comparison hgext/hooklib/changeset_published.py @ 45292:3c2fae87bd5a

templatespec: use new factory functions in hooklib Differential Revision: https://phab.mercurial-scm.org/D8853
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 30 Jul 2020 12:22:41 -0700
parents 4cabeea6d214
children 89a2afe31e82
comparison
equal deleted inserted replaced
45291:c1915cfa8080 45292:3c2fae87bd5a
24 24
25 from mercurial.i18n import _ 25 from mercurial.i18n import _
26 from mercurial import ( 26 from mercurial import (
27 encoding, 27 encoding,
28 error, 28 error,
29 formatter,
29 logcmdutil, 30 logcmdutil,
30 mail, 31 mail,
31 pycompat, 32 pycompat,
32 registrar, 33 registrar,
33 ) 34 )
59 ) 60 )
60 messageidseed = ui.config( 61 messageidseed = ui.config(
61 b'notify_published', b'messageidseed' 62 b'notify_published', b'messageidseed'
62 ) or ui.config(b'notify', b'messageidseed') 63 ) or ui.config(b'notify', b'messageidseed')
63 template = ui.config(b'notify_published', b'template') 64 template = ui.config(b'notify_published', b'template')
64 spec = logcmdutil.templatespec(template, None) 65 spec = formatter.literal_templatespec(template)
65 templater = logcmdutil.changesettemplater(ui, repo, spec) 66 templater = logcmdutil.changesettemplater(ui, repo, spec)
66 ui.pushbuffer() 67 ui.pushbuffer()
67 n = notify.notifier(ui, repo, b'incoming') 68 n = notify.notifier(ui, repo, b'incoming')
68 69
69 subs = set() 70 subs = set()