Svn: how to list the latest tags from svn command line?

Whe created a wrapper that delimits the last tag in svn and prepares the layout of directories and copies the diff files in the right pane.

but we must enter two tag names in the commnand line, and therefore we must refer to the version schedule (from the windows).

Is there any way to list tags from svn command line client?

+6
source share
3 answers

This will work from the command line on Windows, Mac, or Linux, although this requires that the current working directory be in the working copy:

svn ls "^/tags" 
+14
source

With power shell:

 $path = (([Xml] (svn log --xml $Url --verbose --username $Username --password $Password)).Log.LogEntry.Paths.Path | ? { $_.action -eq 'A' -and $_.kind -eq 'dir' -and $_.InnerText -like '*tags*'} | Select -Property @( @{N='date'; E={$_.ParentNode.ParentNode.Date}}, @{N='path'; E={$_.InnerText}} )| Sort Date -Descending | Select -First 1).path 

Where $ Url is the URL of your tags

+2
source

This should help:

 svnlook tree --full-paths /home/path/to/svn/project | \ egrep -a '/?tags/.+' | \ sed -re 's!.*/?tags/([^/]*).*!\1!' | \ sort -u 

Link: http://blog.amnuts.com/2007/08/14/getting-a-list-of-project-tags-from-subversion/

+1
source

Source: https://habr.com/ru/post/927814/


All Articles