From ec2472daa930a46949fcdb3fb9ca715f9bb3f200 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 29 Dec 2009 21:25:33 -0500 Subject: [PATCH] Disable mercurial.demandimport, since it breaks Bzr Running python test.py libbe.storage.vcs.hg libbe.storage.vcs.bzr with the old setup produced lots of Traceback (most recent call last): File ".../libbe/storage/vcs/base.py", line 1010, in setUp self.s.init() File ".../libbe/storage/base.py", line 170, in init return self._init() File ".../libbe/storage/vcs/base.py", line 664, in _init self._vcs_init(self.repo) File ".../libbe/storage/vcs/bzr.py", line 88, in _vcs_init cmd.run(location=path) File ".../python2.5/site-packages/bzrlib/builtins.py", line 1685, in run format = bzrdir.format_registry.make_bzrdir('default') File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3452, in make_bzrdir return self.get(key)() File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3398, in helper bd.set_branch_format(_load(branch_format)) File ".../python2.5/site-packages/bzrlib/bzrdir.py", line 3385, in _load [factory_name]) File "/var/lib/python-support/python2.5/mercurial/demandimport.py", line 108, in _demandimport setattr(mod, x, _demandmod(x, mod.__dict__, locals)) File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 106, in __getattribute__ obj = _replace() File ".../python2.5/site-packages/bzrlib/lazy_import.py", line 88, in _replace extra=e) IllegalUseOfScopeReplacer: ScopeReplacer object 'branch' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory --- libbe/storage/vcs/hg.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/libbe/storage/vcs/hg.py b/libbe/storage/vcs/hg.py index 19e3585..b280ff2 100644 --- a/libbe/storage/vcs/hg.py +++ b/libbe/storage/vcs/hg.py @@ -22,8 +22,6 @@ Mercurial (hg) backend. """ try: - # enable importing on demand to reduce startup time - from mercurial import demandimport; demandimport.enable() import mercurial import mercurial.version import mercurial.dispatch -- 2.26.2