Mercurial > hg-stable
changeset 42235:c4d96f4761d3
phabricator: read more metadata from local:commits
local:commits metadata can contain branch info, and 'rev' has been superseded
by 'commit', see:
https://github.com/phacility/arcanist/blob/83661809e532c3fe444a8bf7c7d6936e6377691b/src/repository/api/ArcanistMercurialAPI.php#L281
Differential Revision: https://phab.mercurial-scm.org/D6300
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Sat, 20 Apr 2019 17:27:24 +0100 |
parents | 6dd454e5b123 |
children | 258821f2d465 |
files | hgext/phabricator.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/phabricator.py Sat Apr 20 17:22:35 2019 +0100 +++ b/hgext/phabricator.py Sat Apr 20 17:27:24 2019 +0100 @@ -911,8 +911,11 @@ commit[b'authorEmail']) if b'time' in commit: meta[b'date'] = b'%d 0' % commit[b'time'] - if b'rev' in commit: - meta[b'node'] = commit[b'rev'] + if b'branch' in commit: + meta[b'branch'] = commit[b'branch'] + node = commit.get(b'commit', commit.get(b'rev')) + if node: + meta[b'node'] = node if len(commit.get(b'parents', ())) >= 1: meta[b'parent'] = commit[b'parents'][0] return meta or {}