Ticket Change Details
Not logged in
Overview

Artifact ID: 618d12d2be8463c3c588a94e53e7572f4cbfd8be
Ticket: 7ac304ac058264540383dbfea555368572f282f2
IENG, ICOP, and ICMT are lost in translation
Date: 2014-11-19 15:32:13
User: anonymous
Changes

  1. Change foundin to "d0f178c2c0e9c7c7"
  2. Change icomment to:

    The IENG, ICOP, and ICMT chunks are not preserved in the translation to XML.

    The following patch fixes this. It also changes the handling of IPRD to work the same way as IENG, ICOP, and ICMT, since I don't think the original behaviour of inserting a default IPRD of SBAWE32 is desirable.

    diff --git a/pysf.py b/pysf.py index edce72e..8524740 100755 --- a/pysf.py +++ b/pysf.py @@ -827,7 +827,6 @@ def SfToXml(Src, Dst): u'ISNG': Def(Tree.CkIdStr('isng', None, -1), u'pysf song'), u'INAM': Def(Tree.CkIdStr('INAM', None, -1), u'pysf instruments'), u'ICRD': Def(Tree.CkIdStr('ICRD', None, -1), ustr(DateAsciiGet())), - u'IPRD': Def(Tree.CkIdStr('IPRD', None, -1), u'SBAWE32'), u'IFIL': { u'major': Major, u'minor': Minor @@ -836,7 +835,12 @@ def SfToXml(Src, Dst): Tree.CkIdStr('ISFT', None, -1), u'pysf %d:pysf %d' % (PysfVersion, PysfVersion) ) - } + } + for chunk in ('IENG', 'IPRD', 'ICOP', 'ICMT'): + val = Tree.CkIdStr(chunk, None, -1) + if val is not None: + Dict[unicode(chunk)] = val + OutHandle.write(DictToXmlStr({ u'sf2': Dict })) @@ -867,11 +871,11 @@ def SfInfo(Dict): 'ICRD', SfStr(Def(Val(Dict, u'ICRD'), DateAsciiGet())) ] ] - Ieng = SfStr(Val(Dict, u'IENG')) - if Ieng != None: - List[1].append('IENG', Ieng) + for chunk in ('IENG', 'IPRD', 'ICOP', 'ICMT'): + val = SfStr(Val(Dict, unicode(chunk))) + if val is not None: + List[1].extend([chunk, val]) map(List[1].append, [ - 'IPRD', SfStr(Def(Val(Dict, u'IPRD'), 'SBAWE32')), 'ISFT', SfStr(Def(Val(Dict, u'ISFT'), 'SFEDT v1.28')) ]) return List

  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-plain"
  5. Change private_contact to "04caaba228847c668f7872ba7053cdf934c644c9"
  6. Change severity to "Minor"
  7. Change status to "Open"
  8. Change title to "IENG, ICOP, and ICMT are lost in translation"
  9. Change type to "Code_Defect"