<p dir="ltr">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. </p>
<p dir="ltr">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. </p>
<p dir="ltr">I can give you a few more direct pointers if you are interested. <br>
John<br>
=:-></p>
<div class="gmail_quote">On May 10, 2013 10:16 AM, "Glenn Morris" <<a href="mailto:rgm@gnu.org">rgm@gnu.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi,<br>
<br>
<a href="http://savannah.gnu.org" target="_blank">savannah.gnu.org</a> uses bzr-hookless-email for commit notifications.<br>
Recently, the system was updated to bzr 2.6 (somehow, this<br>
never-to-be-finished beta version is the version in Debian stable).<br>
<br>
Now bzr-hookless-email fails, because bzr 2.6 removed the<br>
"revision_history" that it uses.<br>
<br>
We found this bug report:<br>
<a href="https://bugs.launchpad.net/bzr-hookless-email/+bug/988195" target="_blank">https://bugs.launchpad.net/bzr-hookless-email/+bug/988195</a><br>
<br>
Applying the patch from there made it work again, for a while.<br>
<br>
Now it is failing for the Emacs repository, with this error:<br>
<br>
Traceback (most recent call last):<br>
File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 347, in <module><br>
main()<br>
File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 79, in main<br>
branch.update()<br>
File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 147, in update<br>
msg = self._compose_email(revision)<br>
File "/usr/src/bzr-hookless-email/bzr_hookless_email.py", line 210, in _compose_email<br>
rev1 = rev2 = self._branch.revision_id_to_revno(revid) or None<br>
File "<string>", line 4, in revision_id_to_revno_read_locked<br>
File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2852, in revision_id_to_revno<br>
raise errors.NoSuchRevision(self, revision_id)<br>
bzrlib.errors.NoSuchRevision: BzrBranch7(file:///srv/bzr/emacs/trunk/) has no revision rgm@gnu.org-20130428174032-q60c2x7yqlpm469j<br>
<br>
That revid does exist, but it is not on trunk, it is on the emacs-24 branch.<br>
I recently merged that commit from emacs-24 to trunk.<br>
I guess that is the cause. The last commit mail that appeared is for the<br>
one prior to the merge (r112528 on Emacs trunk).<br>
So I guess the bzr-hookless-email patch that we found doesn't handle merges.<br>
<br>
<br>
Does anyone have any ideas about how to fix bzr-hookless-email?<br>
<br>
<br>
I guess the only other option is to use the bzr-email plugin.<br>
IIUC, the reason why Savannah does not use that is security concerns:<br>
<br>
<a href="http://lists.gnu.org/archive/html/savannah-hackers/2009-12/msg00009.html" target="_blank">http://lists.gnu.org/archive/html/savannah-hackers/2009-12/msg00009.html</a><br>
<a href="http://lists.gnu.org/archive/html/savannah-hackers-public/2010-03/msg00028.html" target="_blank">http://lists.gnu.org/archive/html/savannah-hackers-public/2010-03/msg00028.html</a><br>
<br>
I don't really know what those concerns are. I can understand not<br>
wanting to allow users to install arbitrary plugins, but I don't really<br>
see the problem with a system-installed plugin.<br>
<br>
Maybe the concern is that someone with write access to a branch's<br>
bazaar.conf could eg set post_commit_mailer to something malicious?<br>
I don't know. I suppose we'd have to try to hack the plugin to read very<br>
few config options (basically, on or off for any branch).<br>
There's more hope of someone like me being able to do that then to fix<br>
bzr-hookless-email.<br>
<br>
<br>
I wish Savannah had just stuck with bzr 2.5. Is downgrading feasible?<br>
<br>
<br>
TIA for any help.<br>
<br>
</blockquote></div>