bzr-hookless-email doesn't work with bzr 2.6

John Meinel john at arbash-meinel.com
Sat May 11 13:42:56 UTC 2013


It has been a while since I looked at that code.  But when Jelmer removed
revision_history I remember him having some helper code for the transition.

It really doesnt scale well to use it, because it requires walking all the
history, when you probably only care about fairly recent bits. If anything,
I would try to look at using the graph objects to find unique ancestors on
each side.

I can give you a few more direct pointers if you are interested.
John
=:->
On May 10, 2013 10:16 AM, "Glenn Morris" <rgm at gnu.org> wrote:

>
> Hi,
>
> savannah.gnu.org uses bzr-hookless-email for commit notifications.
> Recently, the system was updated to bzr 2.6 (somehow, this
> never-to-be-finished beta version is the version in Debian stable).
>
> Now bzr-hookless-email fails, because bzr 2.6 removed the
> "revision_history" that it uses.
>
> We found this bug report:
> https://bugs.launchpad.net/bzr-hookless-email/+bug/988195
>
> Applying the patch from there made it work again, for a while.
>
> Now it is failing for the Emacs repository, with this error:
>
>     Traceback (most recent call last):
>       File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 347,
> in <module>
>         main()
>       File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 79,
> in main
>         branch.update()
>       File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 147,
> in update
>         msg = self._compose_email(revision)
>       File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 210,
> in _compose_email
>         rev1 = rev2 = self._branch.revision_id_to_revno(revid) or None
>       File "<string>", line 4, in revision_id_to_revno_read_locked
>       File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2852,
> in revision_id_to_revno
>         raise errors.NoSuchRevision(self, revision_id)
>     bzrlib.errors.NoSuchRevision: BzrBranch7(file:///srv/bzr/emacs/trunk/)
> has no revision rgm at gnu.org-20130428174032-q60c2x7yqlpm469j
>
> That revid does exist, but it is not on trunk, it is on the emacs-24
> branch.
> I recently merged that commit from emacs-24 to trunk.
> I guess that is the cause. The last commit mail that appeared is for the
> one prior to the merge (r112528 on Emacs trunk).
> So I guess the bzr-hookless-email patch that we found doesn't handle
> merges.
>
>
> Does anyone have any ideas about how to fix bzr-hookless-email?
>
>
> I guess the only other option is to use the bzr-email plugin.
> IIUC, the reason why Savannah does not use that is security concerns:
>
> http://lists.gnu.org/archive/html/savannah-hackers/2009-12/msg00009.html
>
> http://lists.gnu.org/archive/html/savannah-hackers-public/2010-03/msg00028.html
>
> I don't really know what those concerns are. I can understand not
> wanting to allow users to install arbitrary plugins, but I don't really
> see the problem with a system-installed plugin.
>
> Maybe the concern is that someone with write access to a branch's
> bazaar.conf could eg set post_commit_mailer to something malicious?
> I don't know. I suppose we'd have to try to hack the plugin to read very
> few config options (basically, on or off for any branch).
> There's more hope of someone like me being able to do that then to fix
> bzr-hookless-email.
>
>
> I wish Savannah had just stuck with bzr 2.5. Is downgrading feasible?
>
>
> TIA for any help.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20130511/740e6816/attachment.html>


More information about the bazaar mailing list