/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

Fix imports.

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,
 
34
from bzrlib.xml_serializer import (
 
35
    escape_invalid_chars,
36
36
    )
37
37
 
38
38
 
88
88
            raise AssertionError("Commit object can't be None")
89
89
        rev = ForeignRevision(commit.id, self, self.revision_id_foreign_to_bzr(commit.id))
90
90
        rev.parent_ids = tuple([self.revision_id_foreign_to_bzr(p) for p in commit.parents])
91
 
        rev.message = escape_commit_message(commit.message.decode("utf-8", "replace"))
92
 
        rev.committer = escape_commit_message(str(commit.committer).decode("utf-8", "replace"))
 
91
        rev.message = escape_invalid_chars(commit.message.decode("utf-8", "replace"))[0]
 
92
        rev.committer = escape_invalid_chars(str(commit.committer).decode("utf-8", "replace"))[0]
93
93
        if commit.committer != commit.author:
94
 
            rev.properties['author'] = escape_commit_message(str(commit.author).decode("utf-8", "replace"))
 
94
            rev.properties['author'] = escape_invalid_chars(str(commit.author).decode("utf-8", "replace"))[0]
95
95
        rev.timestamp = commit.commit_time
96
96
        rev.timezone = 0
97
97
        return rev