Skip to content

Commit

Permalink
Tools: Fix authors functions in version-info.py (#1617)
Browse files Browse the repository at this point in the history
Thanks to @mlyle for figuring this out
  • Loading branch information
tracernz authored and mlyle committed Mar 9, 2017
1 parent 3fc213c commit 190852f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions make/scripts/version-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def _get_dirty(self):
self._dirty = True

def _get_authors_since_release(self):
"""Get list of authors since the last full release tag (.n are ignored)"""
self._authors_since_release = []
self._exec('show-ref --tags')
pat = re.compile('^refs/tags/(?P<type>[A-Za-z]*)\-(?P<rel>(?P<date>[0-9]{8})(\.(?P<suffix>[0-9]*))?)$')
Expand Down Expand Up @@ -138,11 +139,12 @@ def _get_authors_since_release(self):

self._exec('shortlog -s {}..HEAD'.format(last_rel['ref']))
if self._rc == 0:
self._authors_since_release = sorted([l.strip().split('\t', 1)[1] for l in self._out.splitlines()], key=str.lower)
self._authors_since_release = sorted([l.strip().split(None, 1)[1] for l in self._out.splitlines()], key=str.lower)

def _get_authors(self):
"""Get all-time list of authors sorted by contributions"""
self._authors = []
self._exec('shortlog -sn')
self._exec('shortlog -sn HEAD')
if self._rc == 0:
self._authors = [l.strip().split(None, 1)[1] for l in self._out.splitlines()]

Expand Down

0 comments on commit 190852f

Please sign in to comment.