##// 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 b' def testchunkselector(testfn, ui, header'
501 break
501 break
502 return chunkselector.opts
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 class curseschunkselector(object):
510 class curseschunkselector(object):
505 def __init__(self, headerlist, ui, operation=None):
511 def __init__(self, headerlist, ui, operation=None):
506 # put the headers into a patch object
512 # put the headers into a patch object
@@ -557,6 +563,8 b' class curseschunkselector(object):'
557 self.waslasttoggleallapplied = True
563 self.waslasttoggleallapplied = True
558
564
559 # affects some ui text
565 # affects some ui text
566 if operation not in _headermessages:
567 raise RuntimeError('unexpected operation: %s' % operation)
560 self.operation = operation
568 self.operation = operation
561
569
562 def uparrowevent(self):
570 def uparrowevent(self):
@@ -950,7 +958,7 b' class curseschunkselector(object):'
950 """-> [str]. return segments"""
958 """-> [str]. return segments"""
951 selected = self.currentselecteditem.applied
959 selected = self.currentselecteditem.applied
952 segments = [
960 segments = [
953 _('Select hunks to record'),
961 _headermessages[self.operation],
954 '-',
962 '-',
955 _('[x]=selected **=collapsed'),
963 _('[x]=selected **=collapsed'),
956 _('c: confirm'),
964 _('c: confirm'),
General Comments 0
You need to be logged in to leave comments. Login now