# HG changeset patch # User Jun Wu # Date 2016-11-28 23:37:29 # Node ID 5129ed3c254805be1550a106290fa1fac7903281 # Parent 9b674957e2e44c9e3efbafcaa083e119307dcd5c 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". diff --git a/mercurial/crecord.py b/mercurial/crecord.py --- a/mercurial/crecord.py +++ b/mercurial/crecord.py @@ -948,6 +948,7 @@ class curseschunkselector(object): def _getstatuslinesegments(self): """-> [str]. return segments""" + selected = self.currentselecteditem.applied segments = [ _('Select hunks to record'), '-', @@ -955,7 +956,7 @@ class curseschunkselector(object): _('c: confirm'), _('q: abort'), _('arrow keys: move/expand/collapse'), - _('space: select'), + _('space: deselect') if selected else _('space: select'), _('?: help'), ] return segments