Mercurial > evolve
changeset 4947:0ad2000854c4
obslog: make reason for unavailable patch part of template
We need the reason to be in the template in order to be able to
templatize the whole output.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Nov 2019 22:24:50 -0800 |
parents | bd992b1d4426 |
children | 069cfc5301fb |
files | hgext3rd/evolve/obshistory.py |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py Thu Nov 07 16:34:01 2019 -0800 +++ b/hgext3rd/evolve/obshistory.py Thu Nov 07 22:24:50 2019 -0800 @@ -622,10 +622,8 @@ ui.write(chunk, label=label) fm.write(b'patch', b'%s', ui.popbuffer()) else: - nopatch = b" (No patch available, %s)" % _patchavailable[1] - fm.plain(b"\n") - # TODO: should be in json too - fm.plain(nopatch) + fm.write(b'nopatchreason', b"\n (No patch available, %s)", + _patchavailable[1]) fm.plain(b"\n") @@ -766,10 +764,8 @@ ui.write(chunk, label=label) fm.write(b'patch', b'%s', ui.popbuffer()) else: - nopatch = b" (No patch available, %s)" % _patchavailable[1] - fm.plain(b"\n") - # TODO: should be in json too - fm.plain(nopatch) + fm.write(b'nopatchreason', b"\n (No patch available, %s)", + _patchavailable[1]) fm.plain(b"\n")