# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 2015-02-21 05:40:18
# Node ID 28af978c8f13a73180eb47c3e55ae92f588579d9
# Parent  a35b59d4df332e8e730fa906d5358d57f25f97a1

extensions: indicate loaded for an immediately called afterload callback

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 @@ def afterloaded(extension, callback):
     '''
 
     if extension in _extensions:
-        callback(loaded=False)
+        callback(loaded=True)
     else:
         _aftercallbacks.setdefault(extension, []).append(callback)