##// END OF EJS Templates
copies: filter invalid copies only at end of pathcopies() (issue6163)...
Martin von Zweigbergk -
r42797:d013099c default
parent child Browse files
Show More
@@ -285,7 +285,6 b' def _changesetforwardcopies(a, b, match)'
285 # that side, even if it was also copied on the p2 side.
285 # that side, even if it was also copied on the p2 side.
286 copies[dst] = copies2[dst]
286 copies[dst] = copies2[dst]
287 if r == b.rev():
287 if r == b.rev():
288 _filter(a, b, copies)
289 return copies
288 return copies
290 for i, c in enumerate(children[r]):
289 for i, c in enumerate(children[r]):
291 childctx = repo[c]
290 childctx = repo[c]
@@ -321,7 +320,6 b' def _forwardcopies(a, b, match=None):'
321 cm = _committedforwardcopies(a, b.p1(), match)
320 cm = _committedforwardcopies(a, b.p1(), match)
322 # combine copies from dirstate if necessary
321 # combine copies from dirstate if necessary
323 copies = _chain(cm, _dirstatecopies(b._repo, match))
322 copies = _chain(cm, _dirstatecopies(b._repo, match))
324 _filter(a, b, copies)
325 else:
323 else:
326 copies = _committedforwardcopies(a, b, match)
324 copies = _committedforwardcopies(a, b, match)
327 return copies
325 return copies
@@ -373,7 +371,7 b' def pathcopies(x, y, match=None):'
373 repo.ui.debug('debug.copies: search mode: combined\n')
371 repo.ui.debug('debug.copies: search mode: combined\n')
374 copies = _chain(_backwardrenames(x, a, match=match),
372 copies = _chain(_backwardrenames(x, a, match=match),
375 _forwardcopies(a, y, match=match))
373 _forwardcopies(a, y, match=match))
376 _filter(x, y, copies)
374 _filter(x, y, copies)
377 return copies
375 return copies
378
376
379 def mergecopies(repo, c1, c2, base):
377 def mergecopies(repo, c1, c2, base):
@@ -299,6 +299,8 b' above, but here the break in history is '
299 o 0 base
299 o 0 base
300 a
300 a
301 $ hg debugpathcopies 1 4
301 $ hg debugpathcopies 1 4
302 x -> y (no-filelog !)
303 #if filelog
302 BROKEN: This should succeed and merge the changes from x into y
304 BROKEN: This should succeed and merge the changes from x into y
303 $ hg graft -r 2
305 $ hg graft -r 2
304 grafting 2:* "modify x" (glob)
306 grafting 2:* "modify x" (glob)
@@ -308,6 +310,11 b' BROKEN: This should succeed and merge th'
308 abort: unresolved conflicts, can't continue
310 abort: unresolved conflicts, can't continue
309 (use 'hg resolve' and 'hg graft --continue')
311 (use 'hg resolve' and 'hg graft --continue')
310 [255]
312 [255]
313 #else
314 $ hg graft -r 2
315 grafting 2:* "modify x" (glob)
316 merging y and x to y
317 #endif
311 $ hg co -qC 2
318 $ hg co -qC 2
312 $ hg graft -r 4
319 $ hg graft -r 4
313 grafting 4:* "rename x to y"* (glob)
320 grafting 4:* "rename x to y"* (glob)
@@ -345,6 +352,8 b' different between the branches.'
345 o 0 base
352 o 0 base
346 a
353 a
347 $ hg debugpathcopies 1 5
354 $ hg debugpathcopies 1 5
355 x -> y (no-filelog !)
356 #if filelog
348 BROKEN: This should succeed and merge the changes from x into y
357 BROKEN: This should succeed and merge the changes from x into y
349 $ hg graft -r 2
358 $ hg graft -r 2
350 grafting 2:* "modify x" (glob)
359 grafting 2:* "modify x" (glob)
@@ -354,6 +363,11 b' BROKEN: This should succeed and merge th'
354 abort: unresolved conflicts, can't continue
363 abort: unresolved conflicts, can't continue
355 (use 'hg resolve' and 'hg graft --continue')
364 (use 'hg resolve' and 'hg graft --continue')
356 [255]
365 [255]
366 #else
367 $ hg graft -r 2
368 grafting 2:* "modify x" (glob)
369 merging y and x to y
370 #endif
357 $ hg co -qC 2
371 $ hg co -qC 2
358 BROKEN: This should succeed and merge the changes from x into y
372 BROKEN: This should succeed and merge the changes from x into y
359 $ hg graft -r 5
373 $ hg graft -r 5
@@ -354,8 +354,7 b' of the merge to the merge should include'
354 $ hg debugpathcopies 1 3
354 $ hg debugpathcopies 1 3
355 x -> z
355 x -> z
356
356
357 Copy x to y on one side of merge, create y and rename to z on the other side. Pathcopies from the
357 Copy x to y on one side of merge, create y and rename to z on the other side.
358 first side should not include the y->z rename since y didn't exist in the merge base.
359 $ newrepo
358 $ newrepo
360 $ echo x > x
359 $ echo x > x
361 $ hg ci -Aqm 'add x'
360 $ hg ci -Aqm 'add x'
@@ -385,6 +384,7 b' first side should not include the y->z r'
385 $ hg debugpathcopies 2 3
384 $ hg debugpathcopies 2 3
386 y -> z
385 y -> z
387 $ hg debugpathcopies 1 3
386 $ hg debugpathcopies 1 3
387 y -> z (no-filelog !)
388
388
389 Create x and y, then rename x to z on one side of merge, and rename y to z and
389 Create x and y, then rename x to z on one side of merge, and rename y to z and
390 modify z on the other side. When storing copies in the changeset, we don't
390 modify z on the other side. When storing copies in the changeset, we don't
General Comments 0
You need to be logged in to leave comments. Login now