Skip to content

Commit

Permalink
#21
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Mar 30, 2017
1 parent 2717d9c commit 55f3a42
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions TSVN/Helpers/CommandHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,16 @@ public static string GetRepositoryRoot(string path = "")
};
proc.Start();

var workingCopyRootPath = string.Empty;
var relativeUrl = string.Empty;

while (!proc.StandardOutput.EndOfStream)
{
var line = proc.StandardOutput.ReadLine();
if (line?.StartsWith("Working Copy Root Path:") ?? false)
{
workingCopyRootPath = line.Substring(24);
}
else if (line?.StartsWith("Relative URL:") ?? false)
{
relativeUrl = line.Substring(14);
return line.Substring(24);
}
}

return Path.Combine(workingCopyRootPath, relativeUrl.Substring(2));
return string.Empty;
}

private static void StartProcess(string application, string args)
Expand Down

0 comments on commit 55f3a42

Please sign in to comment.