{"thread":{"id":"33838","subject":"[PATCH] remote-bzr: fix cloning of non-listable repos","startedAt":"2013-05-16T10:04:05Z","lastAt":"2013-05-16T16:29:17Z","messageCount":2,"participants":["Felipe Contreras","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"217572","messageId":"1368698645-28429-1-git-send-email-felipe.contreras@gmail.com","threadId":"33838","inReplyTo":null,"subject":"[PATCH] remote-bzr: fix cloning of non-listable repos","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-16T10:04:05Z","receivedAt":"2013-05-16T10:04:05Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Commit 95b0c60 (remote-bzr: add support for bzr repos) introduced a\nregression by assuming all bzr remote repos are listable, but they are\nnot.\n\nIf they are not listable they are basically useless, so let's assume\nthere is no bzr repo.\n\nReported-by: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n\nWe want this on master for v1.8.3.\n\n contrib/remote-helpers/git-remote-bzr | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\nindex b295dd4..ad42317 100755\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -840,6 +840,9 @@ def get_repo(url, alias):\n \n     try:\n         repo = origin.open_repository()\n+        if not repo.user_transport.listable():\n+            # this repository is not usable for us\n+            raise bzrlib.errors.NoRepositoryPresent(repo.bzrdir)\n     except bzrlib.errors.NoRepositoryPresent:\n         # branch\n \n-- \n1.8.3.rc2.542.g24820ba\n"},{"id":"217620","messageId":"7vli7e7usi.fsf@alter.siamese.dyndns.org","threadId":"33838","inReplyTo":"1368698645-28429-1-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH] remote-bzr: fix cloning of non-listable repos","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-16T16:29:17Z","receivedAt":"2013-05-16T16:29:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Commit 95b0c60 (remote-bzr: add support for bzr repos) introduced a\n> regression by assuming all bzr remote repos are listable, but they are\n> not.\n>\n> If they are not listable they are basically useless, so let's assume\n> there is no bzr repo.\n>\n> Reported-by: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n>\n> We want this on master for v1.8.3.\n\nSure.\n\n>\n>  contrib/remote-helpers/git-remote-bzr | 3 +++\n>  1 file changed, 3 insertions(+)\n>\n> diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr\n> index b295dd4..ad42317 100755\n> --- a/contrib/remote-helpers/git-remote-bzr\n> +++ b/contrib/remote-helpers/git-remote-bzr\n> @@ -840,6 +840,9 @@ def get_repo(url, alias):\n>  \n>      try:\n>          repo = origin.open_repository()\n> +        if not repo.user_transport.listable():\n> +            # this repository is not usable for us\n> +            raise bzrlib.errors.NoRepositoryPresent(repo.bzrdir)\n>      except bzrlib.errors.NoRepositoryPresent:\n>          # branch\n"}]}