[PATCH] extensions: indicate loaded for an immediately called afterload callback

Augie Fackler raf at durin42.com
Wed Feb 25 08:38:58 CST 2015


On Sun, Feb 22, 2015 at 12:34:44PM -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1424497218 18000
> #      Sat Feb 21 00:40:18 2015 -0500
> # Node ID 6e555df5c9f23a601df8f511ba29efb17b9bdce3
> # Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
> extensions: indicate loaded for an immediately called afterload callback

Queued, thanks.

>
> Otherwise, there's no way to tell between the immediate callback when it is
> already loaded, and when the extension is not loaded at all.
>
> diff --git a/mercurial/extensions.py b/mercurial/extensions.py
> --- a/mercurial/extensions.py
> +++ b/mercurial/extensions.py
> @@ -148,7 +148,7 @@
>      '''
>
>      if extension in _extensions:
> -        callback(loaded=False)
> +        callback(loaded=True)
>      else:
>          _aftercallbacks.setdefault(extension, []).append(callback)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list