diff hgext/eol.py @ 37507:9b16a67cef56

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Apr 2018 09:53:17 -0700
parents f0b6fbea00cf
children 5f8f013e7d52
line wrap: on
line diff
--- 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):