list directory entries in the svn repository?

前端 未结 1 555
囚心锁ツ
囚心锁ツ 2021-02-06 06:17

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.

相关标签:
1条回答
  • 2021-02-06 06:46

    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 讨论(0)
提交回复
热议问题