2011-01-11 21 views
12

我在過去已經有一段時間的Subversion中有一個標籤。我想知道它是從哪個分支創建的。有沒有辦法做到這一點。我已經試過如何找到標籤的源代碼分支

svn log --stop-on-copy 

但是,這隻給我修訂號,而不是分支路徑。我需要分支路徑,所以我可以檢查它。任何想法,最好是SVN命令行方法在這裏將不勝感激。

回答

18

svn log -v --stop-on-copy <url-of-the-tag>應該爲您提供這個信息documented here

相關摘錄:

In addition to the action codes which precede the changed paths, svn log with the 
--verbose (-v) option will note whether a path was added or replaced as the result of 
a copy operation. It does so by printing (from COPY-FROM-PATH:COPY-FROM-REV) after such 
paths. 
+0

但它給了我下面的消息** svn:'標籤網址'選項:200 OK(服務器根url)** – 2013-02-11 08:28:16

9

要直接得到正確的版本:

svn log -v -r0:HEAD --stop-on-copy --limit 1 <url-of-the-tag> 

它只會打印從一個分支建立的修訂:

rxxx | Author | 2013-01-25 11:43:55 +0100 (fri., 2013, jan. 25) | 1 line 
Changed paths: 
    A /project/branches/branch (from /project/trunk/folder:ryyy) 

修訂你正在尋找的路徑是:/project/trunk/folder:ryyy

+0

更簡潔。謝謝。 – scraimer 2014-04-29 05:44:25