diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py --- a/mercurial/logcmdutil.py +++ b/mercurial/logcmdutil.py @@ -377,10 +377,9 @@ class changesetprinter(object): self._exthook(ctx) if self.ui.debugflag: - files = ctx.p1().status(ctx) for key, value in zip( [b'files', b'files+', b'files-'], - [files.modified, files.added, files.removed], + [ctx.filesmodified(), ctx.filesadded(), ctx.filesremoved()], ): if value: self.ui.write( @@ -512,11 +511,10 @@ class changesetformatter(changesetprinte or b'added' in datahint or b'removed' in datahint ): - files = ctx.p1().status(ctx) fm.data( - modified=fm.formatlist(files.modified, name=b'file'), - added=fm.formatlist(files.added, name=b'file'), - removed=fm.formatlist(files.removed, name=b'file'), + modified=fm.formatlist(ctx.filesmodified(), name=b'file'), + added=fm.formatlist(ctx.filesadded(), name=b'file'), + removed=fm.formatlist(ctx.filesremoved(), name=b'file'), ) verbose = not self.ui.debugflag and self.ui.verbose diff --git a/tests/test-issue6642.t b/tests/test-issue6642.t --- a/tests/test-issue6642.t +++ b/tests/test-issue6642.t @@ -25,11 +25,9 @@ https://bz.mercurial-scm.org/show_bug.cg $ hg log -r . --debug | grep files - files+: b (known-bad-output !) - [1] (missing-correct-output !) + [1] $ hg log -r . --debug -T json | egrep '(added|removed|modified)' - "added": ["b"], (known-bad-output !) - "added": [], (missing-correct-output !) + "added": [], "modified": [], "removed": [], $ hg log -r . --debug -T xml | grep path diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -407,7 +407,6 @@ test that phase are displayed in log at manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8 user: test date: Thu Jan 01 00:00:00 1970 +0000 - files+: C D E extra: branch=default description: merge B' and E