~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: John Arbash Meinel
  • Date: 2008-04-21 17:32:54 UTC
  • mto: This revision was merged to the branch mainline in revision 3434.
  • Revision ID: john@arbash-meinel.com-20080421173254-8x9ynjqe0hk46xsz
Add repository_implementation tests for get_parent_map

If None is passed, repositories should raise ValueError, since
None is not a valid revision_id.

Implement this ability for all repository implementations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
826
826
            return self.get_revision_graph()
827
827
 
828
828
        keys = set(keys)
 
829
        if None in keys:
 
830
            raise ValueError('get_parent_map(None) is not valid')
829
831
        if NULL_REVISION in keys:
830
832
            keys.discard(NULL_REVISION)
831
833
            found_parents = {NULL_REVISION:()}
859
861
        body = self._serialise_search_recipe(recipe)
860
862
        path = self.bzrdir._path_for_remote_call(self._client)
861
863
        for key in keys:
862
 
            assert type(key) is str, \
863
 
                "Key type is %s not a plain string" % (type(key),)
 
864
            assert type(key) is str, "Key %r is not a plain string" % (key,)
864
865
        verb = 'Repository.get_parent_map'
865
866
        args = (path,) + tuple(keys)
866
867
        try: