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

In .testr.conf; run all git-relevant tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
from dulwich.objects import (
49
49
    Commit,
 
50
    Tag,
50
51
    )
51
52
 
52
53
 
171
172
        if foreign_revid == ZERO_SHA:
172
173
            return revision.NULL_REVISION
173
174
        commit = self._git[foreign_revid]
 
175
        while isinstance(commit, Tag):
 
176
            commit = self._git[commit.object[1]]
174
177
        rev, roundtrip_revid, verifiers = mapping.import_commit(commit,
175
178
            lambda x: None)
176
179
        # FIXME: check testament before doing this?
273
276
    supports_tree_reference = False
274
277
    rich_root_data = True
275
278
 
 
279
    @property
 
280
    def _matchingbzrdir(self):
 
281
        from bzrlib.plugins.git.dir import LocalGitControlDirFormat
 
282
        return LocalGitControlDirFormat()
 
283
 
276
284
    def get_format_description(self):
277
285
        return "Git Repository"
278
286
 
279
 
    def initialize(self, url, shared=False, _internal=False):
280
 
        raise errors.UninitializableFormat(self)
 
287
    def initialize(self, controldir, shared=False, _internal=False):
 
288
        from bzrlib.plugins.git.dir import GitDir
 
289
        if not isinstance(controldir, GitDir):
 
290
            raise errors.UninitializableFormat(self)
 
291
        return controldir.open_repository()
281
292
 
282
293
    def check_conversion_target(self, target_repo_format):
283
294
        return target_repo_format.rich_root_data