copies: added manifests to computenonoverlap
authorDurham Goode <durham@fb.com>
Tue, 10 Mar 2015 13:56:05 -0700
changeset 24273 ce847603040b
parent 24272 26a1c617e047
child 24274 9640820bc957
copies: added manifests to computenonoverlap Commit 30219bd46ed7 changed the computenonoverlap api's to not require the manifests. We actually need the manifests in the remotefilelog extension so we can find the file nodes for the various files that change. Let's add it back to the function signature with a note explaining why. This doesn't affect any behavior.
mercurial/copies.py
--- a/mercurial/copies.py	Tue Mar 10 17:14:33 2015 -0700
+++ b/mercurial/copies.py	Tue Mar 10 13:56:05 2015 -0700
@@ -209,10 +209,13 @@
         return _backwardrenames(x, y)
     return _chain(x, y, _backwardrenames(x, a), _forwardcopies(a, y))
 
-def _computenonoverlap(repo, addedinm1, addedinm2):
+def _computenonoverlap(repo, m1, m2, addedinm1, addedinm2):
     """Computes, based on addedinm1 and addedinm2, the files exclusive to m1
     and m2. This is its own function so extensions can easily wrap this call
     to see what files mergecopies is about to process.
+
+    Even though m1 and m2 are not used in this function, they are useful in
+    other extensions for being able to read the file nodes of the changed files.
     """
     u1 = sorted(addedinm1 - addedinm2)
     u2 = sorted(addedinm2 - addedinm1)
@@ -280,7 +283,7 @@
 
     addedinm1 = m1.filesnotin(ma)
     addedinm2 = m2.filesnotin(ma)
-    u1, u2 = _computenonoverlap(repo, addedinm1, addedinm2)
+    u1, u2 = _computenonoverlap(repo, m1, m2, addedinm1, addedinm2)
 
     for f in u1:
         checkcopies(ctx, f, m1, m2, ca, limit, diverge, copy, fullcopy)