templatespec: use new factory functions in hooklib
Differential Revision: https://phab.mercurial-scm.org/D8853
--- a/hgext/hooklib/changeset_obsoleted.py Mon Jul 20 22:43:33 2020 -0700
+++ b/hgext/hooklib/changeset_obsoleted.py Thu Jul 30 12:22:41 2020 -0700
@@ -26,6 +26,7 @@
from mercurial import (
encoding,
error,
+ formatter,
logcmdutil,
mail,
obsutil,
@@ -62,7 +63,7 @@
b'notify_obsoleted', b'messageidseed'
) or ui.config(b'notify', b'messageidseed')
template = ui.config(b'notify_obsoleted', b'template')
- spec = logcmdutil.templatespec(template, None)
+ spec = formatter.literal_templatespec(template)
templater = logcmdutil.changesettemplater(ui, repo, spec)
ui.pushbuffer()
n = notify.notifier(ui, repo, b'incoming')
--- a/hgext/hooklib/changeset_published.py Mon Jul 20 22:43:33 2020 -0700
+++ b/hgext/hooklib/changeset_published.py Thu Jul 30 12:22:41 2020 -0700
@@ -26,6 +26,7 @@
from mercurial import (
encoding,
error,
+ formatter,
logcmdutil,
mail,
pycompat,
@@ -61,7 +62,7 @@
b'notify_published', b'messageidseed'
) or ui.config(b'notify', b'messageidseed')
template = ui.config(b'notify_published', b'template')
- spec = logcmdutil.templatespec(template, None)
+ spec = formatter.literal_templatespec(template)
templater = logcmdutil.changesettemplater(ui, repo, spec)
ui.pushbuffer()
n = notify.notifier(ui, repo, b'incoming')