hgext3rd/evolve/cmdrewrite.py
changeset 4108 ef3c9ecb8099
parent 4052 73e73471d6c6
child 4126 099e264bf3be
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Sep 04 19:30:19 2018 +0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Thu Sep 13 00:04:17 2018 +0800
@@ -186,7 +186,6 @@
         lockmod.release(lock, wlock)
 
 def _editandapply(ui, repo, pats, old, p1, fp, diffopts):
-    RETRYCHOICE = _('try to fix the patch (yn)?$$ &Yes $$ &No')
     newnode = None
     while newnode is None:
         fp.seek(0)
@@ -220,7 +219,8 @@
             defaultchoice = 0 # yes
             if not ui.interactive:
                 defaultchoice = 1 # no
-            if ui.promptchoice(RETRYCHOICE, default=defaultchoice):
+            retrychoice = _('try to fix the patch (yn)?$$ &Yes $$ &No')
+            if ui.promptchoice(retrychoice, default=defaultchoice):
                 raise error.Abort(_("Could not apply amended path"))
             else:
                 # consider a third choice where we restore the original patch