##// END OF EJS Templates
dirstate: extract logic to compute the list of ignorefiles...
Laurent Charignon -
r27594:0921caca default
parent child Browse files
Show More
@@ -203,15 +203,7 b' class dirstate(object):'
203 203
204 204 @rootcache('.hgignore')
205 205 def _ignore(self):
206 files = []
207 if os.path.exists(self._join('.hgignore')):
208 files.append(self._join('.hgignore'))
209 for name, path in self._ui.configitems("ui"):
210 if name == 'ignore' or name.startswith('ignore.'):
211 # we need to use os.path.join here rather than self._join
212 # because path is arbitrary and user-specified
213 files.append(os.path.join(self._rootdir, util.expandpath(path)))
214
206 files = self._ignorefiles()
215 207 if not files:
216 208 return util.never
217 209
@@ -774,6 +766,17 b' class dirstate(object):'
774 766 return True
775 767 return False
776 768
769 def _ignorefiles(self):
770 files = []
771 if os.path.exists(self._join('.hgignore')):
772 files.append(self._join('.hgignore'))
773 for name, path in self._ui.configitems("ui"):
774 if name == 'ignore' or name.startswith('ignore.'):
775 # we need to use os.path.join here rather than self._join
776 # because path is arbitrary and user-specified
777 files.append(os.path.join(self._rootdir, util.expandpath(path)))
778 return files
779
777 780 def _walkexplicit(self, match, subrepos):
778 781 '''Get stat data about the files explicitly specified by match.
779 782
General Comments 0
You need to be logged in to leave comments. Login now