Patchwork D10119: copies: inline _backwardrenames() in pathcopies()

login
register
mail settings
Submitter phabricator
Date March 6, 2021, 12:41 a.m.
Message ID <differential-rev-PHID-DREV-wy2wiqv4kgyslg4xm4x5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48434/
State Superseded
Headers show

Comments

phabricator - March 6, 2021, 12:41 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I'll add another filtering step in `patchcopies()` next. I need access
  to the forward copies for that.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10119

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -761,9 +761,12 @@ 
         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