comparison mercurial/manifest.py @ 24635:21e1ece30f8c

util: move dirs() and finddirs() from scmutil to util An upcoming commit requires that match.py be able to call scmutil.dirs(), but when match.py imports scmutil, a dependency cycle is created. This commit avoids the cycle by moving dirs() and its related finddirs() function from scmutil to util, which match.py already depends on.
author Drew Gottlieb <drgott@google.com>
date Mon, 06 Apr 2015 14:36:08 -0700
parents ea24cf92557a
children 36872036169b
comparison
equal deleted inserted replaced
24634:4ece2847cf4c 24635:21e1ece30f8c
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from i18n import _ 8 from i18n import _
9 import mdiff, parsers, error, revlog, util, scmutil 9 import mdiff, parsers, error, revlog, util
10 import array, struct 10 import array, struct
11 import os 11 import os
12 12
13 propertycache = util.propertycache 13 propertycache = util.propertycache
14 14
215 files.difference_update(m2) 215 files.difference_update(m2)
216 return files 216 return files
217 217
218 @propertycache 218 @propertycache
219 def _dirs(self): 219 def _dirs(self):
220 return scmutil.dirs(self) 220 return util.dirs(self)
221 221
222 def dirs(self): 222 def dirs(self):
223 return self._dirs 223 return self._dirs
224 224
225 def hasdir(self, dir): 225 def hasdir(self, dir):
559 _filesnotin(self, m2) 559 _filesnotin(self, m2)
560 return files 560 return files
561 561
562 @propertycache 562 @propertycache
563 def _alldirs(self): 563 def _alldirs(self):
564 return scmutil.dirs(self) 564 return util.dirs(self)
565 565
566 def dirs(self): 566 def dirs(self):
567 return self._alldirs 567 return self._alldirs
568 568
569 def hasdir(self, dir): 569 def hasdir(self, dir):