Mercurial > hg-stable
changeset 18437:358c23e8f1c6
histedit: record histedit source (issue3681)
Have histedit record the hex of the original changeset as already done by:
- graft
- commit --amend
- rebase
My main motivation for adding this is to prevent the creation of obsolescence cycle
(see issue3681).
Note that commit created during edit are not affected yet.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 16 Jan 2013 19:14:22 +0100 |
parents | b38c10502af9 |
children | 81e77a8820f3 |
files | hgext/histedit.py tests/test-histedit-bookmark-motion.t tests/test-histedit-commute.t tests/test-histedit-drop.t tests/test-histedit-edit.t tests/test-histedit-fold-non-commute.t tests/test-histedit-fold.t tests/test-histedit-no-change.t tests/test-histedit-non-commute.t tests/test-histedit-obsolete.t |
diffstat | 10 files changed, 186 insertions(+), 112 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Jan 16 19:11:06 2013 +0100 +++ b/hgext/histedit.py Wed Jan 16 19:14:22 2013 +0100 @@ -181,12 +181,15 @@ This function ensure we apply the same treatement to all changesets. - No such treatment is done yet. + - Add a 'histedit_source' entry in extra. Note that fold have its own separated logic because its handling is a bit different and not easily factored out of the fold method. """ def commitfunc(**kwargs): + extra = kwargs.get('extra', {}).copy() + extra['histedit_source'] = src.hex() + kwargs['extra'] = extra return repo.commit(**kwargs) return commitfunc @@ -270,7 +273,7 @@ message = first.description() user = commitopts.get('user') date = commitopts.get('date') - extra = first.extra() + extra = commitopts.get('extra') parents = (first.p1().node(), first.p2().node()) new = context.memctx(repo, @@ -348,6 +351,12 @@ commitopts['message'] = newmessage # date commitopts['date'] = max(ctx.date(), oldctx.date()) + extra = ctx.extra().copy() + # histedit_source + # note: ctx is likely a temporary commit but that the best we can do here + # This is sufficient to solve issue3681 anyway + extra['histedit_source'] = '%s,%s' % (ctx.hex(), oldctx.hex()) + commitopts['extra'] = extra n = collapse(repo, ctx, repo[newnode], commitopts) if n is None: return ctx, []
--- a/tests/test-histedit-bookmark-motion.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-bookmark-motion.t Wed Jan 16 19:14:22 2013 +0100 @@ -84,30 +84,30 @@ > pick 652413bf663e 5 f > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: moving bookmarks also-two from 177f92b77385 to d36c0562f908 - histedit: moving bookmarks five from 652413bf663e to 0efacef7cb48 - histedit: moving bookmarks four from e860deea161a to ae467701c500 - histedit: moving bookmarks three from 055a42cdd887 to ae467701c500 - histedit: moving bookmarks two from 177f92b77385 to d36c0562f908 + histedit: moving bookmarks also-two from 177f92b77385 to b346ab9a313d + histedit: moving bookmarks five from 652413bf663e to cacdfd884a93 + histedit: moving bookmarks four from e860deea161a to 59d9f330561f + histedit: moving bookmarks three from 055a42cdd887 to 59d9f330561f + histedit: moving bookmarks two from 177f92b77385 to b346ab9a313d histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-backup.hg (glob) - saved backup bundle to $TESTTMP/r/.hg/strip-backup/34a9919932c1-backup.hg (glob) + saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-backup.hg (glob) $ hg log --graph - @ changeset: 3:0efacef7cb48 + @ changeset: 3:cacdfd884a93 | bookmark: five | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 2:ae467701c500 + o changeset: 2:59d9f330561f | bookmark: four | bookmark: three | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d | - o changeset: 1:d36c0562f908 + o changeset: 1:b346ab9a313d | bookmark: also-two | bookmark: two | user: test @@ -121,11 +121,11 @@ summary: a $ HGEDITOR=cat hg histedit 1 - pick d36c0562f908 1 c - pick ae467701c500 2 d - pick 0efacef7cb48 3 f + pick b346ab9a313d 1 c + pick 59d9f330561f 2 d + pick cacdfd884a93 3 f - # Edit history between d36c0562f908 and 0efacef7cb48 + # Edit history between b346ab9a313d and cacdfd884a93 # # Commands: # p, pick = use commit @@ -136,21 +136,21 @@ # 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat > commands.txt << EOF - > pick d36c0562f908 1 c - > pick 0efacef7cb48 3 f - > pick ae467701c500 2 d + > pick b346ab9a313d 1 c + > pick cacdfd884a93 3 f + > pick 59d9f330561f 2 d > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - histedit: moving bookmarks five from 0efacef7cb48 to 1be9c35b4cb2 - histedit: moving bookmarks four from ae467701c500 to 1be9c35b4cb2 - histedit: moving bookmarks three from ae467701c500 to 1be9c35b4cb2 - saved backup bundle to $TESTTMP/r/.hg/strip-backup/ae467701c500-backup.hg (glob) + histedit: moving bookmarks five from cacdfd884a93 to c04e50810e4b + histedit: moving bookmarks four from 59d9f330561f to c04e50810e4b + histedit: moving bookmarks three from 59d9f330561f to c04e50810e4b + saved backup bundle to $TESTTMP/r/.hg/strip-backup/59d9f330561f-backup.hg (glob) We expect 'five' to stay at tip, since the tipmost bookmark is most likely the useful signal. $ hg log --graph - @ changeset: 3:1be9c35b4cb2 + @ changeset: 3:c04e50810e4b | bookmark: five | bookmark: four | bookmark: three @@ -159,12 +159,12 @@ | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d | - o changeset: 2:7c044e3e33a9 + o changeset: 2:c13eb81022ca | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 1:d36c0562f908 + o changeset: 1:b346ab9a313d | bookmark: also-two | bookmark: two | user: test
--- a/tests/test-histedit-commute.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-commute.t Wed Jan 16 19:14:22 2013 +0100 @@ -94,18 +94,18 @@ log after edit $ hg log --graph - @ changeset: 5:853c68da763f + @ changeset: 5:07114f51870f | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d | - o changeset: 4:26f6a030ae82 + o changeset: 4:8ade9693061e | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 3:b069cc29fb22 + o changeset: 3:d8249471110a | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e @@ -130,9 +130,9 @@ $ cat > $EDITED <<EOF > pick 177f92b77385 c - > pick 853c68da763f d - > pick b069cc29fb22 e - > pick 26f6a030ae82 f + > pick 07114f51870f d + > pick d8249471110a e + > pick 8ade9693061e f > EOF $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle 0 files updated, 0 files merged, 3 files removed, 0 files unresolved @@ -141,18 +141,18 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --graph - @ changeset: 5:652413bf663e + @ changeset: 5:7eca9b5b1148 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 4:e860deea161a + o changeset: 4:915da888f2de | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 3:055a42cdd887 + o changeset: 3:10517e47bbbb | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d @@ -176,9 +176,9 @@ slightly different this time $ cat > $EDITED <<EOF - > pick 055a42cdd887 d - > pick 652413bf663e f - > pick e860deea161a e + > pick 10517e47bbbb d + > pick 7eca9b5b1148 f + > pick 915da888f2de e > pick 177f92b77385 c > EOF $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle @@ -188,23 +188,23 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --graph - @ changeset: 5:99a62755c625 + @ changeset: 5:38b92f448761 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: c | - o changeset: 4:7c6fdd608667 + o changeset: 4:de71b079d9ce | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 3:c4f52e213402 + o changeset: 3:be9ae3a309c6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 2:bfe4a5a76b37 + o changeset: 2:799205341b6b | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d @@ -222,48 +222,48 @@ keep prevents stripping dead revs $ cat > $EDITED <<EOF - > pick bfe4a5a76b37 d - > pick c4f52e213402 f - > pick 99a62755c625 c - > pick 7c6fdd608667 e + > pick 799205341b6b d + > pick be9ae3a309c6 f + > pick 38b92f448761 c + > pick de71b079d9ce e > EOF - $ HGEDITOR="cat \"$EDITED\" > " hg histedit bfe4a5a76b37 --keep 2>&1 | fixbundle + $ HGEDITOR="cat \"$EDITED\" > " hg histedit 799205341b6b --keep 2>&1 | fixbundle 0 files updated, 0 files merged, 2 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --graph > cat > $EDITED <<EOF - > pick 7c6fdd608667 e - > pick 99a62755c625 c + > pick de71b079d9ce e + > pick 38b92f448761 c > EOF - @ changeset: 7:99e266581538 + @ changeset: 7:803ef1c6fcfd | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 6:5ad36efb0653 - | parent: 3:c4f52e213402 + o changeset: 6:ece0b8d93dda + | parent: 3:be9ae3a309c6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: c | - | o changeset: 5:99a62755c625 + | o changeset: 5:38b92f448761 | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: c | | - | o changeset: 4:7c6fdd608667 + | o changeset: 4:de71b079d9ce |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 3:c4f52e213402 + o changeset: 3:be9ae3a309c6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 2:bfe4a5a76b37 + o changeset: 2:799205341b6b | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d @@ -283,34 +283,34 @@ $ hg histedit --commands "$EDITED" --rev -2 2>&1 | fixbundle abort: may not use changesets other than the ones listed $ hg log --graph - @ changeset: 7:99e266581538 + @ changeset: 7:803ef1c6fcfd | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 6:5ad36efb0653 - | parent: 3:c4f52e213402 + o changeset: 6:ece0b8d93dda + | parent: 3:be9ae3a309c6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: c | - | o changeset: 5:99a62755c625 + | o changeset: 5:38b92f448761 | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: c | | - | o changeset: 4:7c6fdd608667 + | o changeset: 4:de71b079d9ce |/ user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e | - o changeset: 3:c4f52e213402 + o changeset: 3:be9ae3a309c6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 2:bfe4a5a76b37 + o changeset: 2:799205341b6b | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d
--- a/tests/test-histedit-drop.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-drop.t Wed Jan 16 19:14:22 2013 +0100 @@ -69,18 +69,18 @@ log after edit $ hg log --graph - @ changeset: 4:708943196e52 + @ changeset: 4:f518305ce889 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d | - o changeset: 3:75cbdffecadb + o changeset: 3:a4f7421b80f7 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 2:493dc0964412 + o changeset: 2:ee283cb5f2d5 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e @@ -96,6 +96,25 @@ summary: a +Check histedit_source + + $ hg log --debug --rev f518305ce889 + changeset: 4:f518305ce889c07cb5bd05522176d75590ef3324 + tag: tip + phase: draft + parent: 3:a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3 + parent: -1:0000000000000000000000000000000000000000 + manifest: 4:d3d4f51c157ff242c32ff745d4799aaa26ccda44 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + files+: d + extra: branch=default + extra: histedit_source=055a42cdd88768532f9cf79daa407fc8d138de9b + description: + d + + + manifest after edit $ hg manifest a
--- a/tests/test-histedit-edit.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-edit.t Wed Jan 16 19:14:22 2013 +0100 @@ -88,13 +88,13 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --graph - @ changeset: 6:bf757c081cd0 + @ changeset: 6:b5f70786f9b0 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 5:d6b15fed32d4 + o changeset: 5:a5e1ba2f7afb | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: foobaz @@ -128,8 +128,26 @@ $ hg cat e a +check histedit_source + + $ hg log --debug --rev 5 + changeset: 5:a5e1ba2f7afb899ef1581cea528fd885d2fca70d + phase: draft + parent: 4:1a60820cd1f6004a362aa622ebc47d59bc48eb34 + parent: -1:0000000000000000000000000000000000000000 + manifest: 5:5ad3be8791f39117565557781f5464363b918a45 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + files: e + extra: branch=default + extra: histedit_source=e860deea161a2f77de56603b340ebbb4536308ae + description: + foobaz + + + $ cat > $EDITED <<EOF - > edit bf757c081cd0 f + > edit b5f70786f9b0 f > EOF $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle 0 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -139,11 +157,13 @@ A f $ HGEDITOR='true' hg histedit --continue 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + saved backup bundle to $TESTTMP/r/.hg/strip-backup/b5f70786f9b0-backup.hg (glob) + $ hg status log after edit $ hg log --limit 1 - changeset: 6:bf757c081cd0 + changeset: 6:a107ee126658 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -160,7 +180,7 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg status $ hg log --limit 1 - changeset: 6:bf757c081cd0 + changeset: 6:1fd3b2fe7754 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 @@ -169,18 +189,18 @@ modify the message $ cat > $EDITED <<EOF - > mess bf757c081cd0 f + > mess 1fd3b2fe7754 f > EOF $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg status $ hg log --limit 1 - changeset: 6:0b16746f8e89 + changeset: 6:5585e802ef99 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 - summary: mess bf757c081cd0 f + summary: mess 1fd3b2fe7754 f rollback should not work after a histedit
--- a/tests/test-histedit-fold-non-commute.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-fold-non-commute.t Wed Jan 16 19:14:22 2013 +0100 @@ -136,13 +136,13 @@ log after edit $ hg log --graph - @ changeset: 5:2696a654c663 + @ changeset: 5:d9cf42e54966 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 4:ec2c1cf833a8 + o changeset: 4:10486af2e984 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d
--- a/tests/test-histedit-fold.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-fold.t Wed Jan 16 19:14:22 2013 +0100 @@ -72,18 +72,18 @@ log after edit $ hg log --graph - @ changeset: 4:82b0c1ff1777 + @ changeset: 4:7e0a290363ed | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: d | - o changeset: 3:150aafb44a91 + o changeset: 3:5e24935bad3d | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: pick e860deea161a e | - o changeset: 2:493dc0964412 + o changeset: 2:ee283cb5f2d5 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: e @@ -108,6 +108,28 @@ e f + +check histedit_source + + $ hg log --debug --rev 3 + changeset: 3:5e24935bad3d5a4486de3b90f233e991465ced72 + phase: draft + parent: 2:ee283cb5f2d5955443f23a27b697a04339e9a39a + parent: -1:0000000000000000000000000000000000000000 + manifest: 3:81eede616954057198ead0b2c73b41d1f392829a + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + files+: c f + extra: branch=default + extra: histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b + description: + pick e860deea161a e + pick 652413bf663e f + fold 177f92b77385 c + pick 055a42cdd887 d + + + $ cd .. folding and creating no new change doesn't break: @@ -258,7 +280,7 @@ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-backup.hg (glob) $ hg log -G - @ changeset: 1:e29e02896e6c + @ changeset: 1:10c647b2cdd5 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 @@ -273,7 +295,7 @@ # HG changeset patch # User test # Date 0 0 - # Node ID e29e02896e6c2b149d2228a0a64b4f3a9a4237f3 + # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 +4 *** @@ -281,7 +303,7 @@ *** +6 - diff -r 0189ba417d34 -r e29e02896e6c file + diff -r 0189ba417d34 -r 10c647b2cdd5 file --- a/file Thu Jan 01 00:00:00 1970 +0000 +++ b/file Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +1,6 @@
--- a/tests/test-histedit-no-change.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-no-change.t Wed Jan 16 19:14:22 2013 +0100 @@ -96,17 +96,19 @@ When you are finished, run hg histedit --continue to resume. $ continueediting true "(leaving commit message unaltered)" % finalize changeset editing (leaving commit message unaltered) - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + check state of working copy $ hg id - 652413bf663e tip + 794fe033d0a0 tip $ graphlog "log after history editing" % log after history editing - @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" + @ 5 794fe033d0a030f8df77c5de945fca35c9181c30 "f" | - o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" + o 4 04d2fab980779f332dec458cc944f28de8b43435 "e" | o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" | @@ -152,12 +154,14 @@ When you are finished, run hg histedit --continue to resume. $ graphlog "log after first edit" % log after first edit - o 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" + @ 6 e5ae3ca2f1ffdbd89ec41ebc273a231f7c3022f2 "d" | - o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" - | - @ 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" - | + | o 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f" + | | + | o 4 e860deea161a2f77de56603b340ebbb4536308ae "e" + | | + | o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d" + |/ o 2 177f92b773850b59254aa5e923436f921b55483b "c" | o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
--- a/tests/test-histedit-non-commute.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-non-commute.t Wed Jan 16 19:14:22 2013 +0100 @@ -174,13 +174,13 @@ log after edit $ hg log --graph - @ changeset: 6:8e082d1a72ea + @ changeset: 6:7efe1373e4bc | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 5:13b04d775b81 + o changeset: 5:e334d87a1e55 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: does not commute with e @@ -255,13 +255,13 @@ post message fix $ hg log --graph - @ changeset: 6:f14da722aa4b + @ changeset: 6:521c4c32c5e2 | tag: tip | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: f | - o changeset: 5:382ff1adf0ed + o changeset: 5:f4f088e8adf6 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: pick 65a9a84f33fd 3 c
--- a/tests/test-histedit-obsolete.t Wed Jan 16 19:11:06 2013 +0100 +++ b/tests/test-histedit-obsolete.t Wed Jan 16 19:14:22 2013 +0100 @@ -66,13 +66,13 @@ > pick 652413bf663e 5 f > EOF $ hg histedit 1 --commands commands.txt --verbose | grep histedit - saved backup bundle to $TESTTMP/base/.hg/strip-backup/34a9919932c1-backup.hg (glob) + saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-backup.hg (glob) $ hg log --graph --hidden - @ 8:0efacef7cb48 f + @ 8:cacdfd884a93 f | - o 7:ae467701c500 d + o 7:59d9f330561f d | - o 6:d36c0562f908 c + o 6:b346ab9a313d c | | x 5:652413bf663e f | | @@ -88,10 +88,10 @@ $ hg debugobsolete d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {'date': '* *', 'user': 'test'} (glob) - 177f92b773850b59254aa5e923436f921b55483b d36c0562f908c692f5204d606d4ff3537d41f1bf 0 {'date': '* *', 'user': 'test'} (glob) - 055a42cdd88768532f9cf79daa407fc8d138de9b ae467701c5006bf21ffcfdb555b3d6b63280b6b7 0 {'date': '* *', 'user': 'test'} (glob) - e860deea161a2f77de56603b340ebbb4536308ae ae467701c5006bf21ffcfdb555b3d6b63280b6b7 0 {'date': '* *', 'user': 'test'} (glob) - 652413bf663ef2a641cab26574e46d5f5a64a55a 0efacef7cb481bf574f69075b82d044fdbe5c20f 0 {'date': '* *', 'user': 'test'} (glob) + 177f92b773850b59254aa5e923436f921b55483b b346ab9a313db8537ecf96fca3ca3ca984ef3bd7 0 {'date': '* *', 'user': 'test'} (glob) + 055a42cdd88768532f9cf79daa407fc8d138de9b 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 {'date': '* *', 'user': 'test'} (glob) + e860deea161a2f77de56603b340ebbb4536308ae 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 {'date': '* *', 'user': 'test'} (glob) + 652413bf663ef2a641cab26574e46d5f5a64a55a cacdfd884a9321ec4e1de275ef3949fa953a1f83 0 {'date': '* *', 'user': 'test'} (glob) Ensure hidden revision does not prevent histedit @@ -100,25 +100,25 @@ create an hidden revision $ cat > commands.txt <<EOF - > pick d36c0562f908 6 c - > drop ae467701c500 7 d - > pick 0efacef7cb48 8 f + > pick b346ab9a313d 6 c + > drop 59d9f330561f 7 d + > pick cacdfd884a93 8 f > EOF $ hg histedit 6 --commands commands.txt 0 files updated, 0 files merged, 3 files removed, 0 files unresolved 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg log --graph - @ 9:7c044e3e33a9 f + @ 9:c13eb81022ca f | - o 6:d36c0562f908 c + o 6:b346ab9a313d c | o 0:cb9a9f314b8b a check hidden revision are ignored (6 have hidden children 7 and 8) $ cat > commands.txt <<EOF - > pick d36c0562f908 6 c - > pick 7c044e3e33a9 8 f + > pick b346ab9a313d 6 c + > pick c13eb81022ca 8 f > EOF $ hg histedit 6 --commands commands.txt 0 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -130,9 +130,9 @@ (not directly related to the test file but doesn't deserve it's own test case) $ hg log -G - @ 9:7c044e3e33a9 f + @ 9:c13eb81022ca f | - o 6:d36c0562f908 c + o 6:b346ab9a313d c | o 0:cb9a9f314b8b a @@ -150,6 +150,6 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg phase --force --draft . $ hg log -r 'children(.)' - 9:7c044e3e33a9 f (no-eol) + 9:c13eb81022ca f (no-eol) $ hg histedit -r '.' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved