Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.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 | b2fb1403994e |
children | cb981009d697 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Apr 06 13:59:36 2015 -0700 +++ b/mercurial/dirstate.py Mon Apr 06 14:36:08 2015 -0700 @@ -139,7 +139,7 @@ @propertycache def _dirs(self): - return scmutil.dirs(self._map, 'r') + return util.dirs(self._map, 'r') def dirs(self): return self._dirs @@ -381,7 +381,7 @@ if f in self._dirs: raise util.Abort(_('directory %r already in dirstate') % f) # shadows - for d in scmutil.finddirs(f): + for d in util.finddirs(f): if d in self._dirs: break if d in self._map and self[d] != 'r': @@ -601,7 +601,7 @@ return False if self._ignore(f): return True - for p in scmutil.finddirs(f): + for p in util.finddirs(f): if self._ignore(p): return True return False @@ -698,7 +698,7 @@ results[nf] = None else: # does it match a missing directory? if alldirs is None: - alldirs = scmutil.dirs(dmap) + alldirs = util.dirs(dmap) if nf in alldirs: if matchedir: matchedir(nf)