mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-07-09 01:41:40 +02:00
Avoid bytecode generation when importing
This commit is contained in:
@@ -36,6 +36,7 @@ def log(msg, *args):
|
||||
def import_sibling(mod, filename):
|
||||
import imp
|
||||
mydir = os.path.dirname(__file__)
|
||||
sys.dont_write_bytecode = True
|
||||
return imp.load_source(mod, os.path.join(mydir, filename))
|
||||
|
||||
class GitHgRepo:
|
||||
|
||||
@@ -1445,6 +1445,7 @@ def do_push_refspec(parser, refspec, revs):
|
||||
subprocess.check_call(cmd, stdin=None, stdout=tmpfastexport)
|
||||
try:
|
||||
import imp
|
||||
sys.dont_write_bytecode = True
|
||||
ctx.hghelper = imp.load_source('hghelper', \
|
||||
os.path.join(os.path.dirname(__file__), 'git-hg-helper'))
|
||||
ctx.hghelper.init_git(gitdir)
|
||||
|
||||
Reference in New Issue
Block a user