SVN查找标签的修订版本

发布于 2024-08-21 09:04:57 字数 28 浏览 13 评论 0原文

有什么方法可以显示哪个版本相当于某个标签?

Is there any way of showing which revision is equivalent to a certain tag?

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

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

发布评论

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

评论(2

十年不长 2024-08-28 09:04:57

试试这个

svn log /path/to/tag -v --stop-on-copy

您可能会看到类似这样的内容

r10 | user | 2010-02-07 17:06:01 -0800 (Sun, 07 Feb 2010) | 1 line
Changed paths:
   A /path/to/tag (from /path/to/branch:5)

您可以看到该标签在修订版 5 处进行了分支

Try this

svn log /path/to/tag -v --stop-on-copy

You might see something like this

r10 | user | 2010-02-07 17:06:01 -0800 (Sun, 07 Feb 2010) | 1 line
Changed paths:
   A /path/to/tag (from /path/to/branch:5)

You can see that the tag was branched at revision 5

雨后咖啡店 2024-08-28 09:04:57

如果您想知道此标记所指向内容的修订号,您需要使用 < code>svn log,它提供以下格式的数据:

------------------------------------------------------------------------
r643 | [author] | [date] | [n] lines

Added tag
------------------------------------------------------------------------
r643 | [author] | [date] | [n] lines

[log message]
------------------------------------------------------------------------
...

如果添加选项--stop-on-copy,您可以找出创建标签的版本。使用和不使用 --stop-on-copy 选项运行 svn log ,使用该选项运行时显示的最后一个条目下方的条目将最终显示标记的修订版本指向.

或者,假设人们没有在您的存储库中做坏事(例如针对标签提交),您可以使用 svn info,它返回的信息格式为

Path: [path]
URL: [url]
Revision: [current repository revision]
Node Kind: directory
Schedule: normal
Last Changed Author: [author]
Last Changed Rev: [last revision this particular path was changed]
Last Changed Date: YYYY-MM-DD hh:mm:ss TZ

您可能会调用类似 svn info http://www.example.com/svn/path/to/标签

If you want to know the revision number of what this tag points to you need to use svn log, which provides data in the format:

------------------------------------------------------------------------
r643 | [author] | [date] | [n] lines

Added tag
------------------------------------------------------------------------
r643 | [author] | [date] | [n] lines

[log message]
------------------------------------------------------------------------
...

If you add the option --stop-on-copy you can find out which revision the tag was created. Run svn log both with and without the --stop-on-copy option and the entry beneath the last one shown when run with the option will show the revision the tag ultimately points to.

Alternatively, assuming people aren't doing bad things in your repository (like committing against a tag) you can use svn info, it returns information in the format

Path: [path]
URL: [url]
Revision: [current repository revision]
Node Kind: directory
Schedule: normal
Last Changed Author: [author]
Last Changed Rev: [last revision this particular path was changed]
Last Changed Date: YYYY-MM-DD hh:mm:ss TZ

You might call something like svn info http://www.example.com/svn/path/to/tag

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