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