Submitter | Durham Goode |
---|---|
Date | March 10, 2015, 10:29 p.m. |
Message ID | <2c1d33d6a45257f27da9.1426026592@dev2000.prn2.facebook.com> |
Download | mbox | patch |
Permalink | /patch/7983/ |
State | Accepted |
Commit | ce847603040b76c5b1da35630e44cd0e76c5159e |
Headers | show |
Comments
On 03/10/2015 03:29 PM, Durham Goode wrote: > # HG changeset patch > # User Durham Goode <durham@fb.com> > # Date 1426020965 25200 > # Tue Mar 10 13:56:05 2015 -0700 > # Node ID 2c1d33d6a45257f27da9ea2b590db48b21eeeb87 > # Parent 913347bcd59c33110f029d83203b3b4c2ecd91a8 > copies: added manifests to computenonoverlap I guess? Given martin approval, this is pushed to the clowncopter.
On Tue, Mar 10, 2015 at 08:29:45PM -0700, Pierre-Yves David wrote: > > > On 03/10/2015 03:29 PM, Durham Goode wrote: > ># HG changeset patch > ># User Durham Goode <durham@fb.com> > ># Date 1426020965 25200 > ># Tue Mar 10 13:56:05 2015 -0700 > ># Node ID 2c1d33d6a45257f27da9ea2b590db48b21eeeb87 > ># Parent 913347bcd59c33110f029d83203b3b4c2ecd91a8 > >copies: added manifests to computenonoverlap > > I guess? It makes sense to me. We probably want this for other hooking at Google too (though I don't know for sure yet.) > > Given martin approval, this is pushed to the clowncopter. > > > -- > Pierre-Yves David > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
Patch
diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -209,10 +209,13 @@ def pathcopies(x, y): 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 @@ def mergecopies(repo, c1, c2, ca): 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)