hgext/largefiles/overrides.py
changeset 23726 d944492445fa
parent 23713 5f84695734f1
parent 23721 1b3df5ef5949
child 23733 86810cd85eb8
--- a/hgext/largefiles/overrides.py	Mon Jan 05 11:02:04 2015 +0900
+++ b/hgext/largefiles/overrides.py	Mon Jan 05 15:46:14 2015 -0600
@@ -201,12 +201,10 @@
             if not opts.get('dry_run'):
                 if not after:
                     util.unlinkpath(repo.wjoin(f), ignoremissing=True)
-                lfdirstate.remove(f)
 
         if opts.get('dry_run'):
             return result
 
-        lfdirstate.write()
         remove = [lfutil.standin(f) for f in remove]
         # If this is being called by addremove, let the original addremove
         # function handle this.
@@ -214,6 +212,12 @@
             for f in remove:
                 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
         repo[None].forget(remove)
+
+        for f in remove:
+            lfutil.synclfdirstate(repo, lfdirstate, lfutil.splitstandin(f),
+                                  False)
+
+        lfdirstate.write()
     finally:
         wlock.release()