Patchwork D3414: phabricator: specify some metadata compatibly with arc.

login
register
mail settings
Submitter phabricator
Date April 19, 2018, 4:02 a.m.
Message ID <5a0f6443119537b6d9368b766c1c7895@localhost.localdomain>
Download mbox | patch
Permalink /patch/31193/
State Not Applicable
Headers show

Comments

phabricator - April 19, 2018, 4:02 a.m.
tom.prince updated this revision to Diff 8408.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3414?vs=8400&id=8408

REVISION DETAIL
  https://phab.mercurial-scm.org/D3414

AFFECTED FILES
  contrib/phabricator.py

CHANGE DETAILS




To: tom.prince, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/contrib/phabricator.py b/contrib/phabricator.py
--- a/contrib/phabricator.py
+++ b/contrib/phabricator.py
@@ -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