Mercurial > public > mercurial-scm > hg
diff mercurial/patch.py @ 32068:51fdedd29b0a stable
record: update help message to use operation instead of "record" (issue5432)
Update the hunk selector help message to use the operation name instead
of using "record" for all operations. Extract the help message in the same way
as other single and multiple message line.
Update tests to make sure that both "revert" and "discard" variants are tested.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 24 Apr 2017 17:13:24 +0200 |
parents | fde4822b0102 |
children | e62cf13e0858 |
line wrap: on
line diff
--- a/mercurial/patch.py Mon Apr 24 14:38:30 2017 -0400 +++ b/mercurial/patch.py Mon Apr 24 17:13:24 2017 +0200 @@ -992,6 +992,38 @@ 'record': _("record this change to '%s'?"), 'revert': _("revert this change to '%s'?"), }[operation], + 'help': { + 'discard': _('[Ynesfdaq?]' + '$$ &Yes, discard this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Discard remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Discard &all changes to all remaining files' + '$$ &Quit, discarding no changes' + '$$ &? (display help)'), + 'record': _('[Ynesfdaq?]' + '$$ &Yes, record this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Record remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Record &all changes to all remaining files' + '$$ &Quit, recording no changes' + '$$ &? (display help)'), + 'revert': _('[Ynesfdaq?]' + '$$ &Yes, revert this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Revert remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Revert &all changes to all remaining files' + '$$ &Quit, reverting no changes' + '$$ &? (display help)') + }[operation] } def prompt(skipfile, skipall, query, chunk): @@ -1010,16 +1042,7 @@ if skipfile is not None: return skipfile, skipfile, skipall, newpatches while True: - resps = _('[Ynesfdaq?]' - '$$ &Yes, record this change' - '$$ &No, skip this change' - '$$ &Edit this change manually' - '$$ &Skip remaining changes to this file' - '$$ Record remaining changes to this &file' - '$$ &Done, skip remaining changes and files' - '$$ Record &all changes to all remaining files' - '$$ &Quit, recording no changes' - '$$ &? (display help)') + resps = messages['help'] r = ui.promptchoice("%s %s" % (query, resps)) ui.write("\n") if r == 8: # ?