Patchwork [2,of,8,v4] convert: self.heads is a list

login
register
mail settings
Submitter David Soria Parra
Date Dec. 14, 2016, 9:46 a.m.
Message ID <09e574c75df2e3547a40.1481708798@devbig415.prn1.facebook.com>
Download mbox | patch
Permalink /patch/17899/
State Superseded
Headers show

Comments

David Soria Parra - Dec. 14, 2016, 9:46 a.m.
# HG changeset patch
# User David Soria Parra <davidsp@fb.com>
# Date 1481708627 28800
#      Wed Dec 14 01:43:47 2016 -0800
# Node ID 09e574c75df2e3547a40f9d9b13464c63235136c
# Parent  506cb0034ebdbe85d2a7174d9214f833b3fed3fb
convert: self.heads is a list

self.heads is used as a list throughout convert and never a dictionary.
Initialize it correctly to a list.

Patch

diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
--- a/hgext/convert/p4.py
+++ b/hgext/convert/p4.py
@@ -56,7 +56,7 @@ 
         common.checktool('p4', abort=False)
 
         self.p4changes = {}
-        self.heads = {}
+        self.heads = []
         self.changeset = {}
         self.files = {}
         self.copies = {}