comparison mercurial/subrepo.py @ 20033:f962870712da

pathutil: tease out a new library to break an import cycle from canonpath use
author Augie Fackler <raf@durin42.com>
date Wed, 06 Nov 2013 18:19:04 -0500
parents 5e10d41e7b9c
children af12f58e2aa0
comparison
equal deleted inserted replaced
20032:175c6fd8cacc 20033:f962870712da
7 7
8 import errno, os, re, shutil, posixpath, sys 8 import errno, os, re, shutil, posixpath, sys
9 import xml.dom.minidom 9 import xml.dom.minidom
10 import stat, subprocess, tarfile 10 import stat, subprocess, tarfile
11 from i18n import _ 11 from i18n import _
12 import config, scmutil, util, node, error, cmdutil, bookmarks, match as matchmod 12 import config, util, node, error, cmdutil, bookmarks, match as matchmod
13 import pathutil
13 hg = None 14 hg = None
14 propertycache = util.propertycache 15 propertycache = util.propertycache
15 16
16 nullstate = ('', '', 'empty') 17 nullstate = ('', '', 'empty')
17 18
330 # scripts that don't use our demand-loading 331 # scripts that don't use our demand-loading
331 global hg 332 global hg
332 import hg as h 333 import hg as h
333 hg = h 334 hg = h
334 335
335 scmutil.pathauditor(ctx._repo.root)(path) 336 pathutil.pathauditor(ctx._repo.root)(path)
336 state = ctx.substate[path] 337 state = ctx.substate[path]
337 if state[2] not in types: 338 if state[2] not in types:
338 raise util.Abort(_('unknown subrepo type %s') % state[2]) 339 raise util.Abort(_('unknown subrepo type %s') % state[2])
339 return types[state[2]](ctx, path, state[:2]) 340 return types[state[2]](ctx, path, state[:2])
340 341