0

I have to commit some code to the svn using ant script, Before committing to the SVN i should validate the credentials ,Is there any command in svn for validating the username and password from ant script

1 Answers1

1

No, special command for validating credentials does not exist in SVN

but: you can to use any SVN command for accessing remote repository and use --username and --password option in it

but BEWARE: 1) nor successful nor failed command doesn't return exit-code|error-code to caller, you have to validate and *check output 2) even successful READ command doesn't mean "OK" for WRITE command (you can test on URL with anonymous read access or user can have only read-access to test-URL)

I think, best solution (dirty hack) for testing will be complex of

  • Special "blackhole" URL, with $authenticated = rw permissions on it
  • Pre-commit hook, which block all commits to $BLACKHOLE (you don't want to have useless commits in repo)
  • svn ci $BLACKHOLE --username ... --password ... as test-tool
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110