从 bzr 责任确定起源分支
我进行了一个复杂的更改,影响了一堆文件。我不记得我在哪个集市分支中编写了该更改。我们有一个有点复杂的合并设置,因此我现在所在的分支将更改与许多其他更改混为一谈。我想做一些非常相似的工作,所以最好能提取原始的差异。
我觉得我应该可以使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 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
andbzr 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 bemybranch
.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 number1107+213=1320