##// END OF EJS Templates
subrepo: use hg.repository instead of creating localrepo directly...
Abderrahim Kitouni -
r9092:9aebeea7 default
parent child Browse files
Show More
@@ -8,7 +8,7 b''
8 8 import errno, os
9 9 from i18n import _
10 10 import config, util, node, error
11 localrepo = hg = None
11 hg = None
12 12
13 13 nullstate = ('', '')
14 14
@@ -117,9 +117,8 b' def subrepo(ctx, path):'
117 117 # because it wants to make repo objects from deep inside the stack
118 118 # so we manually delay the circular imports to not break
119 119 # scripts that don't use our demand-loading
120 global localrepo, hg
121 import localrepo as l, hg as h
122 localrepo = l
120 global hg
121 import hg as h
123 122 hg = h
124 123
125 124 util.path_auditor(ctx._repo.root)(path)
@@ -135,10 +134,10 b' class hgsubrepo(object):'
135 134 r = ctx._repo
136 135 root = r.wjoin(path)
137 136 if os.path.exists(os.path.join(root, '.hg')):
138 self._repo = localrepo.localrepository(r.ui, root)
137 self._repo = hg.repository(r.ui, root)
139 138 else:
140 139 util.makedirs(root)
141 self._repo = localrepo.localrepository(r.ui, root, create=True)
140 self._repo = hg.repository(r.ui, root, create=True)
142 141 self._repo._subparent = r
143 142 self._repo._subsource = state[0]
144 143
General Comments 0
You need to be logged in to leave comments. Login now