/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 dir.py

Handle empty metadata.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
LockWarner = getattr(lockable_files, "_LockWarner", None)
28
28
 
29
29
from bzrlib.plugins.git import (
30
 
    BareLocalGitControlDirFormat,
31
30
    LocalGitControlDirFormat,
32
31
    )
33
32
try:
81
80
            self._lock_warner = LockWarner(repr(self))
82
81
 
83
82
 
84
 
class GitDirConfig(object):
85
 
 
86
 
    def get_default_stack_on(self):
87
 
        return None
88
 
 
89
 
    def set_default_stack_on(self, value):
90
 
        raise bzr_errors.BzrError("Cannot set configuration")
91
 
 
92
 
 
93
83
class GitDir(ControlDir):
94
84
    """An adapter to the '.git' dir used by git."""
95
85
 
99
89
    def can_convert_format(self):
100
90
        return False
101
91
 
102
 
    def break_lock(self):
103
 
        pass
104
 
 
105
92
    def cloning_metadir(self, stacked=False):
106
93
        return format_registry.make_bzrdir("default")
107
94
 
118
105
            return self._open_branch(name=None,
119
106
                ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
120
107
 
121
 
    def get_config(self):
122
 
        return GitDirConfig()
123
 
 
124
108
 
125
109
class LocalGitDir(GitDir):
126
110
    """An adapter to the '.git' dir used by git."""