}
return string.joinv("\n",ret);
}
-
+ public static string queueArrayToString(Array<GitMonitorQueue> list) {
+ var ret = "";
+ for(var i =0; i < list.length; i++) {
+
+ ret += (ret.length > 0 ? ", " : "") + list.index(i).vname;
+ }
+ return ret;
+
+ }
}
break;
}
}
-
+ print( "ADD : %s\n", GitMonitorQueue.queueArrayToString(add_files));
+ print( "REMOVE FILES: %s\n", GitMonitorQueue.queueArrayToString(remove_files));
//repo.debug = 1;
// these can fail... at present... as we wildcard stuff.
- stdout.printf("ADD : %u files\n" , add_files.length);
-
+
// make sure added files do not get removed.. ??
/*
var remove_files_f = new Array<GitMonitorQueue>();
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));
+
// make sure monitoring is paused so it does not recursively pick up
// deletions
// -- DO STUFF..
try {
- repo.add(add_files);
+ repo.add(add_files_f);
} catch(Error e) {
failure += e.message;
}
try {
success += repo.commit(
GitMonitorQueue.messageToString(messages),
- add_files
+ add_files_f
);
success += repo.push();
this.lastAdd = new DateTime.now(new TimeZone.local());
var cmd_s = new GitMonitorQueue(src);
- var cmd_d = new GitMonitorQueue(src);
+ var cmd_d = new GitMonitorQueue(dest);
if (cmd_d.gitpath != cmd_s.gitpath) {
return;
}
-
+
cmd_s.action = "rm";
this.queue.append_val(cmd_s);
-
-
-
+
cmd_d.action = "add";
this.queue.append_val(cmd_d);