Mercurial > public > mercurial-scm > hg
diff mercurial/copies.py @ 20641:3db9e798e004
copies: when both sides made the same copy, report it as a copy
Not used yet ... but shows up in debug output.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 25 Feb 2014 20:29:14 +0100 |
parents | 243ea5ffdf31 |
children | e8533ec2d222 |
line wrap: on
line diff
--- a/mercurial/copies.py Sun Mar 02 18:36:02 2014 +0100 +++ b/mercurial/copies.py Tue Feb 25 20:29:14 2014 +0100 @@ -262,6 +262,18 @@ else: diverge2.update(fl) # reverse map for below + bothnew = sorted([d for d in m1 if d in m2 and d not in ma]) + if bothnew: + repo.ui.debug(" unmatched files new in both:\n %s\n" + % "\n ".join(bothnew)) + bothdiverge, _copy, _fullcopy = {}, {}, {} + for f in bothnew: + checkcopies(ctx, f, m1, m2, ca, limit, bothdiverge, _copy, _fullcopy) + checkcopies(ctx, f, m2, m1, ca, limit, bothdiverge, _copy, _fullcopy) + for of, fl in bothdiverge.items(): + if len(fl) == 2 and fl[0] == fl[1]: + copy[fl[0]] = of # not actually divergent, just matching renames + if fullcopy: repo.ui.debug(" all copies found (* = to merge, ! = divergent, " "% = renamed and deleted):\n")