/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

Add tests for import_revision_gist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""An adapter between a Git Repository and a Bazaar Branch"""
19
19
 
 
20
import dulwich as git
20
21
import os
21
22
import time
22
23
 
41
42
from bzrlib.plugins.git.foreign import (
42
43
    versionedfiles,
43
44
    )
44
 
from bzrlib.plugins.git.mapping import default_mapping, mapping_registry, inventory_to_tree_and_blobs, revision_to_commit
 
45
from bzrlib.plugins.git.mapping import (
 
46
    default_mapping,
 
47
    inventory_to_tree_and_blobs,
 
48
    mapping_registry,
 
49
    revision_to_commit,
 
50
    )
45
51
from bzrlib.plugins.git.versionedfiles import GitTexts
46
52
 
47
 
import dulwich as git
48
 
 
49
53
 
50
54
class GitTags(object):
51
55
 
151
155
        return [None] + ancestry
152
156
 
153
157
    def import_revision_gist(self, source, revid, parent_lookup):
154
 
        """Impor the gist of another revision into this Git repository.
 
158
        """Import the gist of a revision into this Git repository.
155
159
 
156
160
        """
157
161
        objects = []
166
170
        return commit.sha().hexdigest()
167
171
 
168
172
    def dfetch(self, source, stop_revision):
 
173
        """Import the gist of the ancestry of a particular revision."""
169
174
        if stop_revision is None:
170
175
            raise NotImplementedError
171
176
        revidmap = {}