[PATCH RFC] readonly: experimental extension to mark repositories as read only
pierre-yves.david at ens-lyon.org
Sun Mar 27 14:44:27 EDT 2016
On 03/20/2016 05:43 PM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1458521001 25200
> # Sun Mar 20 17:43:21 2016 -0700
> # Node ID e31e1b3ad7fcdff919d7cae2234b00de986eefed
> # Parent 0e7a929754aa4510e946dec8eba1cc79f9558361
> readonly: experimental extension to mark repositories as read only
> (I HAVEN'T AUDITED THE CODE FOR CODE STYLE COMPLIANCE, ETC. THIS
> IS AN RFC PATCH.)
> This extension allows repositories to be marked as read only by
> creating a file at a well-defined location. This is enforced by
> hooks that run during operations that change the repo.
> An individual repository can be marked read only by creating a
> .hg/readonly file. Or, a global read only file can be defined so all
> repos are marked read only. This is useful for servers when undergoing
> maintenance, for example. If the read only file has content, it will
> be printed to the client, informing them why the repository is
> read only.
> This extension was originally written by me for use at Mozilla. We've
> had it deployed for several months and believe it is generally useful
> outside of Mozilla, especially in server environments.
> diff --git a/hgext/readonly.py b/hgext/readonly.py
> new file mode 100644
> --- /dev/null
> +++ b/hgext/readonly.py
> @@ -0,0 +1,78 @@
> +# readonly.py - Make repositories read only
> +# Copyright 2016 Gregory Szorc <gregory.szorc at gmail.com>
> +# This software may be used and distributed according to the terms of the
> +# GNU General Public License version 2 or any later version.
> +from __future__ import absolute_import
> +'''Ability to make repositories read only (EXPERIMENTAL)
According to our new shinny process, experimental extension need to
fulfill multiple criteria and multiple information need to be updated on
the wiki. Can you add an entry for that one before we move forward?
More information about the Mercurial-devel