[MERGE][0.8.1] Fix number of arguments in raising InvalidRevisionId in knits.py

Olaf Conradi olaf at conradi.org
Tue May 16 00:00:22 BST 2006


Subject says it all.

Available as:
http://deschacht.student.utwente.nl/bzr/bazaar-vcs/bzr.0.8.olaf.fixes/

or shall I merge it with the rest to:
http://deschacht.student.utwente.nl/bzr/bazaar-vcs/bzr.0.8.olaf.integration/

Cheers
 -Olaf

-------------- next part --------------
=== modified file 'NEWS'
--- NEWS	
+++ NEWS	
@@ -7,6 +7,8 @@
 
     * Nicer messages from 'commit' in the case of renames, and correct
       messages when a merge has occured. (Robert Collins, Martin Pool)
+
+    * Fix bug in knits when raising InvalidRevisionId. (#44284, Olaf Conradi)
 
   INTERNALS:
 

=== modified file 'bzrlib/errors.py'
--- bzrlib/errors.py	
+++ bzrlib/errors.py	
@@ -134,6 +134,7 @@
 class InvalidRevisionId(BzrNewError):
     """Invalid revision-id {%(revision_id)s} in %(branch)s"""
     def __init__(self, revision_id, branch):
+        # branch can be any string or object with __str__ defined
         BzrNewError.__init__(self)
         self.revision_id = revision_id
         self.branch = branch

=== modified file 'bzrlib/knit.py'
--- bzrlib/knit.py	
+++ bzrlib/knit.py	
@@ -629,7 +629,7 @@
         assert self.writable, "knit is not opened for write"
         ### FIXME escape. RBC 20060228
         if contains_whitespace(version_id):
-            raise InvalidRevisionId(version_id)
+            raise InvalidRevisionId(version_id, self.filename)
         if self.has_version(version_id):
             raise RevisionAlreadyPresent(version_id, self.filename)
         self._check_lines_not_unicode(lines)



More information about the bazaar mailing list