Mercurial > evolve
annotate tests/test-push-checkheads-multibranches-E1.t @ 5992:eb1333a0c290
tests: use `| tee` for writing to files at the same time as to stdout
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 01 Jul 2021 14:36:20 +0300 |
parents | 11c359b4071d |
children | 35e769c9604f fc60328270ac ebc2dea354a2 |
rev | line source |
---|---|
5223
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 ==================================== |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 Testing head checking code: Case E-1 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 ==================================== |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 Mercurial checks for the introduction of new heads on push. Evolution comes |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 into play to detect if existing branches on the server are being replaced by |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 some of the new one we push. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 This case is part of a series of tests checking this behavior. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 Category E: case involving changeset on multiple branch |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 TestCase 8: moving a branch to another location |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 .. old-state: |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
16 .. * 1-changeset on branch default |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 .. * 1-changeset on branch Z (above default) |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
18 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 .. new-state: |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 .. * 1-changeset on branch default |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 .. * 1-changeset on branch Z (rebased away from A0) |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 .. expected-result: |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 .. * push allowed |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 .. graph-summary: |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 .. |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 .. B ø⇠◔ B' |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 .. | | |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 .. A ◔ | |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 .. |/ |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 .. ● |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 $ . $TESTDIR/testlib/topic_setup.sh |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 $ . $TESTDIR/testlib/push-checkheads-util.sh |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 Test setup |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 ---------- |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 $ mkdir E1 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 $ cd E1 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 $ setuprepos |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 creating basic server and client repo |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 updating to branch default |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 $ cd client |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 $ hg branch Z |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 marked working directory as branch Z |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 (branches are permanent and global, did you want a bookmark?) |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 $ mkcommit B0 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 $ hg push --new-branch |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 pushing to $TESTTMP/E1/server |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
55 searching for changes |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 adding changesets |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 adding manifests |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 adding file changes |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
59 added 1 changesets with 1 changes to 1 files |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 $ hg up 0 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 $ hg branch --force Z |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
63 marked working directory as branch Z |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 $ mkcommit B1 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 created new head |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 (consider using topic for lightweight branches. See 'hg help topic') |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"` |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 1 new obsolescence markers |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 obsoleted 1 changesets |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 $ hg log -G --hidden |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 @ c98b855401e7 (draft): B1 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 | |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 | x 93e5c1321ece (draft): B0 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 | | |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 | o 8aaa48160adc (draft): A0 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 |/ |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 o 1e4be0697311 (public): root |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 Actual testing |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 -------------- |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 $ hg push |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 pushing to $TESTTMP/E1/server |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 searching for changes |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
86 adding changesets |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 adding manifests |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 adding file changes |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
89 added 1 changesets with 1 changes to 1 files (+1 heads) |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
90 1 new obsolescence markers |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 obsoleted 1 changesets |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 |
11c359b4071d
head-checking: backport fix from 7d5455b988ec
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 $ cd ../.. |