Mercurial > hg
changeset 31185:bbb5d2aa0bf0
patchbomb: build patch texts by _getpatchmsgs()
Now _getpatchmsgs() knows revision numbers, which allows us to generate flags
by applying a template to changectx objects.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 25 Feb 2017 18:28:04 +0900 |
parents | e3ab7c717129 |
children | 83fa357edbd5 |
files | hgext/patchbomb.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sat Feb 25 18:25:17 2017 +0900 +++ b/hgext/patchbomb.py Sat Feb 25 18:28:04 2017 +0900 @@ -340,7 +340,7 @@ opts.get('test')) return (msg, subj, diffstat) -def _getpatchmsgs(repo, sender, patches, patchnames=None, **opts): +def _getpatchmsgs(repo, sender, revs, patchnames=None, **opts): """return a list of emails from a list of patches This involves introduction message creation if necessary. @@ -349,6 +349,7 @@ """ ui = repo.ui _charsets = mail._charsets(ui) + patches = list(_getpatches(repo, revs, **opts)) msgs = [] ui.write(_('this patch series consists of %d patches.\n\n') @@ -597,8 +598,7 @@ bundleopts.pop('bundle', None) # already processed msgs = _getbundlemsgs(repo, sender, bundledata, **bundleopts) else: - _patches = list(_getpatches(repo, revs, **opts)) - msgs = _getpatchmsgs(repo, sender, _patches, **opts) + msgs = _getpatchmsgs(repo, sender, revs, **opts) showaddrs = []