Mercurial > hg
comparison mercurial/crecord.py @ 24840:a5e3634ba024 stable
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.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 21 Apr 2015 16:20:43 -0700 |
parents | 23727465ff72 |
children | d71492ca2fdd 093d38165e5a |
comparison
equal
deleted
inserted
replaced
24839:6e38b6fc4123 | 24840:a5e3634ba024 |
---|---|
976 printstring(self.statuswin, | 976 printstring(self.statuswin, |
977 "SELECT CHUNKS: (j/k/up/dn/pgup/pgdn) move cursor; " | 977 "SELECT CHUNKS: (j/k/up/dn/pgup/pgdn) move cursor; " |
978 "(space/A) toggle hunk/all; (e)dit hunk;", | 978 "(space/A) toggle hunk/all; (e)dit hunk;", |
979 pairname="legend") | 979 pairname="legend") |
980 printstring(self.statuswin, | 980 printstring(self.statuswin, |
981 " (f)old/unfold; (c)ommit applied; (q)uit; (?) help " | 981 " (f)old/unfold; (c)onfirm applied; (q)uit; (?) help " |
982 "| [X]=hunk applied **=folded", | 982 "| [X]=hunk applied **=folded", |
983 pairname="legend") | 983 pairname="legend") |
984 except curses.error: | 984 except curses.error: |
985 pass | 985 pass |
986 | 986 |
1317 def helpwindow(self): | 1317 def helpwindow(self): |
1318 "print a help window to the screen. exit after any keypress." | 1318 "print a help window to the screen. exit after any keypress." |
1319 helptext = """ [press any key to return to the patch-display] | 1319 helptext = """ [press any key to return to the patch-display] |
1320 | 1320 |
1321 crecord allows you to interactively choose among the changes you have made, | 1321 crecord allows you to interactively choose among the changes you have made, |
1322 and commit only those changes you select. after committing the selected | 1322 and confirm only those changes you select for further processing by the command |
1323 you are running (commit/shelve/revert), after confirming the selected | |
1323 changes, the unselected changes are still present in your working copy, so you | 1324 changes, the unselected changes are still present in your working copy, so you |
1324 can use crecord multiple times to split large changes into smaller changesets. | 1325 can use crecord multiple times to split large changes into smaller changesets. |
1325 the following are valid keystrokes: | 1326 the following are valid keystrokes: |
1326 | 1327 |
1327 [space] : (un-)select item ([~]/[x] = partly/fully applied) | 1328 [space] : (un-)select item ([~]/[x] = partly/fully applied) |
1333 f : fold / unfold item, hiding/revealing its children | 1334 f : fold / unfold item, hiding/revealing its children |
1334 f : fold / unfold parent item and all of its ancestors | 1335 f : fold / unfold parent item and all of its ancestors |
1335 m : edit / resume editing the commit message | 1336 m : edit / resume editing the commit message |
1336 e : edit the currently selected hunk | 1337 e : edit the currently selected hunk |
1337 a : toggle amend mode (hg rev >= 2.2) | 1338 a : toggle amend mode (hg rev >= 2.2) |
1338 c : commit selected changes | 1339 c : confirm selected changes |
1339 r : review/edit and commit selected changes | 1340 r : review/edit and confirm selected changes |
1340 q : quit without committing (no changes will be made) | 1341 q : quit without confirming (no changes will be made) |
1341 ? : help (what you're currently reading)""" | 1342 ? : help (what you're currently reading)""" |
1342 | 1343 |
1343 helpwin = curses.newwin(self.yscreensize, 0, 0, 0) | 1344 helpwin = curses.newwin(self.yscreensize, 0, 0, 0) |
1344 helplines = helptext.split("\n") | 1345 helplines = helptext.split("\n") |
1345 helplines = helplines + [" "]*( | 1346 helplines = helplines + [" "]*( |
1373 response = None | 1374 response = None |
1374 | 1375 |
1375 return response | 1376 return response |
1376 | 1377 |
1377 def confirmcommit(self, review=False): | 1378 def confirmcommit(self, review=False): |
1378 "ask for 'y' to be pressed to confirm commit. return True if confirmed." | 1379 """ask for 'y' to be pressed to confirm selected. return True if |
1380 confirmed.""" | |
1379 if review: | 1381 if review: |
1380 confirmtext = ( | 1382 confirmtext = ( |
1381 """if you answer yes to the following, the your currently chosen patch chunks | 1383 """if you answer yes to the following, the your currently chosen patch chunks |
1382 will be loaded into an editor. you may modify the patch from the editor, and | 1384 will be loaded into an editor. you may modify the patch from the editor, and |
1383 save the changes if you wish to change the patch. otherwise, you can just | 1385 save the changes if you wish to change the patch. otherwise, you can just |
1384 close the editor without saving to accept the current patch as-is. | 1386 close the editor without saving to accept the current patch as-is. |
1385 | 1387 |
1386 note: don't add/remove lines unless you also modify the range information. | 1388 note: don't add/remove lines unless you also modify the range information. |
1387 failing to follow this rule will result in the commit aborting. | 1389 failing to follow this rule will result in the commit aborting. |
1388 | 1390 |
1389 are you sure you want to review/edit and commit the selected changes [yn]? """) | 1391 are you sure you want to review/edit and confirm the selected changes [yn]? |
1392 """) | |
1390 else: | 1393 else: |
1391 confirmtext = ( | 1394 confirmtext = ( |
1392 "are you sure you want to commit the selected changes [yn]? ") | 1395 "are you sure you want to confirm the selected changes [yn]? ") |
1393 | 1396 |
1394 response = self.confirmationwindow(confirmtext) | 1397 response = self.confirmationwindow(confirmtext) |
1395 if response is None: | 1398 if response is None: |
1396 response = "n" | 1399 response = "n" |
1397 if response.lower().startswith("y"): | 1400 if response.lower().startswith("y"): |