projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2f4593
)
GitMonitor.vala
author
john
<john@roojs.com>
Thu, 10 May 2018 09:11:42 +0000
(17:11 +0800)
committer
john
<john@roojs.com>
Thu, 10 May 2018 09:11:42 +0000
(17:11 +0800)
GitMonitor.vala
patch
|
blob
|
history
diff --git
a/GitMonitor.vala
b/GitMonitor.vala
index
f858c93
..
e149696
100644
(file)
--- a/
GitMonitor.vala
+++ b/
GitMonitor.vala
@@
-300,7
+300,7
@@
public class GitMonitor : Monitor
notification.set_timeout(5);
notification.show();
} catch(Error e) {
notification.set_timeout(5);
notification.show();
} catch(Error e) {
-
print
("Error %s\n",e.message);
+
GLib.debug
("Error %s\n",e.message);
}
return false; // do not keep doing this..
}
return false; // do not keep doing this..
@@
-361,7
+361,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
-
print
("GitMonitor.runQueue\n");
+
GLib.debug
("GitMonitor.runQueue\n");
this.queueRunning = true;
this.queueRunning = true;
@@
-389,21
+389,21
@@
public class GitMonitor : Monitor
this.paused = true;
this.paused = true;
-
print
("GitMonitor.runQueue - creating repos\n");
+
GLib.debug
("GitMonitor.runQueue - creating repos\n");
for(var i = 0; i < cmds.length; i++) {
var cmd = cmds.index(i);
var gitpath = cmd.gitpath;
for(var i = 0; i < cmds.length; i++) {
var cmd = cmds.index(i);
var gitpath = cmd.gitpath;
-
stdout.printf
("GitMonitor.runQueue - finding %s\n", cmd.gitpath);
+
GLib.debug
("GitMonitor.runQueue - finding %s\n", cmd.gitpath);
var ix = GitRepo.indexOf(repo_list, cmd.gitpath);
if (ix < 0) {
repo_list.append_val(new GitRepo( gitpath ));
ix = GitRepo.indexOf(repo_list, cmd.gitpath);
}
var ix = GitRepo.indexOf(repo_list, cmd.gitpath);
if (ix < 0) {
repo_list.append_val(new GitRepo( gitpath ));
ix = GitRepo.indexOf(repo_list, cmd.gitpath);
}
-
stdout.printf
("GitMonitor.runQueue - adding to repolist %d\n", ix);
+
GLib.debug
("GitMonitor.runQueue - adding to repolist %d\n", ix);
//if (typeof(repo_list[gitpath]) == 'undefined') {
// repo_list[gitpath] = new imports.Scm.Git.Repo.Repo( { repopath : gitpath });
//if (typeof(repo_list[gitpath]) == 'undefined') {
// repo_list[gitpath] = new imports.Scm.Git.Repo.Repo( { repopath : gitpath });
@@
-416,7
+416,7
@@
public class GitMonitor : Monitor
this.paused = false;
// build add, remove and commit message list..
this.paused = false;
// build add, remove and commit message list..
-
print
("GitMonitor.runQueue - creating actions\n");
+
GLib.debug
("GitMonitor.runQueue - creating actions\n");
for(var i = 0;i < repo_list.length;i++) {
for(var i = 0;i < repo_list.length;i++) {
@@
-471,8
+471,8
@@
public class GitMonitor : Monitor
break;
}
}
break;
}
}
-
print
( "ADD : %s\n", GitMonitorQueue.queueArrayToString(add_files));
-
print
( "REMOVE FILES: %s\n", GitMonitorQueue.queueArrayToString(remove_files));
+
GLib.debug
( "ADD : %s\n", GitMonitorQueue.queueArrayToString(add_files));
+
GLib.debug
( "REMOVE FILES: %s\n", GitMonitorQueue.queueArrayToString(remove_files));
//repo.debug = 1;
// these can fail... at present... as we wildcard stuff.
//repo.debug = 1;
// these can fail... at present... as we wildcard stuff.
@@
-517,8
+517,8
@@
public class GitMonitor : Monitor
add_files_f.append_val(add_files.index(ii));
};
add_files_f.append_val(add_files.index(ii));
};
-
print
( "ADD : %s\n", GitMonitorQueue.queueArrayToString(add_files_f));
-
print
( "REMOVE FILES: %s\n", GitMonitorQueue.queueArrayToString(remove_files_f));
+
GLib.debug
( "ADD : %s\n", GitMonitorQueue.queueArrayToString(add_files_f));
+
GLib.debug
( "REMOVE FILES: %s\n", GitMonitorQueue.queueArrayToString(remove_files_f));
if (add_files_f.length < 1 && remove_files_f.length < 1) {
continue;
if (add_files_f.length < 1 && remove_files_f.length < 1) {
continue;
@@
-546,7
+546,7
@@
public class GitMonitor : Monitor
this.pauseError(e.message);
return;
failure += e.message;
this.pauseError(e.message);
return;
failure += e.message;
-
print
("Add failed:\n");
+
GLib.debug
("Add failed:\n");
}
try {
repo.remove(remove_files_f);
}
try {
repo.remove(remove_files_f);
@@
-554,7
+554,7
@@
public class GitMonitor : Monitor
this.pauseError(e.message);
return;
failure += e.message;
this.pauseError(e.message);
return;
failure += e.message;
-
print
("Remove failed:\n");
+
GLib.debug
("Remove failed:\n");
}
}
@@
-570,7
+570,7
@@
public class GitMonitor : Monitor
// if the error is 'nothing to commit, working tree clean'
// then it's not an error, - just continue;
if (/nothing to commit, working tree clean/.match(e.message)) {
// if the error is 'nothing to commit, working tree clean'
// then it's not an error, - just continue;
if (/nothing to commit, working tree clean/.match(e.message)) {
-
print
("%s\n",e.message);
+
GLib.debug
("%s\n",e.message);
success += e.message;
this.paused = false;
continue;
success += e.message;
this.paused = false;
continue;
@@
-614,7
+614,7
@@
public class GitMonitor : Monitor
// this.pauseError();
//}
} catch(Error e) {
// this.pauseError();
//}
} catch(Error e) {
-
print
(e.message);
+
GLib.debug
(e.message);
}
this.queueRunning = false;
}
this.queueRunning = false;
@@
-652,7
+652,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
- print("GitMonitor.onChangedHint\n");
+ GLib.debug("GitMonitor.onChangedHint\n");
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
@@
-693,7
+693,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
- print("GitMonitor.onDeleted\n");
+ GLib.debug("GitMonitor.onDeleted\n");
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
if (cmd.shouldIgnore()) {
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
if (cmd.shouldIgnore()) {
@@
-717,7
+717,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
- print("GitMonitor.onCreated\n");
+ GLib.debug("GitMonitor.onCreated\n");
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
if (cmd.shouldIgnore()) {
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd = new GitMonitorQueue(src);
if (cmd.shouldIgnore()) {
@@
-748,7
+748,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
- print("GitMonitor.onAttributeChanged\n");
+ GLib.debug("GitMonitor.onAttributeChanged\n");
if (src.dir == GitMonitor.gitlive) {
return; // attribute on top level..
}
if (src.dir == GitMonitor.gitlive) {
return; // attribute on top level..
}
@@
-773,7
+773,7
@@
public class GitMonitor : Monitor
if (this.paused) {
return;
}
if (this.paused) {
return;
}
- print("GitMonitor.onMoved\n");
+ GLib.debug("GitMonitor.onMoved\n");
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd_s = new GitMonitorQueue(src);
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd_s = new GitMonitorQueue(src);
@@
-803,13
+803,13
@@
public class GitMonitor : Monitor
}
}
-
print
("RM: %s\n", cmd_s.vname);
+
GLib.debug
("RM: %s\n", cmd_s.vname);
cmd_s.action = "rm";
this.queue.append_val(cmd_s);
cmd_s.action = "rm";
this.queue.append_val(cmd_s);
-
print
("ADD: %s\n", cmd_d.vname);
+
GLib.debug
("ADD: %s\n", cmd_d.vname);
cmd_d.action = "add";
this.queue.append_val(cmd_d);
cmd_d.action = "add";
this.queue.append_val(cmd_d);