From: Junio C Hamano Date: Wed, 18 Sep 2013 18:45:49 +0000 (-0700) Subject: Merge branch 'fc/contrib-bzr-hg-fixes' X-Git-Tag: v1.8.5-rc0~112 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=751e2b371892d34a4619b69a50426e368d053c41;p=git.git Merge branch 'fc/contrib-bzr-hg-fixes' * fc/contrib-bzr-hg-fixes: contrib/remote-helpers: quote variable references in redirection targets contrib/remote-helpers: style updates for test scripts remote-hg: use notes to keep track of Hg revisions remote-helpers: cleanup more global variables remote-helpers: trivial style fixes remote-hg: improve basic test remote-hg: add missing &&s in the test remote-hg: fix test remote-bzr: make bzr branches configurable per-repo remote-bzr: fix export of utf-8 authors --- 751e2b371892d34a4619b69a50426e368d053c41 diff --cc contrib/remote-helpers/git-remote-bzr index 1e0044b69f,42cec58a00..054161ae21 --- a/contrib/remote-helpers/git-remote-bzr +++ b/contrib/remote-helpers/git-remote-bzr @@@ -770,20 -748,16 +749,17 @@@ def do_list(parser) print def clone(path, remote_branch): - global transports try: - bdir = bzrlib.bzrdir.BzrDir.create(path) + bdir = bzrlib.bzrdir.BzrDir.create(path, possible_transports=transports) except bzrlib.errors.AlreadyControlDirError: - bdir = bzrlib.bzrdir.BzrDir.open(path) + bdir = bzrlib.bzrdir.BzrDir.open(path, possible_transports=transports) repo = bdir.find_repository() repo.fetch(remote_branch.repository) return remote_branch.sprout(bdir, repository=repo) def get_remote_branch(name): - global dirname, branches, transports - - remote_branch = bzrlib.branch.Branch.open(branches[name]) + remote_branch = bzrlib.branch.Branch.open(branches[name], + possible_transports=transports) if isinstance(remote_branch.user_transport, bzrlib.transport.local.LocalTransport): return remote_branch @@@ -825,10 -798,8 +801,8 @@@ def find_branches(repo) yield name, branch.base def get_repo(url, alias): - global dirname, peer, branches, transports - normal_url = bzrlib.urlutils.normalize_url(url) - origin = bzrlib.bzrdir.BzrDir.open(url) + origin = bzrlib.bzrdir.BzrDir.open(url, possible_transports=transports) is_local = isinstance(origin.transport, bzrlib.transport.local.LocalTransport) shared_path = os.path.join(gitdir, 'bzr')