/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 formatting, remove catch-all for exceptions when opening local repositories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Converters, etc for going between Bazaar and Git ids."""
18
18
 
19
19
from bzrlib import errors, foreign
20
 
from bzrlib.inventory import ROOT_ID
21
20
from bzrlib.foreign import (
22
21
        ForeignRevision,
23
22
        )
49
48
        return { "git commit": foreign_revid }
50
49
 
51
50
    def generate_file_id(self, path):
52
 
        if path == "":
53
 
            return ROOT_ID
54
51
        return escape_file_id(path.encode('utf-8'))
55
52
 
56
53
    def import_commit(self, commit):
71
68
        return rev
72
69
 
73
70
 
74
 
class BzrGitMappingv1(BzrGitMapping):
75
 
    revid_prefix = 'git-v1'
76
 
    experimental = False
77
 
 
78
 
 
79
 
class BzrGitMappingExperimental(BzrGitMappingv1):
 
71
class BzrGitMappingExperimental(BzrGitMapping):
80
72
    revid_prefix = 'git-experimental'
81
73
    experimental = True
82
74
 
83
75
 
84
 
default_mapping = BzrGitMappingv1()
 
76
default_mapping = BzrGitMappingExperimental()