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

make 'bzr pull --revision' work for remote repositories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    )
24
24
from bzrlib.errors import (
25
25
    BzrError,
 
26
    InvalidRevisionId,
26
27
    NoSuchFile,
 
28
    NoSuchRevision,
27
29
    NotLocalUrl,
28
30
    )
29
31
from bzrlib.trace import (
48
50
from bzrlib.plugins.git.dir import (
49
51
    GitDir,
50
52
    )
 
53
from bzrlib.plugins.git.mapping import (
 
54
    mapping_registry,
 
55
    )
51
56
from bzrlib.plugins.git.repository import (
52
57
    GitRepositoryFormat,
53
58
    GitRepository,
241
246
            return EmptyObjectStoreIterator()
242
247
        return TemporaryPackIterator(path[:-len(".pack")], resolve_ext_ref)
243
248
 
 
249
    def lookup_git_revid(self, bzr_revid):
 
250
        # This won't work for any round-tripped bzr revisions, but it's a start..
 
251
        try:
 
252
            return mapping_registry.revision_id_bzr_to_foreign(bzr_revid)
 
253
        except InvalidRevisionId:
 
254
            raise NoSuchRevision(self, bzr_revid)
 
255
 
244
256
 
245
257
class RemoteGitTagDict(tag.BasicTags):
246
258