Patchwork D6300: phabricator: read more metadata from local:commits

login
register
mail settings
Submitter phabricator
Date April 25, 2019, 6:07 p.m.
Message ID <6bc315ca67bb7526e461e302263f80e5@localhost.localdomain>
Download mbox | patch
Permalink /patch/39829/
State Not Applicable
Headers show

Comments

phabricator - April 25, 2019, 6:07 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc4d96f4761d3: phabricator: read more metadata from local:commits (authored by Kwan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6300?vs=14888&id=14922

REVISION DETAIL
  https://phab.mercurial-scm.org/D6300

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: Kwan, #hg-reviewers, indygreg, pulkit
Cc: mercurial-devel

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -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 {}