Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get all branch names in SVN

Tags:

svn

How do I get the list of all SVN branches which are more than x years old?

I use SVN on CentOS, and I have sventon for viewing all the repository.

like image 704
user1164061 Avatar asked Feb 01 '12 22:02

user1164061


People also ask

Do we have branches in svn?

SVN's “branch” directory runs parallel to the “trunk” directory. A SVN branch copies the trunk and allows you to make changes. When the new feature is stable, the branch is merged back. Here's a basic step-by-step overview of SVN branching and merging.

How do I view tags in svn?

and tags, and then just "ls". You can run "svn list -h" for more info on list.

What is branches tags trunk in svn?

- A trunk in SVN is main development area, where major development happens. - A branch in SVN is sub development area where parallel development on different functionalities happens. After completion of a functionality, a branch is usually merged back into trunk.


1 Answers

  • svn help ls

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/ 

The 3+4+5 field in gawk will give you the branch's last-changed date.

  • svn help log

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

like image 172
Lazy Badger Avatar answered Sep 28 '22 13:09

Lazy Badger