[Updated] D8527: py3: change default priority and length used for sorting hooks to be compatible with python 3
charlesetc (Charles Chamberlain)
phabricator at mercurial-scm.org
Mon May 18 17:14:27 UTC 2020
Closed by commit rHG50416d3d4b65: py3: change default priority and length used for sorting hooks to be compatible… (authored by charlesetc).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8527?vs=21389&id=21424
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8527/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8527
AFFECTED FILES
mercurial/hook.py
CHANGE DETAILS
diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -206,7 +206,7 @@
# in that section uses "_fromuntrusted" as its command.
untrustedhooks = _hookitems(ui, _untrusted=True)
for name, value in untrustedhooks.items():
- trustedvalue = hooks.get(name, (None, None, name, _fromuntrusted))
+ trustedvalue = hooks.get(name, ((), (), name, _fromuntrusted))
if value != trustedvalue:
(lp, lo, lk, lv) = trustedvalue
hooks[name] = (lp, lo, lk, _fromuntrusted)
@@ -222,7 +222,7 @@
continue
priority = ui.configint(b'hooks', b'priority.%s' % name, 0)
- hooks[name] = (-priority, len(hooks), name, cmd)
+ hooks[name] = ((-priority,), (len(hooks),), name, cmd)
return hooks
To: charlesetc, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200518/a560fa87/attachment-0002.html>
More information about the Mercurial-patches
mailing list