repo: set HasUnsyncedChanges to true after a resolved conflict, so we'll push them later

This commit is contained in:
Hylke Bons 2011-05-22 18:49:04 +01:00
parent 2e6d8ac33e
commit 00327a1eb0
2 changed files with 7 additions and 12 deletions

View file

@ -118,12 +118,10 @@ namespace SparkleLib {
git.Start (); git.Start ();
git.WaitForExit (); git.WaitForExit ();
if (git.ExitCode == 0) { if (git.ExitCode == 0)
return true; return true;
} else { else
return false; return false;
//FetchRebaseAndPush ();TODO
}
} }
@ -252,7 +250,6 @@ namespace SparkleLib {
EnableWatching (); EnableWatching ();
OnConflictResolved (); OnConflictResolved ();
RequestStatus (SyncStatus.SyncUp);
} }
EnableWatching (); EnableWatching ();

View file

@ -164,6 +164,8 @@ namespace SparkleLib {
protected void OnConflictResolved () protected void OnConflictResolved ()
{ {
HasUnsyncedChanges = true;
if (ConflictResolved != null) if (ConflictResolved != null)
ConflictResolved (); ConflictResolved ();
} }
@ -346,13 +348,6 @@ namespace SparkleLib {
} }
protected void RequestStatus (SyncStatus requested_status)
{
if (requested_status == SyncStatus.SyncUp)
SyncUpBase ();
}
private void SyncUpBase () private void SyncUpBase ()
{ {
try { try {
@ -416,8 +411,11 @@ namespace SparkleLib {
if (SyncStatusChanged != null) if (SyncStatusChanged != null)
SyncStatusChanged (SyncStatus.Idle); SyncStatusChanged (SyncStatus.Idle);
// There could be changes from a
// resolved conflict
if (HasUnsyncedChanges) if (HasUnsyncedChanges)
SyncUp (); SyncUp ();
} else { } else {
SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Error"); SparkleHelpers.DebugInfo ("SyncDown", "[" + Name + "] Error");
this.server_online = false; this.server_online = false;