1. David Soria Parra
  2. hgmbox

Commits

Patrick Mézard  committed afa9505

Fix mercurial prompt() refactoring

Introduiced by mercurial@86b4a9b0ddda

  • Participants
  • Parent commits 0f52190
  • Branches default

Comments (0)

Files changed (1)

File mbox.py

View file
         while 1:
             allowed = _('[Nydq?]')
             choices = [_('&No'), _('&Yes'), _('&Done'), _('&Quit'), _('&?')]
-            r = ui.prompt(_('import this group? %s ') % allowed, 
-                          choices, default=_('n')) or _('n')
-            if r == _('?'):
+            r = ui.promptchoice(_('import this group? %s ') % allowed, choices)
+            if r == 4:
                 doc = gettext(mimport.__doc__)
                 c = doc.find(_('n - skip this patch group'))
                 for l in doc[c:].splitlines():
                     if l:
                         ui.write(l.strip(), '\n')
                 continue
-            elif r == _('y'):
+            elif r == 1:
                 selecteds.append(patches)
-            elif r == _('d'):
+            elif r == 2:
                 stop = True
-            elif r == _('q'):
+            elif r == 3:
                 raise util.Abort(_('user quit'))
             break