Comment 5 for bug 1087346

Revision history for this message
Aaron Bentley (abentley) wrote :

It appears that there is a bug in Bazaar that doing commits to remote branches with gpg signing enabled breaks. See below.

That bug was probably not noticed until now because doing lightweight checkouts of remote branches is not performant and therefore discouraged. It is easy to work around by using heavyweight checkouts or normal branches or stacked branches instead of lightweight checkouts.

$ bzr init lp:~abentley/+junk/gpg-commit
Created a standalone branch (format: unnamed)
$ bzr checkout --lightweight lp:~abentley/+junk/gpg-commit
$ bzr commit -m "test" gpg-commit --unchanged
Committing to: bzr+ssh://bazaar.launchpad.net/~abentley/+junk/gpg-commit/
bzr: ERROR: bzrlib.errors.NoSuchRevision: RemoteRepository(bzr+ssh://bazaar.launchpad.net/~abentley/%2Bjunk/gpg-commit/.bzr/) has no revision <email address hidden>

Traceback (most recent call last):
  File "/home/abentley/hacking/bzr/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/home/abentley/hacking/bzr/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/abentley/hacking/bzr/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/builtins.py", line 3687, in run
    lossy=lossy)
  File "/home/abentley/hacking/bzr/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/workingtree_4.py", line 218, in commit
    result = WorkingTree.commit(self, message, revprops, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/mutabletree.py", line 211, in commit
    *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/commit.py", line 290, in commit
    lossy=lossy)
  File "/home/abentley/hacking/bzr/bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/commit.py", line 447, in _commit
    self.rev_id = self.builder.commit(self.message)
  File "/home/abentley/hacking/bzr/bzrlib/vf_repository.py", line 204, in commit
    testament = Testament(rev, self.revision_tree())
  File "/home/abentley/hacking/bzr/bzrlib/vf_repository.py", line 230, in revision_tree
    self._new_revision_id)
  File "/home/abentley/hacking/bzr/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/abentley/hacking/bzr/bzrlib/remote.py", line 1923, in get_inventory
    return list(self.iter_inventories([revision_id]))[0]
  File "/home/abentley/hacking/bzr/bzrlib/remote.py", line 1987, in iter_inventories
    raise errors.NoSuchRevision(self, revid)
NoSuchRevision: RemoteRepository(bzr+ssh://bazaar.launchpad.net/~abentley/%2Bjunk/gpg-commit/.bzr/) has no revision <email address hidden>

bzr 2.6.0dev3 on python 2.7.3 (Linux-3.5.0-25-generic-x86_64-with-
    Ubuntu-12.10-quantal)
arguments: ['/home/abentley/bin/bzr', 'commit', '-m', 'test', 'gpg-commit', '
    --unchanged']
plugins: arch[unknown], bash_completion[2.6.0dev3], builder[0.7.4dev],
    bzrtools[2.5.0], changelog_merge[2.6.0dev3], colo[0.3.1dev],
    difftacular[unknown], faultline[unknown], grep[0.5.0dev], gtk[0.104.0dev],
    hide[unknown], launchpad[2.6.0dev3], loggerhead[1.18.1],
    lpreview_body[unknown], netrc_credential_store[2.6.0dev3],
    news_merge[2.6.0dev3], openlookup[unknown], pipeline[1.4.0],
    po_merge[2.6.0dev3], pqm[1.4.0dev], trigger_scan[unknown],
    weave_fmt[2.6.0dev3]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_CA.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.