Changelog inclusion

Hal Burgiss hal at burgiss.net
Sat Mar 14 15:16:20 GMT 2009


On Sat, Mar 14, 2009 at 07:22:44AM -0700, Colin D Bennett wrote:
> 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:  $

> 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?

I am using bzr now to manage and distribute configuration files, system
management scripts and the like among a group of servers. I want these
files to be identical and automatically updated. 

These are mostly things that don't change often. Also, I use a
manually kept changelog in each file now so I know who made a change,
when and why. Even if I made the change, I don't trust myself
sometimes to remember *why*. Of course I can always keep this practice
up, but I feel like now I am maintaining one changelog and bzr is
pretty much doing the same thing for me. Not a big deal though.

So ... part of my thinking here, is that if a file is clearly labeled
with versioning and log data, it will be obvious to others in the
organization and future staffers that we have a distributed file here
as opposed to an OS or package installed file, or some special local
file. The implication being "don't mess with this file", go to the
repository and do it there and let the magic happen across the entire
group of servers.
 
> 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.

See above.

> 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.

I can get this to work inside shell scripts.

Thanks!


-- 
Hal




More information about the bazaar mailing list