[PATCH 1/1] xmlrpc: Expose patch hash to patch_get

Florian Fainelli f.fainelli at gmail.com
Wed Dec 14 05:47:37 AEDT 2016


Expose the patch object hash value to xmlrpc::patch_get. This is
particuarly helpful if some patche(s) have been submitted several times
but changed from e.g: RFC to a proper official patch submission. The
hash would typically be identical, but numbers would not.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 patchwork/views/xmlrpc.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/patchwork/views/xmlrpc.py b/patchwork/views/xmlrpc.py
index 6ef957c667e4..bfbdef0ffa2b 100644
--- a/patchwork/views/xmlrpc.py
+++ b/patchwork/views/xmlrpc.py
@@ -263,6 +263,7 @@ def patch_to_dict(obj):
         'delegate': 'admin',
         'delegate_id': 1,
         'commit_ref': '',
+        'hash': '',
     }
 
     Args:
@@ -287,6 +288,7 @@ def patch_to_dict(obj):
         'delegate': six.text_type(obj.delegate).encode('utf-8'),
         'delegate_id': obj.delegate_id or 0,
         'commit_ref': obj.commit_ref or '',
+        'hash': obj.hash or '',
     }
 
 
-- 
2.9.3



More information about the Patchwork mailing list