effetflag: move the flag back with the test of the creation logic
Previous changeset was published by mistake.
Test the 'effect-flags' feature
Global setup
============
$ . $TESTDIR/testlib/common.sh
$ cat >> $HGRCPATH <<EOF
> [ui]
> interactive = true
> [phases]
> publish=False
> [extensions]
> evolve =
> rebase =
> [experimental]
> evolution.effect-flags = 1
> EOF
$ hg init $TESTTMP/effect-flags
$ cd $TESTTMP/effect-flags
$ mkcommit ROOT
amend touching the description only
-----------------------------------
$ mkcommit A0
$ hg amend -m "A1"
check result
$ hg debugobsolete --rev .
471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (*) {'ef1': '1', 'user': 'test'} (glob)
$ hg obslog .
@ fdf9bde5129a (2) A1
|
x 471f378eab4c (1) A0
rewritten(description) by test (*) as fdf9bde5129a (glob)
amend touching the metadata only
--------------------------------
$ mkcommit B0
$ hg amend -u "bob <bob@bob.com>"
check result
$ hg debugobsolete --rev .
ef4a313b1e0ade55718395d80e6b88c5ccd875eb 5485c92d34330dac9d7a63dc07e1e3373835b964 0 (*) {'ef1': '2', 'user': 'test'} (glob)
$ hg obslog .
@ 5485c92d3433 (4) B0
|
x ef4a313b1e0a (3) B0
rewritten(meta) by test (*) as 5485c92d3433 (glob)
rebase (parents change)
-----------------------
$ mkcommit C0
$ mkcommit D0
$ hg rebase -r . -d 'desc(B0)'
rebasing 6:2ee0a31bd600 "D0" (tip)
check result
$ hg debugobsolete --rev .
2ee0a31bd600ca999a5e6e69bfdfde3f9c78a6f9 131ac3eecd92fb2dfd2fc59bb5e0b8efbe9e9201 0 (*) {'ef1': '4', 'user': 'test'} (glob)
$ hg obslog .
@ 131ac3eecd92 (7) D0
|
x 2ee0a31bd600 (6) D0
rewritten(parent) by test (*) as 131ac3eecd92 (glob)
amend touching the diff
-----------------------
$ mkcommit E0
$ echo 42 >> E0
$ hg amend
check result
$ hg debugobsolete --rev .
5734caf1004261ffc2ed05763b82bf9d75ba3788 0 {f75604747b4fd2dfebe7f48c6e629aea15e3b237} (*) {'ef1': '0', 'user': 'test'} (glob)
f75604747b4fd2dfebe7f48c6e629aea15e3b237 bed7e49faeb8ae06649b547a755d50f5bb0be220 0 (*) {'ef1': '8', 'user': 'test'} (glob)
$ hg obslog .
@ bed7e49faeb8 (10) E0
|
x f75604747b4f (8) E0
rewritten(content) by test (*) as bed7e49faeb8 (glob)
amend with multiple effect (desc and meta)
-------------------------------------------
$ mkcommit F0
$ hg amend -m F1 -u "bob <bob@bob.com>"
check result
$ hg debugobsolete --rev .
713ccc39944e10bd35b7f6eaed3eef0eab60e50b 7d0186621c5ba1b0f7c5c99668d43273cb44c2fe 0 (*) {'ef1': '3', 'user': 'test'} (glob)
$ hg obslog .
@ 7d0186621c5b (12) F1
|
x 713ccc39944e (11) F0
rewritten(description, meta) by test (*) as 7d0186621c5b (glob)