Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG5996640fc6fe: tests: fix misspelling of supersede
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-push-checkheads-partial-C1.t (2 lines) | |||
M | tests/test-push-checkheads-partial-C2.t (2 lines) | |||
M | tests/test-push-checkheads-pruned-B2.t (2 lines) | |||
M | tests/test-push-checkheads-pruned-B3.t (4 lines) | |||
M | tests/test-push-checkheads-pruned-B5.t (4 lines) | |||
M | tests/test-push-checkheads-pruned-B8.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A1.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A2.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A3.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A4.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A5.t (2 lines) | |||
M | tests/test-push-checkheads-superceed-A6.t (6 lines) | |||
M | tests/test-push-checkheads-superceed-A7.t (6 lines) | |||
M | tests/test-push-checkheads-superceed-A8.t (2 lines) | |||
M | tests/test-push-checkheads-unpushed-D4.t (4 lines) | |||
M | tests/test-push-checkheads-unpushed-D5.t (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
81a853429f5e | f45e1618cbf6 | Anton Shestakov | Apr 27 2022, 11:45 AM |
TestCase 1: 2 changeset branch, only the head is rewritten | TestCase 1: 2 changeset branch, only the head is rewritten | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new changesets branches superceeding only the head of the old one | .. * 1 new changesets branches superseding only the head of the old one | ||||
.. * base of the old branch is still alive | .. * base of the old branch is still alive | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push denied | .. * push denied | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. |
TestCase 2: 2 changeset branch, only the base is rewritten | TestCase 2: 2 changeset branch, only the base is rewritten | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new changesets branches superceeding only the base of the old one | .. * 1 new changesets branches superseding only the base of the old one | ||||
.. * The old branch is still alive (base is obsolete, head is alive) | .. * The old branch is still alive (base is obsolete, head is alive) | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push denied | .. * push denied | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case B-2 | Testing head checking code: Case B-2 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category B: simple case involving pruned changesets | Category B: simple case involving pruned changesets | ||||
TestCase 2: multi-changeset branch, head is pruned, rest is superceeded | TestCase 2: multi-changeset branch, head is pruned, rest is superseded | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * old head is pruned | .. * old head is pruned |
==================================== | ==================================== | ||||
Testing head checking code: Case B-3 | Testing head checking code: Case B-3 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category B: simple case involving pruned changesets | Category B: simple case involving pruned changesets | ||||
TestCase 3: multi-changeset branch, other is pruned, rest is superceeded | TestCase 3: multi-changeset branch, other is pruned, rest is superseded | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * old head is superceeded | .. * old head is superseded | ||||
.. * old other is pruned | .. * old other is pruned | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push allowed | .. * push allowed | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case B-5 | Testing head checking code: Case B-5 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category B: simple case involving pruned changesets | Category B: simple case involving pruned changesets | ||||
TestCase 5: multi-changeset branch, mix of pruned and superceeded | TestCase 5: multi-changeset branch, mix of pruned and superseded | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 3 changeset branch | .. * 3 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * old head is pruned | .. * old head is pruned | ||||
.. * old mid is superceeded | .. * old mid is superseded | ||||
.. * old root is pruned | .. * old root is pruned | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push allowed | .. * push allowed | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case B-2 | Testing head checking code: Case B-2 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category B: simple case involving pruned changesets | Category B: simple case involving pruned changesets | ||||
TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other | TestCase 2: multi-changeset branch, head is pruned, rest is superseded, through other | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * old head is rewritten then pruned | .. * old head is rewritten then pruned |
==================================== | ==================================== | ||||
Testing head checking code: Case A-1 | Testing head checking code: Case A-1 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 1: single-changeset branch | TestCase 1: single-changeset branch | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 1 changeset branch | .. * 1 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case A-2 | Testing head checking code: Case A-2 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 2: multi-changeset branch | TestCase 2: multi-changeset branch | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 1 branch with 2 changesets | .. * 1 branch with 2 changesets | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case A-3 | Testing head checking code: Case A-3 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 3: multi-changeset branch with reordering | TestCase 3: multi-changeset branch with reordering | ||||
Push should be allowed | Push should be allowed | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 changeset branch | .. * 2 changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: |
==================================== | ==================================== | ||||
Testing head checking code: Case A-4 | Testing head checking code: Case A-4 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 4: New changeset as children of the successor | TestCase 4: New changeset as children of the successor | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 1-changeset branch | .. * 1-changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case A-5 | Testing head checking code: Case A-5 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 5: New changeset as parent of the successor | TestCase 5: New changeset as parent of the successor | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 1-changeset branch | .. * 1-changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. |
==================================== | ==================================== | ||||
Testing head checking code: Case A-6 | Testing head checking code: Case A-6 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head | TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 branch (1-changeset, and 2-changesets) | .. * 2 branch (1-changeset, and 2-changesets) | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new branch superceeding the base of the old-2-changesets-branch, | .. * 1 new branch superseding the base of the old-2-changesets-branch, | ||||
.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other | .. * 1 new changesets on the old-1-changeset-branch superseding the head of the other | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push allowed | .. * push allowed | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. | ||||
.. B'◔⇢ø B | .. B'◔⇢ø B |
==================================== | ==================================== | ||||
Testing head checking code: Case A-7 | Testing head checking code: Case A-7 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head | TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 branch (1-changeset, and 2-changesets) | .. * 2 branch (1-changeset, and 2-changesets) | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new branch superceeding the head of the old-2-changesets-branch, | .. * 1 new branch superseding the head of the old-2-changesets-branch, | ||||
.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other | .. * 1 new changesets on the old-1-changeset-branch superseding the base of the other | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push allowed | .. * push allowed | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: | ||||
.. | .. | ||||
.. B ø⇠◔ B' | .. B ø⇠◔ B' |
==================================== | ==================================== | ||||
Testing head checking code: Case A-8 | Testing head checking code: Case A-8 | ||||
==================================== | ==================================== | ||||
Mercurial checks for the introduction of new heads on push. Evolution comes | 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 | into play to detect if existing branches on the server are being replaced by | ||||
some of the new one we push. | some of the new one we push. | ||||
This case is part of a series of tests checking this behavior. | This case is part of a series of tests checking this behavior. | ||||
Category A: simple case involving a branch being superceeded by another. | Category A: simple case involving a branch being superseded by another. | ||||
TestCase 8: single-changeset branch indirect rewrite | TestCase 8: single-changeset branch indirect rewrite | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 1-changeset branch | .. * 1-changeset branch | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. |
TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch) | TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch) | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 branch (1 changeset, and 2 changesets) | .. * 2 branch (1 changeset, and 2 changesets) | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new branch superceeding the base of the old-2-changesets-branch, | .. * 1 new branch superseding the base of the old-2-changesets-branch, | ||||
.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other | .. * 1 new changesets on the old-1-changeset-branch superseding the head of the other | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push the new branch only -> push denied (variant a) | .. * push the new branch only -> push denied (variant a) | ||||
.. * push the existing branch only -> push allowed (variant b) | .. * push the existing branch only -> push allowed (variant b) | ||||
.. (pushing all is tested as case A-7) | .. (pushing all is tested as case A-7) | ||||
.. | .. | ||||
.. graph-summary: | .. graph-summary: |
TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch) | TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch) | ||||
.. old-state: | .. old-state: | ||||
.. | .. | ||||
.. * 2 branch (1 changeset, and 2 changesets) | .. * 2 branch (1 changeset, and 2 changesets) | ||||
.. | .. | ||||
.. new-state: | .. new-state: | ||||
.. | .. | ||||
.. * 1 new branch superceeding the head of the old-2-changesets-branch, | .. * 1 new branch superseding the head of the old-2-changesets-branch, | ||||
.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other | .. * 1 new changesets on the old-1-changeset-branch superseding the base of the other | ||||
.. | .. | ||||
.. expected-result: | .. expected-result: | ||||
.. | .. | ||||
.. * push the new branch only -> push denied | .. * push the new branch only -> push denied | ||||
.. * push the existing branch only -> push allowed | .. * push the existing branch only -> push allowed | ||||
.. /!\ This push create unstability/orphaning on the other hand and we should | .. /!\ This push create unstability/orphaning on the other hand and we should | ||||
.. probably detect/warn agains that. | .. probably detect/warn agains that. | ||||
.. | .. |