From 2815d67f417722c27f7670cd710e5b8eab74ba70 Mon Sep 17 00:00:00 2001 From: Mark Thomas Date: Thu, 16 Jan 2020 01:01:10 -0800 Subject: [PATCH] mutation: update amend tests to use mutation and visibility Summary: Update all amend tests to use mutation and visibility. For these tests, `mutation.record` is disabled so that hashes do not change. Most tests pass as-is. A few tests have changes which are the results of slight behavioural changes or bug-fixes compared with obsmarkers. Reviewed By: quark-zju Differential Revision: D19413580 fbshipit-source-id: 18696a08db69130b08f829366659783df4c9bcc1 --- eden/scm/tests/test-amend-fold.t | 8 +- eden/scm/tests/test-amend-hiddenoverride.t | 217 ------------------ eden/scm/tests/test-amend-hide-t.py | 6 +- eden/scm/tests/test-amend-metaedit.t | 7 +- eden/scm/tests/test-amend-next.t | 2 +- eden/scm/tests/test-amend-noinhibit-t.py | 7 +- eden/scm/tests/test-amend-previous.t | 11 +- eden/scm/tests/test-amend-rebase-t.py | 9 +- eden/scm/tests/test-amend-restack-auto.t | 10 +- .../scm/tests/test-amend-restack-divergence.t | 8 +- eden/scm/tests/test-amend-restack-multidest.t | 48 +--- eden/scm/tests/test-amend-restack-obsolete.t | 22 +- eden/scm/tests/test-amend-restack-t.py | 3 +- eden/scm/tests/test-amend-split.t | 27 +-- eden/scm/tests/test-amend-template-t.py | 7 +- eden/scm/tests/test-amend-to.t | 10 +- eden/scm/tests/test-amend-userestack.t | 22 +- eden/scm/tests/test-amend.t | 20 +- .../tests/test-commit-amend-reuse-rawfctx.t | 2 +- eden/scm/tests/test-commit-amend.t | 1 + eden/scm/tests/test-treemanifest-amend.t | 4 +- eden/scm/tests/tinit.sh | 12 +- 22 files changed, 97 insertions(+), 366 deletions(-) delete mode 100644 eden/scm/tests/test-amend-hiddenoverride.t diff --git a/eden/scm/tests/test-amend-fold.t b/eden/scm/tests/test-amend-fold.t index 5d16416661..8dae067070 100644 --- a/eden/scm/tests/test-amend-fold.t +++ b/eden/scm/tests/test-amend-fold.t @@ -1,13 +1,7 @@ #chg-compatible Set up test environment. - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > rebase= - > [experimental] - > evolution = createmarkers, allowunstable - > EOF + $ enable mutation-norecord amend rebase $ reset() { > cd .. > rm -rf repo diff --git a/eden/scm/tests/test-amend-hiddenoverride.t b/eden/scm/tests/test-amend-hiddenoverride.t deleted file mode 100644 index 7c260fca8c..0000000000 --- a/eden/scm/tests/test-amend-hiddenoverride.t +++ /dev/null @@ -1,217 +0,0 @@ -#chg-compatible - - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > [experimental] - > evolution = all - > EOF - - $ hg init - $ drawdag <<'EOS' - > B C # amend: B -> C - > |/ - > A - > EOS - - $ hg log -G -T '{rev} {desc}\n' - o 2 C - | - o 0 A - - $ hg log -G -T '{rev} {desc}\n' --hidden - o 2 C - | - | x 1 B - |/ - o 0 A - -Changing working copy parent pins a node - - $ hg update 1 --hidden -q - $ hg update 0 -q - $ hg log -G -T '{rev} {desc}\n' - o 2 C - | - | x 1 B - |/ - @ 0 A - -Strip/prune unpins a node - - $ hg prune 1 -q - hint[strip-hide]: 'hg strip' may be deprecated in the future - use 'hg hide' instead - hint[hint-ack]: use 'hg hint --ack strip-hide' to silence these hints - $ hg log -G -T '{rev} {desc}\n' - o 2 C - | - @ 0 A - -Bookmark pins nodes even after removed - - $ hg bookmark -ir 1 BOOK --hidden -q - $ hg bookmark -d BOOK -q - $ hg log -G -T '{rev} {desc}\n' - o 2 C - | - | x 1 B - |/ - @ 0 A - -Check blackbox logs - - $ hg blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":["or","command","command_finish","pinnednodes"]}}' - [legacy][command] debugdrawdag - [legacy][pinnednodes] pinnednodes: ['debugdrawdag'] newpin=['112478962961'] newunpin=['112478962961'] before=[] after=[] - [legacy][command_finish] debugdrawdag exited 0 after 0.00 seconds - [legacy][command] bookmarks -T '{bookmark}={node}\n' - [legacy][command_finish] bookmarks -T '{bookmark}={node}\n' exited 0 after 0.00 seconds - [legacy][command] book -T '{bookmark} ' - [legacy][command_finish] book -T '{bookmark} ' exited 0 after 0.00 seconds - [legacy][command] book -fd A B C - [legacy][command_finish] book -fd A B C exited 0 after 0.00 seconds - [legacy][command] log -G -T '{rev} {desc}\n' - [legacy][command_finish] log -G -T '{rev} {desc}\n' exited 0 after 0.00 seconds - [legacy][command] log -G -T '{rev} {desc}\n' --hidden - [legacy][command_finish] log -G -T '{rev} {desc}\n' --hidden exited 0 after 0.00 seconds - [legacy][command] update 1 --hidden -q - [legacy][pinnednodes] pinnednodes: ['update', '1', '--hidden', '-q'] newpin=['112478962961'] newunpin=[] before=[] after=['112478962961'] - [legacy][command_finish] update 1 --hidden -q exited 0 after 0.00 seconds - [legacy][command] update 0 -q - [legacy][command_finish] update 0 -q exited 0 after 0.00 seconds - [legacy][command] log -G -T '{rev} {desc}\n' - [legacy][command_finish] log -G -T '{rev} {desc}\n' exited 0 after 0.00 seconds - [legacy][command] prune 1 -q - [legacy][pinnednodes] pinnednodes: ['prune', '1', '-q'] newpin=[] newunpin=['112478962961'] before=['112478962961'] after=[] - [legacy][command_finish] prune 1 -q exited 0 after 0.00 seconds - [legacy][command] log -G -T '{rev} {desc}\n' - [legacy][command_finish] log -G -T '{rev} {desc}\n' exited 0 after 0.00 seconds - [legacy][command] bookmark -ir 1 BOOK --hidden -q - [legacy][pinnednodes] pinnednodes: ['bookmark', '-ir', '1', 'BOOK', '--hidden', '-q'] newpin=['112478962961'] newunpin=[] before=[] after=['112478962961'] - [legacy][command_finish] bookmark -ir 1 BOOK --hidden -q exited 0 after 0.00 seconds - [legacy][command] bookmark -d BOOK -q - [legacy][command_finish] bookmark -d BOOK -q exited 0 after 0.00 seconds - [legacy][command] log -G -T '{rev} {desc}\n' - [legacy][command_finish] log -G -T '{rev} {desc}\n' exited 0 after 0.00 seconds - [legacy][command] blackbox --no-timestamp --no-sid --pattern '{"legacy_log":{"service":["or","command","command_finish","pinnednodes"]}}' - -The order matters - putting bookmarks or moving working copy on non-obsoleted -commits do not pin them. Test this using "debugobsolete" which will not call -"createmarkers". - -Obsolete working copy, and move working copy away should make things disappear - - $ rm -rf .hg && hg init && drawdag <<'EOS' - > C E - > | | - > B D - > |/ - > A - > EOS - - $ hg up -q $E - $ hg debugobsolete `HGPLAIN=1 hg log -r $E -T '{node}'` - obsoleted 1 changesets - $ hg log -G -T '{rev} {desc}\n' - @ 4 E - | - | o 3 C - | | - o | 2 D - | | - | o 1 B - |/ - o 0 A - - $ hg debugobsolete `HGPLAIN=1 hg log -r $D -T '{node}'` - obsoleted 1 changesets - $ hg log -G -T '{rev} {desc}\n' - @ 4 E - | - | o 3 C - | | - x | 2 D - | | - | o 1 B - |/ - o 0 A - - $ hg update -q $C - $ hg log -G -T '{rev} {desc}\n' - @ 3 C - | - o 1 B - | - o 0 A - -Having a bookmark on a commit, obsolete the commit, remove the bookmark - - $ rm -rf .hg && hg init && drawdag <<'EOS' - > C E - > | | - > B D - > |/ - > A - > EOS - - $ hg bookmark -i book-e -r $E - $ hg debugobsolete `HGPLAIN=1 hg log -r $D -T '{node}'` - obsoleted 1 changesets - $ hg debugobsolete `HGPLAIN=1 hg log -r $E -T '{node}'` - obsoleted 1 changesets - $ hg log -G -T '{rev} {desc} {bookmarks}\n' - x 4 E book-e - | - | o 3 C - | | - x | 2 D - | | - | o 1 B - |/ - o 0 A - - $ hg bookmark -d book-e - $ hg log -G -T '{rev} {desc} {bookmarks}\n' - o 3 C - | - o 1 B - | - o 0 A - -Uncommit and hiddenoverride. This is uncommon but the last uncommit should make -"A" invisible: - - $ newrepo - $ drawdag <<'EOS' - > B - > | - > A - > | - > Z - > EOS - - $ hg up $A - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg uncommit - $ hg log -T '{desc}' -G - o B - | - x A - | - @ Z - - $ hg up -C $B - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ hg uncommit - $ hg log -T '{desc}' -G - @ A - | - o Z - - $ hg up -C . - 0 files updated, 0 files merged, 0 files removed, 0 files unresolved - - $ hg uncommit - $ hg log -T '{desc}' -G - @ Z - diff --git a/eden/scm/tests/test-amend-hide-t.py b/eden/scm/tests/test-amend-hide-t.py index 90c0378ba5..9869bf536c 100644 --- a/eden/scm/tests/test-amend-hide-t.py +++ b/eden/scm/tests/test-amend-hide-t.py @@ -13,7 +13,11 @@ sh % "cat" << r""" amend= undo = [experimental] -evolution = createmarkers, allowunstable +evolution = obsolete +[mutation] +enabled = true +[visibility] +enabled = true """ >> "$HGRCPATH" # Create repo diff --git a/eden/scm/tests/test-amend-metaedit.t b/eden/scm/tests/test-amend-metaedit.t index 4b24632d91..354b631b99 100644 --- a/eden/scm/tests/test-amend-metaedit.t +++ b/eden/scm/tests/test-amend-metaedit.t @@ -18,7 +18,12 @@ > amend= > rebase= > [experimental] - > evolution=createmarkers, allowunstable + > evolution=obsolete + > [mutation] + > enabled=true + > record=false + > [visibility] + > enabled=true > EOF $ mkcommit() { > echo "$1" > "$1" diff --git a/eden/scm/tests/test-amend-next.t b/eden/scm/tests/test-amend-next.t index c96654277f..058e6d3ad8 100644 --- a/eden/scm/tests/test-amend-next.t +++ b/eden/scm/tests/test-amend-next.t @@ -1,7 +1,7 @@ #chg-compatible Set up test environment. - $ enable amend obsstore rebase + $ enable mutation-norecord amend rebase $ showgraph() { > hg log --graph -T "{rev} {bookmarks} {desc|firstline}" | sed \$d > } diff --git a/eden/scm/tests/test-amend-noinhibit-t.py b/eden/scm/tests/test-amend-noinhibit-t.py index f203288f8d..2306c15dc6 100644 --- a/eden/scm/tests/test-amend-noinhibit-t.py +++ b/eden/scm/tests/test-amend-noinhibit-t.py @@ -14,7 +14,12 @@ sh % "cat" << r""" amend= rebase= [experimental] -evolution = createmarkers +evolution = obsolete +[mutation] +enabled=true +record=false +[visibility] +enabled=true """ >> "$HGRCPATH" sh % "hg init repo" sh % "cd repo" diff --git a/eden/scm/tests/test-amend-previous.t b/eden/scm/tests/test-amend-previous.t index e7ffdb5fd4..9042e61bbd 100644 --- a/eden/scm/tests/test-amend-previous.t +++ b/eden/scm/tests/test-amend-previous.t @@ -1,15 +1,8 @@ #chg-compatible Set up test environment. - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > rebase= - > [experimental] - > evolution = createmarkers - > [ui] - > disallowemptyupdate = True - > EOF + $ enable mutation-norecord amend rebase + $ setconfig ui.disallowemptyupdate=true $ hg init amendprevious && cd amendprevious Check help text for new options and removal of unsupported options. diff --git a/eden/scm/tests/test-amend-rebase-t.py b/eden/scm/tests/test-amend-rebase-t.py index 233b99d4c0..41b8dc5910 100644 --- a/eden/scm/tests/test-amend-rebase-t.py +++ b/eden/scm/tests/test-amend-rebase-t.py @@ -14,10 +14,15 @@ sh % "cat" << r""" amend= rebase= [experimental] -evolution = createmarkers, allowunstable +evolution = obsolete +[mutation] +enabled=true +record=false +[visibility] +enabled=true """ >> "$HGRCPATH" -# Test that rebased commits that would cause instability are inhibited. +# Test that rebases that cause an orphan commit are not a problem. sh % "hg init repo" sh % "cd repo" sh % "hg debugbuilddag -m '+3 *3'" diff --git a/eden/scm/tests/test-amend-restack-auto.t b/eden/scm/tests/test-amend-restack-auto.t index 9ae59d9261..2c8eb673d9 100644 --- a/eden/scm/tests/test-amend-restack-auto.t +++ b/eden/scm/tests/test-amend-restack-auto.t @@ -1,11 +1,9 @@ #chg-compatible $ . helpers-usechg.sh - $ enable amend rebase + $ enable mutation-norecord amend rebase $ setconfig rebase.experimental.inmemory=True $ setconfig rebase.singletransaction=True - $ setconfig experimental.evolution.allowdivergence=True - $ setconfig experimental.evolution="createmarkers, allowunstable" $ mkcommit() { > echo "$1" > "$1" > hg add "$1" @@ -310,12 +308,6 @@ Test rebasing children with obsolete children themselves needing a restack. | @ 6 21006be03678 A | - | x 3 b45c90359798 C - | | - | x 2 917a077edb8d B - | | - | x 1 ac2f7407182b A - |/ o 0 48b9aae0607f Z Test not rebasing unrelated changes. When rebasing X, only X:: are expected to be rebased. diff --git a/eden/scm/tests/test-amend-restack-divergence.t b/eden/scm/tests/test-amend-restack-divergence.t index 57f2ce94ba..aa0dbe040d 100644 --- a/eden/scm/tests/test-amend-restack-divergence.t +++ b/eden/scm/tests/test-amend-restack-divergence.t @@ -2,9 +2,7 @@ $ . helpers-usechg.sh - $ enable amend rebase - $ setconfig experimental.evolution.allowdivergence=True - $ setconfig experimental.evolution="createmarkers, allowunstable" + $ enable mutation-norecord amend rebase $ mkcommit() { > echo "$1" > "$1" > hg add "$1" @@ -50,8 +48,6 @@ onto the newest successor of their parent. | | o 3 f60c1f15a70e successor 1 |/ - | x 1 7c3bad9141dc add b - |/ o 0 1f0dee641bb7 add a Test situation with divergence due to an unamend. This should actually succeed @@ -99,6 +95,6 @@ since the successor is obsolete. | | o 2 4538525df7e2 add c | | - | o 1 7c3bad9141dc add b + | x 1 7c3bad9141dc add b |/ o 0 1f0dee641bb7 add a diff --git a/eden/scm/tests/test-amend-restack-multidest.t b/eden/scm/tests/test-amend-restack-multidest.t index 27845ccfbf..bf2cfe851a 100644 --- a/eden/scm/tests/test-amend-restack-multidest.t +++ b/eden/scm/tests/test-amend-restack-multidest.t @@ -2,9 +2,7 @@ $ . helpers-usechg.sh - $ enable amend rebase - $ setconfig experimental.evolution.allowdivergence=True - $ setconfig experimental.evolution="createmarkers, allowunstable" + $ enable mutation-norecord amend rebase $ mkcommit() { > echo "$1" > "$1" > hg add "$1" @@ -92,11 +90,11 @@ Restack will only restack the "current" stack and leave other stacks untouched. | | | | o 13 5cb8c357af9e D | | | - o | | 9 a975bfef72d2 L + o | | 12 a975bfef72d2 L | | | - | o | 7 889f49cd29f6 G + | o | 9 889f49cd29f6 G | | | - | | o 5 dc0947a82db8 C + | | o 7 dc0947a82db8 C | | | | | | o 3 48b9aae0607f Z | | | @@ -106,42 +104,6 @@ Restack will only restack the "current" stack and leave other stacks untouched. / o 0 426bada5c675 A -The "prune" cases. - - $ newrepo - $ drawdag<<'EOS' - > D E - > |/ - > C - > | # amend: F -> F2 - > B G H # prune: A, C, F2 - > | |/ - > A F F2 - > EOS - - $ hg update -q $B - $ hg rebase --restack - rebasing 112478962961 "B" - rebasing f585351a92f8 "D" - rebasing 78d2dca436b2 "E" - - $ hg update -q $H - $ hg rebase --restack - rebasing 8fdb2c1feb20 "G" - rebasing 02ac06fe83b9 "H" - - $ showgraph - @ 13 3e1fefc3c8db H - - o 12 0706cfb95b41 G - - o 11 8c0ccd1582b3 E - | - | o 10 f88ac1d7b477 D - |/ - o 9 653ee58caf75 B - - Restack could resume after resolving merge conflicts. @@ -191,7 +153,7 @@ Restack could resume after resolving merge conflicts. | | o | 4 7fb047a69f22 E | | - | o 2 dc0947a82db8 C + | o 3 dc0947a82db8 C |/ o 0 426bada5c675 A diff --git a/eden/scm/tests/test-amend-restack-obsolete.t b/eden/scm/tests/test-amend-restack-obsolete.t index bb925e2002..1a72a0ee45 100644 --- a/eden/scm/tests/test-amend-restack-obsolete.t +++ b/eden/scm/tests/test-amend-restack-obsolete.t @@ -1,11 +1,9 @@ #chg-compatible $ . helpers-usechg.sh - $ enable amend rebase + $ enable mutation-norecord amend rebase $ setconfig rebase.experimental.inmemory=True $ setconfig rebase.singletransaction=True - $ setconfig experimental.evolution.allowdivergence=True - $ setconfig experimental.evolution="createmarkers, allowunstable" $ setconfig amend.autorestack=no-conflict $ mkcommit() { > echo "$1" > "$1" @@ -30,13 +28,13 @@ Test invalid value for amend.autorestack $ showgraph o 5 3c36beb5705f D | - x 4 07863d11c289 C_old - | - | o 3 26805aba1e60 C + | o 4 26805aba1e60 C | | - x | 2 3326d5194fc9 B_old + x | 3 07863d11c289 C_old | | - | @ 1 112478962961 B + | @ 2 112478962961 B + | | + x | 1 3326d5194fc9 B_old |/ o 0 426bada5c675 A $ hg amend -m "B'" @@ -49,9 +47,9 @@ Test invalid value for amend.autorestack | | o 5 3c36beb5705f D | | - | x 4 07863d11c289 C_old + | x 3 07863d11c289 C_old | | - | x 2 3326d5194fc9 B_old + | x 1 3326d5194fc9 B_old |/ o 0 426bada5c675 A $ hg rebase --restack @@ -63,8 +61,4 @@ Test invalid value for amend.autorestack | @ 6 180681c3ccd0 B' | - | x 4 07863d11c289 C_old - | | - | x 2 3326d5194fc9 B_old - |/ o 0 426bada5c675 A diff --git a/eden/scm/tests/test-amend-restack-t.py b/eden/scm/tests/test-amend-restack-t.py index c642170616..2e0b4a7b6d 100644 --- a/eden/scm/tests/test-amend-restack-t.py +++ b/eden/scm/tests/test-amend-restack-t.py @@ -22,8 +22,7 @@ shlib.mkcommit = mkcommit sh % "enable amend rebase remotenames" -sh % "setconfig experimental.evolution.allowdivergence=True experimental.narrow-heads=True" -sh % 'setconfig "experimental.evolution=createmarkers, allowunstable"' +sh % "setconfig experimental.narrow-heads=True" sh % "setconfig visibility.enabled=true mutation.record=true mutation.enabled=true mutation.date='0 0' experimental.evolution= remotenames.rename.default=remote" sh % "hg init restack" sh % "cd restack" diff --git a/eden/scm/tests/test-amend-split.t b/eden/scm/tests/test-amend-split.t index f5422008cf..b52cbe7400 100644 --- a/eden/scm/tests/test-amend-split.t +++ b/eden/scm/tests/test-amend-split.t @@ -1,19 +1,8 @@ #chg-compatible Set up test environment. - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > rebase= - > [experimental] - > evolution = createmarkers, allowunstable - > [ui] - > interactive = true - > [amend] - > safestrip = false - > [hint] - > ack-hint-ack = true - > EOF + $ enable mutation-norecord amend rebase + $ setconfig ui.interactive=true amend.safestrip=false hint.ack-hint-ack=true $ mkcommit() { > echo "${1}1" > "${1}1" > echo "${1}2" > "${1}2" @@ -238,10 +227,6 @@ Split using revset. o 12 a265b3c6c419 add a1 and a2 | o 11 5a5595e342b1 add a1 and a2 - - o 10 bd98a3c83a29 add d1 and d2 - | - x 0 c20cc4d302fc add a1 and a2 Test that command aborts when given multiple commits. $ hg split 11 12 @@ -274,10 +259,6 @@ Test --no-rebase flag. o 12 a265b3c6c419 add a1 and a2 | o 11 5a5595e342b1 add a1 and a2 - - o 10 bd98a3c83a29 add d1 and d2 - | - x 0 c20cc4d302fc add a1 and a2 $ hg split --no-rebase << EOF > y > y @@ -323,10 +304,6 @@ Test --no-rebase flag. o 12 a265b3c6c419 add a1 and a2 | o 11 5a5595e342b1 add a1 and a2 - - o 10 bd98a3c83a29 add d1 and d2 - | - x 0 c20cc4d302fc add a1 and a2 Test that bookmarks are correctly moved. $ reset diff --git a/eden/scm/tests/test-amend-template-t.py b/eden/scm/tests/test-amend-template-t.py index 78f071be33..a6efbb29be 100644 --- a/eden/scm/tests/test-amend-template-t.py +++ b/eden/scm/tests/test-amend-template-t.py @@ -13,7 +13,12 @@ sh % "cat" << r""" amend= rebase= [experimental] -evolution = createmarkers, allowunstable +evolution = obsolete +[mutation] +enabled=true +record=false +[visibility] +enabled=true """ >> "$HGRCPATH" sh % "hg init repo" diff --git a/eden/scm/tests/test-amend-to.t b/eden/scm/tests/test-amend-to.t index e7f7712200..4237300c69 100644 --- a/eden/scm/tests/test-amend-to.t +++ b/eden/scm/tests/test-amend-to.t @@ -1,15 +1,7 @@ #chg-compatible Set up test environment. - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > directaccess= - > histedit= - > rebase= - > [experimental] - > evolution = createmarkers, allowunstable - > EOF + $ enable mutation-norecord amend directaccess histedit rebase Test that amend --to option $ hg init repo && cd repo $ mkcommit() { diff --git a/eden/scm/tests/test-amend-userestack.t b/eden/scm/tests/test-amend-userestack.t index ee64566ab4..fb0db65380 100644 --- a/eden/scm/tests/test-amend-userestack.t +++ b/eden/scm/tests/test-amend-userestack.t @@ -1,14 +1,8 @@ #chg-compatible Set up test environment. - $ cat >> $HGRCPATH << EOF - > [extensions] - > amend= - > rebase= - > tweakdefaults= - > [experimental] - > evolution = createmarkers - > EOF + $ enable mutation-norecord amend rebase tweakdefaults + $ setconfig mutation.date="0 0" $ mkcommit() { > echo "$1" > "$1" > hg add "$1" @@ -65,10 +59,14 @@ Test hg amend --fixup. o 0 add a Test that the operation field on the metadata is correctly set. - $ hg debugobsolete - 7c3bad9141dcb46ff89abf5f61856facd56e476c * 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'} (glob) - 4538525df7e2b9f09423636c61ef63a4cb872a2d * 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'rebase', 'user': 'test'} (glob) - 47d2a3944de8b013de3be9578e8e344ea2e6c097 * 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'rebase', 'user': 'test'} (glob) + $ hg debugmutation "all()" + * 1f0dee641bb7258c56bd60e93edfa2405381c41e + \* * amend by test at 1970-01-01T00:00:00 from: (glob) + 7c3bad9141dcb46ff89abf5f61856facd56e476c + \* * rebase by test at 1970-01-01T00:00:00 from: (glob) + 4538525df7e2b9f09423636c61ef63a4cb872a2d + \* * rebase by test at 1970-01-01T00:00:00 from: (glob) + 47d2a3944de8b013de3be9578e8e344ea2e6c097 Test hg amend --rebase $ hg amend -m "amended again" --rebase diff --git a/eden/scm/tests/test-amend.t b/eden/scm/tests/test-amend.t index ec62527005..174c22023f 100644 --- a/eden/scm/tests/test-amend.t +++ b/eden/scm/tests/test-amend.t @@ -2,7 +2,7 @@ #chg-compatible -#testcases obsstore-off obsstore-on +#testcases obsstore-off obsstore-on mutation $ cat << EOF >> $HGRCPATH > [extensions] @@ -13,9 +13,13 @@ #if obsstore-on $ setconfig experimental.evolution=createmarkers -#else +#endif +#if obsstore-off $ setconfig experimental.evolution= #endif +#if mutation + $ enable mutation-norecord +#endif Basic amend @@ -188,6 +192,18 @@ Amend in the middle of a stack |/ o 0 426bada5c675 A +#endif +#if mutation + + $ hg log -T '{rev} {node|short} {desc}\n' -G + @ 3 be169c7e8dbe B + | + | o 2 26805aba1e60 C + | | + | x 1 112478962961 B + |/ + o 0 426bada5c675 A + #endif Cannot amend public changeset diff --git a/eden/scm/tests/test-commit-amend-reuse-rawfctx.t b/eden/scm/tests/test-commit-amend-reuse-rawfctx.t index 2686c53024..0ad495803f 100644 --- a/eden/scm/tests/test-commit-amend-reuse-rawfctx.t +++ b/eden/scm/tests/test-commit-amend-reuse-rawfctx.t @@ -1,6 +1,6 @@ #chg-compatible - $ enable obsstore + $ enable mutation-norecord File node could be reused during commit --amend diff --git a/eden/scm/tests/test-commit-amend.t b/eden/scm/tests/test-commit-amend.t index dbd1f6c338..a34e9ee7a5 100644 --- a/eden/scm/tests/test-commit-amend.t +++ b/eden/scm/tests/test-commit-amend.t @@ -1,5 +1,6 @@ #chg-compatible + $ enable mutation-norecord $ setconfig extensions.treemanifest=! $ newrepo $ drawdag << 'EOS' diff --git a/eden/scm/tests/test-treemanifest-amend.t b/eden/scm/tests/test-treemanifest-amend.t index e5d9788b62..97a1deafbd 100644 --- a/eden/scm/tests/test-treemanifest-amend.t +++ b/eden/scm/tests/test-treemanifest-amend.t @@ -2,8 +2,8 @@ Crash in histpack code path where the amend destination already exists - $ enable undo treemanifest remotefilelog - $ setconfig experimental.evolution=createmarkers treemanifest.treeonly=1 remotefilelog.reponame=foo remotefilelog.cachepath=$TESTTMP/cache + $ enable mutation-norecord undo treemanifest remotefilelog + $ setconfig treemanifest.treeonly=1 remotefilelog.reponame=foo remotefilelog.cachepath=$TESTTMP/cache $ newrepo $ drawdag << 'EOS' > B diff --git a/eden/scm/tests/tinit.sh b/eden/scm/tests/tinit.sh index 8c37872768..7e1b00e0fa 100644 --- a/eden/scm/tests/tinit.sh +++ b/eden/scm/tests/tinit.sh @@ -119,7 +119,17 @@ enable() { rcpath="$HGRCPATH" fi for name in "$@"; do - if [ "$name" = obsstore ]; then + if [ "$name" = "mutation-norecord" ]; then + cat >> $rcpath << EOF +[experimental] +evolution = obsolete +[mutation] +enabled=true +record=false +[visibility] +enabled=true +EOF + elif [ "$name" = obsstore ]; then cat >> $rcpath << EOF [experimental] evolution = createmarkers, allowunstable