hgext/phabricator.py
changeset 42200 c4d96f4761d3
parent 42199 6dd454e5b123
child 42256 9421d7e12888
equal deleted inserted replaced
42199:6dd454e5b123 42200:c4d96f4761d3
   909         if b'author' in commit and b'authorEmail' in commit:
   909         if b'author' in commit and b'authorEmail' in commit:
   910             meta[b'user'] = b'%s <%s>' % (commit[b'author'],
   910             meta[b'user'] = b'%s <%s>' % (commit[b'author'],
   911                                           commit[b'authorEmail'])
   911                                           commit[b'authorEmail'])
   912         if b'time' in commit:
   912         if b'time' in commit:
   913             meta[b'date'] = b'%d 0' % commit[b'time']
   913             meta[b'date'] = b'%d 0' % commit[b'time']
   914         if b'rev' in commit:
   914         if b'branch' in commit:
   915             meta[b'node'] = commit[b'rev']
   915             meta[b'branch'] = commit[b'branch']
       
   916         node = commit.get(b'commit', commit.get(b'rev'))
       
   917         if node:
       
   918             meta[b'node'] = node
   916         if len(commit.get(b'parents', ())) >= 1:
   919         if len(commit.get(b'parents', ())) >= 1:
   917             meta[b'parent'] = commit[b'parents'][0]
   920             meta[b'parent'] = commit[b'parents'][0]
   918     return meta or {}
   921     return meta or {}
   919 
   922 
   920 def readpatch(repo, drevs, write):
   923 def readpatch(repo, drevs, write):