~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-06-10 09:34:32 UTC
  • Revision ID: mbp@sourcefrog.net-20050610093432-5420236ef61ede65
- add check on revision-ids

Show diffs side-by-side

added added

removed removed

Lines of Context:
532
532
 
533
533
    def get_revision(self, revision_id):
534
534
        """Return the Revision object for a named revision"""
 
535
        if not revision_id or not isinstance(revision_id, basestring):
 
536
            raise ValueError('invalid revision-id: %r' % revision_id)
535
537
        r = Revision.read_xml(self.revision_store[revision_id])
536
538
        assert r.revision_id == revision_id
537
539
        return r