Rev 414: Add some more assertions. in file:///home/jelmer/bzr-svn/0.3/

Jelmer Vernooij jelmer at samba.org
Sat Feb 10 13:49:32 GMT 2007


At file:///home/jelmer/bzr-svn/0.3/

------------------------------------------------------------
revno: 414
revision-id: jelmer at samba.org-20070210134644-yh0z59tdetv4qfcj
parent: jelmer at samba.org-20070131130828-jk3tbipjwu68cyad
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.3
timestamp: Sat 2007-02-10 14:46:44 +0100
message:
  Add some more assertions.
modified:
  branchprops.py                 branchprops.py-20061223204623-80lvm7pjrpsgk0dd-1
=== modified file 'branchprops.py'
--- a/branchprops.py	2007-01-02 16:58:01 +0000
+++ b/branchprops.py	2007-02-10 13:46:44 +0000
@@ -44,10 +44,12 @@
 
         return props
 
-    def get_properties(self, path, revnum):
+    def get_properties(self, path, origrevnum):
+        assert path is not None
+        assert isinstance(origrevnum, int) and origrevnum >= 0
         proplist = {}
-        revnum = self.log.find_latest_change(path, revnum)
-        assert revnum is not None
+        revnum = self.log.find_latest_change(path, origrevnum)
+        assert revnum is not None, "can't find latest change for %r:%r" % (path, origrevnum)
 
         proplist = {}
         for (name, value) in self.cachedb.execute("select name, value from branchprop where revnum=%d and branchpath='%s'" % (revnum, path)):




More information about the bazaar-commits mailing list