##// END OF EJS Templates
record: use "ui.extractchoices()" to get the list of available responses...
FUJIWARA Katsunori -
r20266:06176632 default
parent child Browse files
Show More
@@ -7,7 +7,7 b''
7
7
8 '''commands to interactively select changes for commit/qrefresh'''
8 '''commands to interactively select changes for commit/qrefresh'''
9
9
10 from mercurial.i18n import gettext, _
10 from mercurial.i18n import _
11 from mercurial import cmdutil, commands, extensions, hg, patch
11 from mercurial import cmdutil, commands, extensions, hg, patch
12 from mercurial import util
12 from mercurial import util
13 import copy, cStringIO, errno, os, re, shutil, tempfile
13 import copy, cStringIO, errno, os, re, shutil, tempfile
@@ -286,21 +286,18 b' def filterpatch(ui, headers):'
286 resps = _('[Ynesfdaq?]'
286 resps = _('[Ynesfdaq?]'
287 '$$ &Yes, record this change'
287 '$$ &Yes, record this change'
288 '$$ &No, skip this change'
288 '$$ &No, skip this change'
289 '$$ &Edit the change manually'
289 '$$ &Edit this change manually'
290 '$$ &Skip remaining changes to this file'
290 '$$ &Skip remaining changes to this file'
291 '$$ Record remaining changes to this &file'
291 '$$ Record remaining changes to this &file'
292 '$$ &Done, skip remaining changes and files'
292 '$$ &Done, skip remaining changes and files'
293 '$$ Record &all changes to all remaining files'
293 '$$ Record &all changes to all remaining files'
294 '$$ &Quit, recording no changes'
294 '$$ &Quit, recording no changes'
295 '$$ &?')
295 '$$ &? (display help)')
296 r = ui.promptchoice("%s %s" % (query, resps))
296 r = ui.promptchoice("%s %s" % (query, resps))
297 ui.write("\n")
297 ui.write("\n")
298 if r == 8: # ?
298 if r == 8: # ?
299 doc = gettext(record.__doc__)
299 for c, t in ui.extractchoices(resps)[1]:
300 c = doc.find('::') + 2
300 ui.write('%s - %s\n' % (c, t.lower()))
301 for l in doc[c:].splitlines():
302 if l.startswith(' '):
303 ui.write(l.strip(), '\n')
304 continue
301 continue
305 elif r == 0: # yes
302 elif r == 0: # yes
306 ret = True
303 ret = True
@@ -673,15 +673,15 b' Help, quit'
673 diff --git a/subdir/f1 b/subdir/f1
673 diff --git a/subdir/f1 b/subdir/f1
674 1 hunks, 1 lines changed
674 1 hunks, 1 lines changed
675 examine changes to 'subdir/f1'? [Ynesfdaq?]
675 examine changes to 'subdir/f1'? [Ynesfdaq?]
676 y - record this change
676 y - yes, record this change
677 n - skip this change
677 n - no, skip this change
678 e - edit this change manually
678 e - edit this change manually
679 s - skip remaining changes to this file
679 s - skip remaining changes to this file
680 f - record remaining changes to this file
680 f - record remaining changes to this file
681 d - done, skip remaining changes and files
681 d - done, skip remaining changes and files
682 a - record all changes to all remaining files
682 a - record all changes to all remaining files
683 q - quit, recording no changes
683 q - quit, recording no changes
684 ? - display help
684 ? - ? (display help)
685 examine changes to 'subdir/f1'? [Ynesfdaq?]
685 examine changes to 'subdir/f1'? [Ynesfdaq?]
686 abort: user quit
686 abort: user quit
687 [255]
687 [255]
General Comments 0
You need to be logged in to leave comments. Login now