Merge branch 'tortoise'

Conflicts:
	SparkleLib/Git/SparkleGit.cs
	SparkleLib/SparkleFetcherSSH.cs
	SparkleShare/SparkleControllerBase.cs
This commit is contained in:
Hylke Bons 2013-06-23 10:03:09 +01:00
commit fd163a0c93
7 changed files with 22 additions and 5 deletions

View file

@ -103,6 +103,7 @@ namespace SparkleLib.Git {
public static string ExecPath;
public static string GitPath;
public static string SSHPath;
public SparkleGit (string path, string args) : base (path, args)
@ -121,6 +122,13 @@ namespace SparkleLib.Git {
StartInfo.EnvironmentVariables ["LANG"] = "en_US";
else
StartInfo.EnvironmentVariables.Add ("LANG", "en_US");
if (!string.IsNullOrEmpty (SSHPath)) {
if (StartInfo.EnvironmentVariables.ContainsKey ("GIT_SSH"))
StartInfo.EnvironmentVariables ["GIT_SSH"] = SSHPath;
else
StartInfo.EnvironmentVariables.Add ("GIT_SSH", SSHPath);
}
if (string.IsNullOrEmpty (ExecPath))
StartInfo.Arguments = args;

View file

@ -26,8 +26,9 @@ namespace SparkleLib {
public class SparkleFetcherInfo {
public string Address;
public string Fingerprint;
public string RemotePath;
public string Backend;
public string Fingerprint;
public string TargetDirectory;
public string AnnouncementsUrl;
public bool FetchPriorHistory;

View file

@ -47,7 +47,6 @@ namespace SparkleLib {
return false;
}
if (host_fingerprint == null || !RequiredFingerprint.Equals (host_fingerprint)) {
SparkleLogger.LogInfo ("Auth", "Fingerprint doesn't match");
this.errors.Add ("error: Host fingerprint doesn't match");

View file

@ -527,7 +527,11 @@ namespace SparkleShare {
}
string canonical_name = Path.GetFileName (info.RemotePath);
string backend = SparkleFetcherBase.GetBackend (info.Address);
string backend = info.Backend;
if (string.IsNullOrEmpty (backend))
backend = SparkleFetcherBase.GetBackend (info.Address);
info.TargetDirectory = Path.Combine (tmp_path, canonical_name);
try {

View file

@ -43,7 +43,7 @@ namespace SparkleShare {
get {
string image_file_name = GetValue ("info", "icon");
string image_path = IO.Path.Combine (this.plugin_directory, image_file_name);
if (IO.File.Exists (image_path))
return image_path;
else

View file

@ -356,7 +356,8 @@ namespace SparkleShare {
Fingerprint = SelectedPlugin.Fingerprint,
RemotePath = remote_path,
FetchPriorHistory = this.fetch_prior_history,
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl
AnnouncementsUrl = SelectedPlugin.AnnouncementsUrl,
Backend = SelectedPlugin.Backend
};
new Thread (() => { Program.Controller.StartFetcher (info); }).Start ();

View file

@ -30,6 +30,7 @@ using Microsoft.Win32;
using SparkleLib;
using System.Windows;
namespace SparkleShare {
public class SparkleController : SparkleControllerBase {
@ -57,6 +58,7 @@ namespace SparkleShare {
string executable_path = Path.GetDirectoryName (Forms.Application.ExecutablePath);
string msysgit_path = Path.Combine (executable_path, "msysgit");
string new_PATH = msysgit_path + @"\bin" + ";" +
msysgit_path + @"\mingw\bin" + ";" +
msysgit_path + @"\cmd" + ";" +
@ -66,6 +68,8 @@ namespace SparkleShare {
Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile));
StartSSH ();
SparkleLib.SparkleGit.SparkleGit.SSHPath = Path.Combine (msysgit_path, "bin", "ssh.exe");
base.Initialize ();
}