bazaar equivalents for CVS's $Version$ $Author$ $Log$

John Arbash Meinel john at arbash-meinel.com
Fri Feb 13 15:25:57 GMT 2009


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

Wichmann, Mats D wrote:
> bazaar-bounces at lists.canonical.com wrote:
> 
>> That said, there has been some work done in this area:
>>  http://bazaar-vcs.org/KeywordExpansion
>>
>> I'm not sure what the current status is, just that there is some
>> interest, and people have done some development.
> 
> I used to be interested, because we were migrating code from
> cvs with the concept of expanded keywords fairly deeply
> ingrained.  After living without it for a couple of years,
> I realize I don't want it at all in this form any longer.
> If you must "brand" your code with vcs info, do something at
> build time which extracts whatever information you think is 
> necessary from the bzr repository and builds it into one 
> dynamically constructed file.  Per-file strings just don't
> mean what they used to mean under something like cvs/rcs.
> It's hard weaning yourself from dubious ideas that are deeply
> ingrained, no doubt.
> 

Yeah. I should have also pointed Gizbo to:

  bzr version-info

Which has a couple built-in forms, and can also take a "--template" to
auto-generate a file.

As another user experience... Back in CVS I was using $Version$ to try
and create a version string such that at runtime you could query.
Something like:
  const char *version = "$Version$";

However, that only tracked the version of the 'version.c' file, not the
version of the 20 other files I actually updated. Having a tree-wide
snapshot such that you can have the specific bzr revision-id means you
get a single string that does define the entire tree.

Though again, it doesn't support $Author$ in every file. The only other
place where I've considered $Version$ to be useful is when versioning
websites. As they often don't have a "build" step. (Though I would guess
if you knew enough javascript, you could build a template with the
version info, and have it insert it into the text of every page.)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmVkQUACgkQJdeBCYSNAAPqEQCfY+Igwlt7aMHHT7y6Lt5s1Bko
f/gAnArnwmAuKIRgPxneqgLjkq/e1msF
=Vb61
-----END PGP SIGNATURE-----



More information about the bazaar mailing list