Using svn.exe Command Line Interface (CLI) with SvnBridge

Feb 6, 2008 at 2:56 PM
Have not seen many posts on using the svn.exe command line interface (CLI) tool in conjunction with SvnBridge, so I thought I'd post some of my own experiences:

Test environment configuration:
  • Client machine is Windows XP Pro SP2.
  • Client machine has svn-win32-1.4.6 CLI tools manually unzipped to an arbitrary directory on the file system.
  • Client machine is running SvnBridge v1 launched by way of this command line: SvnBridge.exe http://tfsrtm08:8080 8081
  • Server machine is Windows 2003 SP2 with TFS 2008 RTM.
  • Network is a TCP/IP local area network, with no Internet connectivity.
  • Bootstrapped things by logging in to the server at its console and manually creating an empty Team Project named MyTestTeamProject.
  • Both the client machine and server machine are intentionally not domain-joined (i.e. they are stand-alone).
  • Logged on to the client machine with credentials that intentionally have no mapping or corresponding credentials on the server.
  • Last two bullets are my attempt to ensure that no pass-through-authentication, no credential-mapping, etc. are in the environment so that svn.exe explicit credentials are being used by way of --username and --password.

These svn.exe CLI commands worked for me:
svn ls http://localhost:8081 --username MyUsername --password XXXXXXXXX
svn ls http://localhost:8081/ --username MyUsername --password XXXXXXXXX
svn ls http://localhost:8081 --username MyUsername --password XXXXXXXXX --recursive
svn ls http://localhost:8081/ --username MyUsername --password XXXXXXXXX --recursive
svn ls http://localhost:8081/MyTestTeamProject/ --username MyUsername --password XXXXXXXXX --recursive
svn mkdir http://localhost:8081/MyTestTeamProject/foo --username MyUsername --password XXXXXXXXX -m "Making a server-side directory on the TFS server by way of svn.exe."
svn import . http://localhost:8081/MyTestTeamProject/ --username MyUsername --password XXXXXXXXX -m "Initial import of a project."
svn co http://localhost:8081/MyTestTeamProject/ --username MyUsername --password XXXXXXXXX

These svn.exe CLI commands CRASHED SvnBridge:
rem CRASHED svn ls http://localhost:8081/$ --username MyUsername --password XXXXXXXXX
rem CRASHED svn ls http://localhost:8081/MyTestTeamProject/$ --username MyUsername --password XXXXXXXXX
rem CRASHED svn log http://localhost:8081 --username MyUsername --password XXXXXXXXX
rem CRASHED svn log http://localhost:8081/MyTestTeamProject/ --username MyUsername --password XXXXXXXXX
rem CRASHED svn mkdir http://localhost:8081/foo --username MyUsername --password XXXXXXXXX -m "Making a server-side directory on the TFS server by way of svn.exe."
rem CRASHED svn import . http://localhost:8081 --username MyUsername --password XXXXXXXXX -m "Initial import of a project."

I can understand some of these problems. In fact, I expected some of the commands to fail. For example, the attempt to "svn mkdir http://localhost:8081/foo" is attempting to create a server-side directory without specifying a Team Project. But, why would simple ls and log commands fail?

Interested in experiences others in the community have with using svn.exe in conjunction with SvnBridge.
Feb 7, 2008 at 2:42 PM
Oh crap... Then I suppose this is already resolved:
http://www.codeplex.com/SvnBridge/WorkItem/View.aspx?WorkItemId=9291

-Tommy
Feb 7, 2008 at 2:42 PM
Edited Feb 7, 2008 at 2:59 PM
Did you combine the commands in one single bat file? When I try, the batch just freeze after starting the svnbrige :-/
Feb 7, 2008 at 4:23 PM
If you're going to use a batch file, then you'll need to say "start svnbridge" instead of "svnbridge". Pre-pending the start keyword tells the batch file "run this but don't wait for it to exit", because the default behavior is to wait for exit.
Feb 7, 2008 at 7:20 PM
The svn.exe CLI tests that I executed were not executed from within a batch file. Just synchronous, serial, manual, and casually-entered commands at a command prompt (with some cut/paste from Notepad). I’m particularly interested in the “svn.exe log” command, and why it’s failing and crashing SvnBridge.

If I get some free time and there is interest, perhaps I can assemble a larger battery of svn.exe CLI tests (to include common scenarios like "svn.exe update") to augment the CLI commands above.
Feb 28, 2008 at 7:09 PM
I would like that very much.
I have start to add end to end testing, the start of which you can see here:
http://www.codeplex.com/SvnBridge/SourceControl/FileView.aspx?itemId=203801&changeSetId=15700

I would appreciate any tests and scenarios, both passing and failing, that you can send.