Your string expands to
svn commit -m first commit c:\a\svn\projectwc
Whereas you need to do
svn commit -m "first commit" c:\a\svn\projectwc
As the log message is more than one word it needs to be in quotes.
I think you should re-think what you are trying to achieve here. Constructing strings based on user input and passing them to exec
is a very bad idea from a security perspective.
Also you tagged the post tortoise-svn - if you invoke TSVN from the command line it pops up the GUI which is definitely not appropriate server side.
Then you've got other considerations like:
- How to log error messages when things go wrong
- Does the Web server have sufficient access to the working copy to perform these operations
- Is the invocation of "svn" even possible in your environment.
Whatever you are trying to do, it's probable there is some free software out there that does it already. svn has a webdav interface and an API implemented in many languages - this would be far safer than using exec