debug: remove an 'if ui.debug()' that is not doing anything
ui.debug() does not return a value.
Differential Revision: https://phab.mercurial-scm.org/D1719
paper: minor adjustments to table styles
Adding a bit of padding to table columns on e.g. /log means content and headers
are better aligned: headers already have this padding.
Right margin is removed from #changesetEntry th because elements with display:
table-cell (such as <th>) ignore margins anyway.
filemerge: only raise InMemoryMergeConflictsError when running _xmerge
The old code here was overly broad and would raise in cases when we didn't end
up calling `xmerge` and resolved using an internal tool (such as when
`premerge=True`).
Instead, let's swap out _xmerge if IMM is enabled and have the new tool raise
when called, which is the behavior we want.
Differential Revision: https://phab.mercurial-scm.org/D1739
journal: use pager
journal output is long and should use a pager.
Differential Revision: https://phab.mercurial-scm.org/D1740
commandserver: unblock SIGCHLD
This enables the SIGCHLD handler to work properly if some buggy program
started chg server with SIGCHLD blocked.
A test of this probably requires C code, but we don't have such kind of
tests already. Since this is a simple and clear fix, I'm leaving it as
"untested" but I did a manual test and there were no longer zombie workers.
Differential Revision: https://phab.mercurial-scm.org/D1737
osutil: add a function to unblock signals
Signals could be blocked by something like:
#include <unistd.h>
#include <signal.h>
int main(int argc, char * const argv[]) {
sigset_t set;
sigfillset(&set);
sigprocmask(SIG_BLOCK, &set, NULL);
execv("/bin/hg", argv);
return 0;
}
One of the problems is if SIGCHLD is blocked, chgserver would not reap
zombie workers since it depends on SIGCHLD handler entirely.
While it's the parent process to blame but it seems a good idea to just
unblock the signal from hg. FWIW git does that for SIGPIPE already [1].
Unfortunately Python 2 does not reset or provide APIs to change signal
masks. Therefore let's add one in osutil. Note: Python 3.3 introduced
`signal.pthread_sigmask` which solves the problem.
`sigprocmask` is part of POSIX [2] so there is no feature testing in
`setup.py`.
[1]: https://github.com/git/git/commit/
7559a1be8a0afb10df41d25e4cf4c5285a5faef1
[2]: http://pubs.opengroup.org/onlinepubs/7908799/xsh/sigprocmask.html
Differential Revision: https://phab.mercurial-scm.org/D1736