Show More
@@ -144,6 +144,15 b' def _dirstatecopies(d):' | |||||
144 | del c[k] |
|
144 | del c[k] | |
145 | return c |
|
145 | return c | |
146 |
|
146 | |||
|
147 | def _computeforwardmissing(a, b): | |||
|
148 | """Computes which files are in b but not a. | |||
|
149 | This is its own function so extensions can easily wrap this call to see what | |||
|
150 | files _forwardcopies is about to process. | |||
|
151 | """ | |||
|
152 | missing = set(b.manifest().iterkeys()) | |||
|
153 | missing.difference_update(a.manifest().iterkeys()) | |||
|
154 | return missing | |||
|
155 | ||||
147 | def _forwardcopies(a, b): |
|
156 | def _forwardcopies(a, b): | |
148 | '''find {dst@b: src@a} copy mapping where a is an ancestor of b''' |
|
157 | '''find {dst@b: src@a} copy mapping where a is an ancestor of b''' | |
149 |
|
158 | |||
@@ -167,9 +176,7 b' def _forwardcopies(a, b):' | |||||
167 | # we currently don't try to find where old files went, too expensive |
|
176 | # we currently don't try to find where old files went, too expensive | |
168 | # this means we can miss a case like 'hg rm b; hg cp a b' |
|
177 | # this means we can miss a case like 'hg rm b; hg cp a b' | |
169 | cm = {} |
|
178 | cm = {} | |
170 | missing = set(b.manifest().iterkeys()) |
|
179 | missing = _computeforwardmissing(a, b) | |
171 | missing.difference_update(a.manifest().iterkeys()) |
|
|||
172 |
|
||||
173 | ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) |
|
180 | ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) | |
174 | for f in missing: |
|
181 | for f in missing: | |
175 | fctx = b[f] |
|
182 | fctx = b[f] |
General Comments 0
You need to be logged in to leave comments.
Login now