<div class="gmail_quote">On Wed, Dec 8, 2010 at 20:11, Nick Rout <span dir="ltr"><<a href="mailto:nick.rout@gmail.com" target="_blank">nick.rout@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div>> But won't a variable length commit number cause havoc with things like<br>
> rpm version comparisons. I guess there's a need to ensure that the<br>
> version string components used allow for a previous component that is<br>
> always increasing.<br>
<br>
</div></div>mythbuntu is now numbering by date yyyymmdd then a hash number, eg:<br>
<br>
mythtv-common-0.24.0+fixes.20101208.3e9463e-0ubuntu0mythbuntu1<br></blockquote><div><br>Just as another way: To keep it numeric, increasing, and consistent, I'm currently numbering my Gentoo ebuilds using the unix integer commit timestamp of the commit at the point in question, which I can capture when checked out to the right HEAD using:<br>
<br>$ echo 0.24.$(git log -n1 --pretty="format:%ct")<br>0.24.1291777173<br><br>In reverse, I obtain the commit hash from that point in time on that branch with:<br><br>$ echo $(git log -n1 --pretty="format:%H" --since=1291777173 --until=1291777173)<br>
hash = ee57332927393d071d7b3f1788476f07c77f7e82<br><br>which is great for direct checkout or use with github's tarball URL feature.<br><br>Git is fun, isn't it!<br><br>$0.02,<br>EW<br></div></div>