##// END OF EJS Templates
copies: use ctx.dirs() for directory rename detection
Matt Mackall -
r16178:828fe2ca default
parent child Browse files
Show More
@@ -18,15 +18,6 b' def _dirname(f):'
18 return ""
18 return ""
19 return f[:s]
19 return f[:s]
20
20
21 def _dirs(files):
22 d = set()
23 for f in files:
24 f = _dirname(f)
25 while f not in d:
26 d.add(f)
27 f = _dirname(f)
28 return d
29
30 def _findlimit(repo, a, b):
21 def _findlimit(repo, a, b):
31 """Find the earliest revision that's an ancestor of a or b but not both,
22 """Find the earliest revision that's an ancestor of a or b but not both,
32 None if no such revision exists.
23 None if no such revision exists.
@@ -316,8 +307,8 b' def mergecopies(repo, c1, c2, ca):'
316 repo.ui.debug(" checking for directory renames\n")
307 repo.ui.debug(" checking for directory renames\n")
317
308
318 # generate a directory move map
309 # generate a directory move map
319 d1, d2 = _dirs(m1), _dirs(m2)
310 d1, d2 = c1.dirs(), c2.dirs()
320 invalid = set()
311 invalid = set([""])
321 dirmove = {}
312 dirmove = {}
322
313
323 # examine each file copy for a potential directory move, which is
314 # examine each file copy for a potential directory move, which is
General Comments 0
You need to be logged in to leave comments. Login now