~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/changeset/read_changeset.py

  • Committer: Aaron Bentley
  • Date: 2006-05-16 14:38:07 UTC
  • mto: (1185.82.108 w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: abentley@panoramicfeedback.com-20060516143807-b528a6fe1736e06d
Behave properly when there are no properties in a revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        if self.parent_ids:
76
76
            rev.parent_ids.extend(self.parent_ids)
77
77
 
78
 
        for property in self.properties:
79
 
            key_end = property.find(': ')
80
 
            assert key_end is not None
81
 
            key = property[:key_end].encode('utf-8')
82
 
            value = property[key_end+2:].encode('utf-8')
83
 
            rev.properties[key] = value
 
78
        if self.properties:
 
79
            for property in self.properties:
 
80
                key_end = property.find(': ')
 
81
                assert key_end is not None
 
82
                key = property[:key_end].encode('utf-8')
 
83
                value = property[key_end+2:].encode('utf-8')
 
84
                rev.properties[key] = value
84
85
 
85
86
        return rev
86
87