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

  • Committer: David Allouche
  • Date: 2007-12-30 01:11:44 UTC
  • mto: (0.200.47 bzr-git.pull)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: ddaa@canonical.com-20071230011144-8o9mn507kwf265z1
GitRepository.get_inventory and .revision_tree work for the null revision. Support for testing GitRepository without disk data.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    def __init__(self, gitdir, lockfiles):
41
41
        self.bzrdir = gitdir
42
42
        self.control_files = lockfiles
43
 
        gitdirectory = gitdir.transport.local_abspath('.')
44
 
        self._git = model.GitModel(gitdirectory)
 
43
        self._git = self._make_model(gitdir.transport)
45
44
        self._revision_cache = {}
46
45
 
 
46
    @classmethod
 
47
    def _make_model(klass, transport):
 
48
        gitdirectory = transport.local_abspath('.')
 
49
        return model.GitModel(gitdirectory)
 
50
 
 
51
 
47
52
    def _ancestor_revisions(self, revision_ids):
48
53
        if revision_ids is not None:
49
54
            git_revisions = [gitrevid_from_bzr(r) for r in revision_ids]