Show More
@@ -13,7 +13,6 b' Usage:' | |||||
13 | $ chg help # show help of Mercurial |
|
13 | $ chg help # show help of Mercurial | |
14 | $ alias hg=chg # replace hg command |
|
14 | $ alias hg=chg # replace hg command | |
15 | $ chg --kill-chg-daemon # terminate background server |
|
15 | $ chg --kill-chg-daemon # terminate background server | |
16 | $ chg --reload-chg-daemon # reload configuration files |
|
|||
17 |
|
16 | |||
18 | Environment variables: |
|
17 | Environment variables: | |
19 |
|
18 | |||
@@ -21,8 +20,7 b' Although cHg tries to update environment' | |||||
21 | changed after spawning the server. The following variables are specially |
|
20 | changed after spawning the server. The following variables are specially | |
22 | handled: |
|
21 | handled: | |
23 |
|
22 | |||
24 |
* configuration files are reloaded |
|
23 | * configuration files are reloaded automatically by default. | |
25 | some behaviors won't change correctly. |
|
|||
26 | * CHGHG or HG specifies the path to the hg executable spawned as the |
|
24 | * CHGHG or HG specifies the path to the hg executable spawned as the | |
27 | background command server. |
|
25 | background command server. | |
28 |
|
26 |
@@ -35,9 +35,6 b' command. Additionally it accepts the fol' | |||||
35 | .TP |
|
35 | .TP | |
36 | .B \-\-kill\-chg\-daemon |
|
36 | .B \-\-kill\-chg\-daemon | |
37 | Terminate the background command servers. |
|
37 | Terminate the background command servers. | |
38 | .TP |
|
|||
39 | .B \-\-reload\-chg\-daemon |
|
|||
40 | Reload configuration files. |
|
|||
41 | .SH SEE ALSO |
|
38 | .SH SEE ALSO | |
42 | .BR hg (1), |
|
39 | .BR hg (1), | |
43 | .SH AUTHOR |
|
40 | .SH AUTHOR |
@@ -539,8 +539,6 b' int main(int argc, const char *argv[], c' | |||||
539 | int sig = 0; |
|
539 | int sig = 0; | |
540 | if (strcmp(argv[1], "--kill-chg-daemon") == 0) |
|
540 | if (strcmp(argv[1], "--kill-chg-daemon") == 0) | |
541 | sig = SIGTERM; |
|
541 | sig = SIGTERM; | |
542 | if (strcmp(argv[1], "--reload-chg-daemon") == 0) |
|
|||
543 | sig = SIGHUP; |
|
|||
544 | if (sig > 0) { |
|
542 | if (sig > 0) { | |
545 | killcmdserver(&opts, sig); |
|
543 | killcmdserver(&opts, sig); | |
546 | return 0; |
|
544 | return 0; |
@@ -28,9 +28,6 b'' | |||||
28 | 'validate' command |
|
28 | 'validate' command | |
29 | reload the config and check if the server is up to date |
|
29 | reload the config and check if the server is up to date | |
30 |
|
30 | |||
31 | 'SIGHUP' signal |
|
|||
32 | reload configuration files |
|
|||
33 |
|
||||
34 | Config |
|
31 | Config | |
35 | ------ |
|
32 | ------ | |
36 |
|
33 | |||
@@ -48,7 +45,6 b' import errno' | |||||
48 | import inspect |
|
45 | import inspect | |
49 | import os |
|
46 | import os | |
50 | import re |
|
47 | import re | |
51 | import signal |
|
|||
52 | import struct |
|
48 | import struct | |
53 | import sys |
|
49 | import sys | |
54 | import threading |
|
50 | import threading | |
@@ -616,7 +612,6 b' class AutoExitMixIn: # use old-style to' | |||||
616 |
|
612 | |||
617 | class chgunixservice(commandserver.unixservice): |
|
613 | class chgunixservice(commandserver.unixservice): | |
618 | def init(self): |
|
614 | def init(self): | |
619 | signal.signal(signal.SIGHUP, self._reloadconfig) |
|
|||
620 | self._inithashstate() |
|
615 | self._inithashstate() | |
621 | class cls(AutoExitMixIn, SocketServer.ForkingMixIn, |
|
616 | class cls(AutoExitMixIn, SocketServer.ForkingMixIn, | |
622 | SocketServer.UnixStreamServer): |
|
617 | SocketServer.UnixStreamServer): | |
@@ -647,9 +642,6 b' class chgunixservice(commandserver.unixs' | |||||
647 | os.symlink(os.path.basename(self.address), tempaddress) |
|
642 | os.symlink(os.path.basename(self.address), tempaddress) | |
648 | util.rename(tempaddress, self.baseaddress) |
|
643 | util.rename(tempaddress, self.baseaddress) | |
649 |
|
644 | |||
650 | def _reloadconfig(self, signum, frame): |
|
|||
651 | self.ui = self.server.ui = _renewui(self.ui) |
|
|||
652 |
|
||||
653 | def run(self): |
|
645 | def run(self): | |
654 | try: |
|
646 | try: | |
655 | self.server.serve_forever() |
|
647 | self.server.serve_forever() |
General Comments 0
You need to be logged in to leave comments.
Login now