Bazaar:通过钩子提交之前修改文件内容?

发布于 2024-07-24 18:21:24 字数 341 浏览 2 评论 0原文

我正在为我的私人项目从 SVN 切换到 Bzr。 我缺少 SVN 提供的一项功能:用最新版本标识替换 $Id:$ 占位符。 到目前为止,Bzr 提供了钩子来在提交过程中执行一些技巧。 我已经设法获取修改文件的列表并在本地磁盘上操作它们。 我遇到的问题是,从属于提交的文件中获取的快照是在我修改之前创建的。 结果是,我的文件发生了更改,但只是本地的。

我想要构建的工作流程是:

  • 调用 Bzr commit
  • 修改 $Id:$ 宏
  • 告诉 bzr 这个修改后的集合是 变更集
  • 让 Bzr 完成剩下的工作

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文