remote-bzr: delay peer branch usage

So it doesn't time out. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 30, 2013 at 20:10 UTC 747c9a377fb73aa30f6b4dca958e3b121f88bb66
1 file changed +3 -3
contrib/remote-helpers/git-remote-bzr
+3 -3
@@ -687,7 +687,7 @@ def do_export(parser):
687 branch.generate_revision_history(revid, marks.get_tip(name))
688
689 if name in peers:
690 - peer = peers[name]
690 + peer = bzrlib.branch.Branch.open(peers[name])
691 try:
692 peer.bzrdir.push_branch(branch, revision_id=revid)
693 except bzrlib.errors.DivergedBranches:
@@ -825,7 +825,7 @@ def get_repo(url, alias):
825 branch = origin.open_branch()
826
827 if not is_local:
828 - peers[name] = branch
828 + peers[name] = branch.base
829 branches[name] = get_remote_branch(origin, branch, name)
830 else:
831 branches[name] = branch
@@ -841,7 +841,7 @@ def get_repo(url, alias):
841 for name, branch in find_branches(repo, wanted):
842
843 if not is_local:
844 - peers[name] = branch
844 + peers[name] = branch.base
845 branches[name] = get_remote_branch(origin, branch, name)
846 else:
847 branches[name] = branch