Mercurial > hg
annotate tests/test-push-checkheads-superceed-A2.t @ 34980:705d0f2bb677 stable
pathutil: add doctests for canonpath()
This is a followup to f445b10dc7fb. Since there's no way to ensure that more
drive letters than C: exist, this seems like the only way to test it. This is
enough to catch the f445b10dc7fb scenario, as well as CWD outside of the repo
when the path isn't prefixed with path/to/repo.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 03 Nov 2017 22:22:50 -0400 |
parents | eb586ed5d8ce |
children | 4441705b7111 |
rev | line source |
---|---|
31975
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 ==================================== |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 Testing head checking code: Case A-2 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 ==================================== |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 into play to detect if existing branches on the server are being replaced by |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
7 some of the new one we push. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
9 This case is part of a series of tests checking this behavior. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
11 Category A: simple case involving a branch being superceeded by another. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 TestCase 2: multi-changeset branch |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 .. old-state: |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
15 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
16 .. * 1 branch with 2 changesets |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
17 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
18 .. new-state: |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
19 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
20 .. * another 2-changeset branch succeeding the old one |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
21 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
22 .. expected-result: |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
23 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
24 .. * push allowed |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
25 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
26 .. graph-summary: |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
27 .. |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
28 .. B ø⇠◔ B' |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
29 .. | | |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
30 .. A ø⇠◔ A' |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
31 .. |/ |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
32 .. ● |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
33 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
34 $ . $TESTDIR/testlib/push-checkheads-util.sh |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
35 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
36 Test setup |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
37 ---------- |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
38 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
39 $ mkdir A2 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
40 $ cd A2 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
41 $ setuprepos |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
42 creating basic server and client repo |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
43 updating to branch default |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
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 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
45 $ cd server |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
46 $ mkcommit B0 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
47 $ cd ../client |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
48 $ hg pull |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
49 pulling from $TESTTMP/A2/server (glob) |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
50 searching for changes |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
51 adding changesets |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
52 adding manifests |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
53 adding file changes |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
54 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
33542
diff
changeset
|
55 new changesets d73caddc5533 |
31975
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
56 (run 'hg update' to get a working copy) |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
57 $ hg up 0 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
58 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
59 $ mkcommit A1 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
60 created new head |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
61 $ mkcommit B1 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
62 $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33252
diff
changeset
|
63 obsoleted 1 changesets |
31975
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
64 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
33252
diff
changeset
|
65 obsoleted 1 changesets |
31975
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
66 $ hg log -G --hidden |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
67 @ 262c8c798096 (draft): B1 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
68 | |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
69 o f6082bc4ffef (draft): A1 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
70 | |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
71 | x d73caddc5533 (draft): B0 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
72 | | |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
73 | x 8aaa48160adc (draft): A0 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
74 |/ |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
75 o 1e4be0697311 (public): root |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
76 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
77 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
78 Actual testing |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
79 -------------- |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
80 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
81 $ hg push |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
82 pushing to $TESTTMP/A2/server (glob) |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
83 searching for changes |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
84 adding changesets |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
85 adding manifests |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
86 adding file changes |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
87 added 2 changesets with 2 changes to 2 files (+1 heads) |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
88 2 new obsolescence markers |
33252
53b3a1968aa6
obsolete: reports the number of local changeset obsoleted when unbundling
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
31975
diff
changeset
|
89 obsoleted 2 changesets |
31975
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
90 |
76169296e52f
obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
91 $ cd ../.. |