Mercurial > evolve
annotate tests/test-push-checkheads-pruned-B7.t @ 5695:8c7de8f8bb42
evolve: respect command-templates.oneline-summary if configured
Mercurial has a new `command-templates.oneline-summary` config that is
respected by `hg rebase`, `hg phabsend`, and the bundled version of
`hg split`. This patch makes `hg evolve` also respect it. Unlike the
upstream commands, I let `hg evolve` use the existing template by
default. The reason I didn't change the default is that we have a
different template when topics are enabled and it's unclear how that
should work with the default from upstream. So at least for now, the
user will have to explicitly set the new config if they want it to
apply to `hg evolve`.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 30 Oct 2020 13:42:51 -0700 |
parents | 196ed65594dc |
children | 8d20c0af010a fc60328270ac |
rev | line source |
---|---|
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 ==================================== |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 Testing head checking code: Case B-7 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 ==================================== |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
6 into play to detect if existing branches on the server are being replaced by |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
7 some of the new one we push. |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
9 This case is part of a series of tests checking this behavior. |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
11 Category B: simple case involving pruned changesets |
5053
196ed65594dc
evolve: correct spelling of superseded everywhere else
Anton Shestakov <av6@dwimlabs.net>
parents:
4871
diff
changeset
|
12 TestCase 7: single changesets, pruned then superseded (on an existing changeset) |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 .. old-state: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 .. * 1 changeset branch |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 .. new-state: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 .. * old branch is rewritten onto the common set, |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 .. * the new version is then pruned. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 .. expected-result: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 .. * push allowed |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 .. graph-summary: |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 .. |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 .. A ø⇠⊗ A' |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 .. B ◔ | | |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 .. \|/ |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
32 .. ● |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
33 |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
34 $ . $TESTDIR/testlib/push-checkheads-util.sh |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
35 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 Test setup |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
37 ---------- |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
38 |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
39 $ mkdir B7 |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
40 $ cd B7 |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 $ setuprepos |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 creating basic server and client repo |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 updating to branch default |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 $ cd client |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 $ hg up 0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 $ mkcommit B0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
49 created new head |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 $ mkcommit A1 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
51 $ hg up 'desc(B0)' |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"` |
4871
a8ff17479fb8
branching: preserve test change on stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4860
diff
changeset
|
54 1 new obsolescence markers |
2754
21f06d932231
test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2710
diff
changeset
|
55 obsoleted 1 changesets |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 $ hg debugobsolete --record-parents `getid "desc(A1)"` |
4871
a8ff17479fb8
branching: preserve test change on stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4860
diff
changeset
|
57 1 new obsolescence markers |
2754
21f06d932231
test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2710
diff
changeset
|
58 obsoleted 1 changesets |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 $ hg log -G --hidden |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 x ba93660aff8d (draft): A1 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 | |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
62 @ 74ff5441d343 (draft): B0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
63 | |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
64 | x 8aaa48160adc (draft): A0 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
65 |/ |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
66 o 1e4be0697311 (public): root |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
69 Actual testing |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 -------------- |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
71 |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
72 $ hg push |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
73 pushing to $TESTTMP/B7/server (glob) |
2254
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 searching for changes |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
75 adding changesets |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
76 adding manifests |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 adding file changes |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
78 added 1 changesets with 1 changes to 1 files (+1 heads) |
446ed4c21bf6
check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
79 2 new obsolescence markers |
2710
e22de367fc74
compat: adapt to change in 53b3a1968aa6-core
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2277
diff
changeset
|
80 obsoleted 1 changesets |
2277
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
81 |
61d885899466
checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2254
diff
changeset
|
82 $ cd ../.. |