# HG changeset patch # User Martin von Zweigbergk # Date 1523033597 25200 # Node ID 9b16a67cef56adf1e3c2d176c64660372793aac6 # Parent c4131138eadb232ca5888a0b36d49c7aee18c1df eol: look up partial nodeid as partial nodeid Similar reasoning as the previous patch. For some reason the hook gives us a partial nodeid, so we need to resolve that to a full nodeid. Differential Revision: https://phab.mercurial-scm.org/D3159 diff -r c4131138eadb -r 9b16a67cef56 hgext/eol.py --- a/hgext/eol.py Fri Apr 06 09:43:17 2018 -0700 +++ b/hgext/eol.py Fri Apr 06 09:53:17 2018 -0700 @@ -103,6 +103,7 @@ match, pycompat, registrar, + scmutil, util, ) from mercurial.utils import ( @@ -299,7 +300,8 @@ hook = checkheadshook def preupdate(ui, repo, hooktype, parent1, parent2): - repo.loadeol([parent1]) + p1node = scmutil.resolvepartialhexnodeid(repo, parent1) + repo.loadeol([p1node]) return False def uisetup(ui): diff -r c4131138eadb -r 9b16a67cef56 tests/test-blackbox.t --- a/tests/test-blackbox.t Fri Apr 06 09:43:17 2018 -0700 +++ b/tests/test-blackbox.t Fri Apr 06 09:53:17 2018 -0700 @@ -157,14 +157,13 @@ > # (in addition, keeping it requires extra care for fsmonitor) > eol=! > EOF - $ hg blackbox -l 6 + $ hg blackbox -l 5 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> update (no-chg !) - 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> writing .hg/cache/tags2-visible with 0 tags 1970/01/01 00:00:00 bob @6563da9dcf87b1949716e38ff3e3dfaa3198eb06 (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob) 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> exthook-update: echo hooked finished in * seconds (glob) 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> update exited 0 after * seconds (glob) 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> serve --cmdserver chgunix --address $TESTTMP.chgsock/server.* --daemon-postexec 'chdir:/' (glob) (chg !) - 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 6 + 1970/01/01 00:00:00 bob @d02f48003e62c24e2659d97d30f2a83abe5d5d51 (5000)> blackbox -l 5 log rotation