<div dir="ltr">2008/9/13 Ben Finney <span dir="ltr"><<a href="mailto:bignose%2Bhates-spam@benfinney.id.au">bignose+hates-spam@benfinney.id.au</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">John Arbash Meinel <<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>> writes:<br>
<br>
> ...<br>
><br>
> > How should I automatically trigger the generation of the<br>
> > 'foo/version_info.py' file? It will be used in many places<br>
> > throughout the code base, including in 'setup.py', so it needs to<br>
> > be generated ideally on every commit.<br>
><br>
> You *could* do this with a "post-branch-tip-changed" hook. Also<br>
> realize that not just commit, but also pull and uncommit probably<br>
> need to regenerate this file.<br>
<br>
</div>Okay. I've never written a hook before, so I don't know how to invoke<br>
'bzr version-info --format=python > version_info.py' from a hook.</blockquote><div><br><strong><span style="font-weight: normal;">you may find the shell-hooks plugin useful as I did.</span><br style="font-weight: normal;">
<span style="font-weight: normal;"><a href="http://people.samba.org/bzr/jelmer/bzr-shell-hooks/trunk">http://people.samba.org/bzr/jelmer/bzr-shell-hooks/trunk</a></span><br style="font-weight: normal;"><br style="font-weight: normal;">
<span style="font-weight: normal;">I sent jelmer a patch </span></strong>to make it also work for<strong> </strong>post-branch-tip-changed.<br>He said he merged it, but I don't see it if I pull from the above url.<br>
I'm attaching it for in case you need it.<br><strong><br></strong></div></div>-- <br>regards<br>Marius<br><br><><<br><a href="http://amanica.blogspot.com/">http://amanica.blogspot.com/</a><br><br>
</div>