list directory entries in the svn repository?
How can I write a bash script to list directory entries in the svn repository? I want 开发者_JS百科to write bash file because i have a large number of repositories.
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 "/$"
Extra notes
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
精彩评论