/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

Add some basic documentation in 'bzr help git'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    def is_supported(self):
76
76
        return True
77
77
 
 
78
    def can_convert_format(self):
 
79
        return False
 
80
 
78
81
    def cloning_metadir(self, stacked=False):
79
82
        return bzrdir.format_registry.make_bzrdir("default")
80
83
 
82
85
        raise NotImplementedError(self._branch_name_to_ref)
83
86
 
84
87
    if bzrlib_version >= (2, 2):
85
 
        def open_branch(self, name=None, ignore_fallbacks=None,
86
 
            unsupported=False):
 
88
        def open_branch(self, name=None, unsupported=False, 
 
89
            ignore_fallbacks=None):
87
90
            return self._open_branch(name=name,
88
91
                ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
89
92
    else:
125
128
    def is_control_filename(self, filename):
126
129
        return filename == '.git' or filename.startswith('.git/')
127
130
 
128
 
    def get_branch_transport(self, branch_format, name):
 
131
    def get_branch_transport(self, branch_format, name=None):
129
132
        if branch_format is None:
130
133
            return self.transport
131
134
        if isinstance(branch_format, LocalGitBzrDirFormat):
154
157
            self._lockfiles)
155
158
 
156
159
    def destroy_branch(self, name=None):
157
 
        del self._git.refs[self._branch_name_to_ref(name)]
 
160
        refname = self._branch_name_to_ref(name)
 
161
        if not refname in self._git.refs:
 
162
            raise bzr_errors.NotBranchError(self.root_transport.base,
 
163
                    bzrdir=self)
 
164
        del self._git.refs[refname]
 
165
 
 
166
    def destroy_repository(self):
 
167
        raise bzr_errors.UnsupportedOperation(self.destroy_repository, self)
 
168
 
 
169
    def destroy_workingtree(self):
 
170
        raise bzr_errors.UnsupportedOperation(self.destroy_workingtree, self)
 
171
 
 
172
    def needs_format_conversion(self, format=None):
 
173
        return not isinstance(self._format, format.__class__)
158
174
 
159
175
    def list_branches(self):
160
176
        ret = []