Show More
@@ -139,11 +139,11 def _tracefile(fctx, am, limit=-1): | |||||
139 | if limit >= 0 and f.linkrev() < limit and f.rev() < limit: |
|
139 | if limit >= 0 and f.linkrev() < limit and f.rev() < limit: | |
140 | return None |
|
140 | return None | |
141 |
|
141 | |||
142 | def _dirstatecopies(d): |
|
142 | def _dirstatecopies(d, match=None): | |
143 | ds = d._repo.dirstate |
|
143 | ds = d._repo.dirstate | |
144 | c = ds.copies().copy() |
|
144 | c = ds.copies().copy() | |
145 | for k in list(c): |
|
145 | for k in list(c): | |
146 | if ds[k] not in 'anm': |
|
146 | if ds[k] not in 'anm' or (match and not match(k)): | |
147 | del c[k] |
|
147 | del c[k] | |
148 | return c |
|
148 | return c | |
149 |
|
149 | |||
@@ -166,7 +166,7 def _forwardcopies(a, b, match=None): | |||||
166 | b = w.p1() |
|
166 | b = w.p1() | |
167 | if a == b: |
|
167 | if a == b: | |
168 | # short-circuit to avoid issues with merge states |
|
168 | # short-circuit to avoid issues with merge states | |
169 | return _dirstatecopies(w) |
|
169 | return _dirstatecopies(w, match) | |
170 |
|
170 | |||
171 | # files might have to be traced back to the fctx parent of the last |
|
171 | # files might have to be traced back to the fctx parent of the last | |
172 | # one-side-only changeset, but not further back than that |
|
172 | # one-side-only changeset, but not further back than that | |
@@ -202,7 +202,7 def _forwardcopies(a, b, match=None): | |||||
202 |
|
202 | |||
203 | # combine copies from dirstate if necessary |
|
203 | # combine copies from dirstate if necessary | |
204 | if w is not None: |
|
204 | if w is not None: | |
205 | cm = _chain(a, w, cm, _dirstatecopies(w)) |
|
205 | cm = _chain(a, w, cm, _dirstatecopies(w, match)) | |
206 |
|
206 | |||
207 | return cm |
|
207 | return cm | |
208 |
|
208 |
General Comments 0
You need to be logged in to leave comments.
Login now