# HG changeset patch # User Pierre-Yves David # Date 1492683883 -7200 # Node ID 61d8858994667980b72a2de9f8e36336f9609e69 # Parent 2d55ae0d6ce7bb182d6fdae46cfb0d4266041245 checkheads: update tests to match the one in core These test now exists in core, so we update the evolve version. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-partial-C1.t --- a/tests/test-checkheads-partial-C1.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -==================================== -Testing head checking code: Case C-1 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category C: checking case were the branch is only partially obsoleted. -TestCase 1: 2 changeset branch, only the head is rewritten - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * 1 new changesets branches superceeding only the head of the old one -.. * base of the old branch is still alive -.. -.. expected-result: -.. -.. * push denied -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A ○ | -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ 25c56d33e4c4 (draft): B1 - | - | x d73caddc5533 (draft): B0 - | | - | o 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 25c56d33e4c4! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-partial-C2.t --- a/tests/test-checkheads-partial-C2.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -==================================== -Testing head checking code: Case C-2 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category C: checking case were the branch is only partially obsoleted. -TestCase 2: 2 changeset branch, only the base is rewritten - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * 1 new changesets branches superceeding only the base of the old one -.. * The old branch is still alive (base is obsolete, head is alive) -.. -.. expected-result: -.. -.. * push denied -.. -.. graph-summary: -.. -.. B ○ -.. | -.. A ø⇠◔ A' -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg log -G --hidden - @ f6082bc4ffef (draft): A1 - | - | o d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head f6082bc4ffef! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-partial-C3.t --- a/tests/test-checkheads-partial-C3.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -==================================== -Testing head checking code: Case C-3 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category C: checking case were the branch is only partially obsoleted. -TestCase 3: 2 changeset branch, only the head is pruned - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old head is pruned -.. * 1 new unrelated branch -.. -.. expected-result: -.. -.. * push denied -.. -.. graph-summary: -.. -.. B ⊗ -.. | -.. A ◔ ◔ C -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg debugobsolete --record-parents `getid "desc(B0)"` - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | x d73caddc5533 (draft): B0 - | | - | o 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 0f88766e02d6! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-partial-C4.t --- a/tests/test-checkheads-partial-C4.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -==================================== -Testing head checking code: Case C-4 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category C: checking case were the branch is only partially obsoleted. -TestCase 4: 2 changeset branch, only the base is pruned - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old base is pruned -.. * 1 new unrelated branch -.. -.. expected-result: -.. -.. * push denied -.. -.. graph-summary: -.. -.. B ◔ -.. | -.. A ⊗ ◔ C -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg debugobsolete --record-parents `getid "desc(A0)"` - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | o d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 0f88766e02d6! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B1.t --- a/tests/test-checkheads-pruned-B1.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -==================================== -Testing head checking code: Case B-1 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 1: single pruned changeset - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old branch is pruned -.. * 1 new unrelated branch -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. ◔ B -.. | -.. A ⊗ | -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ hg debugobsolete --record-parents `getid "desc(A0)"` - $ hg log -G --hidden - @ 74ff5441d343 (draft): B0 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - 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 - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B2.t --- a/tests/test-checkheads-pruned-B2.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -==================================== -Testing head checking code: Case B-2 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 2: multi-changeset branch, head is pruned, rest is superceeded - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old head is pruned -.. * 1 new branch succeeding to the other changeset in the old branch -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ⊗ -.. | -.. A ø⇠◔ A' -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete --record-parents `getid "desc(B0)"` - $ hg log -G --hidden - @ f6082bc4ffef (draft): A1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B3.t --- a/tests/test-checkheads-pruned-B3.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -==================================== -Testing head checking code: Case B-3 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 3: multi-changeset branch, other is pruned, rest is superceeded - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old head is superceeded -.. * old other is pruned -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A ⊗ | -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ hg debugobsolete --record-parents `getid "desc(A0)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ 25c56d33e4c4 (draft): B1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B4.t --- a/tests/test-checkheads-pruned-B4.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -==================================== -Testing head checking code: Case B-4 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 4: multi-changeset branch, all are pruned - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old branch is pruned -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ⊗ -.. | -.. A ⊗ -.. | -.. | ◔ C -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg debugobsolete --record-parents `getid "desc(A0)"` - $ hg debugobsolete --record-parents `getid "desc(B0)"` - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B5.t --- a/tests/test-checkheads-pruned-B5.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -==================================== -Testing head checking code: Case B-5 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 5: multi-changeset branch, mix of pruned and superceeded - -.. old-state: -.. -.. * 3 changeset branch -.. -.. new-state: -.. -.. * old head is pruned -.. * old mid is superceeded -.. * old root is pruned -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ⊗ -.. | -.. A ø⇠◔ A' -.. | | -.. B ⊗ | -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ mkcommit C0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - (run 'hg update' to get a working copy) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ hg debugobsolete --record-parents `getid "desc(A0)"` - $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"` - $ hg debugobsolete --record-parents `getid "desc(C0)"` - $ hg log -G --hidden - @ 25c56d33e4c4 (draft): B1 - | - | x 821fb21d0dd2 (draft): C0 - | | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 3 new obsolescence markers - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B6.t --- a/tests/test-checkheads-pruned-B6.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -==================================== -Testing head checking code: Case B-6 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 6: single changesets, pruned then superseeded (on a new changeset) - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old branch is rewritten onto another one, -.. * the new version is then pruned. -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠⊗ A' -.. | | -.. | ◔ B -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg up 'desc(B0)' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` - $ hg debugobsolete --record-parents `getid "desc(A1)"` - $ hg log -G --hidden - x ba93660aff8d (draft): A1 - | - @ 74ff5441d343 (draft): B0 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B7.t --- a/tests/test-checkheads-pruned-B7.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -==================================== -Testing head checking code: Case B-7 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 7: single changesets, pruned then superseeded (on an existing changeset) - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old branch is rewritten onto the common set, -.. * the new version is then pruned. -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠⊗ A' -.. B ◔ | | -.. \|/ -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg up 'desc(B0)' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` - $ hg debugobsolete --record-parents `getid "desc(A1)"` - $ hg log -G --hidden - x ba93660aff8d (draft): A1 - | - @ 74ff5441d343 (draft): B0 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-pruned-B8.t --- a/tests/test-checkheads-pruned-B8.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -==================================== -Testing head checking code: Case B-2 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category B: checking simple case involving pruned changesets -TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * old head is rewritten then pruned -.. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch) -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠⊗ B' -.. | | A' -.. A ø⇠ø⇠◔ A'' -.. |/ / -.. | / -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ mkcommit B1 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit A2 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg debugobsolete --record-parents `getid "desc(B1)"` - $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` - $ hg log -G --hidden - @ c1f8d089020f (draft): A2 - | - | x 262c8c798096 (draft): B1 - | | - | x f6082bc4ffef (draft): A1 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 4 new obsolescence markers - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A1.t --- a/tests/test-checkheads-superceed-A1.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -==================================== -Testing head checking code: Case A-1 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 1: single-changeset branch - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 1 changeset branch succeeding to A -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠◔ A' -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg log -G --hidden - @ f6082bc4ffef (draft): A1 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - 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 - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A2.t --- a/tests/test-checkheads-superceed-A2.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -==================================== -Testing head checking code: Case A-2 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 2: multi-changeset branch - -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * 2 changeset branch succeeding the old one -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A ø⇠◔ A' -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ mkcommit B1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ 262c8c798096 (draft): B1 - | - o f6082bc4ffef (draft): A1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A3.t --- a/tests/test-checkheads-superceed-A3.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -==================================== -Testing head checking code: Case A-3 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 3: multi-changeset branch with reordering - -Push should be allowed -.. old-state: -.. -.. * 2 changeset branch -.. -.. new-state: -.. -.. * 2 changeset branch succeeding the old one with reordering -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠⇠ -.. | ⇡ -.. A ø⇠⇠⇠○ A' -.. | ⇡/ -.. | ○ B' -.. |/ -.. ● O - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - created new head - $ mkcommit A1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ c1c7524e9488 (draft): A1 - | - o 25c56d33e4c4 (draft): B1 - | - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A4.t --- a/tests/test-checkheads-superceed-A4.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -==================================== -Testing head checking code: Case A-4 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 4: New changeset as children of the successor - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 2 changeset branch, first is a successor, but head is new -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. ◔ B -.. | -.. A ø⇠◔ A' -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ mkcommit B0 - $ hg log -G --hidden - @ f40ded968333 (draft): B0 - | - o f6082bc4ffef (draft): A1 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 1 new obsolescence markers - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A5.t --- a/tests/test-checkheads-superceed-A5.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -==================================== -Testing head checking code: Case A-5 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 5: New changeset as parent of the successor - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 2 changeset branch, head is a successor, but other is new -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A ø⇠◔ A' -.. | | -.. | ◔ B -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg log -G --hidden - @ ba93660aff8d (draft): A1 - | - o 74ff5441d343 (draft): B0 - | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 1 new obsolescence markers - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A6.t --- a/tests/test-checkheads-superceed-A6.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -==================================== -Testing head checking code: Case A-6 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch) - -.. old-state: -.. -.. * 2 branch (1 changeset, and 2 changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the base of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B'◔⇢ø B -.. | | -.. A | ø⇠◔ A' -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ d70a1f75a020 (draft): B1 - | - | o f6082bc4ffef (draft): A1 - | | - o | 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A7.t --- a/tests/test-checkheads-superceed-A7.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -==================================== -Testing head checking code: Case A-7 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch) - -.. old-state: -.. -.. * 2 branch (1 changeset, and 2 changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the head of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A'◔⇢ø | -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ 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 - @ 25c56d33e4c4 (draft): B1 - | - | o a0802eb7fc1b (draft): A1 - | | - | o 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - 2 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-superceed-A8.t --- a/tests/test-checkheads-superceed-A8.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -==================================== -Testing head checking code: Case A-8 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 8: single-changeset branch indirect rewrite - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 1 changeset branch succeeding to A, through another unpushed changesets -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A' -.. A ø⇠ø⇠◔ A'' -.. |/ / -.. | / -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A2 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` - $ hg log -G --hidden - @ c1f8d089020f (draft): A2 - | - | x f6082bc4ffef (draft): A1 - |/ - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 2 new obsolescence markers - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D1.t --- a/tests/test-checkheads-unpushed-D1.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -==================================== -Testing head checking code: Case D-1 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 1: remote head is rewritten, but successors is not part of the push - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * 1 changeset branch succeeding the old branch -.. * 1 new unrelated branch -.. -.. expected-result: -.. -.. * pushing only the unrelated branch: denied -.. -.. graph-summary: -.. -.. A ø⇠○ A' -.. |/ -.. | ◔ B -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ hg log -G --hidden - @ 74ff5441d343 (draft): B0 - | - | o f6082bc4ffef (draft): A1 - |/ - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push -r 'desc(B0)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 74ff5441d343! - (merge or see 'hg help push' for details about pushing new heads) - [255] - - - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D2.t --- a/tests/test-checkheads-unpushed-D2.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -==================================== -Testing head checking code: Case D-2 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 1: remote branch has 2 changes, head is pruned, second is rewritten but result is not pushed - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old head is pruned -.. * 1 new branch succeeding to the other changeset in the old branch -.. * 1 new unrelated branch -.. -.. expected-result: -.. -.. * push allowed -.. * pushing only the unrelated branch: denied -.. -.. graph-summary: -.. -.. B ⊗ -.. | -.. A ø⇠○ A' -.. |/ -.. | ◔ C -.. |/ -.. ○ - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete --record-parents `getid "desc(B0)"` - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | o f6082bc4ffef (draft): A1 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 0f88766e02d6! - (merge or see 'hg help push' for details about pushing new heads) - [255] - diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D3.t --- a/tests/test-checkheads-unpushed-D3.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -==================================== -Testing head checking code: Case D-3 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 3: multi-changeset branch, split on multiple new others, only one of them is pushed - -.. old-state: -.. -.. * 2 changesets branch -.. -.. new-state: -.. -.. * 2 new branches, each superseding one changeset in the old one. -.. -.. expected-result: -.. -.. * pushing only one of the resulting branch (either of them) -.. * push denied -.. -.. graph-summary: -.. -.. B'◔⇢ø B -.. | | -.. A | ø⇠◔ A' -.. | |/ -.. \| -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - 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) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up '0' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ 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 - @ 25c56d33e4c4 (draft): B1 - | - | o f6082bc4ffef (draft): A1 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head f6082bc4ffef! - (merge or see 'hg help push' for details about pushing new heads) - [255] - $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 25c56d33e4c4! - (merge or see 'hg help push' for details about pushing new heads) - [255] - -Extra testing -------------- - -In this case, even a bare push is creating more heads - - $ hg push - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 25c56d33e4c4! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D4.t --- a/tests/test-checkheads-unpushed-D4.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -==================================== -Testing head checking code: Case D-4 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch) - -.. old-state: -.. -.. * 2 branch (1 changeset, and 2 changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the base of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other -.. -.. expected-result: -.. -.. * push the new branch only -> push denied -.. * push the existing branch only -> push allowed -.. -.. graph-summary: -.. -.. B'◔⇢ø B -.. | | -.. A | ø⇠◔ A' -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - created new head - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B1 - $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` - $ hg log -G --hidden - @ d70a1f75a020 (draft): B1 - | - | o f6082bc4ffef (draft): A1 - | | - o | 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head f6082bc4ffef! - (merge or see 'hg help push' for details about pushing new heads) - [255] - $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D5.t --- a/tests/test-checkheads-unpushed-D5.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -==================================== -Testing head checking code: Case D-5 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch) - -.. old-state: -.. -.. * 2 branch (1 changeset, and 2 changesets) -.. -.. new-state: -.. -.. * 1 new branch superceeding the head of the old-2-changesets-branch, -.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other -.. -.. expected-result: -.. -.. * push the new branch only -> push denied -.. * push the existing branch only -> push allowed -.. /!\ This push create unstability/orphaning on the other hand and we should -.. probably detect/warn agains that. -.. -.. graph-summary: -.. -.. B ø⇠◔ B' -.. | | -.. A'◔⇢ø | -.. | |/ -.. C ● | -.. \| -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd server - $ mkcommit B0 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ cd ../client - $ hg pull - pulling from $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files (+1 heads) - (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up 'desc(C0)' - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit A1 - $ hg up 0 - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ 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 - @ 25c56d33e4c4 (draft): B1 - | - | o a0802eb7fc1b (draft): A1 - | | - | o 0f88766e02d6 (draft): C0 - |/ - | x d73caddc5533 (draft): B0 - | | - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - - -Actual testing --------------- - - $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 25c56d33e4c4! - (merge or see 'hg help push' for details about pushing new heads) - [255] - $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D6.t --- a/tests/test-checkheads-unpushed-D6.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -==================================== -Testing head checking code: Case D-6 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 6: single changesets, superseeded then pruned (on a new changeset unpushed) changeset - -This is a partial push variation of B6 - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old branch is rewritten onto another one, -.. * the new version is then pruned. -.. -.. expected-result: -.. -.. * push denied -.. -.. graph-summary: -.. -.. A ø⇠⊗ A' -.. | | -.. C ◔ | ◔ B -.. \|/ -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg up '0' - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` - $ hg debugobsolete --record-parents `getid "desc(A1)"` - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | x ba93660aff8d (draft): A1 - | | - | o 74ff5441d343 (draft): B0 - |/ - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server - searching for changes - abort: push creates new remote head 0f88766e02d6! - (merge or see 'hg help push' for details about pushing new heads) - [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-checkheads-unpushed-D7.t --- a/tests/test-checkheads-unpushed-D7.t Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -==================================== -Testing head checking code: Case D-7 -==================================== - -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. - -This test file is part of a series of tests checking this behavior. - -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset - -This is a partial push variation of B6 - -.. old-state: -.. -.. * 1 changeset branch -.. -.. new-state: -.. -.. * old branch is rewritten onto another one, -.. * The rewriting it again rewritten on the root -.. * the new version is then pruned. -.. -.. expected-result: -.. -.. * push allowed -.. -.. graph-summary: -.. -.. A' -.. A ø⇠ø⇠⊗ A'' -.. | | | -.. C ◔ | ◔ | B -.. \|/ / -.. | / -.. |/ -.. | -.. ● - - $ . $TESTDIR/testlib/checkheads-util.sh - -Test setup ----------- - - $ setuprepos - creating basic server and client repo - updating to branch default - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd client - $ hg up 0 - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit B0 - created new head - $ mkcommit A1 - $ hg up '0' - 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - $ mkcommit A2 - created new head - $ hg up '0' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ mkcommit C0 - created new head - $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` - $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"` - $ hg debugobsolete --record-parents `getid "desc(A2)"` - $ hg log -G --hidden - @ 0f88766e02d6 (draft): C0 - | - | x c1f8d089020f (draft): A2 - |/ - | x ba93660aff8d (draft): A1 - | | - | o 74ff5441d343 (draft): B0 - |/ - | x 8aaa48160adc (draft): A0 - |/ - o 1e4be0697311 (public): root - - -Actual testing --------------- - - $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files (+1 heads) - 3 new obsolescence markers diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-partial-C1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-partial-C1.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,79 @@ +==================================== +Testing head checking code: Case C-1 +==================================== + +Mercurial checks for the introduction of multiple heads on push. Evolution +comes into play to detect if existing heads on the server are being replaced by +some of the new heads we push. + +This test file is part of a series of tests checking this behavior. + +Category C: checking case were the branch is only partially obsoleted. +TestCase 1: 2 changeset branch, only the head is rewritten + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * 1 new changesets branches superceeding only the head of the old one +.. * base of the old branch is still alive +.. +.. expected-result: +.. +.. * push denied +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A ○ | +.. |/ +.. ○ + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/server + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ 25c56d33e4c4 (draft): B1 + | + | x d73caddc5533 (draft): B0 + | | + | o 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/server + searching for changes + abort: push creates new remote head 25c56d33e4c4! + (merge or see 'hg help push' for details about pushing new heads) + [255] diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-partial-C2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-partial-C2.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,82 @@ +==================================== +Testing head checking code: Case C-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category C: case were the branch is only partially obsoleted +TestCase 2: 2 changeset branch, only the base is rewritten + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * 1 new changesets branches superceeding only the base of the old one +.. * The old branch is still alive (base is obsolete, head is alive) +.. +.. expected-result: +.. +.. * push denied +.. +.. graph-summary: +.. +.. B ○ +.. | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir C2 + $ cd C2 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/C2/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg log -G --hidden + @ f6082bc4ffef (draft): A1 + | + | o d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(A1)' + pushing to $TESTTMP/C2/server (glob) + searching for changes + abort: push creates new remote head f6082bc4ffef! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-partial-C3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-partial-C3.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,82 @@ +==================================== +Testing head checking code: Case C-3 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category C: case were the branch is only partially obsoleted +TestCase 3: 2 changeset branch, only the head is pruned + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old head is pruned +.. * 1 new unrelated branch +.. +.. expected-result: +.. +.. * push denied +.. +.. graph-summary: +.. +.. B ⊗ +.. | +.. A ◔ ◔ C +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir C3 + $ cd C3 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/C3/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg debugobsolete --record-parents `getid "desc(B0)"` + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | x d73caddc5533 (draft): B0 + | | + | o 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/C3/server (glob) + searching for changes + abort: push creates new remote head 0f88766e02d6! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-partial-C4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-partial-C4.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,82 @@ +==================================== +Testing head checking code: Case C-4 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category C: case were the branch is only partially obsoleted +TestCase 4: 2 changeset branch, only the base is pruned + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old base is pruned +.. * 1 new unrelated branch +.. +.. expected-result: +.. +.. * push denied +.. +.. graph-summary: +.. +.. B ◔ +.. | +.. A ⊗ ◔ C +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir C4 + $ cd C4 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/C4/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg debugobsolete --record-parents `getid "desc(A0)"` + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | o d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(C0)' + pushing to $TESTTMP/C4/server (glob) + searching for changes + abort: push creates new remote head 0f88766e02d6! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B1.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,72 @@ +==================================== +Testing head checking code: Case B-1 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 1: single pruned changeset + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old branch is pruned +.. * 1 new unrelated branch +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. ◔ B +.. | +.. A ⊗ | +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B1 + $ cd B1 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ hg debugobsolete --record-parents `getid "desc(A0)"` + $ hg log -G --hidden + @ 74ff5441d343 (draft): B0 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B1/server (glob) + 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 + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B2.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,85 @@ +==================================== +Testing head checking code: Case B-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 2: multi-changeset branch, head is pruned, rest is superceeded + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old head is pruned +.. * 1 new branch succeeding to the other changeset in the old branch +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ⊗ +.. | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B2 + $ cd B2 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/B2/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete --record-parents `getid "desc(B0)"` + $ hg log -G --hidden + @ f6082bc4ffef (draft): A1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B2/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B3.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,86 @@ +==================================== +Testing head checking code: Case B-3 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 3: multi-changeset branch, other is pruned, rest is superceeded + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old head is superceeded +.. * old other is pruned +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A ⊗ | +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B3 + $ cd B3 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/B3/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ hg debugobsolete --record-parents `getid "desc(A0)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ 25c56d33e4c4 (draft): B1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B3/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. + diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B4.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,86 @@ +==================================== +Testing head checking code: Case B-4 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 4: multi-changeset branch, all are pruned + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old branch is pruned +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ⊗ +.. | +.. A ⊗ +.. | +.. | ◔ C +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B4 + $ cd B4 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/B4/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg debugobsolete --record-parents `getid "desc(A0)"` + $ hg debugobsolete --record-parents `getid "desc(B0)"` + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B4/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B5.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B5.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,92 @@ +==================================== +Testing head checking code: Case B-5 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 5: multi-changeset branch, mix of pruned and superceeded + +.. old-state: +.. +.. * 3 changeset branch +.. +.. new-state: +.. +.. * old head is pruned +.. * old mid is superceeded +.. * old root is pruned +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ⊗ +.. | +.. A ø⇠◔ A' +.. | | +.. B ⊗ | +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B5 + $ cd B5 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ mkcommit C0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/B5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + (run 'hg update' to get a working copy) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ hg debugobsolete --record-parents `getid "desc(A0)"` + $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"` + $ hg debugobsolete --record-parents `getid "desc(C0)"` + $ hg log -G --hidden + @ 25c56d33e4c4 (draft): B1 + | + | x 821fb21d0dd2 (draft): C0 + | | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 3 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B6.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B6.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,78 @@ +==================================== +Testing head checking code: Case B-6 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 6: single changesets, pruned then superseeded (on a new changeset) + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old branch is rewritten onto another one, +.. * the new version is then pruned. +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠⊗ A' +.. | | +.. | ◔ B +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B6 + $ cd B6 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg up 'desc(B0)' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` + $ hg debugobsolete --record-parents `getid "desc(A1)"` + $ hg log -G --hidden + x ba93660aff8d (draft): A1 + | + @ 74ff5441d343 (draft): B0 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B6/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B7.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B7.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,77 @@ +==================================== +Testing head checking code: Case B-7 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 7: single changesets, pruned then superseeded (on an existing changeset) + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old branch is rewritten onto the common set, +.. * the new version is then pruned. +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠⊗ A' +.. B ◔ | | +.. \|/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B7 + $ cd B7 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg up 'desc(B0)' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` + $ hg debugobsolete --record-parents `getid "desc(A1)"` + $ hg log -G --hidden + x ba93660aff8d (draft): A1 + | + @ 74ff5441d343 (draft): B0 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-pruned-B8.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-pruned-B8.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,98 @@ +==================================== +Testing head checking code: Case B-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category B: simple case involving pruned changesets +TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other + +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * old head is rewritten then pruned +.. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch) +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠⊗ B' +.. | | A' +.. A ø⇠ø⇠◔ A'' +.. |/ / +.. | / +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir B8 + $ cd B8 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/B8/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ mkcommit B1 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit A2 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg debugobsolete --record-parents `getid "desc(B1)"` + $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` + $ hg log -G --hidden + @ c1f8d089020f (draft): A2 + | + | x 262c8c798096 (draft): B1 + | | + | x f6082bc4ffef (draft): A1 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/B8/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 4 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A1.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,69 @@ +==================================== +Testing head checking code: Case A-1 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 1: single-changeset branch + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * 1 changeset branch succeeding to A +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A1 + $ cd A1 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg log -G --hidden + @ f6082bc4ffef (draft): A1 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A1/server (glob) + 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 + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A2.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,87 @@ +==================================== +Testing head checking code: Case A-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 2: multi-changeset branch + +.. old-state: +.. +.. * 1 branch with 2 changesets +.. +.. new-state: +.. +.. * another 2-changeset branch succeeding the old one +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A2 + $ cd A2 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/A2/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ mkcommit B1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ 262c8c798096 (draft): B1 + | + o f6082bc4ffef (draft): A1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A2/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A3.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,90 @@ +==================================== +Testing head checking code: Case A-3 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 3: multi-changeset branch with reordering + +Push should be allowed +.. old-state: +.. +.. * 2 changeset branch +.. +.. new-state: +.. +.. * 2 changeset branch succeeding the old one with reordering +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠⇠ +.. | ⇡ +.. A ø⇠⇠⇠○ A' +.. | ⇡/ +.. | ○ B' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A3 + $ cd A3 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/A3/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + created new head + $ mkcommit A1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ c1c7524e9488 (draft): A1 + | + o 25c56d33e4c4 (draft): B1 + | + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A3/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A4.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,74 @@ +==================================== +Testing head checking code: Case A-4 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 4: New changeset as children of the successor + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 2-changeset branch, first is a successor, but head is new +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. ◔ B +.. | +.. A ø⇠◔ A' +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A4 + $ cd A4 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ mkcommit B0 + $ hg log -G --hidden + @ f40ded968333 (draft): B0 + | + o f6082bc4ffef (draft): A1 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A4/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 1 new obsolescence markers + + $ cd ../../ diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A5.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A5.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,75 @@ +==================================== +Testing head checking code: Case A-5 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 5: New changeset as parent of the successor + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 2rchangeset branch, head is a successor, but other is new +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A ø⇠◔ A' +.. | | +.. | ◔ B +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A5 + $ cd A5 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg log -G --hidden + @ ba93660aff8d (draft): A1 + | + o 74ff5441d343 (draft): B0 + | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 1 new obsolescence markers + + $ cd ../.. + diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A6.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A6.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,98 @@ +==================================== +Testing head checking code: Case A-6 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head + +.. old-state: +.. +.. * 2 branch (1-changeset, and 2-changesets) +.. +.. new-state: +.. +.. * 1 new branch superceeding the base of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B'◔⇢ø B +.. | | +.. A | ø⇠◔ A' +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A6 + $ cd A6 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/A6/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ d70a1f75a020 (draft): B1 + | + | o f6082bc4ffef (draft): A1 + | | + o | 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A6/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A7.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A7.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,98 @@ +==================================== +Testing head checking code: Case A-7 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head + +.. old-state: +.. +.. * 2 branch (1-changeset, and 2-changesets) +.. +.. new-state: +.. +.. * 1 new branch superceeding the head of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A'◔⇢ø | +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A7 + $ cd A7 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/A7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ 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 + @ 25c56d33e4c4 (draft): B1 + | + | o a0802eb7fc1b (draft): A1 + | | + | o 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-superceed-A8.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-superceed-A8.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,79 @@ +==================================== +Testing head checking code: Case A-8 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category A: simple case involving a branch being superceeded by another. +TestCase 8: single-changeset branch indirect rewrite + +.. old-state: +.. +.. * 1-changeset branch +.. +.. new-state: +.. +.. * 1-changeset branch succeeding to A, through another unpushed changesets +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A' +.. A ø⇠ø⇠◔ A'' +.. |/ / +.. | / +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir A8 + $ cd A8 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A2 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"` + $ hg log -G --hidden + @ c1f8d089020f (draft): A2 + | + | x f6082bc4ffef (draft): A1 + |/ + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push + pushing to $TESTTMP/A8/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 2 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D1.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D1.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,77 @@ +==================================== +Testing head checking code: Case D-1 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 1: remote head is rewritten, but successors is not part of the push + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * 1 changeset branch succeeding the old branch +.. * 1 new unrelated branch +.. +.. expected-result: +.. +.. * pushing only the unrelated branch: denied +.. +.. graph-summary: +.. +.. A ø⇠○ A' +.. |/ +.. | ◔ B +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D1 + $ cd D1 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ hg log -G --hidden + @ 74ff5441d343 (draft): B0 + | + | o f6082bc4ffef (draft): A1 + |/ + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push -r 'desc(B0)' + pushing to $TESTTMP/D1/server (glob) + searching for changes + abort: push creates new remote head 74ff5441d343! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. + diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D2.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,93 @@ +==================================== +Testing head checking code: Case D-2 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 1: remote branch has 2 changes, head is pruned, other is rewritten but result is not pushed + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old head is pruned +.. * 1 new branch succeeding to the other changeset in the old branch +.. * 1 new unrelated branch +.. +.. expected-result: +.. +.. * push allowed +.. * pushing only the unrelated branch: denied +.. +.. graph-summary: +.. +.. B ⊗ +.. | +.. A ø⇠○ A' +.. |/ +.. | ◔ C +.. |/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D2 + $ cd D2 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ cd ../client + $ hg pull + pulling from $TESTTMP/D2/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete --record-parents `getid "desc(B0)"` + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | o f6082bc4ffef (draft): A1 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(C0)' + pushing to $TESTTMP/D2/server (glob) + searching for changes + abort: push creates new remote head 0f88766e02d6! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D3.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D3.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,110 @@ +==================================== +Testing head checking code: Case D-3 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 3: multi-changeset branch, split on multiple new others, only one of them is pushed + +.. old-state: +.. +.. * 2 changesets branch +.. +.. new-state: +.. +.. * 2 new branches, each superseding one changeset in the old one. +.. +.. expected-result: +.. +.. * pushing only one of the resulting branch (either of them) +.. * push denied +.. +.. graph-summary: +.. +.. B'◔⇢ø B +.. | | +.. A | ø⇠◔ A' +.. | |/ +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D3 + $ cd D3 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ cd ../client + $ hg pull + pulling from $TESTTMP/D3/server (glob) + 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) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up '0' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ 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 + @ 25c56d33e4c4 (draft): B1 + | + | o f6082bc4ffef (draft): A1 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(A1)' + pushing to $TESTTMP/D3/server (glob) + searching for changes + abort: push creates new remote head f6082bc4ffef! + (merge or see 'hg help push' for details about pushing new heads) + [255] + $ hg push --rev 'desc(B1)' + pushing to $TESTTMP/D3/server (glob) + searching for changes + abort: push creates new remote head 25c56d33e4c4! + (merge or see 'hg help push' for details about pushing new heads) + [255] + +Extra testing +------------- + +In this case, even a bare push is creating more heads + + $ hg push + pushing to $TESTTMP/D3/server (glob) + searching for changes + abort: push creates new remote head 25c56d33e4c4! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D4.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D4.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,122 @@ +==================================== +Testing head checking code: Case D-4 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch) + +.. old-state: +.. +.. * 2 branch (1 changeset, and 2 changesets) +.. +.. new-state: +.. +.. * 1 new branch superceeding the base of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other +.. +.. expected-result: +.. +.. * push the new branch only -> push denied (variant a) +.. * push the existing branch only -> push allowed (variant b) +.. (pushing all is tested as case A-7) +.. +.. graph-summary: +.. +.. (variant a) +.. +.. B'○⇢ø B +.. | | +.. A | ø⇠◔ A' +.. | |/ +.. C ● | +.. \| +.. ● +.. +.. or (variant b) +.. +.. B'◔⇢ø B +.. | | +.. A | ø⇠○ A' +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D4 + $ cd D4 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/D4/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + created new head + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B1 + $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` + $ hg log -G --hidden + @ d70a1f75a020 (draft): B1 + | + | o f6082bc4ffef (draft): A1 + | | + o | 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing (new branch only) +-------------------------------- + + $ hg push --rev 'desc(A1)' + pushing to $TESTTMP/D4/server (glob) + searching for changes + abort: push creates new remote head f6082bc4ffef! + (merge or see 'hg help push' for details about pushing new heads) + [255] + +Actual testing (existing branch only) +------------------------------------ + + $ hg push --rev 'desc(B1)' + pushing to $TESTTMP/D4/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D5.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D5.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,107 @@ +==================================== +Testing head checking code: Case D-5 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch) + +.. old-state: +.. +.. * 2 branch (1 changeset, and 2 changesets) +.. +.. new-state: +.. +.. * 1 new branch superceeding the head of the old-2-changesets-branch, +.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other +.. +.. expected-result: +.. +.. * push the new branch only -> push denied +.. * push the existing branch only -> push allowed +.. /!\ This push create unstability/orphaning on the other hand and we should +.. probably detect/warn agains that. +.. +.. graph-summary: +.. +.. B ø⇠◔ B' +.. | | +.. A'◔⇢ø | +.. | |/ +.. C ● | +.. \| +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D5 + $ cd D5 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd server + $ mkcommit B0 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ cd ../client + $ hg pull + pulling from $TESTTMP/D5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files (+1 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up 'desc(C0)' + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit A1 + $ hg up 0 + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ 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 + @ 25c56d33e4c4 (draft): B1 + | + | o a0802eb7fc1b (draft): A1 + | | + | o 0f88766e02d6 (draft): C0 + |/ + | x d73caddc5533 (draft): B0 + | | + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(B1)' + pushing to $TESTTMP/D5/server (glob) + searching for changes + abort: push creates new remote head 25c56d33e4c4! + (merge or see 'hg help push' for details about pushing new heads) + [255] + $ hg push --rev 'desc(A1)' + pushing to $TESTTMP/D5/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 1 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D6.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D6.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,82 @@ +==================================== +Testing head checking code: Case D-6 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 6: single changeset, superseeded then pruned (on a new changeset unpushed) changeset + +This is a partial push variation of case B-6 + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old branch is rewritten onto another one, +.. * the new version is then pruned. +.. +.. expected-result: +.. +.. * push denied +.. +.. graph-summary: +.. +.. A ø⇠⊗ A' +.. | | +.. C ◔ | ○ B +.. \|/ +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D6 + $ cd D6 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg up '0' + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` + $ hg debugobsolete --record-parents `getid "desc(A1)"` + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | x ba93660aff8d (draft): A1 + | | + | o 74ff5441d343 (draft): B0 + |/ + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(C0)' + pushing to $TESTTMP/D6/server (glob) + searching for changes + abort: push creates new remote head 0f88766e02d6! + (merge or see 'hg help push' for details about pushing new heads) + [255] + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/test-push-checkheads-unpushed-D7.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-push-checkheads-unpushed-D7.t Thu Apr 20 12:24:43 2017 +0200 @@ -0,0 +1,96 @@ +==================================== +Testing head checking code: Case D-7 +==================================== + +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. + +This case is part of a series of tests checking this behavior. + +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset + +This is a partial push variation of B6 + +.. old-state: +.. +.. * 1 changeset branch +.. +.. new-state: +.. +.. * old branch is rewritten onto another one, +.. * The rewriting it again rewritten on the root +.. * the new version is then pruned. +.. +.. expected-result: +.. +.. * push allowed +.. +.. graph-summary: +.. +.. A' +.. A ø⇠ø⇠⊗ A'' +.. | | | +.. C ◔ | ◔ | B +.. \|/ / +.. | / +.. |/ +.. | +.. ● + + $ . $TESTDIR/testlib/push-checkheads-util.sh + +Test setup +---------- + + $ mkdir D7 + $ cd D7 + $ setuprepos + creating basic server and client repo + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd client + $ hg up 0 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit B0 + created new head + $ mkcommit A1 + $ hg up '0' + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ mkcommit A2 + created new head + $ hg up '0' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ mkcommit C0 + created new head + $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` + $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"` + $ hg debugobsolete --record-parents `getid "desc(A2)"` + $ hg log -G --hidden + @ 0f88766e02d6 (draft): C0 + | + | x c1f8d089020f (draft): A2 + |/ + | x ba93660aff8d (draft): A1 + | | + | o 74ff5441d343 (draft): B0 + |/ + | x 8aaa48160adc (draft): A0 + |/ + o 1e4be0697311 (public): root + + +Actual testing +-------------- + + $ hg push --rev 'desc(C0)' + pushing to $TESTTMP/D7/server (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files (+1 heads) + 3 new obsolescence markers + + $ cd ../.. diff -r 2d55ae0d6ce7 -r 61d885899466 tests/testlib/checkheads-util.sh --- a/tests/testlib/checkheads-util.sh Thu Apr 20 11:43:57 2017 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -# common setup for head checking code - -. $TESTDIR/testlib/common.sh - -cat >> $HGRCPATH <> $HGRCPATH <