comparison mercurial/merge.py @ 4399:3b7e284b8f28

merge: expand and simplify the invalid handling for directory moves
author Matt Mackall <mpm@selenic.com>
date Thu, 03 May 2007 17:24:43 -0500
parents 9fe267f77f56
children 93652499bed3
comparison
equal deleted inserted replaced
4398:9fe267f77f56 4399:3b7e284b8f28
203 # directory wasn't entirely moved remotely 203 # directory wasn't entirely moved remotely
204 invalid[dsrc] = True 204 invalid[dsrc] = True
205 elif dsrc in dirmove and dirmove[dsrc] != ddst: 205 elif dsrc in dirmove and dirmove[dsrc] != ddst:
206 # files from the same directory moved to two different places 206 # files from the same directory moved to two different places
207 invalid[dsrc] = True 207 invalid[dsrc] = True
208 del dirmove[dsrc]
209 else: 208 else:
210 # looks good so far 209 # looks good so far
211 dirmove[dsrc + "/"] = ddst + "/" 210 dirmove[dsrc + "/"] = ddst + "/"
211
212 for i in invalid:
213 if i in dirmove:
214 del dirmove[i]
212 215
213 del d1, d2, invalid 216 del d1, d2, invalid
214 217
215 if not dirmove: 218 if not dirmove:
216 return copy 219 return copy