##// END OF EJS Templates
phabricator: use templatefilters.json in writediffproperties...
Ian Moody -
r42369:289d82a0 default
parent child Browse files
Show More
@@ -65,6 +65,7 b' from mercurial import ('
65 65 scmutil,
66 66 smartset,
67 67 tags,
68 templatefilters,
68 69 templateutil,
69 70 url as urlmod,
70 71 util,
@@ -380,11 +381,11 b' def writediffproperties(ctx, diff):'
380 381 params = {
381 382 b'diff_id': diff[b'id'],
382 383 b'name': b'hg:meta',
383 b'data': json.dumps({
384 u'user': encoding.unifromlocal(ctx.user()),
385 u'date': u'{:.0f} {}'.format(*ctx.date()),
386 u'node': encoding.unifromlocal(ctx.hex()),
387 u'parent': encoding.unifromlocal(ctx.p1().hex()),
384 b'data': templatefilters.json({
385 b'user': ctx.user(),
386 b'date': b'%d %d' % ctx.date(),
387 b'node': ctx.hex(),
388 b'parent': ctx.p1().hex(),
388 389 }),
389 390 }
390 391 callconduit(ctx.repo(), b'differential.setdiffproperty', params)
@@ -392,12 +393,11 b' def writediffproperties(ctx, diff):'
392 393 params = {
393 394 b'diff_id': diff[b'id'],
394 395 b'name': b'local:commits',
395 b'data': json.dumps({
396 encoding.unifromlocal(ctx.hex()): {
397 u'author': encoding.unifromlocal(stringutil.person(ctx.user())),
398 u'authorEmail': encoding.unifromlocal(
399 stringutil.email(ctx.user())),
400 u'time': u'{:.0f}'.format(ctx.date()[0]),
396 b'data': templatefilters.json({
397 ctx.hex(): {
398 b'author': stringutil.person(ctx.user()),
399 b'authorEmail': stringutil.email(ctx.user()),
400 b'time': b'%d' % ctx.date()[0],
401 401 },
402 402 }),
403 403 }
General Comments 0
You need to be logged in to leave comments. Login now