从 bzr 责任确定起源分支

发布于 2024-09-04 19:59:10 字数 370 浏览 0 评论 0原文

我进行了一个复杂的更改,影响了一堆文件。我不记得我在哪个集市分支中编写了该更改。我们有一个有点复杂的合并设置,因此我现在所在的分支将更改与许多其他更改混为一谈。我想做一些非常相似的工作,所以最好能提取原始的差异。

我觉得我应该可以使用bzr的责备。我在其中一个文件上运行此命令

bzr blame --long path/to/file

,找到相关行之一,并得到类似

1107.6.213 dsmith@satie        20091202 |   tinyMCE.init({

Can I use it to找出原始更改来自哪个分支和修订版本? 6和213代表什么?

I had a complicated change that affected a bunch of files. I don't remember what bazaar branch I wrote that change in. We have a somewhat complicated merge setup, so the branch I'm in now lumps that change in with a lot of other changes. I'd like to do some very similar work so it would be nice to pull the original diff.

I feel like I should be able to use bzr blame. I run this command on one of the files

bzr blame --long path/to/file

and I find one of the pertinent lines and get something like

1107.6.213 dsmith@satie        20091202 |   tinyMCE.init({

Can I use that to figure out what branch and revision the original change came from? What do the 6 and 213 stand for?

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

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

发布评论

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

评论(1

阪姬 2024-09-11 19:59:10

您可以使用 QBzr 插件。 qannotate 和 qlog 都会显示文件更改的修订图。然后您可以看到原始分支是如何合并到主干中的。

但即使没有 QBzr,您也可以获得有关原始分支的一些提示:

1) 运行 bzr log -r1107.6.213 以查看有关此修订的信息。您将看到提交消息,而且您还将看到分支昵称。分支昵称通常是提交发生的分支路径的最后一部分,例如,对于分支路径/home/foo/project/bar/mybranch,昵称将是mybranch

2) 修订号 1107.6.213 表示您的原始分支是从主线修订版 1107 分叉出来的,它是从此时创建的第六个分支并合并到主干中,而 213 是自分叉以来的修订版,因此您原来的分支此版本的编号为1107+213=1320

You can get a better overview of your revisions graph using bzr qlog and bzr qannotate commands from QBzr plugin. Both qannotate and qlog will show you graph of revisions in which your file was changed. You can see then how your original branch was merged in the trunk.

But even without QBzr you can get some hints about your original branch:

1) run bzr log -r1107.6.213 to see information about this revision. You will see commit message, but also you will see branch nick. Branch nick is usually last part of the path to the branch where commit happens, e.g. for branch path /home/foo/project/bar/mybranch the nick will be mybranch.

2) revision number 1107.6.213 means that your original branch was forked from mainline revision 1107, it was 6th branch created from this point which merged into the trunk, and 213 is revision since the fork, so in your original branch this revision has number 1107+213=1320

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