Mercurial > public > mercurial-scm > hg
comparison contrib/phabricator.py @ 37800:6cf5f5b4eb57 stable
phabricator: specify some metadata compatibly with arc
Differential Revision: https://phab.mercurial-scm.org/D3414
author | Tom Prince <mozilla@hocat.ca> |
---|---|
date | Wed, 18 Apr 2018 19:02:44 -0600 |
parents | a8a902d7176e |
children | 20a4543e9a2b |
comparison
equal
deleted
inserted
replaced
37799:1770d8b3e554 | 37800:6cf5f5b4eb57 |
---|---|
66 url as urlmod, | 66 url as urlmod, |
67 util, | 67 util, |
68 ) | 68 ) |
69 from mercurial.utils import ( | 69 from mercurial.utils import ( |
70 procutil, | 70 procutil, |
71 stringutil, | |
71 ) | 72 ) |
72 | 73 |
73 cmdtable = {} | 74 cmdtable = {} |
74 command = registrar.command(cmdtable) | 75 command = registrar.command(cmdtable) |
75 | 76 |
322 'data': json.dumps({ | 323 'data': json.dumps({ |
323 'user': ctx.user(), | 324 'user': ctx.user(), |
324 'date': '%d %d' % ctx.date(), | 325 'date': '%d %d' % ctx.date(), |
325 'node': ctx.hex(), | 326 'node': ctx.hex(), |
326 'parent': ctx.p1().hex(), | 327 'parent': ctx.p1().hex(), |
328 }), | |
329 } | |
330 callconduit(ctx.repo(), 'differential.setdiffproperty', params) | |
331 | |
332 params = { | |
333 'diff_id': diff[r'id'], | |
334 'name': 'local:commits', | |
335 'data': json.dumps({ | |
336 ctx.hex(): { | |
337 'author': stringutil.person(ctx.user()), | |
338 'authorEmail': stringutil.email(ctx.user()), | |
339 'time': ctx.date()[0], | |
340 }, | |
327 }), | 341 }), |
328 } | 342 } |
329 callconduit(ctx.repo(), 'differential.setdiffproperty', params) | 343 callconduit(ctx.repo(), 'differential.setdiffproperty', params) |
330 | 344 |
331 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None, | 345 def createdifferentialrevision(ctx, revid=None, parentrevid=None, oldnode=None, |