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 {
|
git.Exited += delegate {
|
||||||
if (git.ExitCode != 0) {
|
if (git.ExitCode != 0) {
|
||||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict detected. Trying to get out...");
|
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict detected. Trying to get out...");
|
||||||
this.watcher.EnableRaisingEvents = false;
|
DisableWatching ();
|
||||||
|
|
||||||
while (AnyDifferences)
|
while (AnyDifferences)
|
||||||
ResolveConflict ();
|
ResolveConflict ();
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict resolved.");
|
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Conflict resolved.");
|
||||||
this.watcher.EnableRaisingEvents = true;
|
EnableWatching ();
|
||||||
|
|
||||||
SparkleEventArgs args = new SparkleEventArgs ("ConflictDetected");
|
SparkleEventArgs args = new SparkleEventArgs ("ConflictDetected");
|
||||||
if (ConflictDetected != null)
|
if (ConflictDetected != null)
|
||||||
ConflictDetected (this, args);
|
ConflictDetected (this, args);
|
||||||
|
|
||||||
|
Push ();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.current_hash = GetCurrentHash ();
|
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
|
// Gets the domain name of a given URL
|
||||||
private string GetDomain (string url)
|
private string GetDomain (string url)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue