|
1 |
|
2 Initial setup |
|
3 |
|
4 $ . $TESTDIR/_exc-util.sh |
|
5 |
|
6 === A.3 new branch created === |
|
7 |
|
8 .. {{{ |
|
9 .. B' ○⇢ø B |
|
10 .. | | |
|
11 .. \Aø⇠◔ A' |
|
12 .. \|/ |
|
13 .. ● O |
|
14 .. }}} |
|
15 .. |
|
16 .. Marker exist from: |
|
17 .. |
|
18 .. * `Aø⇠○ A'` |
|
19 .. * `Bø⇠○ B'` |
|
20 .. |
|
21 .. Command run: |
|
22 .. |
|
23 .. * hg push -r A |
|
24 .. |
|
25 .. Expected exchange: |
|
26 .. |
|
27 .. * chain from A |
|
28 .. |
|
29 .. Expected Exclude: |
|
30 .. |
|
31 .. * chain from B |
|
32 .. |
|
33 .. Extra note: |
|
34 .. |
|
35 .. If A and B are remontly known, we should expect: |
|
36 .. |
|
37 .. * `hg push` will complain about the new head |
|
38 .. * `hg push` should complain about unstable history creation |
|
39 |
|
40 initial |
|
41 |
|
42 $ setuprepos A.3.a |
|
43 creating test repo for test case A.3.a |
|
44 - pulldest |
|
45 - main |
|
46 - pushdest |
|
47 cd into `main` and proceed with env setup |
|
48 $ cd main |
|
49 $ mkcommit A0 |
|
50 $ mkcommit B0 |
|
51 $ hg update -q 0 |
|
52 $ mkcommit A1 |
|
53 created new head |
|
54 $ hg update -q 0 |
|
55 $ mkcommit B1 |
|
56 created new head |
|
57 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` |
|
58 $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` |
|
59 $ hg log -G --hidden |
|
60 @ f6298a8ac3a4 (draft): B1 |
|
61 | |
|
62 | o e5ea8f9c7314 (draft): A1 |
|
63 |/ |
|
64 | x 6e72f0a95b5e (draft): B0 |
|
65 | | |
|
66 | x 28b51eb45704 (draft): A0 |
|
67 |/ |
|
68 o a9bdc8b26820 (public): O |
|
69 |
|
70 $ hg debugobsolete |
|
71 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
72 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
73 $ cd .. |
|
74 $ cd .. |
|
75 |
|
76 Actual Test for first version (changeset unknown remotly) |
|
77 --------------------------------------------------------- |
|
78 |
|
79 $ dotest A.3.a A1 |
|
80 ## Running testcase A.3.a |
|
81 # testing echange of "A1" (e5ea8f9c7314) |
|
82 ## initial state |
|
83 # obstore: main |
|
84 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
85 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
86 # obstore: pushdest |
|
87 # obstore: pulldest |
|
88 ## pushing "A1" from main to pushdest |
|
89 pushing to pushdest |
|
90 searching for changes |
|
91 adding changesets |
|
92 adding manifests |
|
93 adding file changes |
|
94 added 1 changesets with 1 changes to 1 files |
|
95 OBSEXC: computing relevant nodes |
|
96 OBSEXC: computing markers relevant to 2 nodes |
|
97 OBSEXC: encoding 1 markers |
|
98 OBSEXC: sending 1 pushkey payload (78 bytes) |
|
99 OBSEXC: DONE |
|
100 ## post push state |
|
101 # obstore: main |
|
102 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
103 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
104 # obstore: pushdest |
|
105 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
106 # obstore: pulldest |
|
107 ## pulling "e5ea8f9c7314" from main into pulldest |
|
108 pulling from main |
|
109 searching for changes |
|
110 adding changesets |
|
111 adding manifests |
|
112 adding file changes |
|
113 added 1 changesets with 1 changes to 1 files |
|
114 OBSEXC: pull obsolescence markers |
|
115 OBSEXC: merging obsolescence markers (62 bytes) |
|
116 OBSEXC: 1 markers added |
|
117 OBSEXC: DONE |
|
118 (run 'hg update' to get a working copy) |
|
119 ## post pull state |
|
120 # obstore: main |
|
121 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
122 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
123 # obstore: pushdest |
|
124 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
125 # obstore: pulldest |
|
126 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
127 |
|
128 |
|
129 other variant: changeset know remotly |
|
130 ------------------------------------------- |
|
131 |
|
132 $ setuprepos A.3.b |
|
133 creating test repo for test case A.3.b |
|
134 - pulldest |
|
135 - main |
|
136 - pushdest |
|
137 cd into `main` and proceed with env setup |
|
138 $ cd main |
|
139 $ mkcommit A0 |
|
140 $ mkcommit B0 |
|
141 $ hg push -q ../pushdest |
|
142 $ hg push -q ../pulldest |
|
143 $ hg update -q 0 |
|
144 $ mkcommit A1 |
|
145 created new head |
|
146 $ hg update -q 0 |
|
147 $ mkcommit B1 |
|
148 created new head |
|
149 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` |
|
150 $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` |
|
151 $ hg log -G --hidden |
|
152 @ f6298a8ac3a4 (draft): B1 |
|
153 | |
|
154 | o e5ea8f9c7314 (draft): A1 |
|
155 |/ |
|
156 | x 6e72f0a95b5e (draft): B0 |
|
157 | | |
|
158 | x 28b51eb45704 (draft): A0 |
|
159 |/ |
|
160 o a9bdc8b26820 (public): O |
|
161 |
|
162 $ hg debugobsolete |
|
163 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
164 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
165 $ cd .. |
|
166 $ cd .. |
|
167 |
|
168 Actual Test for first version (changeset unknown remotly) |
|
169 --------------------------------------------------------- |
|
170 |
|
171 check it complains about multiple heads |
|
172 |
|
173 $ cd A.3.b |
|
174 $ hg push -R main -r e5ea8f9c7314 pushdest |
|
175 pushing to pushdest |
|
176 searching for changes |
|
177 abort: push creates new remote head e5ea8f9c7314! |
|
178 (merge or see "hg help push" for details about pushing new heads) |
|
179 [255] |
|
180 $ cd .. |
|
181 |
|
182 test obsmarkers exchange. |
|
183 |
|
184 $ dotest A.3.b A1 -f |
|
185 ## Running testcase A.3.b |
|
186 # testing echange of "A1" (e5ea8f9c7314) |
|
187 ## initial state |
|
188 # obstore: main |
|
189 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
190 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
191 # obstore: pushdest |
|
192 # obstore: pulldest |
|
193 ## pushing "A1" from main to pushdest |
|
194 pushing to pushdest |
|
195 searching for changes |
|
196 adding changesets |
|
197 adding manifests |
|
198 adding file changes |
|
199 added 1 changesets with 1 changes to 1 files (+1 heads) |
|
200 OBSEXC: computing relevant nodes |
|
201 OBSEXC: computing markers relevant to 2 nodes |
|
202 OBSEXC: encoding 1 markers |
|
203 OBSEXC: sending 1 pushkey payload (78 bytes) |
|
204 OBSEXC: DONE |
|
205 ## post push state |
|
206 # obstore: main |
|
207 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
208 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
209 # obstore: pushdest |
|
210 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
211 # obstore: pulldest |
|
212 ## pulling "e5ea8f9c7314" from main into pulldest |
|
213 pulling from main |
|
214 searching for changes |
|
215 adding changesets |
|
216 adding manifests |
|
217 adding file changes |
|
218 added 1 changesets with 1 changes to 2 files (+1 heads) |
|
219 OBSEXC: pull obsolescence markers |
|
220 OBSEXC: merging obsolescence markers (62 bytes) |
|
221 OBSEXC: 1 markers added |
|
222 OBSEXC: DONE |
|
223 (run 'hg heads' to see heads, 'hg merge' to merge) |
|
224 1 new unstable changesets |
|
225 ## post pull state |
|
226 # obstore: main |
|
227 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
228 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {'date': '', 'user': 'test'} |
|
229 # obstore: pushdest |
|
230 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |
|
231 # obstore: pulldest |
|
232 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} |