Mercurial > hg
changeset 27145:3a2fd83182fb
histedit: add examples
author | Mathias De Maré <mathias.demare@gmail.com> |
---|---|
date | Wed, 25 Nov 2015 18:26:48 +0100 |
parents | 24440cc7b441 |
children | 88fde8db5307 |
files | hgext/histedit.py |
diffstat | 1 files changed, 50 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Nov 25 18:10:59 2015 +0100 +++ b/hgext/histedit.py Wed Nov 25 18:26:48 2015 +0100 @@ -770,6 +770,56 @@ such ambiguous situation. See :hg:`help revsets` for detail about selecting revisions. + .. container:: verbose + + Examples: + + - A number of changes have been made. + Revision 3 is no longer needed. + + Start history editing from revision 3:: + + hg histedit -r 3 + + An editor opens, containing the list of revisions, + with specific actions specified:: + + pick 5339bf82f0ca 3 Zworgle the foobar + pick 8ef592ce7cc4 4 Bedazzle the zerlog + pick 0a9639fcda9d 5 Morgify the cromulancy + + Additional information about the possible actions + to take appears below the list of revisions. + + To remove revision 3 from the history, + its action (at the beginning of the relevant line) + is changed to 'drop':: + + drop 5339bf82f0ca 3 Zworgle the foobar + pick 8ef592ce7cc4 4 Bedazzle the zerlog + pick 0a9639fcda9d 5 Morgify the cromulancy + + - A number of changes have been made. + Revision 2 and 4 need to be swapped. + + Start history editing from revision 2:: + + hg histedit -r 2 + + An editor opens, containing the list of revisions, + with specific actions specified:: + + pick 252a1af424ad 2 Blorb a morgwazzle + pick 5339bf82f0ca 3 Zworgle the foobar + pick 8ef592ce7cc4 4 Bedazzle the zerlog + + To swap revision 2 and 4, its lines are swapped + in the editor:: + + pick 8ef592ce7cc4 4 Bedazzle the zerlog + pick 5339bf82f0ca 3 Zworgle the foobar + pick 252a1af424ad 2 Blorb a morgwazzle + Returns 0 on success, 1 if user intervention is required (not only for intentional "edit" command, but also for resolving unexpected conflicts).