annotate tests/test-exchange-A6.t @ 2056:b96ca1b51e04

push: exit obsexchange early if disabled We were exiting the function later, in particular -after- issuing a message about exchanging obsmarkers.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 07 Mar 2017 14:45:02 +0100
parents a49f2e7a2755
children 778afb036245
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
1
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
2
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
3
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
4 Initial setup
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
5
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
6 $ . $TESTDIR/_exc-util.sh
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
7
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
8
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
9 === A.6 between existing changeset ===
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
10
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
11 .. {{{
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
12 .. A ◕⇠● B
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
13 .. |/
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
14 .. ● O
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
15 .. }}}
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
16 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
17 .. Marker exist from:
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
18 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
19 .. * `A◕⇠● B`
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
20 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
21 .. Command run:
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
22 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
23 .. * hg push -r B
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
24 .. * hg push
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
25 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
26 .. Expected exchange:
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
27 ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
28 .. * `A◕⇠● B`
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
29
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
30
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
31 initial
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
32
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
33 $ setuprepos A.6
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
34 creating test repo for test case A.6
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
35 - pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
36 - main
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
37 - pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
38 cd into `main` and proceed with env setup
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
39 $ cd main
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
40 $ mkcommit A0
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
41 $ hg update -q 0
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
42 $ mkcommit A1
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
43 created new head
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
44
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
45 make both changeset known in remote
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
46
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
47 $ hg push -qf ../pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
48 $ hg push -qf ../pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
49
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
50 create a marker after this
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
51
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
52 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
53 $ hg log -G --hidden
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
54 @ e5ea8f9c7314 (draft): A1
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
55 |
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
56 | x 28b51eb45704 (draft): A0
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
57 |/
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
58 o a9bdc8b26820 (public): O
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
59
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
60 $ hg debugobsolete
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
61 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
62 $ cd ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
63 $ cd ..
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
64
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
65 $ cp -r A.6 A.6.a
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
66 $ cp -r A.6 A.6.b
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
67
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
68 Actual Test (explicit push version)
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
69 -----------------------------------
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
70
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
71 $ dotest A.6.a A1
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
72 ## Running testcase A.6.a
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
73 # testing echange of "A1" (e5ea8f9c7314)
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
74 ## initial state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
75 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
76 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
77 # obstore: pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
78 # obstore: pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
79 ## pushing "A1" from main to pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
80 pushing to pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
81 searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
82 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
83 remote: 1 new obsolescence markers
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
84 ## post push state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
85 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
86 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
87 # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
88 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
89 # obstore: pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
90 ## pulling "e5ea8f9c7314" from main into pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
91 pulling from main
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
92 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
93 1 new obsolescence markers
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
94 ## post pull state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
95 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
96 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
97 # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
98 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
99 # obstore: pulldest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
100 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
101
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
102 Actual Test (bare push version)
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
103 -------------------------------
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
104
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
105 $ dotest A.6.b
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
106 ## Running testcase A.6.b
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
107 ## initial state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
108 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
109 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
110 # obstore: pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
111 # obstore: pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
112 ## pushing from main to pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
113 pushing to pushdest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
114 searching for changes
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
115 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
116 remote: 1 new obsolescence markers
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
117 ## post push state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
118 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
119 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
120 # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
121 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
122 # obstore: pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
123 ## pulling from main into pulldest
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
124 pulling from main
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
125 searching for changes
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
126 no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
127 1 new obsolescence markers
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
128 ## post pull state
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
129 # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
130 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
131 # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
132 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
835
34a565a2058d exchange: add test case for A.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
133 # obstore: pulldest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
134 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}