changeset 5709:9dc26941020b

ui: allow default when prompting
author Matt Mackall <mpm@selenic.com>
date Thu, 27 Dec 2007 22:49:01 -0600
parents f6bf89722e29
children 026eb80060d8
files mercurial/ui.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Thu Dec 27 22:47:44 2007 -0600
+++ b/mercurial/ui.py	Thu Dec 27 22:49:01 2007 -0600
@@ -415,6 +415,8 @@
         while True:
             try:
                 r = self._readline(msg + ' ')
+                if not r:
+                    return default
                 if not pat or re.match(pat, r, matchflags):
                     return r
                 else: