[repo] Fix pushing bug
This commit is contained in:
parent
d8e8459b5a
commit
c02ec224f1
|
@ -52,9 +52,10 @@ namespace SparkleLib {
|
|||
if (Nick.Length > 9)
|
||||
Nick = Nick.Substring (0, 9);
|
||||
|
||||
// TODO: Remove these hardcoded values
|
||||
Channel = "#sparkletest";
|
||||
Server = "irc.gnome.org";
|
||||
// Channel = "#sparkletest";
|
||||
// Server = "irc.gnome.org";
|
||||
Channel = channel;
|
||||
Server = server;
|
||||
|
||||
Client = new IrcClient () {
|
||||
PingTimeout = 120,
|
||||
|
|
|
@ -832,6 +832,15 @@ namespace SparkleLib {
|
|||
_IsPushing = true;
|
||||
|
||||
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)
|
||||
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;
|
||||
_IsPushing = false;
|
||||
|
||||
if (Process.ExitCode != 0) {
|
||||
if (process.ExitCode != 0) {
|
||||
|
||||
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] Pushing failed.");
|
||||
|
||||
|
@ -901,7 +910,9 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
};
|
||||
Process.Start ();
|
||||
|
||||
process.Start ();
|
||||
process.WaitForExit ();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue