From 462fd687086db9b2a919eaa1b6d9b104263da806 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 15 Apr 2011 01:28:42 +0100 Subject: [PATCH] [repo] pull before pushing in every situation --- SparkleLib/SparkleRepo.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/SparkleLib/SparkleRepo.cs b/SparkleLib/SparkleRepo.cs index 77cf9337..9413dd68 100644 --- a/SparkleLib/SparkleRepo.cs +++ b/SparkleLib/SparkleRepo.cs @@ -334,10 +334,8 @@ namespace SparkleLib { } - if (_HasUnsyncedChanges) { - CheckForRemoteChanges (); - Push (); - }; + if (_HasUnsyncedChanges) + FetchRebaseAndPush (); }; @@ -590,7 +588,14 @@ namespace SparkleLib { } } - + + + public void FetchRebaseAndPush () + { + CheckForRemoteChanges (); + Push (); + } + public bool AnyDifferences { @@ -849,6 +854,8 @@ namespace SparkleLib { if (PushingFailed != null) PushingFailed (this, args); + FetchRebaseAndPush (); + } else { SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Changes pushed.");