##// END OF EJS Templates
subrepo: use absolute_import
Gregory Szorc -
r25980:38c585c2 default
parent child Browse files
Show More
@@ -5,15 +5,34 b''
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
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 from __future__ import absolute_import
9
8 import copy
10 import copy
9 import errno, os, re, posixpath, sys
11 import errno
12 import os
13 import posixpath
14 import re
15 import stat
16 import subprocess
17 import sys
18 import tarfile
10 import xml.dom.minidom
19 import xml.dom.minidom
11 import stat, subprocess, tarfile
20
12 from i18n import _
21
13 import config, util, node, error, cmdutil, scmutil, match as matchmod
22 from .i18n import _
14 import phases
23 from . import (
15 import pathutil
24 cmdutil,
16 import exchange
25 config,
26 error,
27 exchange,
28 match as matchmod,
29 node,
30 pathutil,
31 phases,
32 scmutil,
33 util,
34 )
35
17 hg = None
36 hg = None
18 propertycache = util.propertycache
37 propertycache = util.propertycache
19
38
@@ -328,7 +347,7 b' def subrepo(ctx, path, allowwdir=False):'
328 # so we manually delay the circular imports to not break
347 # so we manually delay the circular imports to not break
329 # scripts that don't use our demand-loading
348 # scripts that don't use our demand-loading
330 global hg
349 global hg
331 import hg as h
350 from . import hg as h
332 hg = h
351 hg = h
333
352
334 pathutil.pathauditor(ctx.repo().root)(path)
353 pathutil.pathauditor(ctx.repo().root)(path)
@@ -346,7 +365,7 b' def nullsubrepo(ctx, path, pctx):'
346 # so we manually delay the circular imports to not break
365 # so we manually delay the circular imports to not break
347 # scripts that don't use our demand-loading
366 # scripts that don't use our demand-loading
348 global hg
367 global hg
349 import hg as h
368 from . import hg as h
350 hg = h
369 hg = h
351
370
352 pathutil.pathauditor(ctx.repo().root)(path)
371 pathutil.pathauditor(ctx.repo().root)(path)
General Comments 0
You need to be logged in to leave comments. Login now