changeset 16731:dcfc70aab372

largefiles: fix addremove when largefile is missing (issue3227)
author Na'Tosha Bard <natosha@unity3d.com>
date Sun, 13 May 2012 12:11:50 +0200
parents dd4ce44ff53c
children 277e2acb7e5c
files hgext/largefiles/overrides.py hgext/largefiles/reposetup.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Sun May 13 12:01:52 2012 +0200
+++ b/hgext/largefiles/overrides.py	Sun May 13 12:11:50 2012 +0200
@@ -169,6 +169,8 @@
         # function handle this.
         if not getattr(repo, "_isaddremove", False):
             lfutil.reporemove(repo, remove, unlink=True)
+        else:
+            lfutil.reporemove(repo, remove, unlink=False)
     finally:
         wlock.release()
 
--- a/hgext/largefiles/reposetup.py	Sun May 13 12:01:52 2012 +0200
+++ b/hgext/largefiles/reposetup.py	Sun May 13 12:11:50 2012 +0200
@@ -340,8 +340,9 @@
                                     lfdirstate.normal(lfile)
                     for lfile in lfdirstate:
                         if lfile in modifiedfiles:
-                            if not os.path.exists(
-                                    repo.wjoin(lfutil.standin(lfile))):
+                            if (not os.path.exists(repo.wjoin(
+                               lfutil.standin(lfile)))) or \
+                               (not os.path.exists(repo.wjoin(lfile))):
                                 lfdirstate.drop(lfile)
 
                     result = orig(text=text, user=user, date=date, match=match,