tags:

views:

45

answers:

1

I'm building a phing deployment script where I first ask the user to enter the revision/tag to deploy from svn.

when a user enters e.g. 0.1, I would like to check (with a linux script or from svn itself) IF this 0.1 revision actually exists. If it doesn't exist, I want to print an error and stop.

Thanks a lot for sharing your expertise!

+1  A: 

You can use the SVN info command to get information about a folder, file, trunk, branch, tag.

mhitza
thanks. I have something like: svn info http://server/repos/tags/xxx | grep 'Not a valid URL'Can I check somehow that IF this returns something, I should catch "0" in a variable, otherwise 1?
Jorre
solved it with grep -c to count the lines it was outputting!
Jorre