Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.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 | e74f819e9160 |
children | ab6e3729747e |
comparison
equal
deleted
inserted
replaced
24634:4ece2847cf4c | 24635:21e1ece30f8c |
---|---|
2326 except error.LookupError: | 2326 except error.LookupError: |
2327 ui.status(_("skipping missing subrepository: %s\n") | 2327 ui.status(_("skipping missing subrepository: %s\n") |
2328 % join(subpath)) | 2328 % join(subpath)) |
2329 | 2329 |
2330 # warn about failure to delete explicit files/dirs | 2330 # warn about failure to delete explicit files/dirs |
2331 deleteddirs = scmutil.dirs(deleted) | 2331 deleteddirs = util.dirs(deleted) |
2332 for f in m.files(): | 2332 for f in m.files(): |
2333 def insubrepo(): | 2333 def insubrepo(): |
2334 for subpath in wctx.substate: | 2334 for subpath in wctx.substate: |
2335 if f.startswith(subpath): | 2335 if f.startswith(subpath): |
2336 return True | 2336 return True |