projects
/
gitlive
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed MergeBranch.bjsMergeBranch.vala
[gitlive]
/
Monitor.vala
diff --git
a/Monitor.vala
b/Monitor.vala
index
2d049ca
..
5b12963
100644
(file)
--- a/
Monitor.vala
+++ b/
Monitor.vala
@@
-68,7
+68,12
@@
public delegate void onEventHander (FileMonitor fm, File f_orig, File of_orig, F
*
*/
*
*/
-public class Monitor : Object
+public abstract class gitMonitorBase : Object
+{
+ public abstract void monitor(string path, int depth = 0);
+}
+
+public class Monitor : gitMonitorBase
{
{
@@
-136,10
+141,10
@@
public class Monitor : Object
*
*
*/
*
*
*/
- public void monitor(string path, int depth = 0)
+ public
override
void monitor(string path, int depth = 0)
{
{
-
stdout.printf
("ADD: (%d): %s\n", depth, path);
+
//GLib.debug
("ADD: (%d): %s\n", depth, path);
//depth = typeof(depth) == 'number' ? depth *1 : 0;
depth = depth > 0 ? depth *1 : 0;
//depth = typeof(depth) == 'number' ? depth *1 : 0;
depth = depth > 0 ? depth *1 : 0;
@@
-161,7
+166,8
@@
public class Monitor : Object
this.monitors.append_val(fm);
} catch (Error e) {
this.monitors.append_val(fm);
} catch (Error e) {
- GLib.debug("Error adding monitor: %s", e.message);
+ GLib.debug("Error adding monitor: %s\n", e.message);
+ GLib.debug("Try: \n\nsudo su\necho 512 > /proc/sys/fs/inotify/max_user_instances\n");
// FIXME -- show error? do nothing..
}
// print("ADD path " + depth + ' ' + path);
// FIXME -- show error? do nothing..
}
// print("ADD path " + depth + ' ' + path);
@@
-328,12
+334,12
@@
public class Monitor : Object
case FileMonitorEvent.MOVED_OUT: // eg. chmod/chatt
case FileMonitorEvent.RENAMED: // eg. chmod/chatt
case FileMonitorEvent.MOVED_OUT: // eg. chmod/chatt
case FileMonitorEvent.RENAMED: // eg. chmod/chatt
-
var of = this.realpath(of_orig);
-
var dest = new MonitorNamePathDir(
-
of.get_basename(),
-
of.get_path(),
-
Path.get_dirname(of.get_path())
-
);
+ var of = this.realpath(of_orig);
+ var dest = new MonitorNamePathDir(
+ of.get_basename(),
+ of.get_path(),
+ Path.get_dirname(of.get_path())
+ );
src.action = "moved";
dest.action = "moved";
src.action = "moved";
dest.action = "moved";