[PATCH] largefiles: fix deletion of multiple missing largefiles (issue3329)

Na'Tosha Bard natosha at unity3d.com
Fri May 11 08:33:20 CDT 2012


# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1336743142 -7200
# Node ID f361ba9417558e2bedf2f14cda8ea8b22e2bdc35
# Parent  734e6ab91d0cc00ada3d59d406e8cb142633c018
largefiles: fix deletion of multiple missing largefiles (issue3329)

diff -r 734e6ab91d0c -r f361ba941755 hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Fri May 11 14:42:26 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')]


More information about the Mercurial-devel mailing list