##// END OF EJS Templates
copies: respect narrowmatcher in "parent -> working dir" case...
Martin von Zweigbergk -
r41902:fd973639 default draft
parent child Browse files
Show More
@@ -141,8 +141,8 b' def _tracefile(fctx, am, limit=node.null'
141 141 if limit >= 0 and not f.isintroducedafter(limit):
142 142 return None
143 143
144 def _dirstatecopies(d, match=None):
145 ds = d._repo.dirstate
144 def _dirstatecopies(repo, match=None):
145 ds = repo.dirstate
146 146 c = ds.copies().copy()
147 147 for k in list(c):
148 148 if ds[k] not in 'anm' or (match and not match(k)):
@@ -221,11 +221,11 b' def _forwardcopies(a, b, match=None):'
221 221 if b.rev() is None:
222 222 if a == b.p1():
223 223 # short-circuit to avoid issues with merge states
224 return _dirstatecopies(b, match)
224 return _dirstatecopies(b._repo, match)
225 225
226 226 cm = _committedforwardcopies(a, b.p1(), match)
227 227 # combine copies from dirstate if necessary
228 return _chain(a, b, cm, _dirstatecopies(b, match))
228 return _chain(a, b, cm, _dirstatecopies(b._repo, match))
229 229 return _committedforwardcopies(a, b, match)
230 230
231 231 def _backwardrenames(a, b):
@@ -391,9 +391,11 b' def mergecopies(repo, c1, c2, base):'
391 391 if not c1 or not c2 or c1 == c2:
392 392 return {}, {}, {}, {}, {}
393 393
394 narrowmatch = c1.repo().narrowmatch()
395
394 396 # avoid silly behavior for parent -> working dir
395 397 if c2.node() is None and c1.node() == repo.dirstate.p1():
396 return repo.dirstate.copies(), {}, {}, {}, {}
398 return _dirstatecopies(repo, narrowmatch), {}, {}, {}, {}
397 399
398 400 copytracing = repo.ui.config('experimental', 'copytrace')
399 401 boolctrace = stringutil.parsebool(copytracing)
General Comments 0
You need to be logged in to leave comments. Login now