##// END OF EJS Templates
copies: filter out copies from non-existent source later in _chain()...
Martin von Zweigbergk -
r42416:fdbeacb9 default
parent child Browse files
Show More
@@ -134,13 +134,16 b' def _chain(src, dst, a, b):'
134 if t[v] != k:
134 if t[v] != k:
135 # file wasn't renamed back to itself (i.e. case 4, not 3)
135 # file wasn't renamed back to itself (i.e. case 4, not 3)
136 t[k] = t[v]
136 t[k] = t[v]
137 elif v in src:
137 else:
138 # file is a copy of an existing file, i.e. case 6.
138 # Renamed only in 'b', i.e. cases 5 & 6. We'll remove case 5 later.
139 t[k] = v
139 t[k] = v
140
140
141 for k, v in list(t.items()):
141 for k, v in list(t.items()):
142 # remove copies from files that didn't exist, i.e. case 5
143 if v not in src:
144 del t[k]
142 # remove criss-crossed copies, i.e. case 3
145 # remove criss-crossed copies, i.e. case 3
143 if k in src and v in dst:
146 elif k in src and v in dst:
144 del t[k]
147 del t[k]
145 # remove copies to files that were then removed, i.e. case 1
148 # remove copies to files that were then removed, i.e. case 1
146 # and file 'y' in cases 3 & 4 (in case of rename)
149 # and file 'y' in cases 3 & 4 (in case of rename)
General Comments 0
You need to be logged in to leave comments. Login now