Mercurial > public > mercurial-scm > hg
comparison hgext/hooklib/changeset_obsoleted.py @ 45268: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 | 04ef381000a8 |
children | 8b700e9b9fc2 |
comparison
equal
deleted
inserted
replaced
45267:c1915cfa8080 | 45268: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 obsutil, | 32 obsutil, |
32 pycompat, | 33 pycompat, |
33 registrar, | 34 registrar, |
60 ) | 61 ) |
61 messageidseed = ui.config( | 62 messageidseed = ui.config( |
62 b'notify_obsoleted', b'messageidseed' | 63 b'notify_obsoleted', b'messageidseed' |
63 ) or ui.config(b'notify', b'messageidseed') | 64 ) or ui.config(b'notify', b'messageidseed') |
64 template = ui.config(b'notify_obsoleted', b'template') | 65 template = ui.config(b'notify_obsoleted', b'template') |
65 spec = logcmdutil.templatespec(template, None) | 66 spec = formatter.literal_templatespec(template) |
66 templater = logcmdutil.changesettemplater(ui, repo, spec) | 67 templater = logcmdutil.changesettemplater(ui, repo, spec) |
67 ui.pushbuffer() | 68 ui.pushbuffer() |
68 n = notify.notifier(ui, repo, b'incoming') | 69 n = notify.notifier(ui, repo, b'incoming') |
69 | 70 |
70 subs = set() | 71 subs = set() |