From 3c966c980e29f8cc7020393536d45d3f5b898512 Mon Sep 17 00:00:00 2001 From: Kristi Date: Tue, 1 Feb 2011 01:19:22 -0800 Subject: [PATCH 1/4] Fix the open folder button at the end of the intro dialog --- SparkleShare/SparkleIntro.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index c9bed7c9..a89212d8 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -589,7 +589,7 @@ namespace SparkleShare { open_folder_button.Clicked += delegate { - SparkleShare.Controller.OpenSparkleShareFolder (folder_name); + SparkleShare.Controller.OpenSparkleShareFolder (System.IO.Path.GetFileNameWithoutExtension(folder_name)); }; From 2dea1550852ff10563fe18565581b6a79cb7b767 Mon Sep 17 00:00:00 2001 From: Kristi Date: Tue, 1 Feb 2011 01:20:30 -0800 Subject: [PATCH 2/4] Fix bug when syncing a empty repository with no commits --- SparkleLib/SparkleRepo.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 443bfa9d..7160b5f8 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -270,7 +270,12 @@ namespace SparkleLib { UserName = Config ["user.name"]; UserEmail = Config ["user.email"]; - _CurrentHash = Head.CurrentCommit.Hash; + + if (Head.CurrentCommit == null) + _CurrentHash = null; + else + _CurrentHash = Head.CurrentCommit.Hash; + _IsSyncing = false; _IsBuffering = false; _IsPolling = true; From be286b7672548e9d4bf57989e5272bdd3e627990 Mon Sep 17 00:00:00 2001 From: Kristi Date: Tue, 1 Feb 2011 01:38:56 -0800 Subject: [PATCH 3/4] Fix whitespace --- SparkleLib/SparkleRepo.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 7160b5f8..89e63359 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -271,10 +271,10 @@ namespace SparkleLib { UserName = Config ["user.name"]; UserEmail = Config ["user.email"]; - if (Head.CurrentCommit == null) - _CurrentHash = null; - else - _CurrentHash = Head.CurrentCommit.Hash; + if (Head.CurrentCommit == null) + _CurrentHash = null; + else + _CurrentHash = Head.CurrentCommit.Hash; _IsSyncing = false; _IsBuffering = false; From adb8a5cbf496ae7a9c6c1ddfff9dade91a9d51af Mon Sep 17 00:00:00 2001 From: Kristi Date: Tue, 1 Feb 2011 23:39:50 -0800 Subject: [PATCH 4/4] Start processes after adding delegates to avoid duplicate pull messages. --- SparkleLib/SparkleRepo.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 89e63359..68f8479d 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -440,7 +440,6 @@ namespace SparkleLib { process.StartInfo.UseShellExecute = false; process.StartInfo.WorkingDirectory = LocalPath; process.StartInfo.Arguments = "ls-remote origin master"; - process.Start (); process.Exited += delegate { @@ -459,6 +458,8 @@ namespace SparkleLib { }; + process.Start (); + /* FIXME: LsRemoteCommand is not yet implemented by GitSharp LsRemoteCommand ls_remote = new LsRemoteCommand () { @@ -683,9 +684,6 @@ namespace SparkleLib { process.StartInfo.Arguments = "fetch -v origin master"; - process.Start (); - process.WaitForExit (); - process.Exited += delegate { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Changes fetched."); @@ -718,6 +716,9 @@ namespace SparkleLib { }; + process.Start (); + process.WaitForExit (); + } @@ -837,7 +838,6 @@ namespace SparkleLib { Process.StartInfo.Arguments = "push origin master"; Process.WaitForExit (); - Process.Start (); Process.Exited += delegate { @@ -881,6 +881,7 @@ namespace SparkleLib { } }; + Process.Start (); }