Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to find out an SVN command that would return some kind of true / false value depending on wether the user running it has access to a given repository.

I'm building a tool for automated deployment and part of the process is checking out the code from the SVN repository. I'd like to find out if the user running the tool has a valid login already. If there's no valid login, just show a message and exit the tool (handling the SVN login internally is not an option at the moment).

Plan B would be parsing the file in svn.simple looking for the repo URL, but thought about asking first.

Thanks,

Juan

share|improve this question

1 Answer 1

Calling svn with the --non-interactive command-line option disables any prompts for credentials. By checking svn's exit code, you would be able to determine whether the checkout was succesful. If not, you could let your script die with an error message.

Of course, a non-zero exit code for svn doesn't mean it's necessarily an authentication problem, but it's something...

share|improve this answer
    
Not a bad attempt, but would like to get something "official" : ) –  Juan Delgado Jun 19 '10 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.