# Date 1538623011 14400
# Wed Oct 03 23:16:51 2018 -0400
# Node ID a0b0b23fe40cf7b5884241a6ea4184410c51f543
# Parent 190ca11be165b13572b7e6d920cde955ec29f547
hglib: handle additional arguments to extensions.load()
This corresponds to hg 1ab185c78cc3.
diff --git a/tortoisehg/util/hglib.py b/tortoisehg/util/hglib.py
--- a/tortoisehg/util/hglib.py
+++ b/tortoisehg/util/hglib.py
@@ -28,6 +28,7 @@
merge as mergemod,
patch as patchmod,
pathutil,
+ pycompat,
rcutil,
revset as revsetmod,
revsetlang,
@@ -339,7 +340,8 @@
exts['perfarce'] = _('perfarce is incompatible with hgsubversion')
return exts
-def _loadextensionwithblacklist(orig, ui, name, path):
+def _loadextensionwithblacklist(orig, ui, name, path, log=lambda *a: None,
+ loadingtime=None):
if name.startswith('hgext.') or name.startswith('hgext/'):
shortname = name[6:]
else:
@@ -347,7 +349,10 @@
if shortname in _extensions_blacklist and not path: # only bundled ext
return
- return orig(ui, name, path)
+ if b'log' in pycompat.getargspec(orig).args:
+ return orig(ui, name, path, log, loadingtime) # >= 4.8
+ else:
+ return orig(ui, name, path) # < 4.8
def _wrapextensionsloader():
"""Wrap extensions.load(ui, name) for blacklist to take effect"""