changeset 10701:35893dcfd40c stable

cvsps: fix traceback involving 'synthetic' https://bugzilla.redhat.com/show_bug.cgi?id=573666 Reported by Sjoerd Mullender
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 15 Mar 2010 19:55:52 +0100
parents e930017f9e2a
children 1ee60e82333c cfc89fecfe51 3e6709a63d2c
files hgext/convert/cvsps.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvsps.py	Mon Mar 15 18:33:39 2010 +0100
+++ b/hgext/convert/cvsps.py	Mon Mar 15 19:55:52 2010 +0100
@@ -32,6 +32,7 @@
         .branchpoints- the branches that start at the current entry
     '''
     def __init__(self, **entries):
+        self.synthetic = False
         self.__dict__.update(entries)
 
     def __repr__(self):
@@ -296,8 +297,7 @@
             assert match, _('expected revision number')
             e = logentry(rcs=scache(rcs), file=scache(filename),
                     revision=tuple([int(x) for x in match.group(1).split('.')]),
-                    branches=[], parent=None,
-                    synthetic=False)
+                    branches=[], parent=None)
             state = 6
 
         elif state == 6:
@@ -469,6 +469,7 @@
         .branchpoints- the branches that start at the current entry
     '''
     def __init__(self, **entries):
+        self.synthetic = False
         self.__dict__.update(entries)
 
     def __repr__(self):
@@ -542,8 +543,7 @@
         #   "File file4 was added on branch ..." (synthetic, 1 entry)
         #   "Add file3 and file4 to fix ..."     (real, 2 entries)
         # Hence the check for 1 entry here.
-        synth = getattr(c.entries[0], 'synthetic', None)
-        c.synthetic = (len(c.entries) == 1 and synth)
+        c.synthetic = len(c.entries) == 1 and c.entries[0].synthetic
 
     # Sort files in each changeset