/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

Avoid iterating over all keys in the tdb database.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    vcs = foreign_git
58
58
 
59
59
    def __init__(self, gitdir, lockfiles):
60
 
        ForeignRepository.__init__(self, GitRepositoryFormat(), gitdir, 
 
60
        ForeignRepository.__init__(self, GitRepositoryFormat(), gitdir,
61
61
            lockfiles)
62
62
        from bzrlib.plugins.git import fetch, push
63
 
        for optimiser in [fetch.InterRemoteGitNonGitRepository, 
 
63
        for optimiser in [fetch.InterRemoteGitNonGitRepository,
64
64
                          fetch.InterLocalGitNonGitRepository,
65
65
                          fetch.InterGitGitRepository,
66
66
                          push.InterToLocalGitRepository,
99
99
    """Git repository on the file system."""
100
100
 
101
101
    def __init__(self, gitdir, lockfiles):
102
 
        # FIXME: This also caches negatives. Need to be more careful 
 
102
        # FIXME: This also caches negatives. Need to be more careful
103
103
        # about this once we start writing to git
104
104
        self._parents_provider = graph.CachingParentsProvider(self)
105
105
        GitRepository.__init__(self, gitdir, lockfiles)
139
139
            except KeyError:
140
140
                continue
141
141
            if commit is None:
142
 
                # Older versions of Dulwich used to return None rather than 
 
142
                # Older versions of Dulwich used to return None rather than
143
143
                # raise KeyError.
144
144
                continue
145
145
            else:
164
164
 
165
165
    def lookup_foreign_revision_id(self, foreign_revid, mapping=None):
166
166
        """Lookup a revision id.
167
 
        
 
167
 
168
168
        :param revid: Bazaar revision id.
169
169
        :return: Tuple with git revisionid and mapping.
170
170
        """