--- a/mercurial/dirstate.py Wed Dec 23 13:16:03 2015 -0800
+++ b/mercurial/dirstate.py Wed Dec 23 11:52:54 2015 -0800
@@ -203,15 +203,7 @@
@rootcache('.hgignore')
def _ignore(self):
- files = []
- if os.path.exists(self._join('.hgignore')):
- files.append(self._join('.hgignore'))
- for name, path in self._ui.configitems("ui"):
- if name == 'ignore' or name.startswith('ignore.'):
- # we need to use os.path.join here rather than self._join
- # because path is arbitrary and user-specified
- files.append(os.path.join(self._rootdir, util.expandpath(path)))
-
+ files = self._ignorefiles()
if not files:
return util.never
@@ -774,6 +766,17 @@
return True
return False
+ def _ignorefiles(self):
+ files = []
+ if os.path.exists(self._join('.hgignore')):
+ files.append(self._join('.hgignore'))
+ for name, path in self._ui.configitems("ui"):
+ if name == 'ignore' or name.startswith('ignore.'):
+ # we need to use os.path.join here rather than self._join
+ # because path is arbitrary and user-specified
+ files.append(os.path.join(self._rootdir, util.expandpath(path)))
+ return files
+
def _walkexplicit(self, match, subrepos):
'''Get stat data about the files explicitly specified by match.