74 # d, drop = remove commit from history |
75 # d, drop = remove commit from history |
75 # f, fold = use commit, but combine it with the one above |
76 # f, fold = use commit, but combine it with the one above |
76 # r, roll = like fold, but discard this commit's description and date |
77 # r, roll = like fold, but discard this commit's description and date |
77 # |
78 # |
78 |
79 |
|
80 |
|
81 test customization of revision summary |
|
82 $ HGEDITOR=cat hg histedit 177f92b77385 \ |
|
83 > --config histedit.summary-template='I am rev {rev} desc {desc} tags {tags}' |
|
84 pick 177f92b77385 I am rev 2 desc c tags |
|
85 pick 055a42cdd887 I am rev 3 desc d tags |
|
86 pick e860deea161a I am rev 4 desc e tags |
|
87 pick 652413bf663e I am rev 5 desc f tags tip |
|
88 |
|
89 # Edit history between 177f92b77385 and 652413bf663e |
|
90 # |
|
91 # Commits are listed from least to most recent |
|
92 # |
|
93 # You can reorder changesets by reordering the lines |
|
94 # |
|
95 # Commands: |
|
96 # |
|
97 # e, edit = use commit, but stop for amending |
|
98 # m, mess = edit commit message without changing commit content |
|
99 # p, pick = use commit |
|
100 # b, base = checkout changeset and apply further changesets from there |
|
101 # d, drop = remove commit from history |
|
102 # f, fold = use commit, but combine it with the one above |
|
103 # r, roll = like fold, but discard this commit's description and date |
|
104 # |
|
105 |
|
106 |
79 edit the history |
107 edit the history |
80 (use a hacky editor to check histedit-last-edit.txt backup) |
108 (use a hacky editor to check histedit-last-edit.txt backup) |
81 |
109 |
82 $ EDITED="$TESTTMP/editedhistory" |
110 $ EDITED="$TESTTMP/editedhistory" |
83 $ cat > $EDITED <<EOF |
111 $ cat > $EDITED <<EOF |
182 user: test |
211 user: test |
183 date: Thu Jan 01 00:00:00 1970 +0000 |
212 date: Thu Jan 01 00:00:00 1970 +0000 |
184 summary: a |
213 summary: a |
185 |
214 |
186 |
215 |
|
216 |
187 slightly different this time |
217 slightly different this time |
188 |
218 |
189 $ hg histedit 177f92b77385 --commands - << EOF 2>&1 | fixbundle |
219 $ hg histedit 177f92b77385 --commands - << EOF 2>&1 | fixbundle |
190 > pick 10517e47bbbb d |
220 > pick 10517e47bbbb d |
191 > pick 7eca9b5b1148 f |
221 > pick 7eca9b5b1148 f |
222 o changeset: 0:cb9a9f314b8b |
252 o changeset: 0:cb9a9f314b8b |
223 user: test |
253 user: test |
224 date: Thu Jan 01 00:00:00 1970 +0000 |
254 date: Thu Jan 01 00:00:00 1970 +0000 |
225 summary: a |
255 summary: a |
226 |
256 |
|
257 |
227 |
258 |
228 keep prevents stripping dead revs |
259 keep prevents stripping dead revs |
229 $ hg histedit 799205341b6b --keep --commands - 2>&1 << EOF | fixbundle |
260 $ hg histedit 799205341b6b --keep --commands - 2>&1 << EOF | fixbundle |
230 > pick 799205341b6b d |
261 > pick 799205341b6b d |
231 > pick be9ae3a309c6 f |
262 > pick be9ae3a309c6 f |
324 o changeset: 0:cb9a9f314b8b |
356 o changeset: 0:cb9a9f314b8b |
325 user: test |
357 user: test |
326 date: Thu Jan 01 00:00:00 1970 +0000 |
358 date: Thu Jan 01 00:00:00 1970 +0000 |
327 summary: a |
359 summary: a |
328 |
360 |
|
361 |
329 Verify that revsetalias entries work with histedit: |
362 Verify that revsetalias entries work with histedit: |
330 $ cat >> $HGRCPATH <<EOF |
363 $ cat >> $HGRCPATH <<EOF |
331 > [revsetalias] |
364 > [revsetalias] |
332 > grandparent(ARG) = p1(p1(ARG)) |
365 > grandparent(ARG) = p1(p1(ARG)) |
333 > EOF |
366 > EOF |
352 # b, base = checkout changeset and apply further changesets from there |
385 # b, base = checkout changeset and apply further changesets from there |
353 # d, drop = remove commit from history |
386 # d, drop = remove commit from history |
354 # f, fold = use commit, but combine it with the one above |
387 # f, fold = use commit, but combine it with the one above |
355 # r, roll = like fold, but discard this commit's description and date |
388 # r, roll = like fold, but discard this commit's description and date |
356 # |
389 # |
|
390 |
357 |
391 |
358 should also work if a commit message is missing |
392 should also work if a commit message is missing |
359 $ BUNDLE="$TESTDIR/missing-comment.hg" |
393 $ BUNDLE="$TESTDIR/missing-comment.hg" |
360 $ hg init missing |
394 $ hg init missing |
361 $ cd missing |
395 $ cd missing |
450 renamed |
486 renamed |
451 |
487 |
452 diff --git a/another-dir/initial-file b/another-dir/renamed-file |
488 diff --git a/another-dir/initial-file b/another-dir/renamed-file |
453 rename from another-dir/initial-file |
489 rename from another-dir/initial-file |
454 rename to another-dir/renamed-file |
490 rename to another-dir/renamed-file |
|
491 |
455 |
492 |
456 $ cd .. |
493 $ cd .. |
457 |
494 |
458 Test that branches are preserved and stays active |
495 Test that branches are preserved and stays active |
459 ------------------------------------------------- |
496 ------------------------------------------------- |