git: write error outputs to the debug.log for easier debugging

This commit is contained in:
Hylke Bons 2012-04-17 11:05:47 +02:00
parent d542f3e75a
commit 5829bf4622
2 changed files with 16 additions and 6 deletions

View file

@ -117,8 +117,12 @@ namespace SparkleLib.Git {
else else
// "Compressing objects" stage // "Compressing objects" stage
number = (number / 100 * 20); number = (number / 100 * 20);
} else {
SparkleHelpers.DebugInfo ("Fetcher", line);
} }
if (number >= percentage) { if (number >= percentage) {
percentage = number; percentage = number;

View file

@ -238,8 +238,12 @@ namespace SparkleLib.Git {
speed = speed.Replace ("MB/s", "ᴍʙ/s"); speed = speed.Replace ("MB/s", "ᴍʙ/s");
} }
} }
} else {
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] " + line);
} }
if (number >= percentage) { if (number >= percentage) {
percentage = number; percentage = number;
base.OnProgressChanged (percentage, speed); base.OnProgressChanged (percentage, speed);
@ -295,7 +299,11 @@ namespace SparkleLib.Git {
speed = speed.Replace ("MB/s", "ᴍʙ/s"); speed = speed.Replace ("MB/s", "ᴍʙ/s");
} }
} }
} else {
SparkleHelpers.DebugInfo ("Git", "[" + Name + "] " + line);
} }
if (number >= percentage) { if (number >= percentage) {
percentage = number; percentage = number;
@ -714,8 +722,9 @@ namespace SparkleLib.Git {
{ {
try { try {
foreach (string child_path in Directory.GetDirectories (path)) { foreach (string child_path in Directory.GetDirectories (path)) {
if (child_path.EndsWith (".git") && if (child_path.EndsWith (".git")) {
!child_path.Equals (Path.Combine (LocalPath, ".git"))) { if (child_path.Equals (Path.Combine (LocalPath, ".git")))
continue;
string HEAD_file_path = Path.Combine (child_path, "HEAD"); string HEAD_file_path = Path.Combine (child_path, "HEAD");
@ -725,9 +734,6 @@ namespace SparkleLib.Git {
} }
continue; continue;
} else if (child_path.EndsWith (".git")) {
continue;
} }
PrepareDirectories (child_path); PrepareDirectories (child_path);