From f887b28e45b35adf533a2868e6e3376dff3f0f0d Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 17 May 2011 11:43:02 +0100 Subject: [PATCH] Use 'revision' instead of 'hash' --- SparkleLib/SparkleChangeSet.cs | 2 +- SparkleLib/SparkleRepo.cs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SparkleLib/SparkleChangeSet.cs b/SparkleLib/SparkleChangeSet.cs index 7f368238..d8d37909 100644 --- a/SparkleLib/SparkleChangeSet.cs +++ b/SparkleLib/SparkleChangeSet.cs @@ -24,7 +24,7 @@ namespace SparkleLib { public string UserName; public string UserEmail; - public string Hash; + public string Revision; public DateTime Timestamp; public bool IsMerge = false; public List Added = new List (); diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 3abde15c..47e66e59 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -34,7 +34,7 @@ namespace SparkleLib { SyncDownStarted, SyncDownFinished, SyncDownFailed - } + } // TODO: Idle, Error, SyncingUp, SyncingDown public class SparkleRepo { @@ -106,7 +106,7 @@ namespace SparkleLib { } } - public delegate void SyncStatusChangedEventHandler (SyncStatus status); + public delegate void SyncStatusChangedEventHandler (SyncStatus new_status); public event SyncStatusChangedEventHandler SyncStatusChanged; @@ -280,10 +280,10 @@ namespace SparkleLib { if (git.ExitCode != 0) return; - string remote_hash = git.StandardOutput.ReadToEnd ().TrimEnd (); + string remote_revision = git.StandardOutput.ReadToEnd ().TrimEnd (); - if (!remote_hash.StartsWith (this.revision)) { - SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Remote changes found. (" + remote_hash + ")"); + if (!remote_revision.StartsWith (this.revision)) { + SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Remote changes found. (" + remote_revision + ")"); Fetch (); this.watcher.EnableRaisingEvents = false; @@ -431,10 +431,10 @@ namespace SparkleLib { git.Start (); git.WaitForExit (); - string output = git.StandardOutput.ReadToEnd (); - string hash = output.Trim (); + string output = git.StandardOutput.ReadToEnd (); + string revision = output.Trim (); - return hash; + return revision; } @@ -907,7 +907,7 @@ namespace SparkleLib { if (match.Success) { SparkleChangeSet change_set = new SparkleChangeSet (); - change_set.Hash = match.Groups [1].Value; + change_set.Revision = match.Groups [1].Value; change_set.UserName = match.Groups [2].Value; change_set.UserEmail = match.Groups [3].Value; change_set.IsMerge = is_merge_commit;