Show More
@@ -0,0 +1,36 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | "$TESTDIR/hghave" inotify || exit 80 | |||
|
4 | ||||
|
5 | hg init | |||
|
6 | ||||
|
7 | touch a b c d e f | |||
|
8 | ||||
|
9 | echo "[extensions]" >> $HGRCPATH | |||
|
10 | echo "inotify=" >> $HGRCPATH | |||
|
11 | echo inserv1 | |||
|
12 | ||||
|
13 | echo % inserve | |||
|
14 | hg inserve -d --pid-file=hg.pid 2>&1 | |||
|
15 | cat hg.pid >> "$DAEMON_PIDS" | |||
|
16 | ||||
|
17 | hg ci -Am m | |||
|
18 | ||||
|
19 | ||||
|
20 | # let the daemon finish its stuff | |||
|
21 | sleep 1 | |||
|
22 | ||||
|
23 | #Need to test all file opperations | |||
|
24 | hg rm a | |||
|
25 | rm b | |||
|
26 | echo c >> c | |||
|
27 | touch g | |||
|
28 | hg add g | |||
|
29 | hg mv e h | |||
|
30 | hg status | |||
|
31 | ||||
|
32 | ||||
|
33 | sleep 5 | |||
|
34 | echo "Are we able to kill the service? if not, the service died on some error" | |||
|
35 | kill `cat hg.pid` | |||
|
36 |
@@ -0,0 +1,16 b'' | |||||
|
1 | inserv1 | |||
|
2 | % inserve | |||
|
3 | adding a | |||
|
4 | adding b | |||
|
5 | adding c | |||
|
6 | adding d | |||
|
7 | adding e | |||
|
8 | adding f | |||
|
9 | adding hg.pid | |||
|
10 | M c | |||
|
11 | A g | |||
|
12 | A h | |||
|
13 | R a | |||
|
14 | R e | |||
|
15 | ! b | |||
|
16 | Are we able to kill the service? if not, the service died on some error |
@@ -337,10 +337,11 b' class Watcher(object):' | |||||
337 | for wfn, state in ds.iteritems(): |
|
337 | for wfn, state in ds.iteritems(): | |
338 | if not wfn.startswith(wtopdir): |
|
338 | if not wfn.startswith(wtopdir): | |
339 | continue |
|
339 | continue | |
340 | status = state[0] |
|
340 | try: | |
341 | st = self.stat(wfn) |
|
341 | st = self.stat(wfn) | |
342 | if status == 'r' and not st: |
|
342 | except OSError: | |
343 |
|
|
343 | status = state[0] | |
|
344 | self.updatestatus(wfn, None, status=status) | |||
344 | else: |
|
345 | else: | |
345 | self.updatestatus(wfn, st) |
|
346 | self.updatestatus(wfn, st) | |
346 | self.check_deleted('!') |
|
347 | self.check_deleted('!') |
General Comments 0
You need to be logged in to leave comments.
Login now