revno and commit_date in app code

Aaron Bentley aaron.bentley at utoronto.ca
Tue Sep 27 19:53:24 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

george young wrote:
> I'm starting to use bzr for my main application (in python).
> One thing that I need, somehow, is for an installed instance of
> the app to know it's rev_no, and if possible, also it's commit date and
> committer.

> My current bzr hack is this script(kludged from show_info.py), run by make:

That is pretty much the Right approach.  Keywords are quite problematic
for merging and other tree operations (because 99% of the time, bzr
should see the unexpanded version), but we do plan to support them
eventually.

> Is there some cleaner, more stable way to do this?  I could spend some time
> hacking bzr, if someone would suggest a useful path for me that's not too
> laborious.  

I think it would make sense for us to provide a revision-info command
that would write whatever info was desired, e.g.:

bzr revision-info --committer
or
bzr revision-info --commit-date

or even
bzr revision-info --python

> Is anyone working on or thinking about cvs-like keywords, or
> commit trigger hooks?  Any comments, raves, criticisms are welcome.

The beginning of a spec for them is here:
http://bazaar.canonical.com/KeywordExpansion

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDOZUk0F+nu1YWqI0RAtPHAJ4xt+3XbFGaY3rJcceKd9nMSFK+nwCePbZc
GyIsCYNOn5vwZ/OAVsZZXG4=
=TTy0
-----END PGP SIGNATURE-----




More information about the bazaar mailing list