/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to mapping.py

Add XML escaping to work around serialization bug in bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    VcsMappingRegistry, 
32
32
    ForeignRevision,
33
33
    )
 
34
from bzrlib.plugins.git.foreign import (
 
35
    escape_commit_message,
 
36
    )
 
37
 
34
38
 
35
39
def escape_file_id(file_id):
36
40
    return file_id.replace('_', '__').replace(' ', '_s')
84
88
            raise AssertionError("Commit object can't be None")
85
89
        rev = ForeignRevision(commit.id, self, self.revision_id_foreign_to_bzr(commit.id))
86
90
        rev.parent_ids = tuple([self.revision_id_foreign_to_bzr(p) for p in commit.parents])
87
 
        rev.message = commit.message.decode("utf-8", "replace")
 
91
        rev.message = escape_commit_message(commit.message.decode("utf-8", "replace"))
88
92
        rev.committer = str(commit.committer).decode("utf-8", "replace")
89
93
        if commit.committer != commit.author:
90
94
            rev.properties['author'] = str(commit.author).decode("utf-8", "replace")