##// END OF EJS Templates
phabricator: don't assume the existence of properties of local:commits...
Ian Moody -
r42385:6dd454e5 default
parent child Browse files
Show More
@@ -905,11 +905,14 b' def getdiffmeta(diff):'
905 905 meta = props.get(b'hg:meta')
906 906 if not meta and props.get(b'local:commits'):
907 907 commit = sorted(props[b'local:commits'].values())[0]
908 meta = {
909 b'date': b'%d 0' % commit[b'time'],
910 b'node': commit[b'rev'],
911 b'user': b'%s <%s>' % (commit[b'author'], commit[b'authorEmail']),
912 }
908 meta = {}
909 if b'author' in commit and b'authorEmail' in commit:
910 meta[b'user'] = b'%s <%s>' % (commit[b'author'],
911 commit[b'authorEmail'])
912 if b'time' in commit:
913 meta[b'date'] = b'%d 0' % commit[b'time']
914 if b'rev' in commit:
915 meta[b'node'] = commit[b'rev']
913 916 if len(commit.get(b'parents', ())) >= 1:
914 917 meta[b'parent'] = commit[b'parents'][0]
915 918 return meta or {}
General Comments 0
You need to be logged in to leave comments. Login now