comparison mercurial/merge.py @ 2918:db397c38005d

merge: use file size stored in revlog index Add size method to filelog to handle nodes with renames
author Matt Mackall <mpm@selenic.com>
date Tue, 15 Aug 2006 22:46:35 -0500
parents dd032b0f02ac
children 8743188f4d2e
comparison
equal deleted inserted replaced
2917:dd032b0f02ac 2918:db397c38005d
280 # We've update-merged a locally modified file, so 280 # We've update-merged a locally modified file, so
281 # we set the dirstate to emulate a normal checkout 281 # we set the dirstate to emulate a normal checkout
282 # of that file some time in the past. Thus our 282 # of that file some time in the past. Thus our
283 # merge will appear as a normal local file 283 # merge will appear as a normal local file
284 # modification. 284 # modification.
285 f_len = len(repo.file(f).read(other)) 285 fl = repo.file(f)
286 f_len = fl.size(fl.rev(other))
286 repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1) 287 repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1)
287 288
288 remove.sort() 289 remove.sort()
289 for f in remove: 290 for f in remove:
290 repo.ui.note(_("removing %s\n") % f) 291 repo.ui.note(_("removing %s\n") % f)