Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 16202:53e2cd303ecf stable 2.1.1
dirstate: filecacheify _ignore (issue3278)
This still doesn't handle the case where a command is run with
--config ui.ignore=path since we only look for changes in .hgignore.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Thu, 01 Mar 2012 17:49:59 +0200 |
parents | fb7c4c14223f |
children | 594fc9329628 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Thu Mar 01 17:42:49 2012 +0200 +++ b/mercurial/dirstate.py Thu Mar 01 17:49:59 2012 +0200 @@ -21,6 +21,11 @@ def join(self, obj, fname): return obj._opener.join(fname) +class rootcache(filecache): + """filecache for files in the repository root""" + def join(self, obj, fname): + return obj._join(fname) + def _finddirs(path): pos = path.rfind('/') while pos != -1: @@ -120,7 +125,7 @@ def dirs(self): return self._dirs - @propertycache + @rootcache('.hgignore') def _ignore(self): files = [self._join('.hgignore')] for name, path in self._ui.configitems("ui"):