Bazaar: Modify file content before commit via hook?

337 Views Asked by At

I'm switching from SVN to Bzr for my private projects. There is one feature missing for me, which SVN provides: The replacement of a $Id:$ placeholder with the latest version identification. So far, Bzr provides hooks to do some tricks within the commit process. I've managed to get a list of modified files an manipulate them on the local disk. The problem I encounter is that the snapshot, which is taken from the files that are part of the commit, is made before my modification. The result is, that I have a change of my files, but only local.

The workflow I want to build is:

  • Call Bzr commit
  • modify the $Id:$ macro
  • tell bzr that this modified set is the changeset
  • let Bzr do the rest of it's work

Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

Use this extension: http://launchpad.net/bzr-keywords