获取SVN中的所有分支名称 [英] Get all branch names in SVN
问题描述
如何获取所有超过 x 年历史的 SVN 分支列表?
How do I get the list of all SVN branches which are more than x years old?
我在 CentOS 上使用 SVN,并且我有 sventon 用于查看所有存储库.
I use SVN on CentOS, and I have sventon for viewing all the repository.
推荐答案
svn help ls
如果您将存储库分支的 URL 与详细输出一起使用,您将得到如下内容:
If you'll use the URL of the repository branches root with verbose output, you'll get something like this:
svn ls http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/ --verbose
28 lazybadg фев 22 2011 ./
28 lazybadg фев 22 2011 Leichtbau-Deutsch/
26 lazybadg фев 22 2011 branche-francaise/
25 lazybadg сен 14 2010 i18n/
gawk 中的 3+4+5 字段将为您提供分支的最后一个-更改日期.
The 3+4+5 field in gawk will give you the branch's last-changed date.
svn 帮助日志
稍微复杂和嘈杂的输出,有一个优点:可读的日期,
Slightly more complex and noisy output with a single advantage: a readable date,
svn log http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/ -v -q
------------------------------------------------------------------------
r28 | lazybadger | 2011-02-22 09:24:04 +0600 (Вт, 22 фев 2011)
Changed paths:
M /branches/Leichtbau-Deutsch/Hello.de.txt
------------------------------------------------------------------------
r27 | lazybadger | 2011-02-22 09:21:41 +0600 (Вт, 22 фев 2011)
Changed paths:
A /branches/Leichtbau-Deutsch (from /trunk:26)
------------------------------------------------------------------------
r26 | lazybadger | 2011-02-22 06:49:41 +0600 (Вт, 22 фев 2011)
Changed paths:
A /branches/branche-francaise (from /trunk:25)
M /branches/branche-francaise/Hello.fr.txt
------------------------------------------------------------------------
|grep -v "|"为了排除分隔线,使用<任何选择的工具>,从更改的路径"文件名中获取受影响的分支,日期从修订日志的第一个字符串开始.
| grep -v "|" for excluding separation line, with <any tool of choice>, get affected branch from "Changed paths" filenames, date from the first string of the revision log.
这篇关于获取SVN中的所有分支名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!