Re: [PATCH 7 of 8] crecord: change help text for the space key dynamically

2016-11-23 Thread timeless
Jun Wu wrote:
> +_('space: unselect') if selected else _('space: select'),

I favor deselect (13million) over unselect (2.5million) -- numbers from Google.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 7 of 8] crecord: change help text for the space key dynamically

2016-11-23 Thread Jun Wu
# HG changeset patch
# User Jun Wu 
# Date 1479941166 0
#  Wed Nov 23 22:46:06 2016 +
# Node ID 18b6dea42fcdf5922926d6a0ab84f09c0cf5bd1a
# Parent  9e7850a8ae79f7ccf1855a489d42d66dc1d949db
# Available At https://bitbucket.org/quark-zju/hg-draft
#  hg pull https://bitbucket.org/quark-zju/hg-draft -r 18b6dea42fcd
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 "unselect".

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.'),
@@ -955,5 +956,5 @@ class curseschunkselector(object):
 _('q: abort'),
 _('arrow keys: move/expand/collapse'),
-_('space: select'),
+_('space: unselect') if selected else _('space: select'),
 _('?: help'),
 ]
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel