##// END OF EJS Templates
crecord: change the verb according to the operation...
Jun Wu -
r30548:8d9745ff default
parent child Browse files
Show More
@@ -501,6 +501,12 def testchunkselector(testfn, ui, header
501 501 break
502 502 return chunkselector.opts
503 503
504 _headermessages = { # {operation: text}
505 'revert': _('Select hunks to revert'),
506 'discard': _('Select hunks to discard'),
507 None: _('Select hunks to record'),
508 }
509
504 510 class curseschunkselector(object):
505 511 def __init__(self, headerlist, ui, operation=None):
506 512 # put the headers into a patch object
@@ -557,6 +563,8 class curseschunkselector(object):
557 563 self.waslasttoggleallapplied = True
558 564
559 565 # affects some ui text
566 if operation not in _headermessages:
567 raise RuntimeError('unexpected operation: %s' % operation)
560 568 self.operation = operation
561 569
562 570 def uparrowevent(self):
@@ -950,7 +958,7 class curseschunkselector(object):
950 958 """-> [str]. return segments"""
951 959 selected = self.currentselecteditem.applied
952 960 segments = [
953 _('Select hunks to record'),
961 _headermessages[self.operation],
954 962 '-',
955 963 _('[x]=selected **=collapsed'),
956 964 _('c: confirm'),
General Comments 0
You need to be logged in to leave comments. Login now