##// END OF EJS Templates
merge with stable
Benoit Boissinot -
r9898:b5170b8b merge default
parent child Browse files
Show More
@@ -849,9 +849,14 b' def start(ui, dirstate, root, opts):'
849 finally:
849 finally:
850 self.master.shutdown()
850 self.master.shutdown()
851
851
852 runargs = None
853 if 'inserve' not in sys.argv:
852 if 'inserve' not in sys.argv:
854 runargs = [sys.argv[0], 'inserve', '-R', root]
853 runargs = [sys.argv[0], 'inserve', '-R', root]
854 else:
855 runargs = sys.argv[:]
856
857 pidfile = ui.config('inotify', 'pidfile')
858 if opts['daemon'] and pidfile is not None and 'pid-file' not in runargs:
859 runargs.append("--pid-file=%s" % pidfile)
855
860
856 service = service()
861 service = service()
857 logfile = ui.config('inotify', 'log')
862 logfile = ui.config('inotify', 'log')
@@ -571,7 +571,7 b' def service(opts, parentfn=None, initfn='
571 if parentfn:
571 if parentfn:
572 return parentfn(pid)
572 return parentfn(pid)
573 else:
573 else:
574 os._exit(0)
574 return
575
575
576 if initfn:
576 if initfn:
577 initfn()
577 initfn()
@@ -2,7 +2,8 b''
2
2
3 "$TESTDIR/hghave" inotify || exit 80
3 "$TESTDIR/hghave" inotify || exit 80
4
4
5 hg init
5 hg init repo1
6 cd repo1
6
7
7 touch a b c d e
8 touch a b c d e
8 mkdir dir
9 mkdir dir
@@ -10,10 +11,22 b' mkdir dir/bar'
10 touch dir/x dir/y dir/bar/foo
11 touch dir/x dir/y dir/bar/foo
11
12
12 hg ci -Am m
13 hg ci -Am m
14 cd ..
15 hg clone repo1 repo2
13
16
14 echo "[extensions]" >> $HGRCPATH
17 echo "[extensions]" >> $HGRCPATH
15 echo "inotify=" >> $HGRCPATH
18 echo "inotify=" >> $HGRCPATH
16
19
20 cd repo2
21 echo b >> a
22 # check that daemon started automatically works correctly
23 # and make sure that inotify.pidfile works
24 hg --config "inotify.pidfile=../hg2.pid" status
25
26 # make sure that pidfile worked. Output should be silent.
27 kill `cat ../hg2.pid`
28
29 cd ../repo1
17 echo % inserve
30 echo % inserve
18 hg inserve -d --pid-file=hg.pid
31 hg inserve -d --pid-file=hg.pid
19 cat hg.pid >> "$DAEMON_PIDS"
32 cat hg.pid >> "$DAEMON_PIDS"
@@ -20,10 +20,10 b' hg ci -m foo'
20
20
21 cd ..
21 cd ..
22
22
23 hg --config "extensions.inotify=!" clone test test2
23 hg --config "inotify.pidfile=../hg2.pid" clone test test2
24 cat ../hg2.pid >> "$DAEMON_PIDS"
25
24 cd test2
26 cd test2
25 hg inserve -d --pid-file=../hg2.pid
26 cat ../hg2.pid >> "$DAEMON_PIDS"
27 echo bar > bar
27 echo bar > bar
28 hg add
28 hg add
29 hg ci -m bar
29 hg ci -m bar
@@ -1,5 +1,6 b''
1 % fail
1 % fail
2 abort: could not start server: File exists
2 abort: could not start server: File exists
3 could not talk to new inotify server: No such file or directory
3 abort: could not start server: File exists
4 abort: could not start server: File exists
4 % inserve
5 % inserve
5 % status
6 % status
@@ -6,6 +6,9 b' adding dir/bar/foo'
6 adding dir/x
6 adding dir/x
7 adding dir/y
7 adding dir/y
8 adding e
8 adding e
9 updating to branch default
10 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 M a
9 % inserve
12 % inserve
10 ? hg.pid
13 ? hg.pid
11 % clean
14 % clean
General Comments 0
You need to be logged in to leave comments. Login now