comparison mercurial/filemerge.py @ 8259:98acfd1d2b08

ui: replace regexp pattern with sequence of choices Use ampersands (&) to delineate the response char in each choice. ui.prompt() responses are now explicitly case insensitive. GUIs that subclass ui can generate dialogs from the full choice names.
author Steve Borho <steve@borho.org>
date Thu, 30 Apr 2009 10:15:32 -0500
parents 46293a0c7e9f
children bb9f13974d8e
comparison
equal deleted inserted replaced
8258:2263c49af028 8259:98acfd1d2b08
141 141
142 if not tool: 142 if not tool:
143 tool = "internal:local" 143 tool = "internal:local"
144 if ui.prompt(_(" no tool found to merge %s\n" 144 if ui.prompt(_(" no tool found to merge %s\n"
145 "keep (l)ocal or take (o)ther?") % fd, 145 "keep (l)ocal or take (o)ther?") % fd,
146 _("[lo]"), _("l")) != _("l"): 146 (_("&Local"), _("&Other")), _("l")) != _("l"):
147 tool = "internal:other" 147 tool = "internal:other"
148 if tool == "internal:local": 148 if tool == "internal:local":
149 return 0 149 return 0
150 if tool == "internal:other": 150 if tool == "internal:other":
151 repo.wwrite(fd, fco.data(), fco.flags()) 151 repo.wwrite(fd, fco.data(), fco.flags())
203 203
204 if not r and _toolbool(ui, tool, "checkchanged"): 204 if not r and _toolbool(ui, tool, "checkchanged"):
205 if filecmp.cmp(repo.wjoin(fd), back): 205 if filecmp.cmp(repo.wjoin(fd), back):
206 if ui.prompt(_(" output file %s appears unchanged\n" 206 if ui.prompt(_(" output file %s appears unchanged\n"
207 "was merge successful (yn)?") % fd, 207 "was merge successful (yn)?") % fd,
208 _("[yn]"), _("n")) != _("y"): 208 (_("&Yes"), _("&No")), _("n")) != _("y"):
209 r = 1 209 r = 1
210 210
211 if _toolbool(ui, tool, "fixeol"): 211 if _toolbool(ui, tool, "fixeol"):
212 _matcheol(repo.wjoin(fd), back) 212 _matcheol(repo.wjoin(fd), back)
213 213