diff 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
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Fri Jan 11 16:30:29 2013 +0100
+++ b/hgext/largefiles/lfutil.py	Fri Jan 11 16:30:29 2013 +0100
@@ -421,7 +421,11 @@
     matcher = getstandinmatcher(repo)
     for standin in repo.dirstate.walk(matcher, [], False, False):
         lfile = splitstandin(standin)
-        standins.append((lfile, readstandin(repo, lfile)))
+        try:
+            hash = readstandin(repo, lfile)
+        except IOError:
+            hash = None
+        standins.append((lfile, hash))
     return standins
 
 def getlfilestoupdate(oldstandins, newstandins):