[PATCH] commit: document the ui.allowemptycommit option
Augie Fackler
raf at durin42.com
Thu Dec 31 10:14:00 CST 2015
On Wed, Dec 30, 2015 at 03:16:01PM -0500, Jordi GutiƩrrez Hermoso wrote:
> # HG changeset patch
> # User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
> # Date 1451506458 18000
> # Wed Dec 30 15:14:18 2015 -0500
> # Node ID 36b8f8e0a55be1e6ad3356d4b0177712ba62617b
> # Parent 23541bdd1610c08af247f9c8719045cf247ce541
> commit: document the ui.allowemptycommit option
This patch needs to update localrepo.py:1604 and no longer claim
allowemptycommit is an internal config option if it's going to
document that as a public thing. I'm assuming it's not documented for
good reason...
>
> It may be nice to document the situations in which other commands
> create empty commits, but I did not think it was necessary to go into
> that much detail.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -1581,6 +1581,10 @@ def commit(ui, repo, *pats, **opts):
> commit fails, you will find a backup of your message in
> ``.hg/last-message.txt``.
>
> + Empty commits by default are not allowed. You may enable the
> + creation of empty commits via the ``ui.allowemptycommit``
> + configuration option (see :hg:`help config`).
> +
> The --close-branch flag can be used to mark the current branch
> head closed. When all heads of a branch are closed, the branch
> will be considered closed and no longer listed.
> diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
> --- a/mercurial/help/config.txt
> +++ b/mercurial/help/config.txt
> @@ -1441,6 +1441,13 @@ user or service running Mercurial.
>
> User interface controls.
>
> +``allowemptycommit``
> + Whether to allow creation of empty commits by the ordinary ``hg
> + commit`` command. An empty commit is a commit that does not modify
> + any files and is not a merge commit. Note that some other commands
> + may still produce empty commits regardless of this setting.
> + (default: False)
> +
> ``archivemeta``
> Whether to include the .hg_archival.txt file containing meta data
> (hashes for the repository base and for tip) in archives created
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list