D3159: eol: look up partial nodeid as partial nodeid
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sun Apr 8 12:06:08 EDT 2018
martinvonz updated this revision to Diff 7881.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3159?vs=7784&id=7881
REVISION DETAIL
https://phab.mercurial-scm.org/D3159
AFFECTED FILES
hgext/eol.py
tests/test-blackbox.t
CHANGE DETAILS
diff --git a/tests/test-blackbox.t b/tests/test-blackbox.t
--- a/tests/test-blackbox.t
+++ b/tests/test-blackbox.t
@@ -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
diff --git a/hgext/eol.py b/hgext/eol.py
--- a/hgext/eol.py
+++ b/hgext/eol.py
@@ -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):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list