largefiles: simplify lfdirstate ignore handling - it is only for tracking .hglf
authorMads Kiilerich <madski@unity3d.com>
Thu, 13 Dec 2012 19:19:06 +0100
changeset 18148 bf6252d12c34
parent 18147 79f2493198e1
child 18149 2dcc3653b361
largefiles: simplify lfdirstate ignore handling - it is only for tracking .hglf
hgext/largefiles/lfutil.py
hgext/largefiles/reposetup.py
--- a/hgext/largefiles/lfutil.py	Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/lfutil.py	Thu Dec 13 19:19:06 2012 +0100
@@ -135,6 +135,8 @@
         return super(largefilesdirstate, self).forget(unixpath(f))
     def normallookup(self, f):
         return super(largefilesdirstate, self).normallookup(unixpath(f))
+    def _ignore(self):
+        return False
 
 def openlfdirstate(ui, repo, create=True):
     '''
--- a/hgext/largefiles/reposetup.py	Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/reposetup.py	Thu Dec 13 19:19:06 2012 +0100
@@ -157,14 +157,6 @@
                             newfiles.append(f)
                     return newfiles
 
-                # Create a function that we can use to override what is
-                # normally the ignore matcher.  We've already checked
-                # for ignored files on the first dirstate walk, and
-                # unnecessarily re-checking here causes a huge performance
-                # hit because lfdirstate only knows about largefiles
-                def _ignoreoverride(self):
-                    return False
-
                 m = copy.copy(match)
                 m._files = tostandins(m._files)
 
@@ -172,14 +164,6 @@
                     ignored, clean, unknown, listsubrepos)
                 if working:
                     try:
-                        # Any non-largefiles that were explicitly listed must be
-                        # taken out or lfdirstate.status will report an error.
-                        # The status of these files was already computed using
-                        # super's status.
-                        # Override lfdirstate's ignore matcher to not do
-                        # anything
-                        origignore = lfdirstate._ignore
-                        lfdirstate._ignore = _ignoreoverride
 
                         def sfindirstate(f):
                             sf = lfutil.standin(f)
@@ -220,8 +204,7 @@
                                 else:
                                     added.append(lfile)
                     finally:
-                        # Replace the original ignore function
-                        lfdirstate._ignore = origignore
+                        pass
 
                     # Standins no longer found in lfdirstate has been removed
                     for standin in ctx1.manifest():