Bazaar: Modify file content before commit via hook?

北战南征 提交于 2019-12-25 04:31:39

问题


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:


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



来源:https://stackoverflow.com/questions/962228/bazaar-modify-file-content-before-commit-via-hook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!