hgext/largefiles/overrides.py
branchstable
changeset 17231 2446b63c89ec
parent 17229 a6d9b2d33040
child 17232 25248e2ebaee
--- a/hgext/largefiles/overrides.py	Thu Jul 19 10:00:15 2012 -0400
+++ b/hgext/largefiles/overrides.py	Thu Jul 19 11:12:05 2012 -0400
@@ -82,8 +82,15 @@
             continue
 
         if exact or not exists:
+            wfile = repo.wjoin(f)
+
+            # In case the file was removed previously, but not committed
+            # (issue3507)
+            if not os.path.exists(wfile):
+                continue
+
             abovemin = (lfsize and
-                        os.lstat(repo.wjoin(f)).st_size >= lfsize * 1024 * 1024)
+                        os.lstat(wfile).st_size >= lfsize * 1024 * 1024)
             if large or abovemin or (lfmatcher and lfmatcher(f)):
                 lfnames.append(f)
                 if ui.verbose or not exact: