/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

Cope with non-ascii characters in filenames (needs a test..).

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        return bzr_rev_id[len(cls.revid_prefix)+1:], cls()
64
64
 
65
65
    def generate_file_id(self, path):
 
66
        # Git paths are just bytestrings
 
67
        # We must just hope they are valid UTF-8..
 
68
        assert isinstance(path, str)
66
69
        if path == "":
67
70
            return ROOT_ID
68
 
        return escape_file_id(path.encode('utf-8'))
 
71
        return escape_file_id(path)
69
72
 
70
73
    def import_commit(self, commit):
71
74
        """Convert a git commit to a bzr revision.