How can I write a bash script to list directory entries in the svn repository? I want to write bash file because i have a large number of repositories.
svn list is most useful if you want to see what files a repository has without downloading a working copy: $ svn list http://svn.red-bean.com/repos/test/support README. txt INSTALL examples/ … For further details, see the earlier section the section called “Listing versioned directories”.
If the URL is file://C:\Path\to\repository then the path is C:\Path\to\repository .
Last modified: 04 August 2022. A working copy is a directory that contains a collection of files which you can use as your private work area, as well as some extra files, created and maintained by Subversion. For example, each directory in your working copy contains an administrative directory named . svn.
If you are the subversion administrator, the following command will return the directories located in your repository.
svnlook tree $REPO_DIR --full-paths | egrep "/$"
The trick is the grep command that is looking for a trailing "/" character in the name
Same trick works for the svn command as well
svn list $REPO_URL -R | egrep "/$"
To repeatedly run this command you can put it into a shell for loop
for url in $URL1 $URL2 $URL2
do
svn list $url -R | egrep "/$"
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With