# HG changeset patch # User Pierre-Yves David # Date 1491648500 -7200 # Node ID f2ebe960998b515984a6fc4072b3611aedf79de7 # Parent 150fee60887aa8f684ed4d0527d522dff3696818 tests: update test to match upstreamable version Name have been clarified, documentation has been updated and some test-case have been updated to match the intended test. diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A1.t --- a/tests/test-exchange-A1.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -==== A.1.1 pushing a single head ==== -.. -.. {{{ -.. ⇠◔ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A -.. -.. Command run: -.. -.. * hg push -r A -.. * hg push -.. -.. Expected exchange: -.. -.. * chain from A - -Setup ---------------- - -initial - - $ setuprepos A.1.1 - creating test repo for test case A.1.1 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg log -G - @ f5bc6836db60 (draft): A - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 f5bc6836db60 0 2 2 50656e04a95e - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 50656e04a95e - $ cd .. - $ cd .. - -setup both variants - - $ cp -r A.1.1 A.1.1.a - $ cp -r A.1.1 A.1.1.b - - -Variant a: push -r A --------------------- - - $ dotest A.1.1.a A - ## Running testcase A.1.1.a - # testing echange of "A" (f5bc6836db60) - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "f5bc6836db60" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - - - -Variant b: push ---------------- - - $ dotest A.1.1.b - ## Running testcase A.1.1.b - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - - - - - -==== A.1.2 pushing a multiple changeset into a single head ==== - -.. {{{ -.. ◔ B -.. | -.. ⇠◔ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A -.. -.. Command run: -.. -.. * hg push -r B -.. * hg push -.. -.. Expected exchange: -.. -.. * chain from A - -Setup ---------------- - -initial - - $ setuprepos A.1.2 - creating test repo for test case A.1.2 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ mkcommit B - $ hg log -G - @ f6fbb35d8ac9 (draft): B - | - o f5bc6836db60 (draft): A - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ cd .. - $ cd .. - -setup both variants - - $ cp -r A.1.2 A.1.2.a - $ cp -r A.1.2 A.1.2.b - - -Variant a: push -r A --------------------- - - $ dotest A.1.2.a B - ## Running testcase A.1.2.a - # testing echange of "B" (f6fbb35d8ac9) - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "B" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "f6fbb35d8ac9" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Variant b: push ---------------- - - $ dotest A.1.2.b - ## Running testcase A.1.2.b - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A2.t --- a/tests/test-exchange-A2.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== A.2 Two heads === - -.. {{{ -.. ⇠○ B -.. ⇠◔ | A -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A -.. * B -.. -.. -.. Command run: -.. -.. * hg push -r A -.. -.. Expected exchange: -.. -.. * chain from A -.. -.. Expected Exclude: -.. -.. * chain from B - -initial - - $ setuprepos A.2 - creating test repo for test case A.2 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg up .^ - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B - created new head - $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'` - $ hg log -G - @ 35b183996678 (draft): B - | - | o f5bc6836db60 (draft): A - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 - 35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 35b183996678 0 2 2 b9c8f20eef89 - 1 f5bc6836db60 0 2 2 50656e04a95e - 2 35b183996678 1 1 2 b9c8f20eef89 - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 50656e04a95e - $ cd .. - $ cd .. - - -Actual Test ---------------- - - $ dotest A.2 A - ## Running testcase A.2 - # testing echange of "A" (f5bc6836db60) - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "f5bc6836db60" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - - $ cd .. diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A3.t --- a/tests/test-exchange-A3.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== A.3 new branch created === - -.. {{{ -.. B' ○⇢ø B -.. | | -.. \Aø⇠◔ A' -.. \|/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `Aø⇠○ A'` -.. * `Bø⇠○ B'` -.. -.. Command run: -.. -.. * hg push -r A -.. -.. Expected exchange: -.. -.. * chain from A -.. -.. Expected Exclude: -.. -.. * chain from B -.. -.. Extra note: -.. -.. If A and B are remontly known, we should expect: -.. -.. * `hg push` will complain about the new head -.. * `hg push` should complain about unstable history creation - -initial - - $ setuprepos A.3.a - creating test repo for test case A.3.a - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B0 - $ hg update -q 0 - $ mkcommit A1 - created new head - $ hg update -q 0 - $ mkcommit B1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` - $ hg log -G --hidden - @ f6298a8ac3a4 (draft): B1 - | - | o e5ea8f9c7314 (draft): A1 - |/ - | x 6e72f0a95b5e (draft): B0 - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 3 e5ea8f9c7314 0 2 2 3bc2ee626e11 - 4 f6298a8ac3a4 0 2 2 91716bfd671b - 0 a9bdc8b26820 0 1 1 000000000000 - 3 e5ea8f9c7314 1 1 2 3bc2ee626e11 - 4 f6298a8ac3a4 1 1 2 91716bfd671b - $ cd .. - $ cd .. - -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ - - $ dotest A.3.a A1 - ## Running testcase A.3.a - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - -other variant: changeset known in remote ----------------------------------------- - - $ setuprepos A.3.b - creating test repo for test case A.3.b - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B0 - $ hg push -q ../pushdest - $ hg push -q ../pulldest - $ hg update -q 0 - $ mkcommit A1 - created new head - $ hg update -q 0 - $ mkcommit B1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` - $ hg log -G --hidden - @ f6298a8ac3a4 (draft): B1 - | - | o e5ea8f9c7314 (draft): A1 - |/ - | x 6e72f0a95b5e (draft): B0 - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ cd .. - $ cd .. - -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ - -check it complains about multiple heads - - $ cd A.3.b - $ hg push -R main -r e5ea8f9c7314 pushdest - pushing to pushdest - searching for changes - abort: push creates new remote head e5ea8f9c7314! - (merge or see 'hg help push' for details about pushing new heads) - [255] - $ cd .. - -test obsmarkers exchange. - - $ dotest A.3.b A1 -f - ## Running testcase A.3.b - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files (+1 heads) - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 1 new obsolescence markers - (run 'hg heads' to see heads, 'hg merge' to merge) - 1 new unstable changesets - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A4.t --- a/tests/test-exchange-A4.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== A.4 Push in the middle of the obsolescence chain === - -.. (Where we show that we should not push the marker without the successors) -.. -.. {{{ -.. B ◔ -.. | -.. A⇠ø⇠○ A' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `Aø⇠○ A'` -.. * chain from A -.. -.. Command run: -.. -.. * hg push -r B -.. -.. Expected exchange: -.. -.. * Chain from A -.. -.. Expected Exclude: -.. -.. * `Aø⇠○ A'` - - -initial - - $ setuprepos A.4 - creating test repo for test case A.4 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B - $ hg update 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'` - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg log -G --hidden - @ e5ea8f9c7314 (draft): A1 - | - | o 06055a7959d4 (draft): B - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 - 06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 06055a7959d4 0 3 3 000000000000 - 1 28b51eb45704 0 2 2 5d69322fad9e - 3 e5ea8f9c7314 0 2 2 cf518031fa75 - 2 06055a7959d4 2 1 3 000000000000 - 1 28b51eb45704 1 1 2 5d69322fad9e - 0 a9bdc8b26820 0 1 1 000000000000 - 3 e5ea8f9c7314 1 1 2 cf518031fa75 - $ cd .. - $ cd .. - -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ - - $ dotest A.4 B -f - ## Running testcase A.4 - # testing echange of "B" (06055a7959d4) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "B" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "06055a7959d4" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A5.t --- a/tests/test-exchange-A5.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== A.5 partial reordering === -.. -.. {{{ -.. B ø⇠⇠ -.. | ⇡ -.. A ø⇠⇠⇠○ A' -.. | ⇡/ -.. | ○ B' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `Aø⇠○ A'` -.. * `Bø⇠○ B'` -.. -.. Command run: -.. -.. * hg push -r B -.. -.. Expected exchange: -.. -.. * `Bø⇠○ B'` -.. -.. Expected Exclude: -.. -.. * `Aø⇠○ A'` - - -initial - - $ setuprepos A.5 - creating test repo for test case A.5 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B0 - $ hg update 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ mkcommit A1 - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'` - $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg log -G --hidden - @ 8c0a98c83722 (draft): A1 - | - o f6298a8ac3a4 (draft): B1 - | - | x 6e72f0a95b5e (draft): B0 - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a - 8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 4 8c0a98c83722 0 3 3 70185b996296 - 3 f6298a8ac3a4 0 2 2 91716bfd671b - 4 8c0a98c83722 2 1 3 4d835a45c1e9 - 0 a9bdc8b26820 0 1 1 000000000000 - 3 f6298a8ac3a4 1 1 2 91716bfd671b - $ cd .. - $ cd .. - -Actual Test ------------ - - $ dotest A.5 B1 - ## Running testcase A.5 - # testing echange of "B1" (f6298a8ac3a4) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "B1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "f6298a8ac3a4" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A6.t --- a/tests/test-exchange-A6.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ - - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== A.6 between existing changeset === - -.. {{{ -.. A ◕⇠● B -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `A◕⇠● B` -.. -.. Command run: -.. -.. * hg push -r B -.. * hg push -.. -.. Expected exchange: -.. -.. * `A◕⇠● B` - - -initial - - $ setuprepos A.6 - creating test repo for test case A.6 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ hg update -q 0 - $ mkcommit A1 - created new head - -make both changeset known in remote - - $ hg push -qf ../pushdest - $ hg push -qf ../pulldest - -create a marker after this - - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg log -G --hidden - @ e5ea8f9c7314 (draft): A1 - | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 e5ea8f9c7314 0 2 2 3bc2ee626e11 - 0 a9bdc8b26820 0 1 1 000000000000 - 2 e5ea8f9c7314 1 1 2 3bc2ee626e11 - $ cd .. - $ cd .. - - $ cp -r A.6 A.6.a - $ cp -r A.6 A.6.b - -Actual Test (explicit push version) ------------------------------------ - - $ dotest A.6.a A1 - ## Running testcase A.6.a - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) -------------------------------- - - $ dotest A.6.b - ## Running testcase A.6.b - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-A7.t --- a/tests/test-exchange-A7.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== A.7 Non targeted common changeset === - -.. {{{ -.. ⇠◕ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * Chain from A -.. -.. Command run: -.. -.. * hg push -r O -.. -.. Expected exchange: -.. -.. * ø - - - $ setuprepos A.7 - creating test repo for test case A.7 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg push -q ../pushdest - $ hg push -q ../pulldest - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg log -G --hidden - @ f5bc6836db60 (draft): A - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 f5bc6836db60 0 2 2 50656e04a95e - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 50656e04a95e - $ cd .. - $ cd .. - -Actual Test ------------------------------------ - - $ dotest A.7 O - ## Running testcase A.7 - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - ## post push state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - ## post pull state - # obstore: main - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B1.t --- a/tests/test-exchange-B1.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== B.1 Prune on non-targeted common changeset === - -.. {{{ -.. ⊗ B -.. | -.. ◕ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r O -.. * hg push -.. -.. Expected exchange: -.. -.. * B (prune) - - - $ setuprepos B.1 - creating test repo for test case B.1 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ mkcommit B - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x f6fbb35d8ac9 (draft): B - | - @ f5bc6836db60 (draft): A - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 - f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 f5bc6836db60 0 2 2 926d9d84b97b - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 926d9d84b97b - $ cd .. - $ cd .. - - - $ cp -r B.1 B.1.a - $ cp -r B.1 B.1.b - -Actual Test (explicit push version) ------------------------------------ - - $ dotest B.1.a A - ## Running testcase B.1.a - # testing echange of "A" (f5bc6836db60) - ## initial state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "f5bc6836db60" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) ------------------------------------ - - $ dotest B.1.b - ## Running testcase B.1.b - ## initial state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B2.t --- a/tests/test-exchange-B2.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== B.2 Pruned changeset on head: nothing pushed === - -.. {{{ -.. ⊗ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A (prune) -.. -.. Command run: -.. -.. * hg push -r O -.. * hg push -.. -.. Expected exchange: -.. -.. * prune marker for A - - - $ setuprepos B.2 - creating test repo for test case B.2 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x f5bc6836db60 (draft): A - | - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc - f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 0 a9bdc8b26820 0 1 1 52a5380bc047 - $ cd .. - $ cd .. - - - $ cp -r B.2 B.2.a - $ cp -r B.2 B.2.b - -Actual Test (explicit push version) ------------------------------------ - - $ dotest B.2.a O - ## Running testcase B.2.a - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) ------------------------------------ - - $ dotest B.2.b - ## Running testcase B.2.b - ## initial state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B3.t --- a/tests/test-exchange-B3.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== B.3 Pruned changeset on non-pushed part of the history === - -.. {{{ -.. ⊗ C -.. | -.. ○ B -.. | ◔ A -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * C (prune) -.. -.. Command run: -.. -.. * hg push -r A -.. * hg push -.. -.. Expected exchange: -.. -.. * ø -.. -.. Expected Exclude: -.. -.. * chain from B - - - $ setuprepos B.3 - creating test repo for test case B.3 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg up --quiet 0 - $ mkcommit B - created new head - $ mkcommit C - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x e56289ab6378 (draft): C - | - @ 35b183996678 (draft): B - | - | o f5bc6836db60 (draft): A - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000 - 35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3 - e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 35b183996678 0 2 2 631ab4cd02ff - 1 f5bc6836db60 0 2 2 000000000000 - 2 35b183996678 1 1 2 631ab4cd02ff - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 000000000000 - $ cd .. - $ cd .. - - -Actual Test ------------------------------------ - - $ dotest B.3 A - ## Running testcase B.3 - # testing echange of "A" (f5bc6836db60) - ## initial state - # obstore: main - e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - ## post push state - # obstore: main - e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pulling "f5bc6836db60" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B4.t --- a/tests/test-exchange-B4.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== B.4 Pruned changeset on common part of history === - -.. {{{ -.. ⊗ C -.. | ● B -.. | | -.. | ● A -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * C (prune) -.. -.. Command run: -.. -.. * hg push -r B -.. * hg push -.. -.. Expected exchange: -.. -.. * prune for C - - - $ setuprepos B.4 - creating test repo for test case B.4 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ mkcommit B - $ hg phase --public . - $ hg push ../pushdest - pushing to ../pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - $ hg push ../pulldest - pushing to ../pulldest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - $ hg update -q 0 - $ mkcommit C - created new head - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x 7f7f229b13a6 (draft): C - | - | o f6fbb35d8ac9 (public): B - | | - | o f5bc6836db60 (public): A - |/ - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06 - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508 - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 f6fbb35d8ac9 0 3 3 000000000000 - 1 f5bc6836db60 0 2 2 000000000000 - 0 a9bdc8b26820 0 1 1 1900882e85db - 1 f5bc6836db60 1 1 2 000000000000 - 2 f6fbb35d8ac9 2 1 3 000000000000 - $ cd .. - $ cd .. - - - $ cp -r B.4 B.4.a - $ cp -r B.4 B.4.b - -Actual Test (explicit push version) ------------------------------------ - - $ dotest B.4.a O - ## Running testcase B.4.a - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) ------------------------------------ - - $ dotest B.4.b - ## Running testcase B.4.b - ## initial state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 1 new obsolescence markers - ## post push state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 1 new obsolescence markers - ## post pull state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B5.t --- a/tests/test-exchange-B5.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ - - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== B.5 Push of a children of changeset which successors is pruned === - -.. This case Mirror A.4, with pruned changeset successors. -.. -.. {{{ -.. B ◔ -.. | -.. A⇠ø⇠⊗ A' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `Aø⇠○ A'` -.. * chain from A -.. * `A'` -.. -.. Command run: -.. -.. * hg push -r B -.. -.. Expected exchange: -.. -.. * `Aø⇠○ A'` -.. * chain from A -.. * `A'` -.. -.. Extra Note: -.. -.. I'm not totally happy about this case and I believe some more complicated -.. graph can result in behavior wuite confusing for the user (if some tool create -.. prune maker in a the middle of a valid chain) - - $ setuprepos B.5 - creating test repo for test case B.5 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B - $ hg up --quiet 0 - $ mkcommit A1 - created new head - $ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x e5ea8f9c7314 (draft): A1 - | - | o 06055a7959d4 (draft): B - | | - | x 28b51eb45704 (draft): A0 - |/ - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 201e20697f2a6b0752335af7cd813f140e9e653e - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 ae1ac676a5e6d6f4216595c53da763d588929970 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 06055a7959d4 0 3 3 000000000000 - 1 28b51eb45704 0 2 2 000000000000 - 2 06055a7959d4 2 1 3 000000000000 - 1 28b51eb45704 1 1 2 000000000000 - 0 a9bdc8b26820 0 1 1 554c0b12f7d9 - $ cd .. - $ cd .. - - $ cp -r B.5 B.5.a - $ cp -r B.5 B.5.b - -Actual Test (explicit push version) ------------------------------------ - - $ dotest B.5.a B -f - ## Running testcase B.5.a - # testing echange of "B" (06055a7959d4) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "B" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "06055a7959d4" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - 1 new unstable changesets - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) -------------------------------------- - - $ dotest B.5.b B -f - ## Running testcase B.5.b - # testing echange of "B" (06055a7959d4) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "B" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "06055a7959d4" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - 1 new unstable changesets - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B6.t --- a/tests/test-exchange-B6.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ - - - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -== B.6 Pruned changeset with ancestors not in pushed set === - -.. {{{ -.. B ø⇠⊗ B' -.. | | -.. A ○ | -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `Bø⇠⊗ B'` -.. * B' prune -.. -.. Command run: -.. -.. * hg push -r O -.. -.. Expected exchange: -.. -.. * `Bø⇠⊗ B'` -.. * B' prune - - $ setuprepos B.6 - creating test repo for test case B.6 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ mkcommit B0 - $ hg up --quiet 0 - $ mkcommit B1 - created new head - $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x f6298a8ac3a4 (draft): B1 - | - | x 962ecf6b1afc (draft): B0 - | | - | o f5bc6836db60 (draft): A - |/ - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736 - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 f5bc6836db60 0 2 2 000000000000 - 0 a9bdc8b26820 0 1 1 86e41541149f - 1 f5bc6836db60 1 1 2 000000000000 - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest B.6 O - ## Running testcase B.6 - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 2 new obsolescence markers - ## post pull state - # obstore: main - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-B7.t --- a/tests/test-exchange-B7.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== B.7 Prune on non-targeted common changeset === -.. -.. {{{ -.. ⊗ B -.. | -.. ◕ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r O -........ * hg push -.. -.. Expected exchange: -.. -.. * ø -....... * B (prune) - - $ setuprepos B.7 - creating test repo for test case B.7 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg push -q ../pushdest - $ hg push -q ../pulldest - $ mkcommit B - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x f6fbb35d8ac9 (draft): B - | - @ f5bc6836db60 (draft): A - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 - f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 f5bc6836db60 0 2 2 926d9d84b97b - 0 a9bdc8b26820 0 1 1 000000000000 - 1 f5bc6836db60 1 1 2 926d9d84b97b - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest B.7 O - ## Running testcase B.7 - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - ## post push state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - ## post pull state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-C1.t --- a/tests/test-exchange-C1.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,142 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== C.1 Multiple pruned changeset atop each other === -.. -.. {{{ -.. ⊗ B -.. | -.. ⊗ A -.. | -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A (prune) -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r O -.. * hg push -.. -.. Expected exchange: -.. -.. * A (prune) -.. * B (prune) - - $ setuprepos C.1 - creating test repo for test case C.1 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ mkcommit B - $ hg prune -qd '0 0' .^::. - $ hg log -G --hidden - x f6fbb35d8ac9 (draft): B - | - x f5bc6836db60 (draft): A - | - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70 - f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468 - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 0 a9bdc8b26820 0 1 1 1ce18e5a71f7 - $ cd .. - $ cd .. - - $ cp -r C.1 C.1.a - $ cp -r C.1 C.1.b - -Actual Test (explicit push) ---------------------------- - - $ dotest C.1.a O - ## Running testcase C.1.a - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 2 new obsolescence markers - ## post push state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 2 new obsolescence markers - ## post pull state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push) -------------------------------------- - - $ dotest C.1.b - ## Running testcase C.1.b - ## initial state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 2 new obsolescence markers - ## post push state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 2 new obsolescence markers - ## post pull state - # obstore: main - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-C2.t --- a/tests/test-exchange-C2.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== C.2 Pruned changeset on precursors === - -.. {{{ -.. B ⊗ -.. | -.. A ø⇠◔ A' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A' succeed to A -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r A' -.. * hg push -.. -.. Expected exchange: -.. -.. * `A ø⇠o A'` -.. * B (prune) - - $ setuprepos C.2 - creating test repo for test case C.2 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B - $ hg prune -qd '0 0' . - $ hg update -q 0 - $ mkcommit A1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg log -G --hidden - @ e5ea8f9c7314 (draft): A1 - | - | x 06055a7959d4 (draft): B - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31 - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 3 e5ea8f9c7314 0 2 2 289cb0d058c8 - 0 a9bdc8b26820 0 1 1 000000000000 - 3 e5ea8f9c7314 1 1 2 289cb0d058c8 - $ cd .. - $ cd .. - - $ cp -r C.2 C.2.a - $ cp -r C.2 C.2.b - -Actual Test (explicit push) ---------------------------- - - $ dotest C.2.a A1 - ## Running testcase C.2.a - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push) -------------------------------------- - - $ dotest C.2.b - ## Running testcase C.2.b - ## initial state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-C3.t --- a/tests/test-exchange-C3.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,167 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - - -=== C.3 Pruned changeset on precursors of another pruned one === - -.. {{{ -.. B ⊗ -.. | -.. A ø⇠⊗ A' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A' succeed to A -.. * A' (prune -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r A' -.. * hg push -.. -.. Expected exchange: -.. -.. * `A ø⇠⊗ A'` -.. * A (prune) -.. * B (prune) - - $ setuprepos C.3 - creating test repo for test case C.3 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B - $ hg prune -qd '0 0' . - $ hg update -q 0 - $ mkcommit A1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x e5ea8f9c7314 (draft): A1 - | - | x 06055a7959d4 (draft): B - | | - | x 28b51eb45704 (draft): A0 - |/ - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 0 a9bdc8b26820 0 1 1 40be80b35671 - $ cd .. - $ cd .. - - $ cp -r C.3 C.3.a - $ cp -r C.3 C.3.b - -Actual Test (explicit push) ---------------------------- - - $ dotest C.3.a O - ## Running testcase C.3.a - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 3 new obsolescence markers - ## post push state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 3 new obsolescence markers - ## post pull state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push) -------------------------------------- - - $ dotest C.3.b - ## Running testcase C.3.b - ## initial state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 3 new obsolescence markers - ## post push state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 3 new obsolescence markers - ## post pull state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-C4.t --- a/tests/test-exchange-C4.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== C.4 multiple successors, one is pruned === - -.. Another case were prune are confusing? (A is killed without its successors being -.. pushed) -.. -.. (could split of divergence, if split see the Z section) -.. -.. {{{ -.. A -.. B ○⇢ø⇠⊗ C -.. \|/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * `A ø⇠○ B` -.. * `A ø⇠○ C` -.. * C (prune) -.. -.. -.. Command run: -.. -.. * hg push -r O -.. -.. Expected exchange: -.. -.. * `A ø⇠○ C` -.. * C (prune) -.. -.. Expected exclude: -.. -.. * `A ø⇠○ B` - -Implemented as the non-split version - - $ setuprepos C.4 - creating test repo for test case C.4 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A - $ hg update -q 0 - $ mkcommit B - created new head - $ hg update -q 0 - $ mkcommit C - created new head - $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'` - $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'` - $ hg prune -qd '0 0' . - $ hg log -G --hidden - x 7f7f229b13a6 (draft): C - | - | o 35b183996678 (draft): B - |/ - | x f5bc6836db60 (draft): A - |/ - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd - f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be - 35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327 - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 35b183996678 0 2 2 2a098b4a877f - 2 35b183996678 1 1 2 916e804c50de - 0 a9bdc8b26820 0 1 1 a9c02d134f5b - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest C.4 O - ## Running testcase C.4 - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - 2 new obsolescence markers - ## post pull state - # obstore: main - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-D1.t --- a/tests/test-exchange-D1.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== D.1 Pruned changeset based on missing precursor of something not present === - -.. {{{ -.. B ⊗ -.. | -.. A ◌⇠◔ A' -.. |/ -.. ● O -.. }}} -.. -.. Marker exist from: -.. -.. * A' succeed to A -.. * B (prune) -.. -.. Command run: -.. -.. * hg push -r A' -.. * hg push -.. -.. Expected exchange: -.. -.. * `A ø⇠o A'` -.. * B (prune) - - $ setuprepos D.1 - creating test repo for test case D.1 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B - $ hg up -q 0 - $ mkcommit A1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune -d '0 0' 'desc(B)' - 1 changesets pruned - $ hg strip --hidden -q 'desc(A0)' - $ hg log -G --hidden - @ e5ea8f9c7314 (draft): A1 - | - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 1 e5ea8f9c7314 0 2 2 289cb0d058c8 - 0 a9bdc8b26820 0 1 1 000000000000 - 1 e5ea8f9c7314 1 1 2 289cb0d058c8 - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest D.1 A1 - ## Running testcase D.1 - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-D2.t --- a/tests/test-exchange-D2.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== D.2 missing prune target (prune in "pushed set") === - -{{{ -}}} - -Marker exist from: - - * A' succeed to A - * A' (prune) - -Command run: - - * hg push - -Expected exchange: - - * `A ø⇠o A'` - * A' (prune) - - - $ setuprepos D.2 - creating test repo for test case D.2 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ hg up -q 0 - $ mkcommit A1 - created new head - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune --date '0 0' . - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - working directory now at a9bdc8b26820 - 1 changesets pruned - $ hg strip --hidden -q 'desc(A1)' - $ hg log -G --hidden - x 28b51eb45704 (draft): A0 - | - @ a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 0 a9bdc8b26820 0 1 1 554c0b12f7d9 - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest D.2 - ## Running testcase D.2 - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - no changes found - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - no changes found - 2 new obsolescence markers - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-D3.t --- a/tests/test-exchange-D3.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ - - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== D.3 missing prune target (prune in "pushed set") === - -{{{ -}}} - -Marker exist from: - - * A' succeed to A - * A' (prune) - -Command run: - - * hg push - -Expected exchange: - - * `A ø⇠o A'` - * A' (prune) - - - $ setuprepos D.3 - creating test repo for test case D.3 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ hg up -q 0 - $ mkcommit B - created new head - $ mkcommit A1 - $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune -d '0 0' . - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - working directory now at 35b183996678 - 1 changesets pruned - $ hg strip --hidden -q 'desc(A1)' - $ hg log -G --hidden - @ 35b183996678 (draft): B - | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 - 35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 2 35b183996678 0 2 2 65a9f21dff07 - 2 35b183996678 1 1 2 65a9f21dff07 - 0 a9bdc8b26820 0 1 1 000000000000 - $ cd .. - $ cd .. - -Actual Test -------------------------------------- - - $ dotest D.3 O - ## Running testcase D.3 - # testing echange of "O" (a9bdc8b26820) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "O" from main to pushdest - pushing to pushdest - searching for changes - no changes found - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pulling "a9bdc8b26820" from main into pulldest - pulling from main - no changes found - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-D4.t --- a/tests/test-exchange-D4.t Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ - - -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh - -=== D.4 Unknown changeset in between known one === - -.. Mostly a clarification case -.. -.. {{{ -.. ø⇠◌⇠○ -.. | |/ -.. | ◔ -.. |/ -.. ● O -.. -.. }}} -.. -.. Should be treated as A.3 case: -.. -.. {{{ -.. -.. ø⇠○ -.. | | -.. | ◔ -.. |/ -.. ● O -.. -.. }}} - - -initial - - $ setuprepos D.4 - creating test repo for test case D.4 - - pulldest - - main - - pushdest - cd into `main` and proceed with env setup - $ cd main - $ mkcommit A0 - $ mkcommit B0 - $ hg update -q 0 - $ mkcommit A1 - created new head - $ mkcommit B1 - $ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'` - $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'` - $ hg log -G --hidden - @ 069b05c3876d (draft): B1 - | - o e5ea8f9c7314 (draft): A1 - | - | x 6e72f0a95b5e (draft): B0 - | | - | x 28b51eb45704 (draft): A0 - |/ - o a9bdc8b26820 (public): O - - $ hg debugobsolete - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a - 069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0 - $ hg debugobshashrange --subranges --rev 'head()' - rev node index size depth obshash - 4 069b05c3876d 0 3 3 a2b2331da650 - 3 e5ea8f9c7314 0 2 2 0aacc2f86e8f - 4 069b05c3876d 2 1 3 901f118d4333 - 0 a9bdc8b26820 0 1 1 000000000000 - 3 e5ea8f9c7314 1 1 2 0aacc2f86e8f - $ cd .. - $ cd .. - -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ - - $ dotest D.4 A1 - ## Running testcase D.4 - # testing echange of "A1" (e5ea8f9c7314) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing "A1" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "e5ea8f9c7314" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A1.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,318 @@ +============================================ +Testing obsolescence markers push: Cases A.1 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 1: pushing a single head +Subcases: +# A.1.1 pushing a single head (2 variants) +# A.1.2 pushing multiple changesets into a single head (2 variants) + +Case: A.1.1 pushing a single head +================================= +.. +.. {{{ +.. ⇠◔ A +.. | +.. ● O +.. }}} +.. +.. Marker exists from: +.. +.. * A +.. +.. Commands run: +.. +.. * hg push -r A +.. * hg push +.. +.. Expected exchange: +.. +.. * chain from A + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.1.1 + creating test repo for test case A.1.1 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` + $ hg log -G + @ f5bc6836db60 (draft): A + | + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 + obshashrange + ============ + rev node index size depth obshash + 1 f5bc6836db60 0 2 2 50656e04a95e + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 50656e04a95e + $ cd .. + $ cd .. + +setup both variants + + $ cp -R A.1.1 A.1.1.a + $ cp -R A.1.1 A.1.1.b + +Variant a: push -r A +-------------------- + + $ dotest A.1.1.a A + ## Running testcase A.1.1.a + # testing echange of "A" (f5bc6836db60) + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "f5bc6836db60" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Variant b: push +--------------- + + $ dotest A.1.1.b + ## Running testcase A.1.1.b + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +A.1.2 pushing multiple changesets into a single head +==================================================== + +.. {{{ +.. ◔ B +.. | +.. ⇠◔ A +.. | +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A +.. +.. Command run: +.. +.. * hg push -r B +.. * hg push +.. +.. Expected exchange: +.. +.. * chain from A + +Setup +----- + +initial + + $ setuprepos A.1.2 + creating test repo for test case A.1.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B + $ hg log -G + @ f6fbb35d8ac9 (draft): B + | + o f5bc6836db60 (draft): A + | + o a9bdc8b26820 (public): O + + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 9cfa25b36856aa720419146abddd011cf87d368c + obshashrange + ============ + rev node index size depth obshash + 2 f6fbb35d8ac9 0 3 3 000000000000 + 1 f5bc6836db60 0 2 2 50656e04a95e + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 50656e04a95e + 2 f6fbb35d8ac9 2 1 3 000000000000 + $ cd .. + $ cd .. + +setup both variants + + $ cp -R A.1.2 A.1.2.a + $ cp -R A.1.2 A.1.2.b + +Variant a: push -r A +-------------------- + + $ dotest A.1.2.a B + ## Running testcase A.1.2.a + # testing echange of "B" (f6fbb35d8ac9) + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "B" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "f6fbb35d8ac9" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Variant b: push +--------------- + + $ dotest A.1.2.b + ## Running testcase A.1.2.b + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A2.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,137 @@ +============================================ +Testing obsolescence markers push: Cases A.2 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 2: Two heads, only one of them pushed + +A.2 Two heads, only on of then pushed +===================================== + +.. {{{ +.. ⇠○ B +.. ⇠◔ | A +.. |/ +.. ● O +.. }}} +.. +.. Markers exist from: +.. +.. * A +.. * B +.. +.. +.. Command runs: +.. +.. * hg push -r A +.. +.. Expected exchange: +.. +.. * chain from A +.. +.. Expected Exclude: +.. +.. * chain from B + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.2 + creating test repo for test case A.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` + $ hg up '.~1' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B + created new head + $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'` + $ hg log -G + @ 35b183996678 (draft): B + | + | o f5bc6836db60 (draft): A + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 + 35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245 + obshashrange + ============ + rev node index size depth obshash + 2 35b183996678 0 2 2 b9c8f20eef89 + 1 f5bc6836db60 0 2 2 50656e04a95e + 2 35b183996678 1 1 2 b9c8f20eef89 + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 50656e04a95e + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest A.2 A + ## Running testcase A.2 + # testing echange of "A" (f5bc6836db60) + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "f5bc6836db60" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + + $ cd .. diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A3.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,269 @@ +============================================ +Testing obsolescence markers push: Cases A.3 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 3: old branch split in two, only one of the new one pushed +Variants: +# a: changesets are known on remote +# b: changesets are known on remote (push needs -f) + +A.3 new branchs created, one pushed. +==================================== + +.. {{{ +.. B' ○⇢ø B +.. | | +.. \Aø⇠◔ A' +.. \|/ +.. ● O +.. }}} +.. +.. Markers exist from: +.. +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` +.. +.. Command runs: +.. +.. * hg push -r A +.. +.. Expected exchange: +.. +.. * chain from A +.. +.. Expected exclude: +.. +.. * chain from B +.. +.. Extra note: +.. +.. If A and B are remontly known, we should expect: +.. +.. * `hg push` will complain about the new head +.. * `hg push` should complain about unstable history creation + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.3.a + creating test repo for test case A.3.a + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B0 + $ hg update -q 0 + $ mkcommit A1 + created new head + $ hg update -q 0 + $ mkcommit B1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg log -G --hidden + @ f6298a8ac3a4 (draft): B1 + | + | o e5ea8f9c7314 (draft): A1 + |/ + | x 6e72f0a95b5e (draft): B0 + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a + obshashrange + ============ + rev node index size depth obshash + 3 e5ea8f9c7314 0 2 2 3bc2ee626e11 + 4 f6298a8ac3a4 0 2 2 91716bfd671b + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 3bc2ee626e11 + 4 f6298a8ac3a4 1 1 2 91716bfd671b + $ cd .. + $ cd .. + +Actual Test for first version (changeset unknown in remote) +----------------------------------------------------------- + + $ dotest A.3.a A1 + ## Running testcase A.3.a + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +other variant: changeset known in remote +---------------------------------------- + + $ setuprepos A.3.b + creating test repo for test case A.3.b + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B0 + $ hg push -q ../pushdest + $ hg push -q ../pulldest + $ hg update -q 0 + $ mkcommit A1 + created new head + $ hg update -q 0 + $ mkcommit B1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg log -G --hidden + @ f6298a8ac3a4 (draft): B1 + | + | o e5ea8f9c7314 (draft): A1 + |/ + | x 6e72f0a95b5e (draft): B0 + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a + obshashrange + ============ + rev node index size depth obshash + 3 e5ea8f9c7314 0 2 2 3bc2ee626e11 + 4 f6298a8ac3a4 0 2 2 91716bfd671b + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 3bc2ee626e11 + 4 f6298a8ac3a4 1 1 2 91716bfd671b + $ cd .. + $ cd .. + +Actual Test for first version (changeset known in remote) +----------------------------------------------------------- + +check it complains about multiple heads + + $ cd A.3.b + $ hg push -R main -r 'desc(A1)' pushdest + pushing to pushdest + searching for changes + abort: push creates new remote head e5ea8f9c7314! + (merge or see 'hg help push' for details about pushing new heads) + [255] + $ cd .. + +test obsmarkers exchange. + + $ dotest A.3.b A1 -f + ## Running testcase A.3.b + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files (+1 heads) + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 1 new obsolescence markers + (run 'hg heads' to see heads, 'hg merge' to merge) + 1 new unstable changesets + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A4.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,143 @@ +============================================ +Testing obsolescence markers push: Cases A.4 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. this does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +Testcase 4: Push in the middle of the obsolescence chain + +A.4 Push in the middle of the obsolescence chain +================================================ + +.. (Where we show that we should not push the marker without the successors) +.. +.. {{{ +.. B ◔ +.. | +.. A⇠ø⇠○ A' +.. |/ +.. ● O +.. }}} +.. +.. Markers exist from: +.. +.. * `A ø⇠○ A'` +.. * chain from A +.. +.. Command runs: +.. +.. * hg push -r B +.. +.. Expected exchange: +.. +.. * Chain from A +.. +.. Expected Exclude: +.. +.. * `Ai ø⇠○ A'` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.4 + creating test repo for test case A.4 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B + $ hg update 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'` + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg log -G --hidden + @ e5ea8f9c7314 (draft): A1 + | + | o 06055a7959d4 (draft): B + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 + 06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f + obshashrange + ============ + rev node index size depth obshash + 2 06055a7959d4 0 3 3 000000000000 + 1 28b51eb45704 0 2 2 5d69322fad9e + 3 e5ea8f9c7314 0 2 2 cf518031fa75 + 2 06055a7959d4 2 1 3 000000000000 + 1 28b51eb45704 1 1 2 5d69322fad9e + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 cf518031fa75 + $ cd .. + $ cd .. + +Actual Test for first version +----------------------------- + + $ dotest A.4 B -f + ## Running testcase A.4 + # testing echange of "B" (06055a7959d4) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "B" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "06055a7959d4" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A5.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A5.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,151 @@ +============================================ +Testing obsolescence markers push: Cases A.5 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 5: partial reordering + +A.5 partial reordering +====================== + +.. +.. {{{ +.. B ø⇠⇠ +.. | ⇡ +.. A ø⇠⇠⇠○ A' +.. | ⇡/ +.. | ○ B' +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `Aø⇠○ A'` +.. * `Bø⇠○ B'` +.. +.. Command run: +.. +.. * hg push -r B +.. +.. Expected exchange: +.. +.. * `Bø⇠○ B'` +.. +.. Expected Exclude: +.. +.. * `Aø⇠○ A'` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.5 + creating test repo for test case A.5 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B0 + $ hg update 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ mkcommit A1 + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'` + $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg log -G --hidden + @ 8c0a98c83722 (draft): A1 + | + o f6298a8ac3a4 (draft): B1 + | + | x 6e72f0a95b5e (draft): B0 + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a + 8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21 + obshashrange + ============ + rev node index size depth obshash + 4 8c0a98c83722 0 3 3 70185b996296 + 3 f6298a8ac3a4 0 2 2 91716bfd671b + 4 8c0a98c83722 2 1 3 4d835a45c1e9 + 0 a9bdc8b26820 0 1 1 000000000000 + 3 f6298a8ac3a4 1 1 2 91716bfd671b + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest A.5 B1 + ## Running testcase A.5 + # testing echange of "B1" (f6298a8ac3a4) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "B1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "f6298a8ac3a4" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A6.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A6.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,161 @@ +============================================ +Testing obsolescence markers push: Cases A.6 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 6: new markers between changesets already known on both side +Variants: +# a: explicit push +# b: bare push + +A.6 new markers between changesets already known on both side +============================================================== + +.. {{{ +.. A ◕⇠● B +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `A◕⇠● B` +.. +.. Command runs: +.. +.. * hg push -r B +.. * hg push +.. +.. Expected exchange: +.. +.. * `A◕⇠● B` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos A.6 + creating test repo for test case A.6 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ hg update -q 0 + $ mkcommit A1 + created new head + +make both changeset known in remote + + $ hg push -qf ../pushdest + $ hg push -qf ../pulldest + +create a marker after this + + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg log -G --hidden + @ e5ea8f9c7314 (draft): A1 + | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 + obshashrange + ============ + rev node index size depth obshash + 2 e5ea8f9c7314 0 2 2 3bc2ee626e11 + 0 a9bdc8b26820 0 1 1 000000000000 + 2 e5ea8f9c7314 1 1 2 3bc2ee626e11 + $ cd .. + $ cd .. + + $ cp -R A.6 A.6.a + $ cp -R A.6 A.6.b + +Actual Test (explicit push version) +----------------------------------- + + $ dotest A.6.a A1 + ## Running testcase A.6.a + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push version) +------------------------------- + + $ dotest A.6.b + ## Running testcase A.6.b + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-A7.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-A7.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,103 @@ +============================================ +Testing obsolescence markers push: Cases A.7 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category A: simple cases +TestCase 7: markers one non targeted common changeset + +A.7 non targeted common changeset +================================= + +.. {{{ +.. ⇠◕ A +.. | +.. ● O +.. }}} +.. +.. Markers exist from: +.. +.. * Chain from A +.. +.. Command run: +.. +.. * hg push -r O +.. +.. Expected exchange: +.. +.. * ø + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos A.7 + creating test repo for test case A.7 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg push -q ../pushdest + $ hg push -q ../pulldest + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` + $ hg log -G --hidden + @ f5bc6836db60 (draft): A + | + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 + obshashrange + ============ + rev node index size depth obshash + 1 f5bc6836db60 0 2 2 50656e04a95e + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 50656e04a95e + $ cd .. + $ cd .. + +Actual Test +----------------------------------- + + $ dotest A.7 O + ## Running testcase A.7 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + ## post push state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + ## post pull state + # obstore: main + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B1.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,115 @@ +============================================ +Testing obsolescence markers push: Cases B.1 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 1: Prune on non-targeted common changeset + +B.1 Prune on non-targeted common changeset +========================================== + +.. {{{ +.. ⊗ B +.. | +.. ◕ A +.. | +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * B (prune) +.. +.. Command runs: +.. +.. * hg push -r O +.. +.. Expected exclude: +.. +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos B.1 + creating test repo for test case B.1 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B + +make both changeset known in remote + + $ hg push -qf ../pushdest + $ hg push -qf ../pulldest + +create prune marker + + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x f6fbb35d8ac9 (draft): B + | + @ f5bc6836db60 (draft): A + | + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 + obshashrange + ============ + rev node index size depth obshash + 1 f5bc6836db60 0 2 2 926d9d84b97b + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 926d9d84b97b + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest B.1 O + ## Running testcase B.1 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + ## post push state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + ## post pull state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B2.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,145 @@ +============================================ +Testing obsolescence markers push: Cases B.2 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 2: Prune on targeted common changeset +Variants: +# a: explicite push +# b: bare push + +B.2 Pruned changeset on head: nothing pushed +============================================ + +.. {{{ +.. ⊗ A +.. | +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A (prune) +.. +.. Command run: +.. +.. * hg push -r O +.. * hg push +.. +.. Expected exchange: +.. +.. * prune marker for A + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos B.2 + creating test repo for test case B.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x f5bc6836db60 (draft): A + | + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc + f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c + obshashrange + ============ + rev node index size depth obshash + 0 a9bdc8b26820 0 1 1 52a5380bc047 + $ cd .. + $ cd .. + + $ cp -R B.2 B.2.a + $ cp -R B.2 B.2.b + +Actual Test (explicit push version) +----------------------------------- + + $ dotest B.2.a O + ## Running testcase B.2.a + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push version) +----------------------------------- + + $ dotest B.2.b + ## Running testcase B.2.b + ## initial state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B3.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,129 @@ +============================================ +Testing obsolescence markers push: Cases B.3 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 3: Pruned changeset on non-pushed part of the history + +B.3 Pruned changeset on non-pushed part of the history +====================================================== + +.. {{{ +.. ⊗ C +.. | +.. ○ B +.. | ◔ A +.. |/ +.. ● O +.. }}} +.. +.. Marker exists from: +.. +.. * C (prune) +.. +.. Commands run: +.. +.. * hg push -r A +.. +.. Expected exchange: +.. +.. * ø +.. +.. Expected exclude: +.. +.. * chain from B + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos B.3 + creating test repo for test case B.3 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg up --quiet 0 + $ mkcommit B + created new head + $ mkcommit C + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x e56289ab6378 (draft): C + | + @ 35b183996678 (draft): B + | + | o f5bc6836db60 (draft): A + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000 + 35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3 + e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c + obshashrange + ============ + rev node index size depth obshash + 2 35b183996678 0 2 2 631ab4cd02ff + 1 f5bc6836db60 0 2 2 000000000000 + 2 35b183996678 1 1 2 631ab4cd02ff + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 000000000000 + $ cd .. + $ cd .. + +Actual Test +----------------------------------- + + $ dotest B.3 A + ## Running testcase B.3 + # testing echange of "A" (f5bc6836db60) + ## initial state + # obstore: main + e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + ## post push state + # obstore: main + e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pulling "f5bc6836db60" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B4.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,177 @@ +============================================ +Testing obsolescence markers push: Cases B.4 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 4: Pruned changeset on common part of the history +Variants: +# a: explicite push +# b: bare push + +B.4 Pruned changeset on common part of history +============================================= + +.. {{{ +.. ⊗ C +.. | ● B +.. | | +.. | ● A +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * C (prune) +.. +.. Command run: +.. +.. * hg push -r B +.. * hg push +.. +.. Expected exchange: +.. +.. * prune for C + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos B.4 + creating test repo for test case B.4 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B + $ hg phase --public . + $ hg push ../pushdest + pushing to ../pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + $ hg push ../pulldest + pushing to ../pulldest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files + $ hg update -q 0 + $ mkcommit C + created new head + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x 7f7f229b13a6 (draft): C + | + | o f6fbb35d8ac9 (public): B + | | + | o f5bc6836db60 (public): A + |/ + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508 + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06 + obshashrange + ============ + rev node index size depth obshash + 2 f6fbb35d8ac9 0 3 3 000000000000 + 1 f5bc6836db60 0 2 2 000000000000 + 0 a9bdc8b26820 0 1 1 1900882e85db + 1 f5bc6836db60 1 1 2 000000000000 + 2 f6fbb35d8ac9 2 1 3 000000000000 + $ cd .. + $ cd .. + + $ cp -R B.4 B.4.a + $ cp -R B.4 B.4.b + +Actual Test (explicit push version) +----------------------------------- + + $ dotest B.4.a O + ## Running testcase B.4.a + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push version) +----------------------------------- + + $ dotest B.4.b + ## Running testcase B.4.b + ## initial state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 1 new obsolescence markers + ## post pull state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B5.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B5.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,168 @@ +============================================ +Testing obsolescence markers push: Cases B.5 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 5: Push of a children of changeset which successors is pruned + +B.5 Push of a children of changeset which successors is pruned +============================================================== + +.. This case Mirror A.4, with pruned changeset successors. +.. +.. {{{ +.. C ◔ +.. | +.. B⇠ø⇠⊗ B' +.. | | +.. A ø⇠○ A' +.. |/ +.. ● +.. }}} +.. +.. Marker exist from: +.. +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` +.. * chain from B +.. * `B' is pruned` +.. +.. Command run: +.. +.. * hg push -r C +.. +.. Expected exchange: +.. +.. * chain from B +.. +.. Expected exclude: +.. +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` +.. * `B' prune` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos B.5 + creating test repo for test case B.5 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B0 + $ mkcommit C + $ hg up --quiet 0 + $ mkcommit A1 + created new head + $ mkcommit B1 + $ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg debugobsolete --hidden aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(B0)'` + $ hg debugobsolete --hidden `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg prune -qd '0 0' 'desc(B1)' + $ hg log -G --hidden + x 069b05c3876d (draft): B1 + | + @ e5ea8f9c7314 (draft): A1 + | + | o 1d0f3cd25300 (draft): C + | | + | x 6e72f0a95b5e (draft): B0 + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 13bd00d88332fcd3fe634ed42f9d35c9cfc06398 + 1d0f3cd253006f014c7687a78abbc9287db4101d 01d985a82467333a4de7a5b4e8a0de3286f8bda8 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 d2b1159bcf3694aabc3674785b1859544c35357d + 069b05c3876d56f62895e853a501ea58ea85f68d d00e3201fcf83a1bf42e70757f07b45bdd77a220 + obshashrange + ============ + rev node index size depth obshash + 3 1d0f3cd25300 0 4 4 000000000000 + 3 1d0f3cd25300 2 2 4 000000000000 + 1 28b51eb45704 0 2 2 000000000000 + 4 e5ea8f9c7314 0 2 2 d2b1159bcf36 + 3 1d0f3cd25300 3 1 4 000000000000 + 1 28b51eb45704 1 1 2 000000000000 + 2 6e72f0a95b5e 2 1 3 13bd00d88332 + 0 a9bdc8b26820 0 1 1 000000000000 + 4 e5ea8f9c7314 1 1 2 d2b1159bcf36 + $ cd .. + $ cd .. + +Actual Test (explicit push version) +----------------------------------- + + $ dotest B.5 C -f + ## Running testcase B.5 + # testing echange of "C" (1d0f3cd25300) + ## initial state + # obstore: main + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "C" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 3 changesets with 3 changes to 3 files + remote: 1 new obsolescence markers + ## post push state + # obstore: main + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "1d0f3cd25300" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 3 files + 1 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B6.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B6.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,129 @@ +============================================ +Testing obsolescence markers push: Cases B.6 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 6: Pruned changeset with precursors not in pushed set + +B.6 Pruned changeset with precursors not in pushed set +====================================================== + +.. {{{ +.. B ø⇠⊗ B' +.. | | +.. A ○ | +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `B ø⇠⊗ B'` +.. * B' prune +.. +.. Command run: +.. +.. * hg push -r O +.. +.. Expected exchange: +.. +.. * `B ø⇠⊗ B'` +.. * B' prune + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos B.6 + creating test repo for test case B.6 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B0 + $ hg up --quiet 0 + $ mkcommit B1 + created new head + $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x f6298a8ac3a4 (draft): B1 + | + | x 962ecf6b1afc (draft): B0 + | | + | o f5bc6836db60 (draft): A + |/ + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736 + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747 + obshashrange + ============ + rev node index size depth obshash + 1 f5bc6836db60 0 2 2 000000000000 + 0 a9bdc8b26820 0 1 1 86e41541149f + 1 f5bc6836db60 1 1 2 000000000000 + $ cd .. + $ cd .. + +Actual Test +------------------------------------- + + $ dotest B.6 O + ## Running testcase B.6 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 2 new obsolescence markers + ## post pull state + # obstore: main + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-B7.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-B7.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,111 @@ +============================================ +Testing obsolescence markers push: Cases B.7 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category B: pruning case +TestCase 7: Prune on non-targeted common changeset + +B.7 Prune above non-targeted common changeset +============================================= + +.. (very similar to B1, but the prune changeset is unknown on remote) +.. +.. {{{ +.. ⊗ B +.. | +.. ◕ A +.. | +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * B (prune) +.. +.. Command runs: +.. +.. * hg push -r O +.. +.. Expected exclude: +.. +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos B.7 + creating test repo for test case B.7 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg push -q ../pushdest + $ hg push -q ../pulldest + $ mkcommit B + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x f6fbb35d8ac9 (draft): B + | + @ f5bc6836db60 (draft): A + | + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 + obshashrange + ============ + rev node index size depth obshash + 1 f5bc6836db60 0 2 2 926d9d84b97b + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 926d9d84b97b + $ cd .. + $ cd .. + +Actual Test +------------------------------------- + + $ dotest B.7 O + ## Running testcase B.7 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + ## post push state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + ## post pull state + # obstore: main + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-C1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-C1.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,168 @@ +============================================ +Testing obsolescence markers push: Cases C.1 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category C: advanced case +TestCase 1: Multiple pruned changeset atop each other +Variants: +# a: explicite push +# b: bare push + +C.1 Multiple pruned changeset atop each other +============================================= + +.. {{{ +.. ⊗ B +.. | +.. ⊗ A +.. | +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A (prune) +.. * B (prune) +.. +.. Commands run: +.. +.. * hg push -r O +.. * hg push +.. +.. Expected exchange: +.. +.. * A (prune) +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos C.1 + creating test repo for test case C.1 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B + $ hg prune -qd '0 0' '.~1' + 1 new unstable changesets + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x f6fbb35d8ac9 (draft): B + | + x f5bc6836db60 (draft): A + | + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55 + obshashrange + ============ + rev node index size depth obshash + 0 a9bdc8b26820 0 1 1 1ce18e5a71f7 + $ cd .. + $ cd .. + + $ cp -R C.1 C.1.a + $ cp -R C.1 C.1.b + +Actual Test (explicit push) +--------------------------- + + $ dotest C.1.a O + ## Running testcase C.1.a + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 2 new obsolescence markers + ## post push state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 2 new obsolescence markers + ## post pull state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push) +------------------------------------- + + $ dotest C.1.b + ## Running testcase C.1.b + ## initial state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 2 new obsolescence markers + ## post push state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 2 new obsolescence markers + ## post pull state + # obstore: main + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-C2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-C2.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,190 @@ +============================================ +Testing obsolescence markers push: Cases C.2 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category C: advanced case +TestCase 2: Pruned changeset on precursors +Variants: +# a: explicite push +# b: bare push + +C.2 Pruned changeset on precursors +================================== + +.. {{{ +.. B ⊗ +.. | +.. A ø⇠◔ A' +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A' succeed to A +.. * B (prune) +.. +.. Command run: +.. +.. * hg push -r A' +.. * hg push +.. +.. Expected exchange: +.. +.. * `A ø⇠o A'` +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Itinial + + $ setuprepos C.2 + creating test repo for test case C.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B + $ hg prune -qd '0 0' . + $ hg update -q 0 + $ mkcommit A1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg log -G --hidden + @ e5ea8f9c7314 (draft): A1 + | + | x 06055a7959d4 (draft): B + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31 + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 + obshashrange + ============ + rev node index size depth obshash + 3 e5ea8f9c7314 0 2 2 289cb0d058c8 + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 289cb0d058c8 + $ cd .. + $ cd .. + + $ cp -R C.2 C.2.a + $ cp -R C.2 C.2.b + +Actual Test (explicit push) +--------------------------- + + $ dotest C.2.a A1 + ## Running testcase C.2.a + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push) +------------------------------------- + + $ dotest C.2.b + ## Running testcase C.2.b + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-C3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-C3.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,189 @@ +============================================ +Testing obsolescence markers push: Cases C.3 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category C: advanced case +TestCase 3: Pruned changeset on precursors of another pruned one +Variants: +# a: explicite push +# b: bare push + +C.3 Pruned changeset on precursors of another pruned one +======================================================== + +.. {{{ +.. B ⊗ +.. | +.. A ø⇠⊗ A' +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A' succeed to A +.. * A' (prune +.. * B (prune) +.. +.. Command run: +.. +.. * hg push -r A' +.. * hg push +.. +.. Expected exchange: +.. +.. * `A ø⇠⊗ A'` +.. * A (prune) +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos C.3 + creating test repo for test case C.3 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B + $ hg prune -qd '0 0' . + $ hg update -q 0 + $ mkcommit A1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x e5ea8f9c7314 (draft): A1 + | + | x 06055a7959d4 (draft): B + | | + | x 28b51eb45704 (draft): A0 + |/ + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742 + obshashrange + ============ + rev node index size depth obshash + 0 a9bdc8b26820 0 1 1 40be80b35671 + $ cd .. + $ cd .. + + $ cp -R C.3 C.3.a + $ cp -R C.3 C.3.b + +Actual Test (explicit push) +--------------------------- + + $ dotest C.3.a O + ## Running testcase C.3.a + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 3 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 3 new obsolescence markers + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (bare push) +------------------------------------- + + $ dotest C.3.b + ## Running testcase C.3.b + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 3 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 3 new obsolescence markers + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-C4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-C4.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,141 @@ +============================================ +Testing obsolescence markers push: Cases C.4 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category C: advanced case +TestCase 4: multiple successors, one is pruned + +C.4 multiple successors, one is pruned +====================================== + +.. (A similarish situation can appends with split markers see the Z section) +.. +.. {{{ +.. A +.. B ○⇢ø⇠⊗ C +.. \|/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `A ø⇠○ B` +.. * `A ø⇠○ C` +.. * C (prune) +.. +.. Command run: +.. +.. * hg push -r O +.. +.. Expected exchange: +.. +.. * `A ø⇠○ C` +.. * C (prune) +.. +.. Expected exclude: +.. +.. * `A ø⇠○ B` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Implemented as the non-split version + + $ setuprepos C.4 + creating test repo for test case C.4 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ hg update -q 0 + $ mkcommit B + created new head + $ hg update -q 0 + $ mkcommit C + created new head + $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'` + $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'` + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x 7f7f229b13a6 (draft): C + | + | o 35b183996678 (draft): B + |/ + | x f5bc6836db60 (draft): A + |/ + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd + f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be + 35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327 + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60 + obshashrange + ============ + rev node index size depth obshash + 2 35b183996678 0 2 2 2a098b4a877f + 2 35b183996678 1 1 2 916e804c50de + 0 a9bdc8b26820 0 1 1 a9c02d134f5b + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest C.4 O + ## Running testcase C.4 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + 2 new obsolescence markers + ## post pull state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-D1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-D1.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,187 @@ +============================================ +Testing obsolescence markers push: Cases D.1 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category D: Partial Information Case +TestCase 1: Pruned changeset based on missing precursor of something not present +Variants: +# a: explicite push +# b: bare push + +D.1 Pruned changeset based on missing precursor of something not present +======================================================================== + +.. {{{ +.. B ⊗ +.. | +.. A ◌⇠◔ A' +.. |/ +.. ● O +.. }}} +.. +.. Markers exist from: +.. +.. * `A ø⇠o A'` +.. * B (prune) +.. +.. Command run: +.. +.. * hg push -r A' +.. * hg push +.. +.. Expected exchange: +.. +.. * `A ø⇠o A'` +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos D.1 + creating test repo for test case D.1 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B + $ hg up -q 0 + $ mkcommit A1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg prune -d '0 0' 'desc(B)' + 1 changesets pruned + $ hg strip --hidden -q 'desc(A0)' + $ hg log -G --hidden + @ e5ea8f9c7314 (draft): A1 + | + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 + obshashrange + ============ + rev node index size depth obshash + 1 e5ea8f9c7314 0 2 2 289cb0d058c8 + 0 a9bdc8b26820 0 1 1 000000000000 + 1 e5ea8f9c7314 1 1 2 289cb0d058c8 + $ cd .. + $ cd .. + + $ cp -R D.1 D.1.a + $ cp -R D.1 D.1.b + +Actual Test (explicit push) +--------------------------- + + $ dotest D.1.a A1 + ## Running testcase D.1.a + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + +Actual Test (base push) +--------------------------- + + $ dotest D.1.b + ## Running testcase D.1.b + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-D2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-D2.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,122 @@ +============================================ +Testing obsolescence markers push: Cases D.2 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category D: Partial Information Case +TestCase 2: missing prune target (prune in "pushed set") + +D.2 missing prune target (prune in "pushed set") +================================================ + +.. {{{ +.. A ø⇠✕ A' +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A' succeed to A +.. * A' (prune) +.. +.. Command runs: +.. +.. * hg push +.. +.. Expected exchange: +.. +.. * `A ø⇠o A'` +.. * A' (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + + $ setuprepos D.2 + creating test repo for test case D.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ hg up -q 0 + $ mkcommit A1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg prune --date '0 0' . + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory now at a9bdc8b26820 + 1 changesets pruned + $ hg strip --hidden -q 'desc(A1)' + $ hg log -G --hidden + x 28b51eb45704 (draft): A0 + | + @ a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d + obshashrange + ============ + rev node index size depth obshash + 0 a9bdc8b26820 0 1 1 554c0b12f7d9 + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest D.2 + ## Running testcase D.2 + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + 2 new obsolescence markers + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-D3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-D3.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,122 @@ +============================================ +Testing obsolescence markers push: Cases D.3 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category D: Partial Information Case +TestCase 3: missing prune target (prune not in "pushed set") + +D.3 missing prune target (prune not in "pushed set") +==================================================== + +.. {{{ +.. A ø⇠✕ A' +.. | | +.. | ○ B +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `A ø⇠o A'` +.. * A' (prune) +.. +.. Command runs: +.. +.. * hg push +.. +.. Expected exclude: +.. +.. * `A ø⇠o A'` +.. * A' (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos D.3 + creating test repo for test case D.3 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ hg up -q 0 + $ mkcommit B + created new head + $ mkcommit A1 + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg prune -d '0 0' . + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory now at 35b183996678 + 1 changesets pruned + $ hg strip --hidden -q 'desc(A1)' + $ hg log -G --hidden + @ 35b183996678 (draft): B + | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb + obshashrange + ============ + rev node index size depth obshash + 2 35b183996678 0 2 2 65a9f21dff07 + 2 35b183996678 1 1 2 65a9f21dff07 + 0 a9bdc8b26820 0 1 1 000000000000 + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest D.3 O + ## Running testcase D.3 + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + diff -r 150fee60887a -r f2ebe960998b tests/test-exchange-obsmarkers-case-D4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-obsmarkers-case-D4.t Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,153 @@ +============================================ +Testing obsolescence markers push: Cases D.4 +============================================ + +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). + +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. + +Category D: Partial Information Case +TestCase 4: Unknown changeset in between known changesets + +D.4 Unknown changeset in between known one +========================================== + +.. Mostly a clarification case +.. +.. {{{ +.. B ø⇠◌⇠○ B'' +.. | | +.. A ø⇠◌⇠◔ A' +.. \ / +.. ● O +.. +.. }}} +.. +.. Should be treated as A.3 case: +.. +.. {{{ +.. +.. B ø⇠○ B'' +.. | | +.. A ø⇠◔ A' +.. |/ +.. ● O +.. +.. }}} + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + + $ setuprepos D.4 + creating test repo for test case D.4 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ mkcommit B0 + $ hg update -q 0 + $ mkcommit A1 + created new head + $ mkcommit B1 + $ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'` + $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'` + $ hg log -G --hidden + @ 069b05c3876d (draft): B1 + | + o e5ea8f9c7314 (draft): A1 + | + | x 6e72f0a95b5e (draft): B0 + | | + | x 28b51eb45704 (draft): A0 + |/ + o a9bdc8b26820 (public): O + + $ inspect_obsmarkers + obsstore content + ================ + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a + 069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0 + obshashrange + ============ + rev node index size depth obshash + 4 069b05c3876d 0 3 3 a2b2331da650 + 3 e5ea8f9c7314 0 2 2 0aacc2f86e8f + 4 069b05c3876d 2 1 3 901f118d4333 + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 0aacc2f86e8f + $ cd .. + $ cd .. + +Actual Test +----------- + + $ dotest D.4 A1 + ## Running testcase D.4 + # testing echange of "A1" (e5ea8f9c7314) + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "A1" from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling "e5ea8f9c7314" from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} diff -r 150fee60887a -r f2ebe960998b tests/testlib/exchange-obsmarker-util.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/testlib/exchange-obsmarker-util.sh Sat Apr 08 12:48:20 2017 +0200 @@ -0,0 +1,140 @@ +#!/bin/sh +# setup config and various utility to test obsolescence marker exchanges tests + +cat >> $HGRCPATH <> $HGRCPATH + +mkcommit() { + echo "$1" > "$1" + hg add "$1" + hg ci -m "$1" +} +getid() { + hg log --hidden --template '{node}\n' --rev "$1" +} + +setuprepos() { + echo creating test repo for test case $1 + mkdir $1 + cd $1 + echo - pulldest + hg init pushdest + cd pushdest + mkcommit O + hg phase --public . + cd .. + echo - main + hg clone -q pushdest main + echo - pushdest + hg clone -q main pulldest + echo 'cd into `main` and proceed with env setup' +} + +inspect_obsmarkers (){ + # This exist as its own function to help the evolve extension reuse the tests as is. + # The evolve extensions version will includes more advances query (eg: + # related to obsmarkers discovery) to this. + echo 'obsstore content' + echo '================' + hg debugobsolete + echo 'obshashtree' + echo '===========' + hg debugobsrelsethashtree + echo 'obshashrange' + echo '============' + hg debugobshashrange --subranges --rev 'head()' +} + +dotest() { + # dotest TESTNAME [TARGETNODE] [PUSHFLAGS+] + # + # test exchange for the given test case. + # + # This function performs push and pull in all directions through all + # protocols and display the resulting obsolescence markers on all sides. + + testcase=$1 + shift + target="$1" + if [ $# -gt 0 ]; then + shift + fi + targetnode="" + desccall="" + cd $testcase + echo "## Running testcase $testcase" + if [ -n "$target" ]; then + desccall="desc("\'"$target"\'")" + targetnode="`hg -R main id -qr \"$desccall\"`" + echo "# testing echange of \"$target\" ($targetnode)" + fi + echo "## initial state" + echo "# obstore: main" + hg -R main debugobsolete | sort + echo "# obstore: pushdest" + hg -R pushdest debugobsolete | sort + echo "# obstore: pulldest" + hg -R pulldest debugobsolete | sort + + if [ -n "$target" ]; then + echo "## pushing \"$target\"" from main to pushdest + hg -R main push -r "$desccall" $@ pushdest + else + echo "## pushing from main to pushdest" + hg -R main push pushdest $@ + fi + echo "## post push state" + echo "# obstore: main" + hg -R main debugobsolete | sort + echo "# obstore: pushdest" + hg -R pushdest debugobsolete | sort + echo "# obstore: pulldest" + hg -R pulldest debugobsolete | sort + if [ -n "$target" ]; then + echo "## pulling \"$targetnode\"" from main into pulldest + hg -R pulldest pull -r $targetnode $@ main + else + echo "## pulling from main into pulldest" + hg -R pulldest pull main $@ + fi + echo "## post pull state" + echo "# obstore: main" + hg -R main debugobsolete | sort + echo "# obstore: pushdest" + hg -R pushdest debugobsolete | sort + echo "# obstore: pulldest" + hg -R pulldest debugobsolete | sort + + cd .. + +} diff -r 150fee60887a -r f2ebe960998b tests/testlib/exchange-util.sh --- a/tests/testlib/exchange-util.sh Sat Apr 08 12:45:39 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -#!/bin/sh - -cat >> $HGRCPATH <> $HGRCPATH - -mkcommit() { - echo "$1" > "$1" - hg add "$1" - hg ci -m "$1" -} -getid() { - hg log --hidden --template '{node}\n' --rev "$1" -} - -setuprepos() { - echo creating test repo for test case $1 - mkdir $1 - cd $1 - echo - pulldest - hg init pushdest - cd pushdest - mkcommit O - hg phase --public . - cd .. - echo - main - hg clone -q pushdest main - echo - pushdest - hg clone -q main pulldest - echo 'cd into `main` and proceed with env setup' -} - -dotest() { -# dotest TESTNAME [TARGETNODE] - - testcase=$1 - shift - target="$1" - if [ $# -gt 0 ]; then - shift - fi - targetnode="" - desccall="" - cd $testcase - echo "## Running testcase $testcase" - if [ -n "$target" ]; then - desccall="desc("\'"$target"\'")" - targetnode="`hg -R main id -qr \"$desccall\"`" - echo "# testing echange of \"$target\" ($targetnode)" - fi - echo "## initial state" - echo "# obstore: main" - hg -R main debugobsolete | sort - echo "# obstore: pushdest" - hg -R pushdest debugobsolete | sort - echo "# obstore: pulldest" - hg -R pulldest debugobsolete | sort - - if [ -n "$target" ]; then - echo "## pushing \"$target\"" from main to pushdest - hg -R main push -r "$desccall" $@ pushdest - else - echo "## pushing from main to pushdest" - hg -R main push pushdest $@ - fi - echo "## post push state" - echo "# obstore: main" - hg -R main debugobsolete | sort - echo "# obstore: pushdest" - hg -R pushdest debugobsolete | sort - echo "# obstore: pulldest" - hg -R pulldest debugobsolete | sort - if [ -n "$target" ]; then - echo "## pulling \"$targetnode\"" from main into pulldest - hg -R pulldest pull -r $targetnode $@ main - else - echo "## pulling from main into pulldest" - hg -R pulldest pull main $@ - fi - echo "## post pull state" - echo "# obstore: main" - hg -R main debugobsolete | sort - echo "# obstore: pushdest" - hg -R pushdest debugobsolete | sort - echo "# obstore: pulldest" - hg -R pulldest debugobsolete | sort - - cd .. - -}