Show More
@@ -1,968 +1,977 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH << EOF |
|
2 | 2 | > [phases] |
|
3 | 3 | > # public changeset are not obsolete |
|
4 | 4 | > publish=false |
|
5 | 5 | > [ui] |
|
6 | 6 | > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n" |
|
7 | 7 | > [experimental] |
|
8 | 8 | > # drop me once bundle2 is the default, |
|
9 | 9 | > # added to get test change early. |
|
10 | 10 | > bundle2-exp = True |
|
11 | 11 | > EOF |
|
12 | 12 | $ mkcommit() { |
|
13 | 13 | > echo "$1" > "$1" |
|
14 | 14 | > hg add "$1" |
|
15 | 15 | > hg ci -m "add $1" |
|
16 | 16 | > } |
|
17 | 17 | $ getid() { |
|
18 | 18 | > hg log -T "{node}\n" --hidden -r "desc('$1')" |
|
19 | 19 | > } |
|
20 | 20 | |
|
21 | 21 | $ cat > debugkeys.py <<EOF |
|
22 | 22 | > def reposetup(ui, repo): |
|
23 | 23 | > class debugkeysrepo(repo.__class__): |
|
24 | 24 | > def listkeys(self, namespace): |
|
25 | 25 | > ui.write('listkeys %s\n' % (namespace,)) |
|
26 | 26 | > return super(debugkeysrepo, self).listkeys(namespace) |
|
27 | 27 | > |
|
28 | 28 | > if repo.local(): |
|
29 | 29 | > repo.__class__ = debugkeysrepo |
|
30 | 30 | > EOF |
|
31 | 31 | |
|
32 | 32 | $ hg init tmpa |
|
33 | 33 | $ cd tmpa |
|
34 | 34 | $ mkcommit kill_me |
|
35 | 35 | |
|
36 | 36 | Checking that the feature is properly disabled |
|
37 | 37 | |
|
38 | 38 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
39 | 39 | abort: creating obsolete markers is not enabled on this repo |
|
40 | 40 | [255] |
|
41 | 41 | |
|
42 | 42 | Enabling it |
|
43 | 43 | |
|
44 | 44 | $ cat >> $HGRCPATH << EOF |
|
45 | 45 | > [experimental] |
|
46 | 46 | > evolution=createmarkers,exchange |
|
47 | 47 | > EOF |
|
48 | 48 | |
|
49 | 49 | Killing a single changeset without replacement |
|
50 | 50 | |
|
51 | 51 | $ hg debugobsolete 0 |
|
52 | 52 | abort: changeset references must be full hexadecimal node identifiers |
|
53 | 53 | [255] |
|
54 | 54 | $ hg debugobsolete '00' |
|
55 | 55 | abort: changeset references must be full hexadecimal node identifiers |
|
56 | 56 | [255] |
|
57 | 57 | $ hg debugobsolete -d '0 0' `getid kill_me` -u babar |
|
58 | 58 | $ hg debugobsolete |
|
59 | 59 | 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'} |
|
60 | 60 | |
|
61 | 61 | (test that mercurial is not confused) |
|
62 | 62 | |
|
63 | 63 | $ hg up null --quiet # having 0 as parent prevents it to be hidden |
|
64 | 64 | $ hg tip |
|
65 | 65 | -1:000000000000 (public) [tip ] |
|
66 | 66 | $ hg up --hidden tip --quiet |
|
67 | 67 | |
|
68 | 68 | Killing a single changeset with itself should fail |
|
69 | 69 | (simple local safeguard) |
|
70 | 70 | |
|
71 | 71 | $ hg debugobsolete `getid kill_me` `getid kill_me` |
|
72 | 72 | abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0 |
|
73 | 73 | [255] |
|
74 | 74 | |
|
75 | 75 | $ cd .. |
|
76 | 76 | |
|
77 | 77 | Killing a single changeset with replacement |
|
78 | 78 | (and testing the format option) |
|
79 | 79 | |
|
80 | 80 | $ hg init tmpb |
|
81 | 81 | $ cd tmpb |
|
82 | 82 | $ mkcommit a |
|
83 | 83 | $ mkcommit b |
|
84 | 84 | $ mkcommit original_c |
|
85 | 85 | $ hg up "desc('b')" |
|
86 | 86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
87 | 87 | $ mkcommit new_c |
|
88 | 88 | created new head |
|
89 | 89 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
90 | 90 | $ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120' |
|
91 | 91 | $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden |
|
92 | 92 | 2:245bde4270cd add original_c |
|
93 | 93 | $ hg debugrevlog -cd |
|
94 | 94 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
95 | 95 | 0 -1 -1 0 59 0 0 0 0 58 58 0 1 0 |
|
96 | 96 | 1 0 -1 59 118 59 59 0 0 58 116 0 1 0 |
|
97 | 97 | 2 1 -1 118 193 118 118 59 0 76 192 0 1 0 |
|
98 | 98 | 3 1 -1 193 260 193 193 59 0 66 258 0 2 0 |
|
99 | 99 | $ hg debugobsolete |
|
100 | 100 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
101 | 101 | |
|
102 | 102 | (check for version number of the obsstore) |
|
103 | 103 | |
|
104 | 104 | $ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null |
|
105 | 105 | \x00 (no-eol) (esc) |
|
106 | 106 | |
|
107 | 107 | do it again (it read the obsstore before adding new changeset) |
|
108 | 108 | |
|
109 | 109 | $ hg up '.^' |
|
110 | 110 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
111 | 111 | $ mkcommit new_2_c |
|
112 | 112 | created new head |
|
113 | 113 | $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c` |
|
114 | 114 | $ hg debugobsolete |
|
115 | 115 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
116 | 116 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
117 | 117 | |
|
118 | 118 | Register two markers with a missing node |
|
119 | 119 | |
|
120 | 120 | $ hg up '.^' |
|
121 | 121 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
122 | 122 | $ mkcommit new_3_c |
|
123 | 123 | created new head |
|
124 | 124 | $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337 |
|
125 | 125 | $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c` |
|
126 | 126 | $ hg debugobsolete |
|
127 | 127 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
128 | 128 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
129 | 129 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
130 | 130 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
131 | 131 | |
|
132 | 132 | Refuse pathological nullid successors |
|
133 | 133 | $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000 |
|
134 | 134 | transaction abort! |
|
135 | 135 | rollback completed |
|
136 | 136 | abort: bad obsolescence marker detected: invalid successors nullid |
|
137 | 137 | [255] |
|
138 | 138 | |
|
139 | 139 | Check that graphlog detect that a changeset is obsolete: |
|
140 | 140 | |
|
141 | 141 | $ hg log -G |
|
142 | 142 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
143 | 143 | | |
|
144 | 144 | o 1:7c3bad9141dc (draft) [ ] add b |
|
145 | 145 | | |
|
146 | 146 | o 0:1f0dee641bb7 (draft) [ ] add a |
|
147 | 147 | |
|
148 | 148 | |
|
149 | 149 | check that heads does not report them |
|
150 | 150 | |
|
151 | 151 | $ hg heads |
|
152 | 152 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
153 | 153 | $ hg heads --hidden |
|
154 | 154 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
155 | 155 | 4:ca819180edb9 (draft) [ ] add new_2_c |
|
156 | 156 | 3:cdbce2fbb163 (draft) [ ] add new_c |
|
157 | 157 | 2:245bde4270cd (draft) [ ] add original_c |
|
158 | 158 | |
|
159 | 159 | |
|
160 | 160 | check that summary does not report them |
|
161 | 161 | |
|
162 | 162 | $ hg init ../sink |
|
163 | 163 | $ echo '[paths]' >> .hg/hgrc |
|
164 | 164 | $ echo 'default=../sink' >> .hg/hgrc |
|
165 | 165 | $ hg summary --remote |
|
166 | 166 | parent: 5:5601fb93a350 tip |
|
167 | 167 | add new_3_c |
|
168 | 168 | branch: default |
|
169 | 169 | commit: (clean) |
|
170 | 170 | update: (current) |
|
171 | 171 | phases: 3 draft |
|
172 | 172 | remote: 3 outgoing |
|
173 | 173 | |
|
174 | 174 | $ hg summary --remote --hidden |
|
175 | 175 | parent: 5:5601fb93a350 tip |
|
176 | 176 | add new_3_c |
|
177 | 177 | branch: default |
|
178 | 178 | commit: (clean) |
|
179 | 179 | update: 3 new changesets, 4 branch heads (merge) |
|
180 | 180 | phases: 6 draft |
|
181 | 181 | remote: 3 outgoing |
|
182 | 182 | |
|
183 | 183 | check that various commands work well with filtering |
|
184 | 184 | |
|
185 | 185 | $ hg tip |
|
186 | 186 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
187 | 187 | $ hg log -r 6 |
|
188 | 188 | abort: unknown revision '6'! |
|
189 | 189 | [255] |
|
190 | 190 | $ hg log -r 4 |
|
191 | 191 | abort: hidden revision '4'! |
|
192 | 192 | (use --hidden to access hidden revisions) |
|
193 | 193 | [255] |
|
194 | 194 | $ hg debugrevspec 'rev(6)' |
|
195 | 195 | $ hg debugrevspec 'rev(4)' |
|
196 | 196 | $ hg debugrevspec 'null' |
|
197 | 197 | -1 |
|
198 | 198 | |
|
199 | 199 | Check that public changeset are not accounted as obsolete: |
|
200 | 200 | |
|
201 | 201 | $ hg --hidden phase --public 2 |
|
202 | 202 | $ hg log -G |
|
203 | 203 | @ 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
204 | 204 | | |
|
205 | 205 | | o 2:245bde4270cd (public) [ ] add original_c |
|
206 | 206 | |/ |
|
207 | 207 | o 1:7c3bad9141dc (public) [ ] add b |
|
208 | 208 | | |
|
209 | 209 | o 0:1f0dee641bb7 (public) [ ] add a |
|
210 | 210 | |
|
211 | 211 | |
|
212 | 212 | And that bumped changeset are detected |
|
213 | 213 | -------------------------------------- |
|
214 | 214 | |
|
215 | 215 | If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also |
|
216 | 216 | note that the bumped changeset (5:5601fb93a350) is not a direct successor of |
|
217 | 217 | the public changeset |
|
218 | 218 | |
|
219 | 219 | $ hg log --hidden -r 'bumped()' |
|
220 | 220 | 5:5601fb93a350 (draft) [tip ] add new_3_c |
|
221 | 221 | |
|
222 | 222 | And that we can't push bumped changeset |
|
223 | 223 | |
|
224 | 224 | $ hg push ../tmpa -r 0 --force #(make repo related) |
|
225 | 225 | pushing to ../tmpa |
|
226 | 226 | searching for changes |
|
227 | 227 | warning: repository is unrelated |
|
228 | 228 | adding changesets |
|
229 | 229 | adding manifests |
|
230 | 230 | adding file changes |
|
231 | 231 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
232 | 232 | $ hg push ../tmpa |
|
233 | 233 | pushing to ../tmpa |
|
234 | 234 | searching for changes |
|
235 | 235 | abort: push includes bumped changeset: 5601fb93a350! |
|
236 | 236 | [255] |
|
237 | 237 | |
|
238 | 238 | Fixing "bumped" situation |
|
239 | 239 | We need to create a clone of 5 and add a special marker with a flag |
|
240 | 240 | |
|
241 | 241 | $ hg up '5^' |
|
242 | 242 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
243 | 243 | $ hg revert -ar 5 |
|
244 | 244 | adding new_3_c |
|
245 | 245 | $ hg ci -m 'add n3w_3_c' |
|
246 | 246 | created new head |
|
247 | 247 | $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c` |
|
248 | 248 | $ hg log -r 'bumped()' |
|
249 | 249 | $ hg log -G |
|
250 | 250 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
251 | 251 | | |
|
252 | 252 | | o 2:245bde4270cd (public) [ ] add original_c |
|
253 | 253 | |/ |
|
254 | 254 | o 1:7c3bad9141dc (public) [ ] add b |
|
255 | 255 | | |
|
256 | 256 | o 0:1f0dee641bb7 (public) [ ] add a |
|
257 | 257 | |
|
258 | 258 | |
|
259 | 259 | $ cd .. |
|
260 | 260 | |
|
261 | 261 | Revision 0 is hidden |
|
262 | 262 | -------------------- |
|
263 | 263 | |
|
264 | 264 | $ hg init rev0hidden |
|
265 | 265 | $ cd rev0hidden |
|
266 | 266 | |
|
267 | 267 | $ mkcommit kill0 |
|
268 | 268 | $ hg up -q null |
|
269 | 269 | $ hg debugobsolete `getid kill0` |
|
270 | 270 | $ mkcommit a |
|
271 | 271 | $ mkcommit b |
|
272 | 272 | |
|
273 | 273 | Should pick the first visible revision as "repo" node |
|
274 | 274 | |
|
275 | 275 | $ hg archive ../archive-null |
|
276 | 276 | $ cat ../archive-null/.hg_archival.txt |
|
277 | 277 | repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e |
|
278 | 278 | node: 7c3bad9141dcb46ff89abf5f61856facd56e476c |
|
279 | 279 | branch: default |
|
280 | 280 | latesttag: null |
|
281 | 281 | latesttagdistance: 2 |
|
282 | 282 | changessincelatesttag: 2 |
|
283 | 283 | |
|
284 | 284 | |
|
285 | 285 | $ cd .. |
|
286 | 286 | |
|
287 | 287 | Exchange Test |
|
288 | 288 | ============================ |
|
289 | 289 | |
|
290 | 290 | Destination repo does not have any data |
|
291 | 291 | --------------------------------------- |
|
292 | 292 | |
|
293 | 293 | Simple incoming test |
|
294 | 294 | |
|
295 | 295 | $ hg init tmpc |
|
296 | 296 | $ cd tmpc |
|
297 | 297 | $ hg incoming ../tmpb |
|
298 | 298 | comparing with ../tmpb |
|
299 | 299 | 0:1f0dee641bb7 (public) [ ] add a |
|
300 | 300 | 1:7c3bad9141dc (public) [ ] add b |
|
301 | 301 | 2:245bde4270cd (public) [ ] add original_c |
|
302 | 302 | 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
303 | 303 | |
|
304 | 304 | Try to pull markers |
|
305 | 305 | (extinct changeset are excluded but marker are pushed) |
|
306 | 306 | |
|
307 | 307 | $ hg pull ../tmpb |
|
308 | 308 | pulling from ../tmpb |
|
309 | 309 | requesting all changes |
|
310 | 310 | adding changesets |
|
311 | 311 | adding manifests |
|
312 | 312 | adding file changes |
|
313 | 313 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
314 | 314 | 5 new obsolescence markers |
|
315 | 315 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
316 | 316 | $ hg debugobsolete |
|
317 | 317 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
318 | 318 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
319 | 319 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
320 | 320 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
321 | 321 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
322 | 322 | |
|
323 | 323 | Rollback//Transaction support |
|
324 | 324 | |
|
325 | 325 | $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
326 | 326 | $ hg debugobsolete |
|
327 | 327 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
328 | 328 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
329 | 329 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
330 | 330 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
331 | 331 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
332 | 332 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'} |
|
333 | 333 | $ hg rollback -n |
|
334 | 334 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
335 | 335 | $ hg rollback |
|
336 | 336 | repository tip rolled back to revision 3 (undo debugobsolete) |
|
337 | 337 | $ hg debugobsolete |
|
338 | 338 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
339 | 339 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
340 | 340 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
341 | 341 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
342 | 342 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
343 | 343 | |
|
344 | 344 | $ cd .. |
|
345 | 345 | |
|
346 | 346 | Try to push markers |
|
347 | 347 | |
|
348 | 348 | $ hg init tmpd |
|
349 | 349 | $ hg -R tmpb push tmpd |
|
350 | 350 | pushing to tmpd |
|
351 | 351 | searching for changes |
|
352 | 352 | adding changesets |
|
353 | 353 | adding manifests |
|
354 | 354 | adding file changes |
|
355 | 355 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
356 | 356 | 5 new obsolescence markers |
|
357 | 357 | $ hg -R tmpd debugobsolete | sort |
|
358 | 358 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
359 | 359 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
360 | 360 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
361 | 361 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
362 | 362 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
363 | 363 | |
|
364 | 364 | Check obsolete keys are exchanged only if source has an obsolete store |
|
365 | 365 | |
|
366 | 366 | $ hg init empty |
|
367 | 367 | $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd |
|
368 | 368 | pushing to tmpd |
|
369 | 369 | listkeys phases |
|
370 | 370 | listkeys bookmarks |
|
371 | 371 | no changes found |
|
372 | 372 | listkeys phases |
|
373 | 373 | [1] |
|
374 | 374 | |
|
375 | 375 | clone support |
|
376 | 376 | (markers are copied and extinct changesets are included to allow hardlinks) |
|
377 | 377 | |
|
378 | 378 | $ hg clone tmpb clone-dest |
|
379 | 379 | updating to branch default |
|
380 | 380 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
381 | 381 | $ hg -R clone-dest log -G --hidden |
|
382 | 382 | @ 6:6f9641995072 (draft) [tip ] add n3w_3_c |
|
383 | 383 | | |
|
384 | 384 | | x 5:5601fb93a350 (draft) [ ] add new_3_c |
|
385 | 385 | |/ |
|
386 | 386 | | x 4:ca819180edb9 (draft) [ ] add new_2_c |
|
387 | 387 | |/ |
|
388 | 388 | | x 3:cdbce2fbb163 (draft) [ ] add new_c |
|
389 | 389 | |/ |
|
390 | 390 | | o 2:245bde4270cd (public) [ ] add original_c |
|
391 | 391 | |/ |
|
392 | 392 | o 1:7c3bad9141dc (public) [ ] add b |
|
393 | 393 | | |
|
394 | 394 | o 0:1f0dee641bb7 (public) [ ] add a |
|
395 | 395 | |
|
396 | 396 | $ hg -R clone-dest debugobsolete |
|
397 | 397 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
398 | 398 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
399 | 399 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
400 | 400 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
401 | 401 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
402 | 402 | |
|
403 | 403 | |
|
404 | 404 | Destination repo have existing data |
|
405 | 405 | --------------------------------------- |
|
406 | 406 | |
|
407 | 407 | On pull |
|
408 | 408 | |
|
409 | 409 | $ hg init tmpe |
|
410 | 410 | $ cd tmpe |
|
411 | 411 | $ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 |
|
412 | 412 | $ hg pull ../tmpb |
|
413 | 413 | pulling from ../tmpb |
|
414 | 414 | requesting all changes |
|
415 | 415 | adding changesets |
|
416 | 416 | adding manifests |
|
417 | 417 | adding file changes |
|
418 | 418 | added 4 changesets with 4 changes to 4 files (+1 heads) |
|
419 | 419 | 5 new obsolescence markers |
|
420 | 420 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
421 | 421 | $ hg debugobsolete |
|
422 | 422 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
423 | 423 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
424 | 424 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
425 | 425 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
426 | 426 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
427 | 427 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
428 | 428 | |
|
429 | 429 | |
|
430 | 430 | On push |
|
431 | 431 | |
|
432 | 432 | $ hg push ../tmpc |
|
433 | 433 | pushing to ../tmpc |
|
434 | 434 | searching for changes |
|
435 | 435 | no changes found |
|
436 | 436 | 1 new obsolescence markers |
|
437 | 437 | [1] |
|
438 | 438 | $ hg -R ../tmpc debugobsolete |
|
439 | 439 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
440 | 440 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
441 | 441 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
442 | 442 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
443 | 443 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
444 | 444 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
445 | 445 | |
|
446 | 446 | detect outgoing obsolete and unstable |
|
447 | 447 | --------------------------------------- |
|
448 | 448 | |
|
449 | 449 | |
|
450 | 450 | $ hg log -G |
|
451 | 451 | o 3:6f9641995072 (draft) [tip ] add n3w_3_c |
|
452 | 452 | | |
|
453 | 453 | | o 2:245bde4270cd (public) [ ] add original_c |
|
454 | 454 | |/ |
|
455 | 455 | o 1:7c3bad9141dc (public) [ ] add b |
|
456 | 456 | | |
|
457 | 457 | o 0:1f0dee641bb7 (public) [ ] add a |
|
458 | 458 | |
|
459 | 459 | $ hg up 'desc("n3w_3_c")' |
|
460 | 460 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
461 | 461 | $ mkcommit original_d |
|
462 | 462 | $ mkcommit original_e |
|
463 | 463 | $ hg debugobsolete --record-parents `getid original_d` -d '0 0' |
|
464 | 464 | $ hg debugobsolete | grep `getid original_d` |
|
465 | 465 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
466 | 466 | $ hg log -r 'obsolete()' |
|
467 | 467 | 4:94b33453f93b (draft) [ ] add original_d |
|
468 | 468 | $ hg log -G -r '::unstable()' |
|
469 | 469 | @ 5:cda648ca50f5 (draft) [tip ] add original_e |
|
470 | 470 | | |
|
471 | 471 | x 4:94b33453f93b (draft) [ ] add original_d |
|
472 | 472 | | |
|
473 | 473 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
474 | 474 | | |
|
475 | 475 | o 1:7c3bad9141dc (public) [ ] add b |
|
476 | 476 | | |
|
477 | 477 | o 0:1f0dee641bb7 (public) [ ] add a |
|
478 | 478 | |
|
479 | 479 | |
|
480 | 480 | refuse to push obsolete changeset |
|
481 | 481 | |
|
482 | 482 | $ hg push ../tmpc/ -r 'desc("original_d")' |
|
483 | 483 | pushing to ../tmpc/ |
|
484 | 484 | searching for changes |
|
485 | 485 | abort: push includes obsolete changeset: 94b33453f93b! |
|
486 | 486 | [255] |
|
487 | 487 | |
|
488 | 488 | refuse to push unstable changeset |
|
489 | 489 | |
|
490 | 490 | $ hg push ../tmpc/ |
|
491 | 491 | pushing to ../tmpc/ |
|
492 | 492 | searching for changes |
|
493 | 493 | abort: push includes unstable changeset: cda648ca50f5! |
|
494 | 494 | [255] |
|
495 | 495 | |
|
496 | 496 | Test that extinct changeset are properly detected |
|
497 | 497 | |
|
498 | 498 | $ hg log -r 'extinct()' |
|
499 | 499 | |
|
500 | 500 | Don't try to push extinct changeset |
|
501 | 501 | |
|
502 | 502 | $ hg init ../tmpf |
|
503 | 503 | $ hg out ../tmpf |
|
504 | 504 | comparing with ../tmpf |
|
505 | 505 | searching for changes |
|
506 | 506 | 0:1f0dee641bb7 (public) [ ] add a |
|
507 | 507 | 1:7c3bad9141dc (public) [ ] add b |
|
508 | 508 | 2:245bde4270cd (public) [ ] add original_c |
|
509 | 509 | 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
510 | 510 | 4:94b33453f93b (draft) [ ] add original_d |
|
511 | 511 | 5:cda648ca50f5 (draft) [tip ] add original_e |
|
512 | 512 | $ hg push ../tmpf -f # -f because be push unstable too |
|
513 | 513 | pushing to ../tmpf |
|
514 | 514 | searching for changes |
|
515 | 515 | adding changesets |
|
516 | 516 | adding manifests |
|
517 | 517 | adding file changes |
|
518 | 518 | added 6 changesets with 6 changes to 6 files (+1 heads) |
|
519 | 519 | 7 new obsolescence markers |
|
520 | 520 | |
|
521 | 521 | no warning displayed |
|
522 | 522 | |
|
523 | 523 | $ hg push ../tmpf |
|
524 | 524 | pushing to ../tmpf |
|
525 | 525 | searching for changes |
|
526 | 526 | no changes found |
|
527 | 527 | [1] |
|
528 | 528 | |
|
529 | 529 | Do not warn about new head when the new head is a successors of a remote one |
|
530 | 530 | |
|
531 | 531 | $ hg log -G |
|
532 | 532 | @ 5:cda648ca50f5 (draft) [tip ] add original_e |
|
533 | 533 | | |
|
534 | 534 | x 4:94b33453f93b (draft) [ ] add original_d |
|
535 | 535 | | |
|
536 | 536 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
537 | 537 | | |
|
538 | 538 | | o 2:245bde4270cd (public) [ ] add original_c |
|
539 | 539 | |/ |
|
540 | 540 | o 1:7c3bad9141dc (public) [ ] add b |
|
541 | 541 | | |
|
542 | 542 | o 0:1f0dee641bb7 (public) [ ] add a |
|
543 | 543 | |
|
544 | 544 | $ hg up -q 'desc(n3w_3_c)' |
|
545 | 545 | $ mkcommit obsolete_e |
|
546 | 546 | created new head |
|
547 | 547 | $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'` |
|
548 | 548 | $ hg outgoing ../tmpf # parasite hg outgoing testin |
|
549 | 549 | comparing with ../tmpf |
|
550 | 550 | searching for changes |
|
551 | 551 | 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
552 | 552 | $ hg push ../tmpf |
|
553 | 553 | pushing to ../tmpf |
|
554 | 554 | searching for changes |
|
555 | 555 | adding changesets |
|
556 | 556 | adding manifests |
|
557 | 557 | adding file changes |
|
558 | 558 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
559 | 559 | 1 new obsolescence markers |
|
560 | 560 | |
|
561 | 561 | test relevance computation |
|
562 | 562 | --------------------------------------- |
|
563 | 563 | |
|
564 | 564 | Checking simple case of "marker relevance". |
|
565 | 565 | |
|
566 | 566 | |
|
567 | 567 | Reminder of the repo situation |
|
568 | 568 | |
|
569 | 569 | $ hg log --hidden --graph |
|
570 | 570 | @ 6:3de5eca88c00 (draft) [tip ] add obsolete_e |
|
571 | 571 | | |
|
572 | 572 | | x 5:cda648ca50f5 (draft) [ ] add original_e |
|
573 | 573 | | | |
|
574 | 574 | | x 4:94b33453f93b (draft) [ ] add original_d |
|
575 | 575 | |/ |
|
576 | 576 | o 3:6f9641995072 (draft) [ ] add n3w_3_c |
|
577 | 577 | | |
|
578 | 578 | | o 2:245bde4270cd (public) [ ] add original_c |
|
579 | 579 | |/ |
|
580 | 580 | o 1:7c3bad9141dc (public) [ ] add b |
|
581 | 581 | | |
|
582 | 582 | o 0:1f0dee641bb7 (public) [ ] add a |
|
583 | 583 | |
|
584 | 584 | |
|
585 | 585 | List of all markers |
|
586 | 586 | |
|
587 | 587 | $ hg debugobsolete |
|
588 | 588 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
589 | 589 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
590 | 590 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
591 | 591 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
592 | 592 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
593 | 593 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
594 | 594 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
595 | 595 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
596 | 596 | |
|
597 | 597 | List of changesets with no chain |
|
598 | 598 | |
|
599 | 599 | $ hg debugobsolete --hidden --rev ::2 |
|
600 | 600 | |
|
601 | 601 | List of changesets that are included on marker chain |
|
602 | 602 | |
|
603 | 603 | $ hg debugobsolete --hidden --rev 6 |
|
604 | 604 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
605 | 605 | |
|
606 | 606 | List of changesets with a longer chain, (including a pruned children) |
|
607 | 607 | |
|
608 | 608 | $ hg debugobsolete --hidden --rev 3 |
|
609 | 609 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
610 | 610 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
611 | 611 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
612 | 612 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
613 | 613 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
614 | 614 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
615 | 615 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
616 | 616 | |
|
617 | 617 | List of both |
|
618 | 618 | |
|
619 | 619 | $ hg debugobsolete --hidden --rev 3::6 |
|
620 | 620 | 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
621 | 621 | 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'} |
|
622 | 622 | 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'} |
|
623 | 623 | 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
624 | 624 | 94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
625 | 625 | ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'} |
|
626 | 626 | cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob) |
|
627 | 627 | cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'} |
|
628 | 628 | |
|
629 | 629 | #if serve |
|
630 | 630 | |
|
631 | 631 | Test the debug output for exchange |
|
632 | 632 | ---------------------------------- |
|
633 | 633 | |
|
634 | 634 | $ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' --config 'experimental.bundle2-exp=True' |
|
635 | 635 | pulling from ../tmpb |
|
636 | 636 | searching for changes |
|
637 | 637 | no changes found |
|
638 | 638 | obsmarker-exchange: 346 bytes received |
|
639 | 639 | |
|
640 | 640 | check hgweb does not explode |
|
641 | 641 | ==================================== |
|
642 | 642 | |
|
643 | 643 | $ hg unbundle $TESTDIR/bundles/hgweb+obs.hg |
|
644 | 644 | adding changesets |
|
645 | 645 | adding manifests |
|
646 | 646 | adding file changes |
|
647 | 647 | added 62 changesets with 63 changes to 9 files (+60 heads) |
|
648 | 648 | (run 'hg heads .' to see heads, 'hg merge' to merge) |
|
649 | 649 | $ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`; |
|
650 | 650 | > do |
|
651 | 651 | > hg debugobsolete $node |
|
652 | 652 | > done |
|
653 | 653 | $ hg up tip |
|
654 | 654 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
655 | 655 | |
|
656 | 656 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
657 | 657 | $ cat hg.pid >> $DAEMON_PIDS |
|
658 | 658 | |
|
659 | 659 | check changelog view |
|
660 | 660 | |
|
661 | 661 | $ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/' |
|
662 | 662 | 200 Script output follows |
|
663 | 663 | |
|
664 | 664 | check graph view |
|
665 | 665 | |
|
666 | 666 | $ get-with-headers.py --headeronly localhost:$HGPORT 'graph' |
|
667 | 667 | 200 Script output follows |
|
668 | 668 | |
|
669 | 669 | check filelog view |
|
670 | 670 | |
|
671 | 671 | $ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar' |
|
672 | 672 | 200 Script output follows |
|
673 | 673 | |
|
674 | 674 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68' |
|
675 | 675 | 200 Script output follows |
|
676 | 676 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
677 | 677 | 404 Not Found |
|
678 | 678 | [1] |
|
679 | 679 | |
|
680 | 680 | check that web.view config option: |
|
681 | 681 | |
|
682 | 682 | $ killdaemons.py hg.pid |
|
683 | 683 | $ cat >> .hg/hgrc << EOF |
|
684 | 684 | > [web] |
|
685 | 685 | > view=all |
|
686 | 686 | > EOF |
|
687 | 687 | $ wait |
|
688 | 688 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
689 | 689 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67' |
|
690 | 690 | 200 Script output follows |
|
691 | 691 | $ killdaemons.py hg.pid |
|
692 | 692 | |
|
693 | 693 | Checking _enable=False warning if obsolete marker exists |
|
694 | 694 | |
|
695 | 695 | $ echo '[experimental]' >> $HGRCPATH |
|
696 | 696 | $ echo "evolution=" >> $HGRCPATH |
|
697 | 697 | $ hg log -r tip |
|
698 | 698 | obsolete feature not enabled but 68 markers found! |
|
699 | 699 | 68:c15e9edfca13 (draft) [tip ] add celestine |
|
700 | 700 | |
|
701 | 701 | reenable for later test |
|
702 | 702 | |
|
703 | 703 | $ echo '[experimental]' >> $HGRCPATH |
|
704 | 704 | $ echo "evolution=createmarkers,exchange" >> $HGRCPATH |
|
705 | 705 | |
|
706 | 706 | #endif |
|
707 | 707 | |
|
708 | 708 | Test incoming/outcoming with changesets obsoleted remotely, known locally |
|
709 | 709 | =============================================================================== |
|
710 | 710 | |
|
711 | 711 | This test issue 3805 |
|
712 | 712 | |
|
713 | 713 | $ hg init repo-issue3805 |
|
714 | 714 | $ cd repo-issue3805 |
|
715 | $ echo "base" > base | |
|
716 | $ hg ci -Am "base" | |
|
717 | adding base | |
|
715 | 718 | $ echo "foo" > foo |
|
716 | 719 | $ hg ci -Am "A" |
|
717 | 720 | adding foo |
|
718 | 721 | $ hg clone . ../other-issue3805 |
|
719 | 722 | updating to branch default |
|
720 |
|
|
|
723 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
721 | 724 | $ echo "bar" >> foo |
|
722 | 725 | $ hg ci --amend |
|
723 | 726 | $ cd ../other-issue3805 |
|
724 | 727 | $ hg log -G |
|
725 |
@ |
|
|
728 | @ 1:29f0c6921ddd (draft) [tip ] A | |
|
729 | | | |
|
730 | o 0:d20a80d4def3 (draft) [ ] base | |
|
726 | 731 | |
|
727 | 732 | $ hg log -G -R ../repo-issue3805 |
|
728 |
@ |
|
|
733 | @ 3:323a9c3ddd91 (draft) [tip ] A | |
|
734 | | | |
|
735 | o 0:d20a80d4def3 (draft) [ ] base | |
|
729 | 736 | |
|
730 | 737 | $ hg incoming |
|
731 | 738 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
732 | 739 | searching for changes |
|
733 |
|
|
|
740 | 3:323a9c3ddd91 (draft) [tip ] A | |
|
734 | 741 | $ hg incoming --bundle ../issue3805.hg |
|
735 | 742 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
736 | 743 | searching for changes |
|
737 |
|
|
|
744 | 3:323a9c3ddd91 (draft) [tip ] A | |
|
738 | 745 | $ hg outgoing |
|
739 | 746 | comparing with $TESTTMP/tmpe/repo-issue3805 (glob) |
|
740 | 747 | searching for changes |
|
741 | 748 | no changes found |
|
742 | 749 | [1] |
|
743 | 750 | |
|
744 | 751 | #if serve |
|
745 | 752 | |
|
746 | 753 | $ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
747 | 754 | $ cat hg.pid >> $DAEMON_PIDS |
|
748 | 755 | |
|
749 | 756 | $ hg incoming http://localhost:$HGPORT |
|
750 | 757 | comparing with http://localhost:$HGPORT/ |
|
751 | 758 | searching for changes |
|
752 |
|
|
|
759 | 2:323a9c3ddd91 (draft) [tip ] A | |
|
753 | 760 | $ hg outgoing http://localhost:$HGPORT |
|
754 | 761 | comparing with http://localhost:$HGPORT/ |
|
755 | 762 | searching for changes |
|
756 | 763 | no changes found |
|
757 | 764 | [1] |
|
758 | 765 | |
|
759 | 766 | $ killdaemons.py |
|
760 | 767 | |
|
761 | 768 | #endif |
|
762 | 769 | |
|
763 | 770 | This test issue 3814 |
|
764 | 771 | |
|
765 | 772 | (nothing to push but locally hidden changeset) |
|
766 | 773 | |
|
767 | 774 | $ cd .. |
|
768 | 775 | $ hg init repo-issue3814 |
|
769 | 776 | $ cd repo-issue3805 |
|
770 |
$ hg push -r 3 |
|
|
777 | $ hg push -r 323a9c3ddd91 ../repo-issue3814 | |
|
771 | 778 | pushing to ../repo-issue3814 |
|
772 | 779 | searching for changes |
|
773 | 780 | adding changesets |
|
774 | 781 | adding manifests |
|
775 | 782 | adding file changes |
|
776 |
added |
|
|
783 | added 2 changesets with 2 changes to 2 files | |
|
777 | 784 | 2 new obsolescence markers |
|
778 | 785 | $ hg out ../repo-issue3814 |
|
779 | 786 | comparing with ../repo-issue3814 |
|
780 | 787 | searching for changes |
|
781 | 788 | no changes found |
|
782 | 789 | [1] |
|
783 | 790 | |
|
784 | 791 | Test that a local tag blocks a changeset from being hidden |
|
785 | 792 | |
|
786 |
$ hg tag -l visible -r |
|
|
793 | $ hg tag -l visible -r 1 --hidden | |
|
787 | 794 | $ hg log -G |
|
788 |
@ |
|
|
789 | ||
|
790 |
|
|
|
795 | @ 3:323a9c3ddd91 (draft) [tip ] A | |
|
796 | | | |
|
797 | | x 1:29f0c6921ddd (draft) [visible ] A | |
|
798 | |/ | |
|
799 | o 0:d20a80d4def3 (draft) [ ] base | |
|
791 | 800 | |
|
792 | 801 | Test that removing a local tag does not cause some commands to fail |
|
793 | 802 | |
|
794 | 803 | $ hg tag -l -r tip tiptag |
|
795 | 804 | $ hg tags |
|
796 |
tiptag |
|
|
797 |
tip |
|
|
798 |
visible |
|
|
805 | tiptag 3:323a9c3ddd91 | |
|
806 | tip 3:323a9c3ddd91 | |
|
807 | visible 1:29f0c6921ddd | |
|
799 | 808 | $ hg --config extensions.strip= strip -r tip --no-backup |
|
800 | 809 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
801 | 810 | $ hg tags |
|
802 |
visible |
|
|
803 |
tip |
|
|
811 | visible 1:29f0c6921ddd | |
|
812 | tip 1:29f0c6921ddd | |
|
804 | 813 | |
|
805 | 814 | Test bundle overlay onto hidden revision |
|
806 | 815 | |
|
807 | 816 | $ cd .. |
|
808 | 817 | $ hg init repo-bundleoverlay |
|
809 | 818 | $ cd repo-bundleoverlay |
|
810 | 819 | $ echo "A" > foo |
|
811 | 820 | $ hg ci -Am "A" |
|
812 | 821 | adding foo |
|
813 | 822 | $ echo "B" >> foo |
|
814 | 823 | $ hg ci -m "B" |
|
815 | 824 | $ hg up 0 |
|
816 | 825 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
817 | 826 | $ echo "C" >> foo |
|
818 | 827 | $ hg ci -m "C" |
|
819 | 828 | created new head |
|
820 | 829 | $ hg log -G |
|
821 | 830 | @ 2:c186d7714947 (draft) [tip ] C |
|
822 | 831 | | |
|
823 | 832 | | o 1:44526ebb0f98 (draft) [ ] B |
|
824 | 833 | |/ |
|
825 | 834 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
826 | 835 | |
|
827 | 836 | |
|
828 | 837 | $ hg clone -r1 . ../other-bundleoverlay |
|
829 | 838 | adding changesets |
|
830 | 839 | adding manifests |
|
831 | 840 | adding file changes |
|
832 | 841 | added 2 changesets with 2 changes to 1 files |
|
833 | 842 | updating to branch default |
|
834 | 843 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
835 | 844 | $ cd ../other-bundleoverlay |
|
836 | 845 | $ echo "B+" >> foo |
|
837 | 846 | $ hg ci --amend -m "B+" |
|
838 | 847 | $ hg log -G --hidden |
|
839 | 848 | @ 3:b7d587542d40 (draft) [tip ] B+ |
|
840 | 849 | | |
|
841 | 850 | | x 2:eb95e9297e18 (draft) [ ] temporary amend commit for 44526ebb0f98 |
|
842 | 851 | | | |
|
843 | 852 | | x 1:44526ebb0f98 (draft) [ ] B |
|
844 | 853 | |/ |
|
845 | 854 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
846 | 855 | |
|
847 | 856 | |
|
848 | 857 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
849 | 858 | comparing with ../repo-bundleoverlay |
|
850 | 859 | searching for changes |
|
851 | 860 | 1:44526ebb0f98 (draft) [ ] B |
|
852 | 861 | 2:c186d7714947 (draft) [tip ] C |
|
853 | 862 | $ hg log -G -R ../bundleoverlay.hg |
|
854 | 863 | o 4:c186d7714947 (draft) [tip ] C |
|
855 | 864 | | |
|
856 | 865 | | @ 3:b7d587542d40 (draft) [ ] B+ |
|
857 | 866 | |/ |
|
858 | 867 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
859 | 868 | |
|
860 | 869 | |
|
861 | 870 | #if serve |
|
862 | 871 | |
|
863 | 872 | Test issue 4506 |
|
864 | 873 | |
|
865 | 874 | $ cd .. |
|
866 | 875 | $ hg init repo-issue4506 |
|
867 | 876 | $ cd repo-issue4506 |
|
868 | 877 | $ echo "0" > foo |
|
869 | 878 | $ hg add foo |
|
870 | 879 | $ hg ci -m "content-0" |
|
871 | 880 | |
|
872 | 881 | $ hg up null |
|
873 | 882 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
874 | 883 | $ echo "1" > bar |
|
875 | 884 | $ hg add bar |
|
876 | 885 | $ hg ci -m "content-1" |
|
877 | 886 | created new head |
|
878 | 887 | $ hg up 0 |
|
879 | 888 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
880 | 889 | $ hg graft 1 |
|
881 | 890 | grafting 1:1c9eddb02162 "content-1" (tip) |
|
882 | 891 | |
|
883 | 892 | $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'` |
|
884 | 893 | |
|
885 | 894 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
886 | 895 | $ cat hg.pid >> $DAEMON_PIDS |
|
887 | 896 | |
|
888 | 897 | $ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1' |
|
889 | 898 | 404 Not Found |
|
890 | 899 | [1] |
|
891 | 900 | $ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar' |
|
892 | 901 | 200 Script output follows |
|
893 | 902 | $ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar' |
|
894 | 903 | 200 Script output follows |
|
895 | 904 | |
|
896 | 905 | $ killdaemons.py |
|
897 | 906 | |
|
898 | 907 | #endif |
|
899 | 908 | |
|
900 | 909 | Test heads computation on pending index changes with obsolescence markers |
|
901 | 910 | $ cd .. |
|
902 | 911 | $ cat >$TESTTMP/test_extension.py << EOF |
|
903 | 912 | > from mercurial import cmdutil |
|
904 | 913 | > from mercurial.i18n import _ |
|
905 | 914 | > |
|
906 | 915 | > cmdtable = {} |
|
907 | 916 | > command = cmdutil.command(cmdtable) |
|
908 | 917 | > @command("amendtransient",[], _('hg amendtransient [rev]')) |
|
909 | 918 | > def amend(ui, repo, *pats, **opts): |
|
910 | 919 | > def commitfunc(ui, repo, message, match, opts): |
|
911 | 920 | > return repo.commit(message, repo['.'].user(), repo['.'].date(), match) |
|
912 | 921 | > opts['message'] = 'Test' |
|
913 | 922 | > opts['logfile'] = None |
|
914 | 923 | > cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts) |
|
915 | 924 | > print repo.changelog.headrevs() |
|
916 | 925 | > EOF |
|
917 | 926 | $ cat >> $HGRCPATH << EOF |
|
918 | 927 | > [extensions] |
|
919 | 928 | > testextension=$TESTTMP/test_extension.py |
|
920 | 929 | > EOF |
|
921 | 930 | $ hg init repo-issue-nativerevs-pending-changes |
|
922 | 931 | $ cd repo-issue-nativerevs-pending-changes |
|
923 | 932 | $ mkcommit a |
|
924 | 933 | $ mkcommit b |
|
925 | 934 | $ hg up ".^" |
|
926 | 935 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
927 | 936 | $ echo aa > a |
|
928 | 937 | $ hg amendtransient |
|
929 | 938 | [1, 3] |
|
930 | 939 | |
|
931 | 940 | Test cache consistency for the visible filter |
|
932 | 941 | 1) We want to make sure that the cached filtered revs are invalidated when |
|
933 | 942 | bookmarks change |
|
934 | 943 | $ cd .. |
|
935 | 944 | $ cat >$TESTTMP/test_extension.py << EOF |
|
936 | 945 | > from mercurial import cmdutil, extensions, bookmarks, repoview |
|
937 | 946 | > def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs): |
|
938 | 947 | > repo = bkmstoreinst._repo |
|
939 | 948 | > ret = orig(bkmstoreinst, *args, **kwargs) |
|
940 | 949 | > hidden1 = repoview.computehidden(repo) |
|
941 | 950 | > hidden = repoview.filterrevs(repo, 'visible') |
|
942 | 951 | > if sorted(hidden1) != sorted(hidden): |
|
943 | 952 | > print "cache inconsistency" |
|
944 | 953 | > return ret |
|
945 | 954 | > def extsetup(ui): |
|
946 | 955 | > extensions.wrapfunction(bookmarks.bmstore, 'write', _bookmarkchanged) |
|
947 | 956 | > EOF |
|
948 | 957 | |
|
949 | 958 | $ hg init repo-cache-inconsistency |
|
950 | 959 | $ cd repo-issue-nativerevs-pending-changes |
|
951 | 960 | $ mkcommit a |
|
952 | 961 | a already tracked! |
|
953 | 962 | $ mkcommit b |
|
954 | 963 | $ hg id |
|
955 | 964 | 13bedc178fce tip |
|
956 | 965 | $ echo "hello" > b |
|
957 | 966 | $ hg commit --amend -m "message" |
|
958 | 967 | $ hg book bookb -r 13bedc178fce --hidden |
|
959 | 968 | $ hg log -r 13bedc178fce |
|
960 | 969 | 5:13bedc178fce (draft) [ bookb] add b |
|
961 | 970 | $ hg book -d bookb |
|
962 | 971 | $ hg log -r 13bedc178fce |
|
963 | 972 | abort: hidden revision '13bedc178fce'! |
|
964 | 973 | (use --hidden to access hidden revisions) |
|
965 | 974 | [255] |
|
966 | 975 | |
|
967 | 976 | |
|
968 | 977 |
General Comments 0
You need to be logged in to leave comments.
Login now