@@ -419,6 +419,28 @@ def patch_set(user, patch_id, params):
+ """Take a patch ID and return a list of patches in the same series.
+ This uses some heuristics to do its job so might not be perfect.
+ See the function in the Patch model for details.
+ @patch_id: The patch ID that's part of the series.
+ @return: A list of patches in the series.
+ # Get the patch.
+ patch = Patch.objects.filter(id=patch_id)
+ if not patch:
+ return 
+ patch = patch
+ # Make a series.
+ patches = patch.to_series()
+ # Convert to dict for xmlrpc.
+ return [patch_to_dict(p) for p in patches]
def state_list(search_str="", max_count=0):
"""Get a list of state structures matching the given search string."""