<div dir="ltr">2008/9/13 Ben Finney <span dir="ltr">&lt;<a href="mailto:bignose%2Bhates-spam@benfinney.id.au">bignose+hates-spam@benfinney.id.au</a>&gt;</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 &lt;<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>&gt; writes:<br>
<br>
&gt; ...<br>
&gt;<br>
&gt; &gt; How should I automatically trigger the generation of the<br>
&gt; &gt; &#39;foo/version_info.py&#39; file? It will be used in many places<br>
&gt; &gt; throughout the code base, including in &#39;setup.py&#39;, so it needs to<br>
&gt; &gt; be generated ideally on every commit.<br>
&gt;<br>
&gt; You *could* do this with a &quot;post-branch-tip-changed&quot; hook. Also<br>
&gt; realize that not just commit, but also pull and uncommit probably<br>
&gt; need to regenerate this file.<br>
<br>
</div>Okay. I&#39;ve never written a hook before, so I don&#39;t know how to invoke<br>
&#39;bzr version-info --format=python &gt; version_info.py&#39; 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&nbsp;</span></strong>to make it also work for<strong> </strong>post-branch-tip-changed.<br>He said he merged it, but I don&#39;t see it if I pull from the above url.<br>
I&#39;m attaching it for in case you need it.<br><strong><br></strong></div></div>-- <br>regards<br>Marius<br><br>&lt;&gt;&lt;<br><a href="http://amanica.blogspot.com/">http://amanica.blogspot.com/</a><br><br>
</div>