~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/testament.py

[merge] Marien Zwart: make testament actually support unicode strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        hashed in that encoding.
115
115
        """
116
116
        r = []
117
 
        def a(s):
118
 
            r.append(s)
 
117
        a = r.append
119
118
        a('bazaar-ng testament version 1\n')
120
119
        a('revision-id: %s\n' % self.revision_id)
121
120
        a('committer: %s\n' % self.committer)
137
136
            for l in r:
138
137
                assert isinstance(l, basestring), \
139
138
                    '%r of type %s is not a plain string' % (l, type(l))
140
 
        return r
 
139
        return [line.encode('utf-8') for line in r]
141
140
 
142
141
    def _escape_path(self, path):
143
142
        assert not contains_linebreaks(path)