简体   繁体   English

获取特定标签的Subversion版本号

[英]Get subversion's revision number for specific tag

I'm getting conflicting numbers when it comes to the revision number. 关于修订版本号,我遇到了冲突的数字。 Let's say I run the following two commands. 假设我运行以下两个命令。 The most recent tag is "XYZ." 最近的标签是“ XYZ”。

svn log $REPO_URL/$PATH/tags/ --limit=1
------------------------------------------------------------------------
r16557 | userx | 2014-12-11 00:27:05 -0400 (Thu, 11 Dec 2014) | 1 line

svn log $REPO_URL/$PATH/tags/XYZ --limit=1
------------------------------------------------------------------------
r16556 | userx | 2014-12-11 00:24:14 -0400 (Thu, 11 Dec 2014) | 1 line

My question is, which revision number do I care for? 我的问题是,我需要哪个修订号? What I'm looking to do is to run the following command against it to see what changes were made since the last tag was created. 我想要做的是针对它运行以下命令,以查看自创建上一个标记以来进行了哪些更改。 I've tried using both numbers and they return the same result. 我尝试使用两个数字,它们返回相同的结果。 I wasn't sure which one is the "right" one to use. 我不确定哪一个是“正确的”使用。

svn log -r<REVISION NUMBER>:HEAD $REPO_URL/$PATH/branches/$BRANCH_NAME

If you have two different revisions for a path and a subpath, the parent path will always have the higher revision. 如果路径和子路径有两个不同的修订,则父路径将始终具有较高的修订。 It means that the parent path (or another subpath than the one your are looking at) was changed later. 这意味着父路径(或除您正在查看的子路径以外的其他子路径)后来已更改。

In your case it means that $REPO_URL/$PATH/tags/XYZ was not the last change to $REPO_URL/$PATH/tags/ or any of its subdirectories. 在您的情况下,这意味着$REPO_URL/$PATH/tags/XYZ 不是$REPO_URL/$PATH/tags/或其任何子目录的最后更改。 Use -v as suggested by @Ben to find out what was changed. 按照@Ben的建议使用-v来查找更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM