hgext/largefiles/lfcommands.py
branchstable
changeset 18727 4846f2115927
parent 18722 f0aa8bbffe60
child 18728 1e636f7b1cfe
--- a/hgext/largefiles/lfcommands.py	Thu Feb 28 13:45:18 2013 +0100
+++ b/hgext/largefiles/lfcommands.py	Thu Feb 28 13:45:18 2013 +0100
@@ -501,6 +501,8 @@
                 # use normallookup() to allocate entry in largefiles dirstate,
                 # because lack of it misleads lfilesrepo.status() into
                 # recognition that such cache missing files are REMOVED.
+                if lfile not in repo[None]: # not switched to normal file
+                    util.unlinkpath(abslfile, ignoremissing=True)
                 lfdirstate.normallookup(lfile)
                 return None # don't try to set the mode
             else: