largefiles: fix deletion of multiple missing largefiles (issue3329) stable
authorNa'Tosha Bard <natosha@unity3d.com>
Fri, 11 May 2012 15:32:22 +0200
branchstable
changeset 16638 29fe533fe447
parent 16637 265daefc00b2
child 16639 00290bd359fe
largefiles: fix deletion of multiple missing largefiles (issue3329)
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Fri May 11 15:15:50 2012 +0200
+++ b/hgext/largefiles/overrides.py	Fri May 11 15:32:22 2012 +0200
@@ -552,7 +552,8 @@
         for lfile in modified:
             lfutil.updatestandin(repo, lfutil.standin(lfile))
         for lfile in missing:
-            os.unlink(repo.wjoin(lfutil.standin(lfile)))
+            if (os.path.exists(repo.wjoin(lfutil.standin(lfile)))):
+                os.unlink(repo.wjoin(lfutil.standin(lfile)))
 
         try:
             ctx = repo[opts.get('rev')]