remote-bzr: fixes for older versions of bzr

Down to v2.0, by using older but still valid interfaces. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed May 17, 2013 at 12:10 UTC 31eb360b43ec351b97adcf67e07fb748da574aaa
1 file changed +4 -2
contrib/remote-helpers/git-remote-bzr
+4 -2
@@ -31,6 +31,7 @@ import bzrlib.transport
31 import bzrlib.errors
32 import bzrlib.ui
33 import bzrlib.urlutils
34 +import bzrlib.branch
35
36 import sys
37 import os
@@ -788,7 +789,7 @@ def get_remote_branch(origin, remote_branch, name):
789 return branch
790
791 def find_branches(repo, wanted):
791 - transport = repo.user_transport
792 + transport = repo.bzrdir.root_transport
793
794 for fn in transport.iter_files_recursive():
795 if not fn.endswith('.bzr/branch-format'):
@@ -924,7 +925,8 @@ def main(args):
925 if not os.path.exists(dirname):
926 os.makedirs(dirname)
927
927 - bzrlib.ui.ui_factory.be_quiet(True)
928 + if hasattr(bzrlib.ui.ui_factory, 'be_quiet'):
929 + bzrlib.ui.ui_factory.be_quiet(True)
930
931 repo = get_repo(url, alias)
932