diff easyhg.py @ 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 3b8501070c21
children 19cce6d2c470
line wrap: on
line diff
--- a/easyhg.py	Thu Mar 17 13:45:05 2011 +0000
+++ b/easyhg.py	Thu Mar 17 13:52:57 2011 +0000
@@ -54,7 +54,7 @@
         self.write(msg, ' ', default, "\n")
         return default
     if msg == _('user:'):
-        msg = _('User:')
+        msg = _('Username for remote repository:')
     d = QtGui.QInputDialog()
     d.setInputMode(QtGui.QInputDialog.TextInput)
     d.setTextEchoMode(QtGui.QLineEdit.Normal)
@@ -65,7 +65,7 @@
     ok = d.exec_()
     r = d.textValue()
     if not ok:
-        raise util.Abort(_('response expected'))
+        raise util.Abort(_('username entry cancelled'))
     if not r:
         return default
     return r
@@ -74,7 +74,7 @@
     if not self.interactive():
         return default
     if not prompt or prompt == _('password:'):
-        prompt = _('Password:');
+        prompt = _('Password for remote repository:');
     d = QtGui.QInputDialog()
     d.setInputMode(QtGui.QInputDialog.TextInput)
     d.setTextEchoMode(QtGui.QLineEdit.Password)
@@ -85,8 +85,9 @@
     ok = d.exec_()
     r = d.textValue()
     if not ok:
-        raise util.Abort(_('response expected'))
+        raise util.Abort(_('password entry cancelled'))
     if not r:
         return default
     return r
 
+