문제

I need revisions of different tags. So far I used a Tag-Browser in SmartSVN. However it is quite slow.

Something like svn ls "^/tags" shows only the tags but no revisions. And something like

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

gives too much confusing information which is not needed.

Is there a svn command to get only tags and its revision?

도움이 되었습니까?

해결책

You can see the revision numbers of the most recent commit for each tag by adding the option -v:

svn ls -v ^/tags

If you want to process the results, I recommend using the command line svn info --xml --depth=immediates ^/tags and parsing the XML document with a script. For example, the following python script prints the names of the tags with their revision number:

#! /usr/bin/env python3
import sys, lxml.etree
document = lxml.etree.parse(sys.stdin.buffer)
for entry in document.xpath('//entry[@kind="dir"]'):
    print(entry.xpath('string(@path)'), entry.xpath('string(commmit/@revision)'))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top