Mercurial > hg
comparison mercurial/subrepo.py @ 13972:d1f4e7fd970a
move path_auditor from util to scmutil
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Wed, 20 Apr 2011 22:43:31 +0200 |
parents | 518344d02761 |
children | bcc6ed0f6c3b |
comparison
equal
deleted
inserted
replaced
13971:bfeaa88b875d | 13972:d1f4e7fd970a |
---|---|
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 import errno, os, re, xml.dom.minidom, shutil, posixpath | 8 import errno, os, re, xml.dom.minidom, shutil, posixpath |
9 import stat, subprocess, tarfile | 9 import stat, subprocess, tarfile |
10 from i18n import _ | 10 from i18n import _ |
11 import config, util, node, error, cmdutil, url, bookmarks | 11 import config, scmutil, util, node, error, cmdutil, url, bookmarks |
12 hg = None | 12 hg = None |
13 | 13 |
14 nullstate = ('', '', 'empty') | 14 nullstate = ('', '', 'empty') |
15 | 15 |
16 def state(ctx, ui): | 16 def state(ctx, ui): |
232 # scripts that don't use our demand-loading | 232 # scripts that don't use our demand-loading |
233 global hg | 233 global hg |
234 import hg as h | 234 import hg as h |
235 hg = h | 235 hg = h |
236 | 236 |
237 util.path_auditor(ctx._repo.root)(path) | 237 scmutil.path_auditor(ctx._repo.root)(path) |
238 state = ctx.substate.get(path, nullstate) | 238 state = ctx.substate.get(path, nullstate) |
239 if state[2] not in types: | 239 if state[2] not in types: |
240 raise util.Abort(_('unknown subrepo type %s') % state[2]) | 240 raise util.Abort(_('unknown subrepo type %s') % state[2]) |
241 return types[state[2]](ctx, path, state[:2]) | 241 return types[state[2]](ctx, path, state[:2]) |
242 | 242 |