pre-commit hooks and $Id$ banners?
John Arbash Meinel
john at arbash-meinel.com
Sun Apr 23 15:40:58 BST 2006
Igor Goryachev wrote:
> Hello, everyone.
>
> Are there any plans on implementing pre-commit hooks? How could I help
> with that?
>
> And is it possible (and how better?) to implement banners $Id$,
> $Revision$ support like in CVS or Subversion? I do really need this
> because I work with specific OTP software which handles this stuff
> and acts somehow according to it.
>
> Thank you.
>
>
Are you sure that this isn't better than having a separate file which
maintains the state of the tree?
Having used bzr, I've done quite a bit to get my build scripts to
automatically generate a version file. Which is really nice, since in
the released product, you can find out exactly what source tree it came
from (and in my scripts, I even detect if the tree is "unclean").
On a side project I was working with some people who use SVN, and I
thought I could try the $Rev$ thing again (I used it in CVS but it
horribly breaks merging, which SVN supposedly fixed).
The problem is that it only sets it to the "LastChangedRevision" of
*this* file. So I have to put one in *every* file, just so that I can
figure out what state my project is in.
Now, I realize your OTP software probably does something special. Which
may not be related to a build script.
But what if I give you a plugin which gives you a post-commit hook,
which will fill a file with the last committed revision information?
This is fairly cheap, and doesn't have all problems with
merging/automunging of files, etc.
It also would be fairly easy to write a plugin which filters the source
on a "bzr export" so that it would expand them at that time.
In the meantime, this is the wiki page discussing keywords:
http://bazaar-vcs.org/KeywordExpansion
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060423/670d0e2c/attachment.pgp
More information about the bazaar
mailing list