[repo] Fix pushing bug
This commit is contained in:
parent
a548c014de
commit
f54c0798eb
|
@ -52,9 +52,10 @@ namespace SparkleLib {
|
||||||
if (Nick.Length > 9)
|
if (Nick.Length > 9)
|
||||||
Nick = Nick.Substring (0, 9);
|
Nick = Nick.Substring (0, 9);
|
||||||
|
|
||||||
// TODO: Remove these hardcoded values
|
// Channel = "#sparkletest";
|
||||||
Channel = "#sparkletest";
|
// Server = "irc.gnome.org";
|
||||||
Server = "irc.gnome.org";
|
Channel = channel;
|
||||||
|
Server = server;
|
||||||
|
|
||||||
Client = new IrcClient () {
|
Client = new IrcClient () {
|
||||||
PingTimeout = 120,
|
PingTimeout = 120,
|
||||||
|
|
|
@ -833,6 +833,15 @@ namespace SparkleLib {
|
||||||
|
|
||||||
SparkleEventArgs args = new SparkleEventArgs ("PushingStarted");
|
SparkleEventArgs args = new SparkleEventArgs ("PushingStarted");
|
||||||
|
|
||||||
|
Process process = new Process () {
|
||||||
|
EnableRaisingEvents = true
|
||||||
|
};
|
||||||
|
|
||||||
|
process.StartInfo.FileName = SparklePaths.GitPath;
|
||||||
|
process.StartInfo.RedirectStandardOutput = true;
|
||||||
|
process.StartInfo.UseShellExecute = false;
|
||||||
|
process.StartInfo.WorkingDirectory = LocalPath;
|
||||||
|
|
||||||
if (PushingStarted != null)
|
if (PushingStarted != null)
|
||||||
PushingStarted (this, args);
|
PushingStarted (this, args);
|
||||||
|
|
||||||
|
@ -855,16 +864,16 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Process.StartInfo.Arguments = "push origin master";
|
process.StartInfo.Arguments = "push origin master";
|
||||||
|
|
||||||
Process.WaitForExit ();
|
|
||||||
|
|
||||||
Process.Exited += delegate {
|
|
||||||
|
process.Exited += delegate {
|
||||||
|
|
||||||
_IsSyncing = false;
|
_IsSyncing = false;
|
||||||
_IsPushing = false;
|
_IsPushing = false;
|
||||||
|
|
||||||
if (Process.ExitCode != 0) {
|
if (process.ExitCode != 0) {
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Pushing failed.");
|
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Pushing failed.");
|
||||||
|
|
||||||
|
@ -901,7 +910,9 @@ namespace SparkleLib {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
Process.Start ();
|
|
||||||
|
process.Start ();
|
||||||
|
process.WaitForExit ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue