changeset 42233:d49ab47be8a6

phabricator: include branch in the diffproperty metadata This does not make Phabricator display the branch in web UI anywhere as that still need us to use creatediff API for that. However a future patch will make phabread use this to include the branch in its `hg import`-able output. Differential Revision: https://phab.mercurial-scm.org/D6297
author Ian Moody <moz-ian@perix.co.uk>
date Sat, 20 Apr 2019 16:01:47 +0100
parents c96507f6875c
children 6dd454e5b123
files hgext/phabricator.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/phabricator.py	Wed Apr 24 10:47:40 2019 -0700
+++ b/hgext/phabricator.py	Sat Apr 20 16:01:47 2019 +0100
@@ -384,6 +384,7 @@
         b'data': templatefilters.json({
             b'user': ctx.user(),
             b'date': b'%d %d' % ctx.date(),
+            b'branch': ctx.branch(),
             b'node': ctx.hex(),
             b'parent': ctx.p1().hex(),
         }),
@@ -398,6 +399,7 @@
                 b'author': stringutil.person(ctx.user()),
                 b'authorEmail': stringutil.email(ctx.user()),
                 b'time': int(ctx.date()[0]),
+                b'branch': ctx.branch(),
             },
         }),
     }