From 190852f30b66c31db269eb9b1ff83c3702ac16f3 Mon Sep 17 00:00:00 2001 From: Michael Corcoran Date: Thu, 9 Mar 2017 06:07:59 +1300 Subject: [PATCH] Tools: Fix authors functions in version-info.py (#1617) Thanks to @mlyle for figuring this out --- make/scripts/version-info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make/scripts/version-info.py b/make/scripts/version-info.py index 44d24d671a..1f603185aa 100644 --- a/make/scripts/version-info.py +++ b/make/scripts/version-info.py @@ -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[A-Za-z]*)\-(?P(?P[0-9]{8})(\.(?P[0-9]*))?)$') @@ -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()]