# HG changeset patch # User Martin von Zweigbergk # Date 1596136961 25200 # Node ID 3c2fae87bd5a3d1031d7c2d9f60e70c03bbf64e0 # Parent c1915cfa808069c4a7c8204ead08dc764723e2bc templatespec: use new factory functions in hooklib Differential Revision: https://phab.mercurial-scm.org/D8853 diff -r c1915cfa8080 -r 3c2fae87bd5a hgext/hooklib/changeset_obsoleted.py --- 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') diff -r c1915cfa8080 -r 3c2fae87bd5a hgext/hooklib/changeset_published.py --- 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')