From 28aa6d23051c9cfafe3ae9cef9ba423002d96fcc Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 27 Apr 2011 18:44:59 +0200 Subject: [PATCH] repo: don't fetch changes when we're busy adding files --- SparkleLib/SparkleRepo.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index a3fa538a..6fe5bfe6 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -239,13 +239,15 @@ namespace SparkleLib { // Fetch changes when there is a message in the irc channel Listener.Client.OnChannelMessage += delegate (object o, IrcEventArgs args) { - SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Was notified of a remote change."); + SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Was notified of a remote change..."); string message = args.Data.Message.Trim (); if (!message.Equals (_CurrentHash) && message.Length == 40) { FetchQueue++; - if (!_IsFetching) { + if (_IsBuffering) { + SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] ...but we're busy adding files. We'll fetch them later."); + } else if (!_IsFetching) { while (FetchQueue > 0) { Fetch (); FetchQueue--; @@ -903,9 +905,9 @@ namespace SparkleLib { // Creates a pretty commit message based on what has changed private string FormatCommitMessage () { - List Added = new List (); - List Modified = new List (); - List Removed = new List (); + List Added = new List (); + List Modified = new List (); + List Removed = new List (); string file_name = ""; string message = null;