diff mercurial/logcmdutil.py @ 42517:c929f612afac

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 18 Jun 2019 23:19:24 -0700
parents b162229ebe0d
children a68350a7fc55
line wrap: on
line diff
--- a/mercurial/logcmdutil.py	Tue Jun 18 23:23:30 2019 -0700
+++ b/mercurial/logcmdutil.py	Tue Jun 18 23:19:24 2019 -0700
@@ -891,7 +891,7 @@
     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 @@
     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)