开发者

list directory entries in the svn repository?

开发者 https://www.devze.com 2023-01-16 14:22 出处:网络
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 administra

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
0

精彩评论

暂无评论...
验证码 换一张
取 消