mercurial/copies.py
changeset 43297 8a2925265402
parent 43257 675c776fbcd1
child 43299 83bb1e89ab9b
--- a/mercurial/copies.py	Fri Oct 18 15:16:57 2019 -0700
+++ b/mercurial/copies.py	Wed Oct 02 18:16:02 2019 -0400
@@ -192,13 +192,19 @@
 
     if repo.filecopiesmode == b'changeset-sidedata':
         changelogrevision = cl.changelogrevision
+        flags = cl.flags
 
         def revinfo(rev):
             p1, p2 = parents(rev)
-            c = changelogrevision(rev)
-            p1copies = c.p1copies
-            p2copies = c.p2copies
-            removed = c.filesremoved
+            if flags(rev) & REVIDX_SIDEDATA:
+                c = changelogrevision(rev)
+                p1copies = c.p1copies
+                p2copies = c.p2copies
+                removed = c.filesremoved
+            else:
+                p1copies = {}
+                p2copies = {}
+                removed = ()
             return p1, p2, p1copies, p2copies, removed
 
     else: