crecord: change help text for the space key dynamically
A follow-up of the previous patch, to make the text simple and clear about
whether it's to "select" or "deselect".
--- a/mercurial/crecord.py Mon Nov 28 23:33:02 2016 +0000
+++ b/mercurial/crecord.py Mon Nov 28 23:37:29 2016 +0000
@@ -948,6 +948,7 @@
def _getstatuslinesegments(self):
"""-> [str]. return segments"""
+ selected = self.currentselecteditem.applied
segments = [
_('Select hunks to record'),
'-',
@@ -955,7 +956,7 @@
_('c: confirm'),
_('q: abort'),
_('arrow keys: move/expand/collapse'),
- _('space: select'),
+ _('space: deselect') if selected else _('space: select'),
_('?: help'),
]
return segments