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>
*** 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.
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 //bazaar. launchpad. net/~abentley/ +junk/gpg- commit/ errors. NoSuchRevision: RemoteRepositor y(bzr+ssh: //bazaar. launchpad. net/~abentley/ %2Bjunk/ gpg-commit/ .bzr/) has no revision <email address hidden>
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:
bzr: ERROR: bzrlib.
Traceback (most recent call last): abentley/ hacking/ bzr/bzrlib/ commands. py", line 930, in exception_ to_return_ code abentley/ hacking/ bzr/bzrlib/ commands. py", line 1121, in run_bzr abentley/ hacking/ bzr/bzrlib/ commands. py", line 673, in run_argv_aliases **all_cmd_ args) abentley/ hacking/ bzr/bzrlib/ commands. py", line 697, in run .run_simple( *args, **kwargs) abentley/ hacking/ bzr/bzrlib/ cleanup. py", line 136, in run_simple abentley/ hacking/ bzr/bzrlib/ cleanup. py", line 166, in _do_with_cleanups abentley/ hacking/ bzr/bzrlib/ builtins. py", line 3687, in run abentley/ hacking/ bzr/bzrlib/ decorators. py", line 218, in write_locked abentley/ hacking/ bzr/bzrlib/ workingtree_ 4.py", line 218, in commit commit( self, message, revprops, *args, **kwargs) abentley/ hacking/ bzr/bzrlib/ decorators. py", line 218, in write_locked abentley/ hacking/ bzr/bzrlib/ mutabletree. py", line 211, in commit abentley/ hacking/ bzr/bzrlib/ commit. py", line 290, in commit abentley/ hacking/ bzr/bzrlib/ cleanup. py", line 132, in run abentley/ hacking/ bzr/bzrlib/ cleanup. py", line 166, in _do_with_cleanups abentley/ hacking/ bzr/bzrlib/ commit. py", line 447, in _commit commit( self.message) abentley/ hacking/ bzr/bzrlib/ vf_repository. py", line 204, in commit tree()) abentley/ hacking/ bzr/bzrlib/ vf_repository. py", line 230, in revision_tree _new_revision_ id) abentley/ hacking/ bzr/bzrlib/ decorators. py", line 155, in read_locked abentley/ hacking/ bzr/bzrlib/ remote. py", line 1923, in get_inventory iter_inventorie s([revision_ id]))[0] abentley/ hacking/ bzr/bzrlib/ remote. py", line 1987, in iter_inventories NoSuchRevision( self, revid) y(bzr+ssh: //bazaar. launchpad. net/~abentley/ %2Bjunk/ gpg-commit/ .bzr/) has no revision <email address hidden>
File "/home/
return the_callable(*args, **kwargs)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
return self._operation
File "/home/
self.cleanups, self.func, *args, **kwargs)
File "/home/
result = func(*args, **kwargs)
File "/home/
lossy=lossy)
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
result = WorkingTree.
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
*args, **kwargs)
File "/home/
lossy=lossy)
File "/home/
self.cleanups, self.func, self, *args, **kwargs)
File "/home/
result = func(*args, **kwargs)
File "/home/
self.rev_id = self.builder.
File "/home/
testament = Testament(rev, self.revision_
File "/home/
self.
File "/home/
result = unbound(self, *args, **kwargs)
File "/home/
return list(self.
File "/home/
raise errors.
NoSuchRevision: RemoteRepositor
bzr 2.6.0dev3 on python 2.7.3 (Linux- 3.5.0-25- generic- x86_64- with- 12.10-quantal) abentley/ bin/bzr' , 'commit', '-m', 'test', 'gpg-commit', ' [2.6.0dev3] , builder[0.7.4dev], 2.5.0], changelog_ merge[2. 6.0dev3] , colo[0.3.1dev], [unknown] , faultline[unknown], grep[0.5.0dev], gtk[0.104.0dev], 2.6.0dev3] , loggerhead[1.18.1], body[unknown] , netrc_credentia l_store[ 2.6.0dev3] , merge[2. 6.0dev3] , openlookup[ unknown] , pipeline[1.4.0], merge[2. 6.0dev3] , pqm[1.4.0dev], trigger_ scan[unknown] , fmt[2.6. 0dev3]
Ubuntu-
arguments: ['/home/
--unchanged']
plugins: arch[unknown], bash_completion
bzrtools[
difftacular
hide[unknown], launchpad[
lpreview_
news_
po_
weave_
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_CA.UTF-8'
*** Bazaar has encountered an internal error. This probably indicates a /bugs.launchpad .net/bzr/ +filebug
bug in Bazaar. You can help us fix it by filing a bug report at
https:/
including this traceback and a description of the problem.