Skip to content

Commit 4f4e7e9

Browse files
felipecgitster
authored andcommitted
remote-bzr: fix cloning of non-listable repos
Commit 95b0c60 (remote-bzr: add support for bzr repos) introduced a regression by assuming all bzr remote repos are listable, but they are not. If they are not listable they are basically useless, so let's assume there is no bzr repo. Reported-by: Thorsten Kranzkowski <[email protected]> Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0c2b1cf commit 4f4e7e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/remote-helpers/git-remote-bzr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,9 @@ def get_repo(url, alias):
840840

841841
try:
842842
repo = origin.open_repository()
843+
if not repo.user_transport.listable():
844+
# this repository is not usable for us
845+
raise bzrlib.errors.NoRepositoryPresent(repo.bzrdir)
843846
except bzrlib.errors.NoRepositoryPresent:
844847
# branch
845848

0 commit comments

Comments
 (0)