Merge branch 'fc/contrib-bzr-hg-fixes'
authorJunio C Hamano <gitster@pobox.com>
Wed, 18 Sep 2013 18:45:49 +0000 (11:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Sep 2013 18:45:49 +0000 (11:45 -0700)
* 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

1  2 
contrib/remote-helpers/git-remote-bzr
contrib/remote-helpers/git-remote-hg
index 1e0044b69fc5c87ec03833b6fb1bf434a9e0acc0,42cec58a00aad15f7daef4a26caffca79e839778..054161ae21b0c884d314c984992a6c7aa8276a96
@@@ -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')
Simple merge