From patchwork Sat Sep 15 01:54:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5,of,5] log: make changesetformatter pass in changectx to formatter From: Yuya Nishihara X-Patchwork-Id: 34666 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sat, 15 Sep 2018 10:54:09 +0900 # HG changeset patch # User Yuya Nishihara # 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