phabricator: specify some metadata compatibly with arc stable
authorTom Prince <mozilla@hocat.ca>
Wed, 18 Apr 2018 19:02:44 -0600
branchstable
changeset 37800 6cf5f5b4eb57
parent 37799 1770d8b3e554
child 37801 5cab6f5016fa
phabricator: specify some metadata compatibly with arc Differential Revision: https://phab.mercurial-scm.org/D3414
contrib/phabricator.py
--- a/contrib/phabricator.py	Thu Apr 19 19:46:24 2018 +0900
+++ b/contrib/phabricator.py	Wed Apr 18 19:02:44 2018 -0600
@@ -68,6 +68,7 @@
 )
 from mercurial.utils import (
     procutil,
+    stringutil,
 )
 
 cmdtable = {}
@@ -328,6 +329,19 @@
     }
     callconduit(ctx.repo(), 'differential.setdiffproperty', params)
 
+    params = {
+        'diff_id': diff[r'id'],
+        'name': 'local:commits',
+        'data': json.dumps({
+            ctx.hex(): {
+                'author': stringutil.person(ctx.user()),
+                'authorEmail': stringutil.email(ctx.user()),
+                'time': ctx.date()[0],
+            },
+        }),
+    }
+    callconduit(ctx.repo(), 'differential.setdiffproperty', params)
+
 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None,
                                olddiff=None, actions=None):
     """create or update a Differential Revision