[Pkg-bazaar-commits] ./bzr/unstable r666: - add check on revision-ids

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:20:38 UTC 2009


------------------------------------------------------------
revno: 666
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Fri 2005-06-10 19:34:32 +1000
message:
  - add check on revision-ids
modified:
  bzrlib/branch.py
-------------- next part --------------
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2005-06-10 09:08:09 +0000
+++ b/bzrlib/branch.py	2005-06-10 09:34:32 +0000
@@ -532,6 +532,8 @@
 
     def get_revision(self, revision_id):
         """Return the Revision object for a named revision"""
+        if not revision_id or not isinstance(revision_id, basestring):
+            raise ValueError('invalid revision-id: %r' % revision_id)
         r = Revision.read_xml(self.revision_store[revision_id])
         assert r.revision_id == revision_id
         return r



More information about the Pkg-bazaar-commits mailing list