/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

Handle non-ascii characters in filenames.

Show diffs side-by-side

added added

removed removed

Lines of Context:
574
574
        self.mapping = mapping
575
575
 
576
576
    def lookup_file_id(self, path):
 
577
        assert type(path) is str
577
578
        try:
578
579
            file_id = self.file_ids[path]
579
580
        except KeyError:
587
588
            for k, v in self.file_ids.iteritems():
588
589
                self.paths[v] = k
589
590
        try:
590
 
            return self.paths[file_id]
 
591
            path = self.paths[file_id]
591
592
        except KeyError:
592
593
            return self.mapping.parse_file_id(file_id)
 
594
        else:
 
595
            assert type(path) is str
 
596
            return path