##// END OF EJS Templates
copies._forwardcopies: use set operations to find missing files...
Siddharth Agarwal -
r18878:3cfaace0 default
parent child Browse files
Show More
@@ -133,11 +133,13 b' def _forwardcopies(a, b):'
133 # we currently don't try to find where old files went, too expensive
133 # we currently don't try to find where old files went, too expensive
134 # this means we can miss a case like 'hg rm b; hg cp a b'
134 # this means we can miss a case like 'hg rm b; hg cp a b'
135 cm = {}
135 cm = {}
136 for f in b:
136 missing = set(b.manifest().iterkeys())
137 if f not in a:
137 missing.difference_update(a.manifest().iterkeys())
138 ofctx = _tracefile(b[f], a)
138
139 if ofctx:
139 for f in missing:
140 cm[f] = ofctx.path()
140 ofctx = _tracefile(b[f], a)
141 if ofctx:
142 cm[f] = ofctx.path()
141
143
142 # combine copies from dirstate if necessary
144 # combine copies from dirstate if necessary
143 if w is not None:
145 if w is not None:
General Comments 0
You need to be logged in to leave comments. Login now