##// END OF EJS Templates
clfilter: fix a false positive in the test-obsolete.t...
Pierre-Yves David -
r18015:42f56a04 default
parent child Browse files
Show More
@@ -1,592 +1,599
1 1 $ cat >> $HGRCPATH << EOF
2 2 > [extensions]
3 3 > graphlog=
4 4 > [phases]
5 5 > # public changeset are not obsolete
6 6 > publish=false
7 7 > EOF
8 8 $ mkcommit() {
9 9 > echo "$1" > "$1"
10 10 > hg add "$1"
11 11 > hg ci -m "add $1"
12 12 > }
13 13 $ getid() {
14 14 > hg id --debug -ir "desc('$1')"
15 15 > }
16 16
17 17 $ cat > debugkeys.py <<EOF
18 18 > def reposetup(ui, repo):
19 19 > class debugkeysrepo(repo.__class__):
20 20 > def listkeys(self, namespace):
21 21 > ui.write('listkeys %s\n' % (namespace,))
22 22 > return super(debugkeysrepo, self).listkeys(namespace)
23 23 >
24 24 > if repo.local():
25 25 > repo.__class__ = debugkeysrepo
26 26 > EOF
27 27
28 28 $ hg init tmpa
29 29 $ cd tmpa
30 30 $ mkcommit kill_me
31 31
32 32 Checking that the feature is properly disabled
33 33
34 34 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
35 35 abort: obsolete feature is not enabled on this repo
36 36 [255]
37 37
38 38 Enabling it
39 39
40 40 $ cat > ../obs.py << EOF
41 41 > import mercurial.obsolete
42 42 > mercurial.obsolete._enabled = True
43 43 > EOF
44 44 $ echo '[extensions]' >> $HGRCPATH
45 45 $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
46 46
47 47 Killing a single changeset without replacement
48 48
49 49 $ hg debugobsolete 0
50 50 abort: changeset references must be full hexadecimal node identifiers
51 51 [255]
52 52 $ hg debugobsolete '00'
53 53 abort: changeset references must be full hexadecimal node identifiers
54 54 [255]
55 55 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
56 56 $ hg debugobsolete
57 57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
58 58 $ cd ..
59 59
60 60 Killing a single changeset with replacement
61 61
62 62 $ hg init tmpb
63 63 $ cd tmpb
64 64 $ mkcommit a
65 65 $ mkcommit b
66 66 $ mkcommit original_c
67 67 $ hg up "desc('b')"
68 68 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
69 69 $ mkcommit new_c
70 70 created new head
71 71 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
72 72 $ hg debugobsolete --flag 12 `getid original_c` `getid new_c` -d '56 12'
73 73 $ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
74 74 2:245bde4270cd add original_c
75 75 $ hg debugobsolete
76 76 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
77 77
78 78 do it again (it read the obsstore before adding new changeset)
79 79
80 80 $ hg up '.^'
81 81 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 82 $ mkcommit new_2_c
83 83 created new head
84 84 $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
85 85 $ hg debugobsolete
86 86 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
87 87 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
88 88
89 89 Register two markers with a missing node
90 90
91 91 $ hg up '.^'
92 92 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
93 93 $ mkcommit new_3_c
94 94 created new head
95 95 $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
96 96 $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
97 97 $ hg debugobsolete
98 98 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
99 99 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
100 100 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
101 101 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
102 102
103 103 Refuse pathological nullid successors
104 104 $ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
105 105 transaction abort!
106 106 rollback completed
107 107 abort: bad obsolescence marker detected: invalid successors nullid
108 108 [255]
109 109
110 110 Check that graphlog detect that a changeset is obsolete:
111 111
112 112 $ hg glog
113 113 @ changeset: 5:5601fb93a350
114 114 | tag: tip
115 115 | parent: 1:7c3bad9141dc
116 116 | user: test
117 117 | date: Thu Jan 01 00:00:00 1970 +0000
118 118 | summary: add new_3_c
119 119 |
120 120 o changeset: 1:7c3bad9141dc
121 121 | user: test
122 122 | date: Thu Jan 01 00:00:00 1970 +0000
123 123 | summary: add b
124 124 |
125 125 o changeset: 0:1f0dee641bb7
126 126 user: test
127 127 date: Thu Jan 01 00:00:00 1970 +0000
128 128 summary: add a
129 129
130 130
131 131 Check that public changeset are not accounted as obsolete:
132 132
133 133 $ hg phase --public 2
134 134 $ hg --config 'extensions.graphlog=' glog
135 135 @ changeset: 5:5601fb93a350
136 136 | tag: tip
137 137 | parent: 1:7c3bad9141dc
138 138 | user: test
139 139 | date: Thu Jan 01 00:00:00 1970 +0000
140 140 | summary: add new_3_c
141 141 |
142 142 | o changeset: 2:245bde4270cd
143 143 |/ user: test
144 144 | date: Thu Jan 01 00:00:00 1970 +0000
145 145 | summary: add original_c
146 146 |
147 147 o changeset: 1:7c3bad9141dc
148 148 | user: test
149 149 | date: Thu Jan 01 00:00:00 1970 +0000
150 150 | summary: add b
151 151 |
152 152 o changeset: 0:1f0dee641bb7
153 153 user: test
154 154 date: Thu Jan 01 00:00:00 1970 +0000
155 155 summary: add a
156 156
157 157
158 158 And that bumped changeset are detected
159 159 --------------------------------------
160 160
161 161 If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
162 162 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
163 163 the public changeset
164 164
165 165 $ hg log --hidden -r 'bumped()'
166 166 changeset: 5:5601fb93a350
167 167 tag: tip
168 168 parent: 1:7c3bad9141dc
169 169 user: test
170 170 date: Thu Jan 01 00:00:00 1970 +0000
171 171 summary: add new_3_c
172 172
173 173
174 174 And that we can't push bumped changeset
175 175
176 $ hg push ../tmpa -r 0 --force #(make repo)
177 pushing to ../tmpa
178 searching for changes
179 adding changesets
180 adding manifests
181 adding file changes
182 added 1 changesets with 1 changes to 1 files (+1 heads)
176 183 $ hg push ../tmpa
177 184 pushing to ../tmpa
178 185 searching for changes
179 186 abort: push includes bumped changeset: 5601fb93a350!
180 187 [255]
181 188
182 189 Fixing "bumped" situation
183 190 We need to create a clone of 5 and add a special marker with a flag
184 191
185 192 $ hg up '5^'
186 193 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
187 194 $ hg revert -ar 5
188 195 adding new_3_c
189 196 $ hg ci -m 'add n3w_3_c'
190 197 created new head
191 198 $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
192 199 $ hg log -r 'bumped()'
193 200 $ hg log -G
194 201 @ changeset: 6:6f9641995072
195 202 | tag: tip
196 203 | parent: 1:7c3bad9141dc
197 204 | user: test
198 205 | date: Thu Jan 01 00:00:00 1970 +0000
199 206 | summary: add n3w_3_c
200 207 |
201 208 | o changeset: 2:245bde4270cd
202 209 |/ user: test
203 210 | date: Thu Jan 01 00:00:00 1970 +0000
204 211 | summary: add original_c
205 212 |
206 213 o changeset: 1:7c3bad9141dc
207 214 | user: test
208 215 | date: Thu Jan 01 00:00:00 1970 +0000
209 216 | summary: add b
210 217 |
211 218 o changeset: 0:1f0dee641bb7
212 219 user: test
213 220 date: Thu Jan 01 00:00:00 1970 +0000
214 221 summary: add a
215 222
216 223
217 224
218 225
219 226 $ cd ..
220 227
221 228 Exchange Test
222 229 ============================
223 230
224 231 Destination repo does not have any data
225 232 ---------------------------------------
226 233
227 234 Try to pull markers
228 235 (extinct changeset are excluded but marker are pushed)
229 236
230 237 $ hg init tmpc
231 238 $ cd tmpc
232 239 $ hg pull ../tmpb
233 240 pulling from ../tmpb
234 241 requesting all changes
235 242 adding changesets
236 243 adding manifests
237 244 adding file changes
238 245 added 4 changesets with 4 changes to 4 files (+1 heads)
239 246 (run 'hg heads' to see heads, 'hg merge' to merge)
240 247 $ hg debugobsolete
241 248 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
242 249 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
243 250 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
244 251 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
245 252 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
246 253
247 254 Rollback//Transaction support
248 255
249 256 $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
250 257 $ hg debugobsolete
251 258 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
252 259 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
253 260 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
254 261 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
255 262 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
256 263 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 {'date': '1340 0', 'user': 'test'}
257 264 $ hg rollback -n
258 265 repository tip rolled back to revision 3 (undo debugobsolete)
259 266 $ hg rollback
260 267 repository tip rolled back to revision 3 (undo debugobsolete)
261 268 $ hg debugobsolete
262 269 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
263 270 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
264 271 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
265 272 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
266 273 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
267 274
268 275 $ cd ..
269 276
270 277 Try to pull markers
271 278
272 279 $ hg init tmpd
273 280 $ hg -R tmpb push tmpd
274 281 pushing to tmpd
275 282 searching for changes
276 283 adding changesets
277 284 adding manifests
278 285 adding file changes
279 286 added 4 changesets with 4 changes to 4 files (+1 heads)
280 287 $ hg -R tmpd debugobsolete
281 288 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
282 289 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
283 290 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
284 291 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
285 292 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
286 293
287 294 Check obsolete keys are exchanged only if source has an obsolete store
288 295
289 296 $ hg init empty
290 297 $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
291 298 pushing to tmpd
292 299 no changes found
293 300 listkeys phases
294 301 listkeys bookmarks
295 302 [1]
296 303
297 304 clone support
298 305 (markers are copied and extinct changesets are included to allow hardlinks)
299 306
300 307 $ hg clone tmpb clone-dest
301 308 updating to branch default
302 309 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
303 310 $ hg -R clone-dest log -G --hidden
304 311 @ changeset: 6:6f9641995072
305 312 | tag: tip
306 313 | parent: 1:7c3bad9141dc
307 314 | user: test
308 315 | date: Thu Jan 01 00:00:00 1970 +0000
309 316 | summary: add n3w_3_c
310 317 |
311 318 | x changeset: 5:5601fb93a350
312 319 |/ parent: 1:7c3bad9141dc
313 320 | user: test
314 321 | date: Thu Jan 01 00:00:00 1970 +0000
315 322 | summary: add new_3_c
316 323 |
317 324 | x changeset: 4:ca819180edb9
318 325 |/ parent: 1:7c3bad9141dc
319 326 | user: test
320 327 | date: Thu Jan 01 00:00:00 1970 +0000
321 328 | summary: add new_2_c
322 329 |
323 330 | x changeset: 3:cdbce2fbb163
324 331 |/ parent: 1:7c3bad9141dc
325 332 | user: test
326 333 | date: Thu Jan 01 00:00:00 1970 +0000
327 334 | summary: add new_c
328 335 |
329 336 | o changeset: 2:245bde4270cd
330 337 |/ user: test
331 338 | date: Thu Jan 01 00:00:00 1970 +0000
332 339 | summary: add original_c
333 340 |
334 341 o changeset: 1:7c3bad9141dc
335 342 | user: test
336 343 | date: Thu Jan 01 00:00:00 1970 +0000
337 344 | summary: add b
338 345 |
339 346 o changeset: 0:1f0dee641bb7
340 347 user: test
341 348 date: Thu Jan 01 00:00:00 1970 +0000
342 349 summary: add a
343 350
344 351 $ hg -R clone-dest debugobsolete
345 352 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
346 353 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
347 354 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
348 355 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
349 356 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
350 357
351 358
352 359 Destination repo have existing data
353 360 ---------------------------------------
354 361
355 362 On pull
356 363
357 364 $ hg init tmpe
358 365 $ cd tmpe
359 366 $ hg debugobsolete -d '1339 0' 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339
360 367 $ hg pull ../tmpb
361 368 pulling from ../tmpb
362 369 requesting all changes
363 370 adding changesets
364 371 adding manifests
365 372 adding file changes
366 373 added 4 changesets with 4 changes to 4 files (+1 heads)
367 374 (run 'hg heads' to see heads, 'hg merge' to merge)
368 375 $ hg debugobsolete
369 376 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
370 377 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
371 378 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
372 379 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
373 380 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
374 381 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
375 382
376 383
377 384 On push
378 385
379 386 $ hg push ../tmpc
380 387 pushing to ../tmpc
381 388 searching for changes
382 389 no changes found
383 390 [1]
384 391 $ hg -R ../tmpc debugobsolete
385 392 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C {'date': '56 12', 'user': 'test'}
386 393 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
387 394 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
388 395 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
389 396 5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 {'date': '1338 0', 'user': 'test'}
390 397 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
391 398
392 399 detect outgoing obsolete and unstable
393 400 ---------------------------------------
394 401
395 402
396 403 $ hg glog
397 404 o changeset: 3:6f9641995072
398 405 | tag: tip
399 406 | parent: 1:7c3bad9141dc
400 407 | user: test
401 408 | date: Thu Jan 01 00:00:00 1970 +0000
402 409 | summary: add n3w_3_c
403 410 |
404 411 | o changeset: 2:245bde4270cd
405 412 |/ user: test
406 413 | date: Thu Jan 01 00:00:00 1970 +0000
407 414 | summary: add original_c
408 415 |
409 416 o changeset: 1:7c3bad9141dc
410 417 | user: test
411 418 | date: Thu Jan 01 00:00:00 1970 +0000
412 419 | summary: add b
413 420 |
414 421 o changeset: 0:1f0dee641bb7
415 422 user: test
416 423 date: Thu Jan 01 00:00:00 1970 +0000
417 424 summary: add a
418 425
419 426 $ hg up 'desc("n3w_3_c")'
420 427 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
421 428 $ mkcommit original_d
422 429 $ mkcommit original_e
423 430 $ hg debugobsolete `getid original_d` -d '0 0'
424 431 $ hg log -r 'obsolete()'
425 432 changeset: 4:94b33453f93b
426 433 user: test
427 434 date: Thu Jan 01 00:00:00 1970 +0000
428 435 summary: add original_d
429 436
430 437 $ hg glog -r '::unstable()'
431 438 @ changeset: 5:cda648ca50f5
432 439 | tag: tip
433 440 | user: test
434 441 | date: Thu Jan 01 00:00:00 1970 +0000
435 442 | summary: add original_e
436 443 |
437 444 x changeset: 4:94b33453f93b
438 445 | user: test
439 446 | date: Thu Jan 01 00:00:00 1970 +0000
440 447 | summary: add original_d
441 448 |
442 449 o changeset: 3:6f9641995072
443 450 | parent: 1:7c3bad9141dc
444 451 | user: test
445 452 | date: Thu Jan 01 00:00:00 1970 +0000
446 453 | summary: add n3w_3_c
447 454 |
448 455 o changeset: 1:7c3bad9141dc
449 456 | user: test
450 457 | date: Thu Jan 01 00:00:00 1970 +0000
451 458 | summary: add b
452 459 |
453 460 o changeset: 0:1f0dee641bb7
454 461 user: test
455 462 date: Thu Jan 01 00:00:00 1970 +0000
456 463 summary: add a
457 464
458 465
459 466 refuse to push obsolete changeset
460 467
461 468 $ hg push ../tmpc/ -r 'desc("original_d")'
462 469 pushing to ../tmpc/
463 470 searching for changes
464 471 abort: push includes obsolete changeset: 94b33453f93b!
465 472 [255]
466 473
467 474 refuse to push unstable changeset
468 475
469 476 $ hg push ../tmpc/
470 477 pushing to ../tmpc/
471 478 searching for changes
472 479 abort: push includes unstable changeset: cda648ca50f5!
473 480 [255]
474 481
475 482 Test that extinct changeset are properly detected
476 483
477 484 $ hg log -r 'extinct()'
478 485
479 486 Don't try to push extinct changeset
480 487
481 488 $ hg init ../tmpf
482 489 $ hg out ../tmpf
483 490 comparing with ../tmpf
484 491 searching for changes
485 492 changeset: 0:1f0dee641bb7
486 493 user: test
487 494 date: Thu Jan 01 00:00:00 1970 +0000
488 495 summary: add a
489 496
490 497 changeset: 1:7c3bad9141dc
491 498 user: test
492 499 date: Thu Jan 01 00:00:00 1970 +0000
493 500 summary: add b
494 501
495 502 changeset: 2:245bde4270cd
496 503 user: test
497 504 date: Thu Jan 01 00:00:00 1970 +0000
498 505 summary: add original_c
499 506
500 507 changeset: 3:6f9641995072
501 508 parent: 1:7c3bad9141dc
502 509 user: test
503 510 date: Thu Jan 01 00:00:00 1970 +0000
504 511 summary: add n3w_3_c
505 512
506 513 changeset: 4:94b33453f93b
507 514 user: test
508 515 date: Thu Jan 01 00:00:00 1970 +0000
509 516 summary: add original_d
510 517
511 518 changeset: 5:cda648ca50f5
512 519 tag: tip
513 520 user: test
514 521 date: Thu Jan 01 00:00:00 1970 +0000
515 522 summary: add original_e
516 523
517 524 $ hg push ../tmpf -f # -f because be push unstable too
518 525 pushing to ../tmpf
519 526 searching for changes
520 527 adding changesets
521 528 adding manifests
522 529 adding file changes
523 530 added 6 changesets with 6 changes to 6 files (+1 heads)
524 531
525 532 no warning displayed
526 533
527 534 $ hg push ../tmpf
528 535 pushing to ../tmpf
529 536 searching for changes
530 537 no changes found
531 538 [1]
532 539
533 540 Do not warn about new head when the new head is a successors of a remote one
534 541
535 542 $ hg glog
536 543 @ changeset: 5:cda648ca50f5
537 544 | tag: tip
538 545 | user: test
539 546 | date: Thu Jan 01 00:00:00 1970 +0000
540 547 | summary: add original_e
541 548 |
542 549 x changeset: 4:94b33453f93b
543 550 | user: test
544 551 | date: Thu Jan 01 00:00:00 1970 +0000
545 552 | summary: add original_d
546 553 |
547 554 o changeset: 3:6f9641995072
548 555 | parent: 1:7c3bad9141dc
549 556 | user: test
550 557 | date: Thu Jan 01 00:00:00 1970 +0000
551 558 | summary: add n3w_3_c
552 559 |
553 560 | o changeset: 2:245bde4270cd
554 561 |/ user: test
555 562 | date: Thu Jan 01 00:00:00 1970 +0000
556 563 | summary: add original_c
557 564 |
558 565 o changeset: 1:7c3bad9141dc
559 566 | user: test
560 567 | date: Thu Jan 01 00:00:00 1970 +0000
561 568 | summary: add b
562 569 |
563 570 o changeset: 0:1f0dee641bb7
564 571 user: test
565 572 date: Thu Jan 01 00:00:00 1970 +0000
566 573 summary: add a
567 574
568 575 $ hg up -q 'desc(n3w_3_c)'
569 576 $ mkcommit obsolete_e
570 577 created new head
571 578 $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
572 579 $ hg push ../tmpf
573 580 pushing to ../tmpf
574 581 searching for changes
575 582 adding changesets
576 583 adding manifests
577 584 adding file changes
578 585 added 1 changesets with 1 changes to 1 files (+1 heads)
579 586
580 587 Checking _enable=False warning if obsolete marker exists
581 588
582 589 $ echo '[extensions]' >> $HGRCPATH
583 590 $ echo "obs=!" >> $HGRCPATH
584 591 $ hg log -r tip
585 592 obsolete feature not enabled but 8 markers found!
586 593 changeset: 6:3de5eca88c00
587 594 tag: tip
588 595 parent: 3:6f9641995072
589 596 user: test
590 597 date: Thu Jan 01 00:00:00 1970 +0000
591 598 summary: add obsolete_e
592 599
General Comments 0
You need to be logged in to leave comments. Login now