~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-04-26 21:11:03 UTC
  • mfrom: (2447.1.7 bundle_empty_properties)
  • Revision ID: pqm@pqm.ubuntu.com-20070426211103-h84prqh7a4ad3ez2
(John Arbash Meinel) Fix bug #109613 by teaching Bundle how to properly read/write revision properties with no value.

Show diffs side-by-side

added added

removed removed

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