Your favorite bug
Steve Borho
steve at borho.org
Sat Feb 21 17:50:22 CST 2009
(sorry in advance if gmail garbles this)
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1235259966 21600
# Node ID 64bc568931c74f7a9c910686427a76def5604f8f
# Parent b8d750daaddeedb0061c48468f07ca4d85d247a9
catch CTRL-D at password prompt
We caught this exception in ui.prompt(), but not here. Without
this, hitting CTRL-D at the password prompt gives a long traceback.
diff -r b8d750daadde -r 64bc568931c7 mercurial/ui.py
--- a/mercurial/ui.py Mon Feb 16 19:35:07 2009 -0600
+++ b/mercurial/ui.py Sat Feb 21 17:46:06 2009 -0600
@@ -439,7 +439,10 @@
def getpass(self, prompt=None, default=None):
if not self.interactive: return default
- return getpass.getpass(prompt or _('password: '))
+ try:
+ return getpass.getpass(prompt or _('password: '))
+ except EOFError:
+ raise util.Abort(_('response expected'))
def status(self, *msg):
if not self.quiet: self.write(*msg)
def warn(self, *msg):
More information about the Mercurial-devel
mailing list