Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+@xmlrpc_method(False)
+def patch_get_by_hash(hash):
+ """Return structure for the given patch hash."""
+ try:
+ patch = Patch.objects.filter(hash = hash)[0]
+ return patch_to_dict(patch)
+ except:
+ return {}
+
@xmlrpc_method(False)
def patch_get_mbox(patch_id):
"""Return mbox string for the given patch ID."""
@xmlrpc_method(False)
def patch_get_mbox(patch_id):
"""Return mbox string for the given patch ID."""