##// END OF EJS Templates
histedit: make histedit prune when obsolete is enabled...
Durham Goode -
r26763:50fc80e4 default
parent child Browse files
Show More
@@ -925,6 +925,13 b' def _histedit(ui, repo, state, *freeargs'
925 for n in succs[1:]:
925 for n in succs[1:]:
926 ui.debug(m % node.short(n))
926 ui.debug(m % node.short(n))
927
927
928 if supportsmarkers:
929 # Only create markers if the temp nodes weren't already removed.
930 obsolete.createmarkers(repo, ((repo[t],()) for t in sorted(tmpnodes)
931 if t in repo))
932 else:
933 cleanupnode(ui, repo, 'temp', tmpnodes)
934
928 if not state.keep:
935 if not state.keep:
929 if mapping:
936 if mapping:
930 movebookmarks(ui, repo, mapping, state.topmost, ntm)
937 movebookmarks(ui, repo, mapping, state.topmost, ntm)
@@ -941,7 +948,6 b' def _histedit(ui, repo, state, *freeargs'
941 else:
948 else:
942 cleanupnode(ui, repo, 'replaced', mapping)
949 cleanupnode(ui, repo, 'replaced', mapping)
943
950
944 cleanupnode(ui, repo, 'temp', tmpnodes)
945 state.clear()
951 state.clear()
946 if os.path.exists(repo.sjoin('undo')):
952 if os.path.exists(repo.sjoin('undo')):
947 os.unlink(repo.sjoin('undo'))
953 os.unlink(repo.sjoin('undo'))
@@ -253,6 +253,7 b' short hash. This tests issue3893.'
253 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/*-backup.hg (glob)
255 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/*-backup.hg (glob)
256 saved backup bundle to $TESTTMP/foo/.hg/strip-backup/c8e68270e35a-23a13bf9-backup.hg (glob)
256
257
257 $ hg update -q 2
258 $ hg update -q 2
258 $ echo x > x
259 $ echo x > x
@@ -85,6 +85,7 b''
85 > fold e860deea161a 4 e
85 > fold e860deea161a 4 e
86 > pick 652413bf663e 5 f
86 > pick 652413bf663e 5 f
87 > EOF
87 > EOF
88 saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-3c6c5d92-backup.hg (glob)
88 histedit: moving bookmarks also-two from 177f92b77385 to b346ab9a313d
89 histedit: moving bookmarks also-two from 177f92b77385 to b346ab9a313d
89 histedit: moving bookmarks five from 652413bf663e to cacdfd884a93
90 histedit: moving bookmarks five from 652413bf663e to cacdfd884a93
90 histedit: moving bookmarks four from e860deea161a to 59d9f330561f
91 histedit: moving bookmarks four from e860deea161a to 59d9f330561f
@@ -92,7 +93,6 b''
92 histedit: moving bookmarks two from 177f92b77385 to b346ab9a313d
93 histedit: moving bookmarks two from 177f92b77385 to b346ab9a313d
93 histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b
94 histedit: moving bookmarks will-move-backwards from d2ae7f538514 to cb9a9f314b8b
94 saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-48787b8d-backup.hg (glob)
95 saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-48787b8d-backup.hg (glob)
95 saved backup bundle to $TESTTMP/r/.hg/strip-backup/96e494a2d553-3c6c5d92-backup.hg (glob)
96 $ hg log --graph
96 $ hg log --graph
97 @ changeset: 3:cacdfd884a93
97 @ changeset: 3:cacdfd884a93
98 | bookmark: five
98 | bookmark: five
@@ -424,6 +424,7 b" Now, let's try to fold the second commit"
424 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
424 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
425 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
425 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
426 saved backup bundle to $TESTTMP/issue4251/.hg/strip-backup/*-backup.hg (glob)
426 saved backup bundle to $TESTTMP/issue4251/.hg/strip-backup/*-backup.hg (glob)
427 saved backup bundle to $TESTTMP/issue4251/.hg/strip-backup/b0f4233702ca-d99e7186-backup.hg (glob)
427
428
428 $ hg --config diff.git=yes export 0
429 $ hg --config diff.git=yes export 0
429 # HG changeset patch
430 # HG changeset patch
@@ -390,7 +390,8 b' dropped revision.'
390 HG: changed file
390 HG: changed file
391 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
391 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
392 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
393 saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-3d69522c-backup.hg (glob)
393 saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/55c8d8dc79ce-4066cd98-backup.hg (glob)
394 saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-a35700fc-backup.hg (glob)
394 $ hg logt -G
395 $ hg logt -G
395 @ 1:10c647b2cdd5 +4
396 @ 1:10c647b2cdd5 +4
396 |
397 |
@@ -64,12 +64,16 b' Enable obsolete'
64 > fold e860deea161a 4 e
64 > fold e860deea161a 4 e
65 > pick 652413bf663e 5 f
65 > pick 652413bf663e 5 f
66 > EOF
66 > EOF
67 saved backup bundle to $TESTTMP/base/.hg/strip-backup/96e494a2d553-3c6c5d92-backup.hg (glob)
67 [1]
68 $ hg log --graph --hidden
68 $ hg log --graph --hidden
69 @ 8:cacdfd884a93 f
69 @ 10:cacdfd884a93 f
70 |
71 o 9:59d9f330561f d
70 |
72 |
71 o 7:59d9f330561f d
73 | x 8:b558abc46d09 fold-temp-revision e860deea161a
72 |
74 | |
75 | x 7:96e494a2d553 d
76 |/
73 o 6:b346ab9a313d c
77 o 6:b346ab9a313d c
74 |
78 |
75 | x 5:652413bf663e f
79 | x 5:652413bf663e f
@@ -85,6 +89,8 b' Enable obsolete'
85 o 0:cb9a9f314b8b a
89 o 0:cb9a9f314b8b a
86
90
87 $ hg debugobsolete
91 $ hg debugobsolete
92 96e494a2d553dd05902ba1cee1d94d4cb7b8faed 0 {b346ab9a313db8537ecf96fca3ca3ca984ef3bd7} (*) {'user': 'test'} (glob)
93 b558abc46d09c30f57ac31e85a8a3d64d2e906e4 0 {96e494a2d553dd05902ba1cee1d94d4cb7b8faed} (*) {'user': 'test'} (glob)
88 d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b} (*) {'user': 'test'} (glob)
94 d2ae7f538514cd87c17547b0de4cea71fe1af9fb 0 {cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b} (*) {'user': 'test'} (glob)
89 177f92b773850b59254aa5e923436f921b55483b b346ab9a313db8537ecf96fca3ca3ca984ef3bd7 0 (*) {'user': 'test'} (glob)
95 177f92b773850b59254aa5e923436f921b55483b b346ab9a313db8537ecf96fca3ca3ca984ef3bd7 0 (*) {'user': 'test'} (glob)
90 055a42cdd88768532f9cf79daa407fc8d138de9b 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob)
96 055a42cdd88768532f9cf79daa407fc8d138de9b 59d9f330561fd6c88b1a6b32f0e45034d88db784 0 (*) {'user': 'test'} (glob)
@@ -105,7 +111,7 b' create an hidden revision'
105 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
111 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
106 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 $ hg log --graph
113 $ hg log --graph
108 @ 9:c13eb81022ca f
114 @ 11:c13eb81022ca f
109 |
115 |
110 o 6:b346ab9a313d c
116 o 6:b346ab9a313d c
111 |
117 |
@@ -127,7 +133,7 b' Test that rewriting leaving instability '
127 $ hg up '.^'
133 $ hg up '.^'
128 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
134 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
129 $ hg log -r 'children(.)'
135 $ hg log -r 'children(.)'
130 9:c13eb81022ca f (no-eol)
136 11:c13eb81022ca f (no-eol)
131 $ hg histedit -r '.' --commands - <<EOF
137 $ hg histedit -r '.' --commands - <<EOF
132 > edit b346ab9a313d 6 c
138 > edit b346ab9a313d 6 c
133 > EOF
139 > EOF
@@ -141,12 +147,12 b' Test that rewriting leaving instability '
141 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
142
148
143 $ hg log -r 'unstable()'
149 $ hg log -r 'unstable()'
144 9:c13eb81022ca f (no-eol)
150 11:c13eb81022ca f (no-eol)
145
151
146 stabilise
152 stabilise
147
153
148 $ hg rebase -r 'unstable()' -d .
154 $ hg rebase -r 'unstable()' -d .
149 rebasing 9:c13eb81022ca "f"
155 rebasing 11:c13eb81022ca "f"
150 $ hg up tip -q
156 $ hg up tip -q
151
157
152 Test dropping of changeset on the top of the stack
158 Test dropping of changeset on the top of the stack
@@ -166,7 +172,7 b' dropped changeset to be hidden.'
166 > EOF
172 > EOF
167 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
173 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
168 $ hg log -G
174 $ hg log -G
169 @ 10:40db8afa467b c
175 @ 12:40db8afa467b c
170 |
176 |
171 o 0:cb9a9f314b8b a
177 o 0:cb9a9f314b8b a
172
178
@@ -188,9 +194,9 b' With rewritten ancestors'
188 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
195 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
190 $ hg log -G
196 $ hg log -G
191 @ 15:ee6544123ab8 c
197 @ 17:ee6544123ab8 c
192 |
198 |
193 o 14:269e713e9eae g
199 o 16:269e713e9eae g
194 |
200 |
195 o 0:cb9a9f314b8b a
201 o 0:cb9a9f314b8b a
196
202
@@ -212,9 +218,9 b' Check that histedit respect immutability'
212 $ hg ph -pv '.^'
218 $ hg ph -pv '.^'
213 phase changed for 2 changesets
219 phase changed for 2 changesets
214 $ hg log -G
220 $ hg log -G
215 @ 11:b449568bf7fc (draft) f
221 @ 13:b449568bf7fc (draft) f
216 |
222 |
217 o 10:40db8afa467b (public) c
223 o 12:40db8afa467b (public) c
218 |
224 |
219 o 0:cb9a9f314b8b (public) a
225 o 0:cb9a9f314b8b (public) a
220
226
@@ -234,19 +240,19 b' Prepare further testing'
234 > done
240 > done
235 $ hg phase --force --secret .~2
241 $ hg phase --force --secret .~2
236 $ hg log -G
242 $ hg log -G
237 @ 16:ee118ab9fa44 (secret) k
243 @ 18:ee118ab9fa44 (secret) k
238 |
244 |
239 o 15:3a6c53ee7f3d (secret) j
245 o 17:3a6c53ee7f3d (secret) j
240 |
246 |
241 o 14:b605fb7503f2 (secret) i
247 o 16:b605fb7503f2 (secret) i
242 |
248 |
243 o 13:7395e1ff83bd (draft) h
249 o 15:7395e1ff83bd (draft) h
244 |
250 |
245 o 12:6b70183d2492 (draft) g
251 o 14:6b70183d2492 (draft) g
246 |
252 |
247 o 11:b449568bf7fc (draft) f
253 o 13:b449568bf7fc (draft) f
248 |
254 |
249 o 10:40db8afa467b (public) c
255 o 12:40db8afa467b (public) c
250 |
256 |
251 o 0:cb9a9f314b8b (public) a
257 o 0:cb9a9f314b8b (public) a
252
258
@@ -284,19 +290,19 b' New-commit as draft (default)'
284 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
290 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 $ hg log -G
292 $ hg log -G
287 @ 22:12e89af74238 (secret) k
293 @ 24:12e89af74238 (secret) k
288 |
294 |
289 o 21:636a8687b22e (secret) j
295 o 23:636a8687b22e (secret) j
290 |
296 |
291 o 20:ccaf0a38653f (secret) i
297 o 22:ccaf0a38653f (secret) i
292 |
298 |
293 o 19:11a89d1c2613 (draft) h
299 o 21:11a89d1c2613 (draft) h
294 |
300 |
295 o 18:c1dec7ca82ea (draft) g
301 o 20:c1dec7ca82ea (draft) g
296 |
302 |
297 o 17:087281e68428 (draft) f
303 o 19:087281e68428 (draft) f
298 |
304 |
299 o 10:40db8afa467b (public) c
305 o 12:40db8afa467b (public) c
300 |
306 |
301 o 0:cb9a9f314b8b (public) a
307 o 0:cb9a9f314b8b (public) a
302
308
@@ -333,19 +339,19 b' New-commit as draft (default)'
333 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
339 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
334 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
335 $ hg log -G
341 $ hg log -G
336 @ 22:12e89af74238 (secret) k
342 @ 24:12e89af74238 (secret) k
337 |
343 |
338 o 21:636a8687b22e (secret) j
344 o 23:636a8687b22e (secret) j
339 |
345 |
340 o 20:ccaf0a38653f (secret) i
346 o 22:ccaf0a38653f (secret) i
341 |
347 |
342 o 19:11a89d1c2613 (draft) h
348 o 21:11a89d1c2613 (draft) h
343 |
349 |
344 o 18:c1dec7ca82ea (draft) g
350 o 20:c1dec7ca82ea (draft) g
345 |
351 |
346 o 17:087281e68428 (draft) f
352 o 19:087281e68428 (draft) f
347 |
353 |
348 o 10:40db8afa467b (public) c
354 o 12:40db8afa467b (public) c
349 |
355 |
350 o 0:cb9a9f314b8b (public) a
356 o 0:cb9a9f314b8b (public) a
351
357
@@ -375,19 +381,19 b' It seems more important to present the s'
375 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
381 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
382 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
377 $ hg log -G
383 $ hg log -G
378 @ 21:558246857888 (secret) k
384 @ 23:558246857888 (secret) k
379 |
385 |
380 o 20:28bd44768535 (secret) h
386 o 22:28bd44768535 (secret) h
381 |
387 |
382 o 19:d5395202aeb9 (secret) i
388 o 21:d5395202aeb9 (secret) i
383 |
389 |
384 o 18:21edda8e341b (secret) g
390 o 20:21edda8e341b (secret) g
385 |
391 |
386 o 17:5ab64f3a4832 (secret) j
392 o 19:5ab64f3a4832 (secret) j
387 |
393 |
388 o 11:b449568bf7fc (draft) f
394 o 13:b449568bf7fc (draft) f
389 |
395 |
390 o 10:40db8afa467b (public) c
396 o 12:40db8afa467b (public) c
391 |
397 |
392 o 0:cb9a9f314b8b (public) a
398 o 0:cb9a9f314b8b (public) a
393
399
@@ -428,33 +434,30 b' Note that there is a few reordering in t'
428 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
434 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
429 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
435 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
430 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
436 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
431 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/58019c66f35f-96092fce-backup.hg (glob)
432 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/83d1858e070b-f3469cf8-backup.hg (glob)
433 saved backup bundle to $TESTTMP/folding/.hg/strip-backup/859969f5ed7e-d89a19d7-backup.hg (glob)
434 $ hg log -G
437 $ hg log -G
435 @ 19:f9daec13fb98 (secret) i
438 @ 27:f9daec13fb98 (secret) i
436 |
439 |
437 o 18:49807617f46a (secret) g
440 o 24:49807617f46a (secret) g
438 |
441 |
439 o 17:050280826e04 (draft) h
442 o 21:050280826e04 (draft) h
440 |
443 |
441 o 10:40db8afa467b (public) c
444 o 12:40db8afa467b (public) c
442 |
445 |
443 o 0:cb9a9f314b8b (public) a
446 o 0:cb9a9f314b8b (public) a
444
447
445 $ hg co 18
448 $ hg co 49807617f46a
446 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
449 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
447 $ echo wat >> wat
450 $ echo wat >> wat
448 $ hg add wat
451 $ hg add wat
449 $ hg ci -m 'add wat'
452 $ hg ci -m 'add wat'
450 created new head
453 created new head
451 $ hg merge 19
454 $ hg merge f9daec13fb98
452 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
455 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
453 (branch merge, don't forget to commit)
456 (branch merge, don't forget to commit)
454 $ hg ci -m 'merge'
457 $ hg ci -m 'merge'
455 $ echo not wat > wat
458 $ echo not wat > wat
456 $ hg ci -m 'modify wat'
459 $ hg ci -m 'modify wat'
457 $ hg histedit 17
460 $ hg histedit 050280826e04
458 abort: cannot edit history that contains merges
461 abort: cannot edit history that contains merges
459 [255]
462 [255]
460 $ cd ..
463 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now