Use SparkleToGitUrl method on typed in addresses

This commit is contained in:
Hylke Bons 2010-08-01 19:17:57 +01:00
parent 38e95b8c3c
commit 8e580f2f82

View file

@ -312,7 +312,7 @@ namespace SparkleShare {
if (radio_button.Active) { if (radio_button.Active) {
server = ServerEntry.Text; server = SparkleToGitUrl (ServerEntry.Text);
// Remove the trailing slash if there is one // Remove the trailing slash if there is one
if (server.EndsWith ("/")) if (server.EndsWith ("/"))
@ -870,8 +870,10 @@ namespace SparkleShare {
process.Start (); process.Start ();
process.Exited += delegate { process.Exited += delegate {
SparkleHelpers.DebugInfo ("Config", "Created key '" + key_file_name + "'"); SparkleHelpers.DebugInfo ("Config", "Created key '" + key_file_name + "'");
SparkleHelpers.DebugInfo ("Config", "Created key '" + key_file_name + ".pub'"); SparkleHelpers.DebugInfo ("Config", "Created key '" + key_file_name + ".pub'");
}; };
} }
@ -931,23 +933,19 @@ namespace SparkleShare {
} }
// Convert the more human readable sparkle:// url to something Git can use. // Convert the more human readable sparkle:// url to something Git can use.
// Example: sparkle://gitorious.org/sparkleshare ssh://git@gitorious.org/sparkleshare // Example: sparkle://gitorious.org/sparkleshare ssh://git@gitorious.org/sparkleshare
/* private static string SparkleToGitUrl (string url) private static string SparkleToGitUrl (string url)
{ {
if (url.StartsWith ("sparkle://")) if (url.StartsWith ("sparkle://"))
url = url.Replace ("sparkle://", "ssh://git@"); url = url.Replace ("sparkle://", "ssh://git@");
// Usually don't need the ".git" at the end.
// It looks ugly as a folder too.
if (url.EndsWith (".git"))
url = url.Substring (0, url.Length - 4);
return url; return url;
} }
*/
} }
} }