At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 3752
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Robert Collins <[EMAIL PROTECTED]>
branch nick: repository
timestamp: Fri 2008-10-17 13:57:07 +1100
message:
  Untested extensions to support repodetails
modified:
  bzrlib/chk_map.py              chk_map.py-20081001014447-ue6kkuhofvdecvxa-1
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py 2008-10-16 01:00:43 +0000
+++ b/bzrlib/chk_map.py 2008-10-17 02:57:07 +0000
@@ -222,3 +222,19 @@
         :return: A bytestring.
         """
         return "chkvalue:\n" + self.value
+
+    def refs(self):
+        """ValueNodes have no refs within the dict."""
+        return []
+
+
+def _deserialise(bytes, key):
+    """Helper for repositorydetails - convert bytes to a node."""
+    if bytes.startswith("chkvalue:\n"):
+        return ValueNode.deserialise(bytes)
+    elif bytes.startswith("chkroot:\n"):
+        result = RootNode()
+        result.deserialise(bytes, key)
+        return result
+    else:
+        raise AssertionError("Unknown node type.")


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to