sapling/contrib/chg
Jun Wu 997125affe chg: forward SIGINT, SIGHUP to process group
These signals are meant to send to a process group, instead of a single
process: SIGINT is usually emitted by the terminal and sent to the process
group. SIGHUP usually happens to a process group if termination of a process
causes that process group to become orphaned.

Before this patch, chg will only forward these signals to the single server
process. This patch changes it to the server process group.

This will allow us to properly kill processes started by the forked server
process, like a ssh process. The behavior difference can be observed by
setting SSH_ASKPASS to a dummy script doing "sleep 100" and then run
"chg push ssh://dest-need-password-auth". Before this patch, the first Ctrl+C
will kill the hg process while ssh-askpass and ssh will remain alive. This
patch will make sure they are killed properly.
2016-07-17 22:55:47 +01:00
..
chg.1 chg: remove manual reload logic 2016-03-10 00:12:33 +00:00
chg.c chg: forward SIGINT, SIGHUP to process group 2016-07-17 22:55:47 +01:00
hgclient.c chg: handle EOF reading data block 2016-07-18 18:55:06 +01:00
hgclient.h chg: add pgid to hgclient struct 2016-07-17 23:05:59 +01:00
Makefile chg: allows default hg path to be overridden 2016-03-20 15:43:20 -07:00
README chg: change default connect timeout to 60 seconds 2016-06-15 21:36:31 +01:00
util.c chg: extract the logic of setting FD_CLOEXEC to a utility function 2016-04-11 00:17:17 +01:00
util.h chg: silence warning of unused parameter 'sig' 2016-06-28 22:39:06 +09:00

cHg
===

A fast client for Mercurial command server running on Unix.

Install:

 $ make
 $ make install

Usage:

 $ chg help                 # show help of Mercurial
 $ alias hg=chg             # replace hg command
 $ chg --kill-chg-daemon    # terminate background server

Environment variables:

Although cHg tries to update environment variables, some of them cannot be
changed after spawning the server. The following variables are specially
handled:

 * configuration files are reloaded automatically by default.
 * CHGHG or HG specifies the path to the hg executable spawned as the
   background command server.

The following variables are available for testing:

 * CHGDEBUG enables debug messages.
 * CHGSOCKNAME specifies the socket path of the background cmdserver.
 * CHGTIMEOUT specifies how many seconds chg will wait before giving up
   connecting to a cmdserver. If it is 0, chg will wait forever. Default: 60