phabricator: specify some metadata compatibly with arc
Differential Revision: https://phab.mercurial-scm.org/D3414
--- 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