Patchwork D3159: eol: look up partial nodeid as partial nodeid

login
register
mail settings
Submitter phabricator
Date April 6, 2018, 4:54 p.m.
Message ID <differential-rev-PHID-DREV-zzko53fmvunvykrflrez-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30440/
State Superseded
Headers show

Comments

phabricator - April 6, 2018, 4:54 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3159

AFFECTED FILES
  hgext/eol.py
  tests/test-blackbox.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

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
@@ -299,7 +299,8 @@ 
 hook = checkheadshook
 
 def preupdate(ui, repo, hooktype, parent1, parent2):
-    repo.loadeol([parent1])
+    p1node = repo.unfiltered().changelog._partialmatch(parent1)
+    repo.loadeol([p1node])
     return False
 
 def uisetup(ui):