view mercurial/help/hgrc.5.txt @ 31956:c13ff31818b0

ui: add special-purpose atexit functionality In spite of its longstanding use, Python's built-in atexit code is not suitable for Mercurial's purposes, for several reasons: * Handlers run after application code has finished. * Because of this, the code that runs handlers swallows exceptions (since there's no possible stacktrace to associate errors with). If we're lucky, we'll get something spat out to stderr (if stderr still works), which of course isn't any use in a big deployment where it's important that exceptions get logged and aggregated. * Mercurial's current atexit handlers make unfortunate assumptions about process state (specifically stdio) that, coupled with the above problems, make it impossible to deal with certain categories of error (try "hg status > /dev/full" on a Linux box). * In Python 3, the atexit implementation is completely hidden, so we can't hijack the platform's atexit code to run handlers at a time of our choosing. As a result, here's a perfectly cromulent atexit-like implementation over which we have control. This lets us decide exactly when the handlers run (after each request has completed), and control what the process state is when that occurs (and afterwards).
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 11 Apr 2017 14:54:12 -0700
parents 75149f84eac7
children 854a7315603e
line wrap: on
line source

======
 hgrc
======

---------------------------------
configuration files for Mercurial
---------------------------------

:Author:         Bryan O'Sullivan <bos@serpentine.com>
:Organization:   Mercurial
:Manual section: 5
:Manual group:   Mercurial Manual

.. contents::
   :backlinks: top
   :class: htmlonly


Description
===========

.. include:: hgrc.5.gendoc.txt

Author
======
Bryan O'Sullivan <bos@serpentine.com>.

Mercurial was written by Matt Mackall <mpm@selenic.com>.

See Also
========
|hg(1)|_, |hgignore(5)|_

Copying
=======
This manual page is copyright 2005 Bryan O'Sullivan.
Mercurial is copyright 2005-2017 Matt Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.

.. include:: common.txt