comparison 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
comparison
equal deleted inserted replaced
37506:c4131138eadb 37507:9b16a67cef56
101 error as errormod, 101 error as errormod,
102 extensions, 102 extensions,
103 match, 103 match,
104 pycompat, 104 pycompat,
105 registrar, 105 registrar,
106 scmutil,
106 util, 107 util,
107 ) 108 )
108 from mercurial.utils import ( 109 from mercurial.utils import (
109 stringutil, 110 stringutil,
110 ) 111 )
297 298
298 # "checkheadshook" used to be called "hook" 299 # "checkheadshook" used to be called "hook"
299 hook = checkheadshook 300 hook = checkheadshook
300 301
301 def preupdate(ui, repo, hooktype, parent1, parent2): 302 def preupdate(ui, repo, hooktype, parent1, parent2):
302 repo.loadeol([parent1]) 303 p1node = scmutil.resolvepartialhexnodeid(repo, parent1)
304 repo.loadeol([p1node])
303 return False 305 return False
304 306
305 def uisetup(ui): 307 def uisetup(ui):
306 ui.setconfig('hooks', 'preupdate.eol', preupdate, 'eol') 308 ui.setconfig('hooks', 'preupdate.eol', preupdate, 'eol')
307 309