在创建分支的主干中查找修订版本

发布于 2024-11-14 13:28:10 字数 168 浏览 4 评论 0原文

我正在尝试将主干的最新更改合并到我的项目的分支中,但问题是我不知道我检查出的主干的哪个版本最终创建了分支。我认为 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 技术交流群。

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

发布评论

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

评论(6

北渚 2024-11-21 13:28:10

在命令行中, --stop-on-copy 标志可用于帮助您显示从何处复制分支:(

svn log --stop-on-copy --verbose --limit 1 -r0:HEAD ^/branches/feature

其中 feature 是分支的名称)

will 的最后一行说这样的话:

Changed paths:
   A /branches/feature (from /trunk:1234)

From the command line, the --stop-on-copy flag can be used to help show you where you copied a branch from:

svn log --stop-on-copy --verbose --limit 1 -r0:HEAD ^/branches/feature

(where feature is the name of your branch)

The last line of will say something like this:

Changed paths:
   A /branches/feature (from /trunk:1234)
徒留西风 2024-11-21 13:28:10

也许有点晚了但是。

如果您当前位于分支中,您可以运行:

svn log -r 1:HEAD --limit 1 --stop-on-copy

它显示分支的第一个修订版本,即您创建分支时的版本。

Perhaps a little bit late but.

If you're currently in the branch you can run:

svn log -r 1:HEAD --limit 1 --stop-on-copy

It displays the first revision of the branch i.e. when you created it.

痞味浪人 2024-11-21 13:28:10

您使用的是 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.
enter image description here

白云不回头 2024-11-21 13:28:10

如果您使用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 a tag/branch, then svn log can tell you from where your stuff in the branch was copied. For example, let's say we have svn://svn/trunk/foo and we have created a branch svn://svn/branches/super_foo. Run svn 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.

夏见 2024-11-21 13:28:10

对于 Cornerstone 应用程序,要查看标签或分支的起源位置,请查看时间线。

For the Cornerstone app, to see where a tag or branch originated, look in the timeline.

梦在深巷 2024-11-21 13:28:10

要使用当前的 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

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