repo: push changes after resolving a conflict
This commit is contained in:
parent
aed1c9fa2d
commit
17b614121c
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue