Show More
@@ -0,0 +1,32 | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | "$TESTDIR/hghave" inotify || exit 80 | |||
|
4 | ||||
|
5 | hg init | |||
|
6 | ||||
|
7 | touch a | |||
|
8 | mkdir dir | |||
|
9 | touch dir/b | |||
|
10 | touch dir/c | |||
|
11 | ||||
|
12 | echo "[extensions]" >> $HGRCPATH | |||
|
13 | echo "inotify=" >> $HGRCPATH | |||
|
14 | ||||
|
15 | hg add dir/c | |||
|
16 | ||||
|
17 | echo % inserve | |||
|
18 | hg inserve -d --pid-file=hg.pid 2>&1 | |||
|
19 | cat hg.pid >> "$DAEMON_PIDS" | |||
|
20 | ||||
|
21 | hg st | |||
|
22 | ||||
|
23 | echo % moving dir out | |||
|
24 | mv dir ../tmp-test-inotify-issue1542 | |||
|
25 | ||||
|
26 | echo % status | |||
|
27 | hg st | |||
|
28 | ||||
|
29 | sleep 1 | |||
|
30 | echo "Are we able to kill the service? if not, the service died on some error" | |||
|
31 | kill `cat hg.pid` | |||
|
32 |
@@ -0,0 +1,11 | |||||
|
1 | % inserve | |||
|
2 | A dir/c | |||
|
3 | ? a | |||
|
4 | ? dir/b | |||
|
5 | ? hg.pid | |||
|
6 | % moving dir out | |||
|
7 | % status | |||
|
8 | ! dir/c | |||
|
9 | ? a | |||
|
10 | ? hg.pid | |||
|
11 | Are we able to kill the service? if not, the service died on some error |
@@ -304,6 +304,11 class Watcher(object): | |||||
304 | dd[fn] = status |
|
304 | dd[fn] = status | |
305 | else: |
|
305 | else: | |
306 | d.pop(fn, None) |
|
306 | d.pop(fn, None) | |
|
307 | elif not status: | |||
|
308 | # a directory is being removed, check its contents | |||
|
309 | for subfile, b in oldstatus.copy().iteritems(): | |||
|
310 | self.updatestatus(wfn + '/' + subfile, None) | |||
|
311 | ||||
307 |
|
312 | |||
308 | def check_deleted(self, key): |
|
313 | def check_deleted(self, key): | |
309 | # Files that had been deleted but were present in the dirstate |
|
314 | # Files that had been deleted but were present in the dirstate | |
@@ -473,7 +478,6 class Watcher(object): | |||||
473 |
|
478 | |||
474 | if evt.mask & inotify.IN_ISDIR: |
|
479 | if evt.mask & inotify.IN_ISDIR: | |
475 | self.scan(wpath) |
|
480 | self.scan(wpath) | |
476 | else: |
|
|||
477 |
|
|
481 | self.schedule_work(wpath, 'd') | |
478 |
|
482 | |||
479 | def process_modify(self, wpath, evt): |
|
483 | def process_modify(self, wpath, evt): |
General Comments 0
You need to be logged in to leave comments.
Login now