Mercurial > hg
changeset 16178:828fe2ca7cbb
copies: use ctx.dirs() for directory rename detection
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Feb 2012 16:45:59 -0600 |
parents | b8c1a8a57540 |
children | 46a96cc830c2 |
files | mercurial/copies.py |
diffstat | 1 files changed, 2 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/copies.py Sun Feb 26 15:51:56 2012 -0600 +++ b/mercurial/copies.py Sun Feb 26 16:45:59 2012 -0600 @@ -18,15 +18,6 @@ return "" return f[:s] -def _dirs(files): - d = set() - for f in files: - f = _dirname(f) - while f not in d: - d.add(f) - f = _dirname(f) - return d - def _findlimit(repo, a, b): """Find the earliest revision that's an ancestor of a or b but not both, None if no such revision exists. @@ -316,8 +307,8 @@ repo.ui.debug(" checking for directory renames\n") # generate a directory move map - d1, d2 = _dirs(m1), _dirs(m2) - invalid = set() + d1, d2 = c1.dirs(), c2.dirs() + invalid = set([""]) dirmove = {} # examine each file copy for a potential directory move, which is