Rev 3752: Untested extensions to support repodetails in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Fri Oct 17 03:57:13 BST 2008
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 3752
revision-id: robertc at robertcollins.net-20081017025707-xicz4bqrrx35dfa0
parent: robertc at robertcollins.net-20081016010043-xn3rlj5zupl03oal
committer: Robert Collins <robertc at robertcollins.net>
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.")
More information about the bazaar-commits
mailing list