tags:

views:

62

answers:

1

how i can write bash to List directory entries in the svn repository (i want to write bach file because i have a large number of repository) ,.,,please HELP ME

+2  A: 

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
Mark O'Connor
i try it now but the follwing result appear:-svnlook: invalid option: --full-pathsType 'svnlook help' for usage.
Osama Ahmad
I'm using subversion 1.6.6. Doco: http://svnbook.red-bean.com/en/1.5/svn.ref.svnlook.c.tree.html
Mark O'Connor
when i execute svn list $REPO_URL -R | egrep "/$" the following result svn: '.' is not a working copy
Osama Ahmad
Yes.... And I get the same result when running the following command: "svn list $I_SHOULD_REPLACE_THIS_WITH_MY_OWN_URL_LOCATION -R". Please use a valid subversion URL when running the command
Mark O'Connor
iam sorry i don't have expert in this field ... and i under big press... you mean like this "svn list $/var/lib/svn/repos -R | egrep "/$" " if you mean this the following result appearsvn: '$/var/lib/svn' is not a working copy
Osama Ahmad
No... What command are you using when checking out from the repository? Send it to me and I'll convert it for you
Mark O'Connor
ok i use the following command (svn list svn+ssh://svn.sts.com.jo/var/lib/svn/repos -R | egrep "/$" )
Osama Ahmad
That's not a checkout command... Does it work now?
Mark O'Connor
i hope to give me you e-mail to chat you on MSN ... but no problem ..it is work but i have a many many repository if i want to execute each one like this method it is a hard method because i have more than 500 repository ... so i need method to execute all at the same time .. for examlpe write bash ... thank you for help me
Osama Ahmad
You're welcome. It's customary on stackoverflow to accept the answer that works.
Mark O'Connor
but please how i can find List directory entries in big number of the svn repository
Osama Ahmad