[Pkg-bazaar-maint] Bug#1110396: brz: Can't clone private bzr branch hosted on Launchpad

L. Guruprasad lgp171188 at gmail.com
Mon Aug 4 14:42:05 BST 2025


Package: brz
Version: 3.3.11-1
Severity: normal
X-Debbugs-Cc: lgp171188 at gmail.com

Dear Maintainer,

When I try to branch a private bzr branch hosted on Launchpad, breezy crashes
and encounters an error. Below is the full output illustrating this issue.

<snip>
guruprasad at debian-sid:~$ brz launchpad-login lgp171188
The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=REDACTED&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
guruprasad at debian-sid:~$ brz branch lp:~lgp171188/+junk/trunk
brz: ERROR: lazr.restfulclient.errors.ServerError: HTTP Error 500: Internal Server Error
Response headers:
---
-content-encoding: gzip
connection: close
content-length: 2294
content-type: text/plain;charset=utf-8
date: Mon, 04 Aug 2025 13:35:02 GMT
server: gunicorn
status: 500
vary: Accept-Encoding
x-lazr-oopsid: OOPS-84efce1a2f031bc191b5e7a42e6bcd3f
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-request-id: f1d11974-f90b-4137-927a-79e363425206
x-vcs-revision: 3cf67b79dc0cb931b720b669b1d12163f9abeaec
---
Response body:
---
b'Private branch ~lgp171188/+junk/trunk has no public URL.\n\nTraceback (most recent call last):\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 146, in publish\n    result = publication.callObject(request, obj)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/publisher.py", line 221, in callObject\n    value = super().callObject(request, object)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/lib/lp/services/webapp/publication.py", line 446, in callObject\n    return mapply(ob, request.getPositionalArguments(), request)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 119, in mapply\n    return debug_call(obj, args)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 126, in debug_call\n    return obj(*args)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 972, in __call__\n    result = self.do_GET()\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 1639, in do_GET\n    result = self.handleCustomGET(operation_name)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 767, in handleCustomGET\n    return operation()\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_operation.py", line 94, in __call__\n    response = self.call(**values)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/declarations.py", line 1655, in call\n    result = self._getMethod()(**params)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/lib/lp/code/model/branch.py", line 863, in composePublicURL\n    assert not (self.private and scheme in public_schemes), (\nAssertionError: Private branch ~lgp171188/+junk/trunk has no public URL.\n'
---


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1071, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 1265, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 792, in run_argv_aliases
    return self.run(**all_cmd_args)
           ~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/breezy/commands.py", line 816, in run
    return class_run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/breezy/builtins.py", line 1617, in run
    accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        from_location, name=colocated_branch
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 961, in open_tree_or_branch
    controldir = klass.open(location)
  File "/usr/lib/python3/dist-packages/breezy/controldir.py", line 862, in open
    t = _mod_transport.get_transport(base, possible_transports)
  File "/usr/lib/python3/dist-packages/breezy/transport/__init__.py", line 1625, in get_transport
    location_to_url(base, purpose=purpose), possible_transports
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/breezy/location.py", line 152, in location_to_url
    location = directories.dereference(location, purpose)
  File "/usr/lib/python3/dist-packages/breezy/directory_service.py", line 88, in dereference
    return directory.look_up(name, url, purpose=purpose)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 149, in look_up
    return _resolve(url)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 119, in _resolve
    result = _resolve_via_api(path, url)
  File "/usr/lib/python3/dist-packages/breezy/plugins/launchpad/lp_directory.py", line 98, in _resolve_via_api
    join(lp_branch.composePublicURL(scheme="http"), *subpaths),
         ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 642, in __call__
    response, content = self.root._browser._request(
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        url,
        ^^^^
    ...<2 lines>...
        extra_headers=extra_headers,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 484, in _request
    raise error
lazr.restfulclient.errors.ServerError: HTTP Error 500: Internal Server Error
Response headers:
---
-content-encoding: gzip
connection: close
content-length: 2294
content-type: text/plain;charset=utf-8
date: Mon, 04 Aug 2025 13:35:02 GMT
server: gunicorn
status: 500
vary: Accept-Encoding
x-lazr-oopsid: OOPS-84efce1a2f031bc191b5e7a42e6bcd3f
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-request-id: f1d11974-f90b-4137-927a-79e363425206
x-vcs-revision: 3cf67b79dc0cb931b720b669b1d12163f9abeaec
---
Response body:
---
b'Private branch ~lgp171188/+junk/trunk has no public URL.\n\nTraceback (most recent call last):\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 146, in publish\n    result = publication.callObject(request, obj)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/publisher.py", line 221, in callObject\n    value = super().callObject(request, object)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/lib/lp/services/webapp/publication.py", line 446, in callObject\n    return mapply(ob, request.getPositionalArguments(), request)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 119, in mapply\n    return debug_call(obj, args)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/zope/publisher/publish.py", line 126, in debug_call\n    return obj(*args)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 972, in __call__\n    result = self.do_GET()\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 1639, in do_GET\n    result = self.handleCustomGET(operation_name)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_resource.py", line 767, in handleCustomGET\n    return operation()\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/_operation.py", line 94, in __call__\n    response = self.call(**values)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/env/lib/python3.8/site-packages/lazr/restful/declarations.py", line 1655, in call\n    result = self._getMethod()(**params)\n  File "/srv/launchpad/payloads/3cf67b79dc0cb931b720b669b1d12163f9abeaec/lib/lp/code/model/branch.py", line 863, in composePublicURL\n    assert not (self.private and scheme in public_schemes), (\nAssertionError: Private branch ~lgp171188/+junk/trunk has no public URL.\n'
---


brz 3.3.11 on python 3.13.5 (Linux-6.12.38+deb13-amd64-x86_64-with-glibc2.41)
arguments: ['brz', 'branch', 'lp:~lgp171188/+junk/trunk']
plugins: bash_completion[3.3.11], changelog_merge[3.3.11],
    commitfromnews[3.3.11], cvs[3.3.11], darcs[3.3.11], email[3.3.11],
    fastimport[3.3.11], flake8[unknown], fossil[3.3.11], github[3.3.11],
    gitlab[3.3.11], hg[3.3.11], launchpad[3.3.11], mtn[3.3.11],
    netrc_credential_store[3.3.11], news_merge[3.3.11], po_merge[3.3.11],
    propose[3.3.11], pypi[3.3.11], quilt[unknown], repodebug[3.3.11],
    rewrite[unknown], stats[3.3.11], svn[3.3.11], upload[3.3.11],
    weave_fmt[3.3.11], webdav[3.3.11], zsh_completion[3.3.11]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'

*** Breezy has encountered an internal error.  This probably indicates a
    bug in Breezy.  You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/brz/+filebug
    including this traceback and a description of the problem.
guruprasad at debian-sid:~$ 
</snip>

When I used the expanded 'bzr+ssh' URL that the Launchpad directory service provides in
the 'bzr branch' command, the command works okay.

<snip>
guruprasad at debian-sid:~$ brz branch bzr+ssh://bazaar.launchpad.net/~lgp171188/+junk/trunk
Branched 1 revision.                                                                                                                                                                                                                                                                                                       
</snip>

-- System Information:
Debian Release: 13.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.38+deb13-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages brz depends on:
ii  libc6           2.41-11
ii  libgcc-s1       14.2.0-19
ii  libpython3.13   3.13.5-2
ii  python3         3.13.5-1
ii  python3-breezy  3.3.11-1

Versions of packages brz recommends:
ii  python3-dulwich  0.22.7-1
pn  python3-gpg      <none>

Versions of packages brz suggests:
pn  brz-doc               <none>
pn  python3-breezy.tests  <none>
pn  python3-fastimport    <none>

-- no debconf information



More information about the Pkg-bazaar-maint mailing list