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

(John Arbash Meinel)  Fix bug #158333,
        make sure that Repository.fetch(self) is properly a no-op for all
        Repository implementations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    errors,
25
25
    lockdir,
26
26
    repository,
 
27
    revision,
27
28
)
28
29
from bzrlib.branch import Branch, BranchReferenceFormat
29
30
from bzrlib.bzrdir import BzrDir, RemoteBzrDirFormat
32
33
from bzrlib.errors import NoSuchRevision
33
34
from bzrlib.lockable_files import LockableFiles
34
35
from bzrlib.pack import ContainerReader
35
 
from bzrlib.revision import NULL_REVISION
36
36
from bzrlib.smart import client, vfs
37
37
from bzrlib.symbol_versioning import (
38
38
    deprecated_method,
309
309
        """See Repository.get_revision_graph()."""
310
310
        if revision_id is None:
311
311
            revision_id = ''
312
 
        elif revision_id == NULL_REVISION:
 
312
        elif revision.is_null(revision_id):
313
313
            return {}
314
314
 
315
315
        path = self.bzrdir._path_for_remote_call(self._client)
357
357
    def gather_stats(self, revid=None, committers=None):
358
358
        """See Repository.gather_stats()."""
359
359
        path = self.bzrdir._path_for_remote_call(self._client)
360
 
        if revid in (None, NULL_REVISION):
 
360
        # revid can be None to indicate no revisions, not just NULL_REVISION
 
361
        if revid is None or revision.is_null(revid):
361
362
            fmt_revid = ''
362
363
        else:
363
364
            fmt_revid = revid
626
627
            # check that last_revision is in 'from' and then return a
627
628
            # no-operation.
628
629
            if (revision_id is not None and
629
 
                not _mod_revision.is_null(revision_id)):
 
630
                not revision.is_null(revision_id)):
630
631
                self.get_revision(revision_id)
631
632
            return 0, []
632
633
        self._ensure_real()