equal
deleted
inserted
replaced
322 """find {dst@b: src@a} copy mapping where a is an ancestor of b""" |
322 """find {dst@b: src@a} copy mapping where a is an ancestor of b""" |
323 |
323 |
324 match = a.repo().narrowmatch(match) |
324 match = a.repo().narrowmatch(match) |
325 # check for working copy |
325 # check for working copy |
326 if b.rev() is None: |
326 if b.rev() is None: |
327 if a == b.p1(): |
|
328 # short-circuit to avoid issues with merge states |
|
329 return _dirstatecopies(b._repo, match) |
|
330 |
|
331 cm = _committedforwardcopies(a, b.p1(), match) |
327 cm = _committedforwardcopies(a, b.p1(), match) |
332 # combine copies from dirstate if necessary |
328 # combine copies from dirstate if necessary |
333 return _chainandfilter(a, b, cm, _dirstatecopies(b._repo, match)) |
329 return _chainandfilter(a, b, cm, _dirstatecopies(b._repo, match)) |
334 return _committedforwardcopies(a, b, match) |
330 return _committedforwardcopies(a, b, match) |
335 |
331 |
365 return {} |
361 return {} |
366 a = y.ancestor(x) |
362 a = y.ancestor(x) |
367 if a == x: |
363 if a == x: |
368 if debug: |
364 if debug: |
369 repo.ui.debug('debug.copies: search mode: forward\n') |
365 repo.ui.debug('debug.copies: search mode: forward\n') |
|
366 if y.rev() is None and x == y.p1(): |
|
367 # short-circuit to avoid issues with merge states |
|
368 return _dirstatecopies(repo, match) |
370 return _forwardcopies(x, y, match=match) |
369 return _forwardcopies(x, y, match=match) |
371 if a == y: |
370 if a == y: |
372 if debug: |
371 if debug: |
373 repo.ui.debug('debug.copies: search mode: backward\n') |
372 repo.ui.debug('debug.copies: search mode: backward\n') |
374 return _backwardrenames(x, y, match=match) |
373 return _backwardrenames(x, y, match=match) |