# HG changeset patch # User Martin von Zweigbergk # Date 2021-03-05 22:26:56 # Node ID 324ded1aa2ab683cfe794419b6f5d64b67443b03 # Parent eca88f5fbcb26488397c2df60f173c6d624d6394 copies: inline _backwardrenames() in pathcopies() I'll add another filtering step in `patchcopies()` next. I need access to the forward copies for that. Differential Revision: https://phab.mercurial-scm.org/D10119 diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -761,9 +761,12 @@ def pathcopies(x, y, match=None): base = None if a.rev() != nullrev: base = x + x_copies = _forwardcopies(a, x) + y_copies = _forwardcopies(a, y, base, match=match) + x_backward_renames = _reverse_renames(x_copies, x, match) copies = _chain( - _backwardrenames(x, a, match=match), - _forwardcopies(a, y, base, match=match), + x_backward_renames, + y_copies, ) _filter(x, y, copies) return copies