# HG changeset patch # User Martin von Zweigbergk # Date 2019-06-19 06:19:24 # Node ID c929f612afac2e9bedb4bf10e6b813586b84e1f2 # Parent 75334e5b519e117d6b67db054ac0011874e38474 logcmdutil: also check for copies in null revision and working copy It's safe (and fast) to look for copies in the null revision, and it's incorrect not to look for them in the working copy, so let's look in both places. Differential Revision: https://phab.mercurial-scm.org/D6544 diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py --- a/mercurial/logcmdutil.py +++ b/mercurial/logcmdutil.py @@ -891,7 +891,7 @@ def displaygraph(ui, repo, dag, displaye for rev, type, ctx, parents in dag: char = formatnode(repo, ctx) copies = None - if getrenamed and ctx.rev(): + if getrenamed: copies = [] for fn in ctx.files(): rename = getrenamed(fn, ctx.rev()) @@ -919,7 +919,7 @@ def displayrevs(ui, repo, revs, displaye for rev in revs: ctx = repo[rev] copies = None - if getrenamed is not None and rev: + if getrenamed is not None: copies = [] for fn in ctx.files(): rename = getrenamed(fn, rev) diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -630,7 +630,6 @@ using log status template (issue5155) b R b -BROKEN: as above, 'a' should be marked a copy $ hg log -GTstatus -r 'wdir()' -C o changeset: 2147483647:ffffffffffff | parent: 0:8c55c58b4c0e @@ -638,6 +637,7 @@ BROKEN: as above, 'a' should be marked a date: * (glob) files: M a + b R b