Mercurial > public > mercurial-scm > hg-stable
diff mercurial/filemerge.py @ 9048:86b4a9b0ddda
ui: extract choice from prompt
avoid translating single characters (as l for _local or sym_link)
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Sun, 21 Jun 2009 01:13:19 +0200 |
parents | 90f74b31ed4f |
children | 38b5d5e0efab |
line wrap: on
line diff
--- a/mercurial/filemerge.py Sun Jul 05 17:09:01 2009 +0200 +++ b/mercurial/filemerge.py Sun Jun 21 01:13:19 2009 +0200 @@ -145,9 +145,9 @@ if not tool or tool == 'internal:prompt': tool = "internal:local" - if ui.prompt(_(" no tool found to merge %s\n" + if ui.promptchoice(_(" no tool found to merge %s\n" "keep (l)ocal or take (o)ther?") % fd, - (_("&Local"), _("&Other")), _("l")) != _("l"): + (_("&Local"), _("&Other")), 0): tool = "internal:other" if tool == "internal:local": return 0 @@ -213,9 +213,9 @@ if not r and _toolbool(ui, tool, "checkchanged"): if filecmp.cmp(repo.wjoin(fd), back): - if ui.prompt(_(" output file %s appears unchanged\n" + if ui.promptchoice(_(" output file %s appears unchanged\n" "was merge successful (yn)?") % fd, - (_("&Yes"), _("&No")), _("n")) != _("y"): + (_("&Yes"), _("&No")), 1): r = 1 if _toolbool(ui, tool, "fixeol"):