Patchwork [STABLE] record: change wording for record curses interface

login
register
mail settings
Submitter Laurent Charignon
Date April 22, 2015, 10:26 p.m.
Message ID <0594ae7950223b168cec.1429741613@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/8767/
State Accepted
Headers show

Comments

Laurent Charignon - April 22, 2015, 10:26 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1429658443 25200
#      Tue Apr 21 16:20:43 2015 -0700
# Branch stable
# Node ID 0594ae7950223b168cec159ed3df15ee253e4418
# Parent  1f9127c9239b9c39c676bb09752db1e2ca6c26f7
record: change wording for record curses interface

We are using record and crecord in different context, not just for commiting
changes but also reverting and shelving changes. This diff changes the wording
from commiting to confirming changes to avoid confusing the users with what
they are doing.
Matt Mackall - April 23, 2015, 6:08 p.m.
On Wed, 2015-04-22 at 15:26 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1429658443 25200
> #      Tue Apr 21 16:20:43 2015 -0700
> # Branch stable
> # Node ID 0594ae7950223b168cec159ed3df15ee253e4418
> # Parent  1f9127c9239b9c39c676bb09752db1e2ca6c26f7
> record: change wording for record curses interface

Queued for stable, thanks.

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -978,7 +978,7 @@ 
                         "(space/A) toggle hunk/all; (e)dit hunk;",
                         pairname="legend")
             printstring(self.statuswin,
-                        " (f)old/unfold; (c)ommit applied; (q)uit; (?) help "
+                        " (f)old/unfold; (c)onfirm applied; (q)uit; (?) help "
                         "| [X]=hunk applied **=folded",
                         pairname="legend")
         except curses.error:
@@ -1319,7 +1319,8 @@ 
         helptext = """            [press any key to return to the patch-display]
 
 crecord allows you to interactively choose among the changes you have made,
-and commit only those changes you select.  after committing the selected
+and confirm only those changes you select for further processing by the command
+you are running (commit/shelve/revert), after confirming the selected
 changes, the unselected changes are still present in your working copy, so you
 can use crecord multiple times to split large changes into smaller changesets.
 the following are valid keystrokes:
@@ -1335,9 +1336,9 @@ 
                       m : edit / resume editing the commit message
                       e : edit the currently selected hunk
                       a : toggle amend mode (hg rev >= 2.2)
-                      c : commit selected changes
-                      r : review/edit and commit selected changes
-                      q : quit without committing (no changes will be made)
+                      c : confirm selected changes
+                      r : review/edit and confirm selected changes
+                      q : quit without confirming (no changes will be made)
                       ? : help (what you're currently reading)"""
 
         helpwin = curses.newwin(self.yscreensize, 0, 0, 0)
@@ -1375,7 +1376,8 @@ 
         return response
 
     def confirmcommit(self, review=False):
-        "ask for 'y' to be pressed to confirm commit. return True if confirmed."
+        """ask for 'y' to be pressed to confirm selected. return True if
+        confirmed."""
         if review:
             confirmtext = (
 """if you answer yes to the following, the your currently chosen patch chunks
@@ -1386,10 +1388,11 @@ 
 note: don't add/remove lines unless you also modify the range information.
       failing to follow this rule will result in the commit aborting.
 
-are you sure you want to review/edit and commit the selected changes [yn]? """)
+are you sure you want to review/edit and confirm the selected changes [yn]?
+""")
         else:
             confirmtext = (
-                "are you sure you want to commit the selected changes [yn]? ")
+                "are you sure you want to confirm the selected changes [yn]? ")
 
         response = self.confirmationwindow(confirmtext)
         if response is None: