在创建分支的主干中查找修订版本
我正在尝试将主干的最新更改合并到我的项目的分支中,但问题是我不知道我检查出的主干的哪个版本最终创建了分支。我认为 SVN 在某个地方记录了这个。有谁知道如何找到修订号?
(换句话说,Subversion 相当于 git merge-base masterbranch-name
)
I am trying to merge the latest changes from trunk into a branch of my project, but the problem is I don't know what revision of the trunk I checked out that I eventually created the branch from. I would think SVN logged this somewhere. Does anyone know how I can find the revision number?
(In other words, the Subversion equivalent of git merge-base master branch-name
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在命令行中, --stop-on-copy 标志可用于帮助您显示从何处复制分支:(
其中
feature
是分支的名称)will 的最后一行说这样的话:
From the command line, the --stop-on-copy flag can be used to help show you where you copied a branch from:
(where
feature
is the name of your branch)The last line of will say something like this:
也许有点晚了但是。
如果您当前位于分支中,您可以运行:
它显示分支的第一个修订版本,即您创建分支时的版本。
Perhaps a little bit late but.
If you're currently in the branch you can run:
It displays the first revision of the branch i.e. when you created it.
您使用的是 TortoiseSvn 还是命令行?
命令行:
svn log --stop-on-copy
然后查看最小的转数。Tortoise SVN:右键单击,tortoise-svn,显示日志,确保“复制时停止”已*选中*并按刷新。滚动到底部并找到最小的转速数。
Are you using TortoiseSvn or command line?
Command Line:
svn log --stop-on-copy
and then look at the smallest rev number.Tortoise SVN:
right-click, tortoise-svn, show log, make sure 'stop on copy' is *checked* and press refresh. Scroll to the bottom and find the smallest rev number.
如果您使用
svn copy
创建标签/分支
,那么svn log
可以告诉您分支中的内容是从哪里复制的。例如,假设我们有svn://svn/trunk/foo
并且创建了一个分支svn://svn/branches/super_foo
。运行 svn log -v svn://svn/branches/super_foo,它会告诉你类似这样的信息 -/branches/super_foo from /trunk/foo:22890
,其中意味着您已将 trunk 的修订版 22890 复制到您的分支中。If you have used
svn copy
to create atag/branch
, thensvn log
can tell you from where your stuff in the branch was copied. For example, let's say we havesvn://svn/trunk/foo
and we have created a branchsvn://svn/branches/super_foo
. Runsvn log -v svn://svn/branches/super_foo
, it will tell you something like this -/branches/super_foo from /trunk/foo:22890
, which means that you have copied revision 22890 of trunk into your branch.对于 Cornerstone 应用程序,要查看标签或分支的起源位置,请查看时间线。
For the Cornerstone app, to see where a tag or branch originated, look in the timeline.
要使用当前的 TortoiseSVN 命令行工具查看更改的路径并在没有本地签出的情况下查询存储库,请运行此命令(从任何目录)
svn log --stop-on-copy --limit 1 --verbose -r0:HEAD " http://server:9876/svn/reponame/branches/branch name"
注意
--verbose
实际显示更改的路径和显式的 repo/branch URL 以避免检查出来To see changed paths with current TortoiseSVN command-line tool and to query repo without having local checkout run this (from any directory)
svn log --stop-on-copy --limit 1 --verbose -r0:HEAD "http://server:9876/svn/reponame/branches/branch name"
Notice
--verbose
to actually show the changed paths and explicit repo/branch URL to avoid having to check it out