[PATCH 10 of 10 shelve-ext v3] shelve: disable inhibit for shelving period

Sean Farley sean at farley.io
Mon Feb 13 15:08:39 EST 2017


Kostia Balytskyi <ikostia at fb.com> writes:

> # HG changeset patch
> # User Kostia Balytskyi <ikostia at fb.com>
> # Date 1484838335 28800
> #      Thu Jan 19 07:05:35 2017 -0800
> # Node ID 6a7e7659886d35dfdc4d7d5efb3ef8479ae35367
> # Parent  088c9191d662d5c0003310119c51540926a815f7
> shelve: disable inhibit for shelving period
>
> While shelving, we're creating a new commit and updating to it.
> If inhibit is enabled, it will try to add this commit to an
> inhibition set, which is not necessary (we're creating a marker
> right after we perform this operation). Thus, disabling inhibit
> speeds things up a bit.
>
> diff --git a/hgext/shelve.py b/hgext/shelve.py
> --- a/hgext/shelve.py
> +++ b/hgext/shelve.py
> @@ -447,8 +447,12 @@ def _docreatecmd(ui, repo, pats, opts):
>          opts['message'] = desc
>  
>      lock = tr = activebookmark = None
> +    _obsinhibit = _notset = object()
>      try:
>          lock = repo.lock()
> +        if util.safehasattr(repo, '_obsinhibit'):
> +            _obsinhibit = getattr(repo, '_obsinhibit')

I didn't see any mention of inhibit in Mercurial? Is this a FB
extension? If so, should this logic be in hgext/shelve.py or in the FB
extension? (honest question)


More information about the Mercurial-devel mailing list