repo: push changes after resolving a conflict

This commit is contained in:
Hylke Bons 2011-05-14 03:18:38 +01:00
parent aed1c9fa2d
commit 17b614121c

View file

@ -585,17 +585,19 @@ namespace SparkleLib {
git.Exited += delegate {
if (git.ExitCode != 0) {
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict detected. Trying to get out...");
this.watcher.EnableRaisingEvents = false;
DisableWatching ();
while (AnyDifferences)
ResolveConflict ();
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict resolved.");
this.watcher.EnableRaisingEvents = true;
EnableWatching ();
SparkleEventArgs args = new SparkleEventArgs ("ConflictDetected");
if (ConflictDetected != null)
ConflictDetected (this, args);
Push ();
}
this.current_hash = GetCurrentHash ();
@ -773,6 +775,18 @@ namespace SparkleLib {
}
public void DisableWatching ()
{
this.watcher.EnableRaisingEvents = false;
}
public void EnableWatching ()
{
this.watcher.EnableRaisingEvents = true;
}
// Gets the domain name of a given URL
private string GetDomain (string url)
{