Rev 4560: (jam) Add AbsentContentFactory.get_bytes_as, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jul 22 19:18:42 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4560 [merge]
revision-id: pqm at pqm.ubuntu.com-20090722181834-2geyfaa06s9himqg
parent: pqm at pqm.ubuntu.com-20090722100136-z7hpflqttygepstr
parent: john at arbash-meinel.com-20090715165226-ot2qb72eexefm2im
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-07-22 19:18:34 +0100
message:
  (jam) Add AbsentContentFactory.get_bytes_as,
  	which just raises a better error.
modified:
  bzrlib/versionedfile.py        versionedfile.py-20060222045106-5039c71ee3b65490
=== modified file 'bzrlib/versionedfile.py'
--- a/bzrlib/versionedfile.py	2009-07-06 20:21:34 +0000
+++ b/bzrlib/versionedfile.py	2009-07-15 16:52:26 +0000
@@ -175,6 +175,12 @@
         self.key = key
         self.parents = None
 
+    def get_bytes_as(self, storage_kind):
+        raise ValueError('A request was made for key: %s, but that'
+                         ' content is not available, and the calling'
+                         ' code does not handle if it is missing.'
+                         % (self.key,))
+
 
 class AdapterFactory(ContentFactory):
     """A content factory to adapt between key prefix's."""




More information about the bazaar-commits mailing list