changeset 37:46260ce88b71

Version 0.5.4. Offer to retry merge directly after failed merge attempt.
author Jari Korhonen <jtkorhonen@gmail.com>
date Sat, 19 Jun 2010 13:10:06 +0300 (2010-06-19)
parents 5986d0758069
children 4c42d3f5065d
files common.h mainwindow.cpp
diffstat 2 files changed, 22 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Sat Jun 19 03:10:51 2010 +0300
+++ b/common.h	Sat Jun 19 13:10:06 2010 +0300
@@ -8,7 +8,7 @@
 #include <QtCore>
 
 #define APPNAME                         "HgExplorer"
-#define APPVERSION                      "0.5.3"
+#define APPVERSION                      "0.5.4"
 #define MY_ICON_SIZE                    32
 #define REPOMENU_TITLE                  "Repository actions"
 #define WORKFOLDERMENU_TITLE            "Workfolder actions"
--- a/mainwindow.cpp	Sat Jun 19 03:10:51 2010 +0300
+++ b/mainwindow.cpp	Sat Jun 19 13:10:06 2010 +0300
@@ -907,12 +907,12 @@
                         break;
 
                     case ACT_PULL:
-                        QMessageBox::information(this, "pull", runner -> getStdOut());
+                        QMessageBox::information(this, "Pull", runner -> getStdOut());
                         shouldHgStat = true;
                         break;
 
                     case ACT_PUSH:
-                        QMessageBox::information(this, "push", runner -> getStdOut());
+                        QMessageBox::information(this, "Push", runner -> getStdOut());
                         shouldHgStat = true;
                         break;
 
@@ -922,7 +922,7 @@
                         break;
 
                     case ACT_CLONEFROMREMOTE:
-                        QMessageBox::information(this, "clone", runner -> getStdOut());
+                        QMessageBox::information(this, "Clone", runner -> getStdOut());
                         enableDisableActions();
                         shouldHgStat = true;
                         break;
@@ -960,18 +960,18 @@
                         break;
 
                     case ACT_UPDATE:
-                        QMessageBox::information(this, "update", runner -> getStdOut());
+                        QMessageBox::information(this, tr("Update"), runner -> getStdOut());
                         shouldHgStat = true;
                         break;
 
                     case ACT_MERGE:
-                        QMessageBox::information(this, "merge", runner -> getStdOut());
+                        QMessageBox::information(this, tr("Merge"), runner -> getStdOut());
                         shouldHgStat = true;
                         justMerged = true;
                         break;
 
                     case ACT_RETRY_MERGE:
-                        QMessageBox::information(this, "retry merge", runner -> getStdOut());
+                        QMessageBox::information(this, "Merge retry", runner -> getStdOut());
                         shouldHgStat = true;
                         justMerged = true;
                         break;
@@ -981,6 +981,7 @@
                 }
             }
 
+
             //Typical sequence goes stat -> heads -> parents -> log
             if (runningAction == ACT_STAT)
             {
@@ -997,6 +998,20 @@
                 runningAction = ACT_NONE;
                 hgLog();
             }
+            else if ((runningAction == ACT_MERGE) && (exitCode != 0))
+            {
+                //If we had a failed merge, offer to retry
+                if (QMessageBox::Ok == QMessageBox::information(this, tr("Retry merge ?"), tr("Merge attempt failed. retry ?"), QMessageBox::Ok | QMessageBox::Cancel))
+                {
+                    runningAction = ACT_NONE;
+                    hgRetryMerge();
+                }
+                else
+                {
+                    runningAction = ACT_NONE;
+                    hgStat();
+                }
+            }
             else
             {
                 runningAction = ACT_NONE;