简体   繁体   中英

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."

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. Use -v as suggested by @Ben to find out what was changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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