# HG changeset patch # User Rocco Rutte # Date 2009-04-04 16:08:41 # Node ID a969b1470987b78c38e4fae757a9b1dd2e3b48e6 # Parent 43b70a964e0dd9bcf27f44a38491747647a7ba39 convert: simple fix for non-existent synthetic/mergepoint attributes diff --git a/hgext/convert/cvsps.py b/hgext/convert/cvsps.py --- a/hgext/convert/cvsps.py +++ b/hgext/convert/cvsps.py @@ -466,7 +466,7 @@ def createchangeset(ui, log, fuzz=60, me e.file not in files): c = changeset(comment=e.comment, author=e.author, branch=e.branch, date=e.date, entries=[], - mergepoint=e.mergepoint) + mergepoint=getattr(e, 'mergepoint', None)) changesets.append(c) files = {} if len(changesets) % 100 == 0: @@ -488,7 +488,8 @@ def createchangeset(ui, log, fuzz=60, me # "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. - c.synthetic = (len(c.entries) == 1 and c.entries[0].synthetic) + synth = getattr(c.entries[0], 'synthetic', None) + c.synthetic = (len(c.entries) == 1 and synth) # Sort files in each changeset