/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

MergeĀ upstream.

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
20
21
from bzrlib.foreign import (
21
22
        ForeignRevision,
22
23
        )
48
49
        return { "git commit": foreign_revid }
49
50
 
50
51
    def generate_file_id(self, path):
 
52
        if path == "":
 
53
            return ROOT_ID
51
54
        return escape_file_id(path.encode('utf-8'))
52
55
 
53
56
    def import_commit(self, commit):
68
71
        return rev
69
72
 
70
73
 
71
 
class BzrGitMappingExperimental(BzrGitMapping):
 
74
class BzrGitMappingv1(BzrGitMapping):
 
75
    revid_prefix = 'git-v1'
 
76
    experimental = False
 
77
 
 
78
 
 
79
class BzrGitMappingExperimental(BzrGitMappingv1):
72
80
    revid_prefix = 'git-experimental'
73
81
    experimental = True
74
82
 
75
83
 
76
 
default_mapping = BzrGitMappingExperimental()
 
84
default_mapping = BzrGitMappingv1()