[PATCH 4 of 5] crecord: change help text for the space key dynamically
Jun Wu
quark at fb.com
Mon Nov 28 18:52:08 EST 2016
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1480376249 0
# Mon Nov 28 23:37:29 2016 +0000
# Node ID 799c420180287cbe9bb2626c5c6286444ba695ab
# Parent 527aa5f0098020651d0eb437538ed429380cd1ce
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 799c42018028
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
@@ -949,4 +949,5 @@ class curseschunkselector(object):
def _getstatuslinesegments(self):
"""-> [str]. return segments"""
+ selected = self.currentselecteditem.applied
segments = [
_('Select hunks to record'),
@@ -956,5 +957,5 @@ class curseschunkselector(object):
_('q: abort'),
_('arrow keys: move/expand/collapse'),
- _('space: select'),
+ _('space: deselect') if selected else _('space: select'),
_('?: help'),
]
More information about the Mercurial-devel
mailing list