##// END OF EJS Templates
py3: only pass unicode to json.dumps in writediffproperties...
Ian Moody -
r42454:8fd19a7b default
parent child Browse files
Show More
@@ -371,10 +371,10 b' def writediffproperties(ctx, diff):'
371 b'diff_id': diff[b'id'],
371 b'diff_id': diff[b'id'],
372 b'name': b'hg:meta',
372 b'name': b'hg:meta',
373 b'data': json.dumps({
373 b'data': json.dumps({
374 b'user': ctx.user(),
374 u'user': encoding.unifromlocal(ctx.user()),
375 b'date': b'%d %d' % ctx.date(),
375 u'date': u'{:.0f} {}'.format(*ctx.date()),
376 b'node': ctx.hex(),
376 u'node': encoding.unifromlocal(ctx.hex()),
377 b'parent': ctx.p1().hex(),
377 u'parent': encoding.unifromlocal(ctx.p1().hex()),
378 }),
378 }),
379 }
379 }
380 callconduit(ctx.repo(), b'differential.setdiffproperty', params)
380 callconduit(ctx.repo(), b'differential.setdiffproperty', params)
@@ -383,10 +383,11 b' def writediffproperties(ctx, diff):'
383 b'diff_id': diff[b'id'],
383 b'diff_id': diff[b'id'],
384 b'name': b'local:commits',
384 b'name': b'local:commits',
385 b'data': json.dumps({
385 b'data': json.dumps({
386 ctx.hex(): {
386 encoding.unifromlocal(ctx.hex()): {
387 b'author': stringutil.person(ctx.user()),
387 u'author': encoding.unifromlocal(stringutil.person(ctx.user())),
388 b'authorEmail': stringutil.email(ctx.user()),
388 u'authorEmail': encoding.unifromlocal(
389 b'time': ctx.date()[0],
389 stringutil.email(ctx.user())),
390 u'time': u'{:.0f}'.format(ctx.date()[0]),
390 },
391 },
391 }),
392 }),
392 }
393 }
General Comments 0
You need to be logged in to leave comments. Login now