diff options
author | W. Trevor King <wking@drexel.edu> | 2010-10-21 07:33:03 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-10-21 07:33:03 -0400 |
commit | 4c43d06e94c0ed1774af8de1088e48de01c3901f (patch) | |
tree | ea63c19ea6cc50275d83ad7f8e43450db2add811 | |
parent | 70f239c0cb1958c42e833e193811421c2ae98ee4 (diff) | |
download | bugseverywhere-4c43d06e94c0ed1774af8de1088e48de01c3901f.tar.gz |
Simpler (and faster) ChangeLog format in release.py.
-rwxr-xr-x | release.py | 21 |
1 files changed, 5 insertions, 16 deletions
@@ -24,7 +24,6 @@ import string import sys from libbe.util.subproc import Pipe, invoke -from libbe.util.encoding import set_file_contents from update_copyright import update_authors, update_files @@ -102,23 +101,13 @@ def make_version(): def make_changelog(filename, tag): """Generate a ChangeLog from the git history. - Based on - http://stackoverflow.com/questions/2976665/git-changelog-day-by-day + Not the most ChangeLog-esque format, but iterating through commits + by hand is just too slow. """ print 'generate ChangeLog file', filename, 'up to tag', tag - p = invoke(['git', 'log', '--no-merges', '--format="%cd"', '--date=short', - '%s..%s' % (INITIAL_COMMIT, tag)]) - days = sorted(set(p.stdout.split('\n')), reverse=True) - log = [] - next = None - for day in days: - args = ['git', 'log', '--no-merges', '--format=" * s"', '--since', day] - if next != None: - args.extend(['--until', next]) - p = invoke(args) - log.extend(['', day, p.stdout]) - next = day - set_file_contents(filename, '\n'.join(log), encoding='utf-8') + p = invoke(['git', 'log', '--no-merges', + '%s..%s' % (INITIAL_COMMIT, tag)], + stdout=open(filename, 'w')), def set_vcs_name(filename, vcs_name='None'): """Exported directory is not a git repository, so set vcs_name to |