comparison hgext/largefiles/lfutil.py @ 18300:745bc16ccef2

largefiles: fix update from a merge with removed files A situation with this case could happen after interrupting an update. Update would fail with: abort: No such file or directory: $TESTTMP/f/.hglf/sub2/large6 Update from a merge without using clean is not possible anyway, so this patch takes a step in the right direction so it gets as far as reporting the right error.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 11 Jan 2013 16:30:29 +0100
parents a7a88a458a4c
children 877f80599df0
comparison
equal deleted inserted replaced
18299:a7a88a458a4c 18300:745bc16ccef2
419 def getstandinsstate(repo): 419 def getstandinsstate(repo):
420 standins = [] 420 standins = []
421 matcher = getstandinmatcher(repo) 421 matcher = getstandinmatcher(repo)
422 for standin in repo.dirstate.walk(matcher, [], False, False): 422 for standin in repo.dirstate.walk(matcher, [], False, False):
423 lfile = splitstandin(standin) 423 lfile = splitstandin(standin)
424 standins.append((lfile, readstandin(repo, lfile))) 424 try:
425 hash = readstandin(repo, lfile)
426 except IOError:
427 hash = None
428 standins.append((lfile, hash))
425 return standins 429 return standins
426 430
427 def getlfilestoupdate(oldstandins, newstandins): 431 def getlfilestoupdate(oldstandins, newstandins):
428 changedstandins = set(oldstandins).symmetric_difference(set(newstandins)) 432 changedstandins = set(oldstandins).symmetric_difference(set(newstandins))
429 filelist = [] 433 filelist = []