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>
This commit is contained in:
parent
a70ae5873d
commit
31eb360b43
@ -31,6 +31,7 @@ import bzrlib.transport
|
|||||||
import bzrlib.errors
|
import bzrlib.errors
|
||||||
import bzrlib.ui
|
import bzrlib.ui
|
||||||
import bzrlib.urlutils
|
import bzrlib.urlutils
|
||||||
|
import bzrlib.branch
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -788,7 +789,7 @@ def get_remote_branch(origin, remote_branch, name):
|
|||||||
return branch
|
return branch
|
||||||
|
|
||||||
def find_branches(repo, wanted):
|
def find_branches(repo, wanted):
|
||||||
transport = repo.user_transport
|
transport = repo.bzrdir.root_transport
|
||||||
|
|
||||||
for fn in transport.iter_files_recursive():
|
for fn in transport.iter_files_recursive():
|
||||||
if not fn.endswith('.bzr/branch-format'):
|
if not fn.endswith('.bzr/branch-format'):
|
||||||
@ -924,6 +925,7 @@ def main(args):
|
|||||||
if not os.path.exists(dirname):
|
if not os.path.exists(dirname):
|
||||||
os.makedirs(dirname)
|
os.makedirs(dirname)
|
||||||
|
|
||||||
|
if hasattr(bzrlib.ui.ui_factory, 'be_quiet'):
|
||||||
bzrlib.ui.ui_factory.be_quiet(True)
|
bzrlib.ui.ui_factory.be_quiet(True)
|
||||||
|
|
||||||
repo = get_repo(url, alias)
|
repo = get_repo(url, alias)
|
||||||
|
Loading…
Reference in New Issue
Block a user