diff mainwindow.cpp @ 358:ea6f76c0aa76

Make username/password prompts in easyhg.py more helpful; use a distinctive return for cancel in these dialogs, and avoid showing command-failed in the main program when cancelled
author Chris Cannam
date Thu, 17 Mar 2011 13:52:57 +0000
parents 368b96a87c43
children 550650bbb959 4cd753e083cc
line wrap: on
line diff
--- a/mainwindow.cpp	Thu Mar 17 13:45:05 2011 +0000
+++ b/mainwindow.cpp	Thu Mar 17 13:52:57 2011 +0000
@@ -1802,6 +1802,9 @@
         if (output.contains("authorization failed")) {
             reportAuthFailed(output);
             return;
+        } else if (output.contains("entry cancelled")) {
+            // ignore this, user cancelled username or password dialog
+            return;
         } else {
             // Incoming returns non-zero code and no output if the
             // check was successful but there are no changes
@@ -1826,6 +1829,9 @@
         if (output.contains("authorization failed")) {
             reportAuthFailed(output);
             return;
+        } else if (output.contains("entry cancelled")) {
+            // ignore this, user cancelled username or password dialog
+            return;
         }
         break; // go on to default report
     case ACT_PUSH:
@@ -1835,6 +1841,9 @@
         } else if (output.contains("authorization failed")) {
             reportAuthFailed(output);
             return;
+        } else if (output.contains("entry cancelled")) {
+            // ignore this, user cancelled username or password dialog
+            return;
         }
         break; // go on to default report
     case ACT_QUERY_HEADS: