Reputation: 295
I want to open TortoiseSVN Repo Browser in a specified "url/path" when i click in a button.
(Windows Forms/C#)
Thanks.
Upvotes: 3
Views: 1873
Reputation: 531
Based on the answer of Michael Perrenoud:
var info = new ProcessStartInfo("/PathToTortoise/TortoiseProc.exe", "/command:repobrowser /path:PathToRepository");
Process.Start(info);
/command:repobrowser tells tortoise to start the repobrowser.
/path tells the repobrowser which path to open.
Upvotes: 4
Reputation: 39500
The command you would need to run at the command line is something like:
C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe /command:repobrowser /path:"myPath"
In C# you could start this like this:
String path = "myPath";
Process.Start("TortoiseProc.exe",
String.Format("/command:repobrowser /path:\"{0}\"", path));
All the documentation for automating TSVN is here:
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-automation.html
Upvotes: 2
Reputation: 67898
This will use the Windows Shell to launch the EXE:
Process.Start(pathToFile);
Now, you'll probably also want to supply some arguments, so you can do that like this:
var info = new ProcessStartInfo(pathToFile, arguments);
Process.Start(info);
You'll need to set the arguments to a valid set of arguments for the command-line for that application.
Upvotes: 3