[PATCH 5 of 5] log: make changesetformatter pass in changectx to formatter
Yuya Nishihara
yuya at tcha.org
Fri Sep 14 21:54:09 EDT 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1535976107 -32400
# Mon Sep 03 21:01:47 2018 +0900
# Node ID fe0538ea99c0e1127a78243ec8ad9d74584fa5da
# Parent 4a7c11cb2443577c7571daf93430d7e08599009c
log: make changesetformatter pass in changectx to formatter
It wasn't necessary before, but user templates may have keywords that aren't
filled in by the changesetformatter.
diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -326,6 +326,7 @@ class changesetformatter(changesetprinte
fm = self._fm
fm.startitem()
+ fm.context(ctx=ctx)
# TODO: maybe this should be wdirrev/wdirnode?
rev = ctx.rev()
if rev is None:
diff --git a/tests/test-journal.t b/tests/test-journal.t
--- a/tests/test-journal.t
+++ b/tests/test-journal.t
@@ -279,13 +279,13 @@ Test that verbose, JSON, template and co
children:
command: up 0
rev: 0
- children:
+ children: 1:1e6c11564562
command: commit -Aqm b
rev: 1
children:
command: commit -Aqm a
rev: 0
- children:
+ children: 1:1e6c11564562
Test for behaviour on unexpected storage version information
More information about the Mercurial-devel
mailing list