Changelog inclusion

Colin D Bennett colin at gibibit.com
Sat Mar 14 14:22:44 GMT 2009


On Sat, 14 Mar 2009 10:06:52 -0400
Hal Burgiss <hal at burgiss.net> wrote:

> This is probably a dumb question from a new bzr user, but I can't find
> this in the documentation and the behavior seems different than cvs.
> How does one get the log data included into a bzr managed file. If
> memory serves me, in cvs its something like ...
> 
>  $Id: $
>  $Log:  $
> 
> would trigger the revision id and change log data to be included and a
> running log would be kept with the file. 
> 
> Thanks.

Basically Bazaar takes the view that version controlled files should
not be polluted by generated strings.  The $Log: $ tag is especially
grievous, since it can result in a huge amount of content.

What is your purpose for using the expanded keywords?

Common wants and possible solutions:

Do you just want it for reference as you do development work?

-> If so, it's better to use Bazaar tools to look up the log, etc.,
   since that is more powerful and doesn't clutter the  files.

Do you want to include version information in distributed program code?

-> If so, use the “bzr version-info” command, as in:
   bzr version-info --custom \
     --template="static const char version_str[] = \"Revision r{revno}\"\n"
 
   Your build process then includes the output of this command in your
   program source code at build time.  The version-info command is
   really powerful for this sort of thing.

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090314/3106e896/attachment.pgp 


More information about the bazaar mailing list