# HG changeset patch # User Mads Kiilerich # Date 2012-12-13 18:19:06 # Node ID bf6252d12c342c41253d29b305609562bba260e3 # Parent 79f2493198e1c248eeb3607b69bc1746f6e836aa largefiles: simplify lfdirstate ignore handling - it is only for tracking .hglf diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -135,6 +135,8 @@ class largefilesdirstate(dirstate.dirsta 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): ''' diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -157,14 +157,6 @@ def reposetup(ui, repo): 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 @@ def reposetup(ui, repo): 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 @@ def reposetup(ui, repo): 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():