Mercurial > piecrust2
diff garcon/changelog.py @ 1000:68f799dc4680
cm: Generate CHANGELOG from the current branch instead of always master. Fix encoding problems.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 21 Nov 2017 10:52:51 -0800 |
parents | be8b233cc69a |
children | 2e5c5d33d62c |
line wrap: on
line diff
--- a/garcon/changelog.py Tue Nov 21 09:54:56 2017 -0800 +++ b/garcon/changelog.py Tue Nov 21 10:52:51 2017 -0800 @@ -2,6 +2,7 @@ import os.path import re import time +import codecs import argparse import subprocess @@ -50,9 +51,9 @@ "Mercurial clone of the PieCrust repository.") hglog = subprocess.check_output([ 'hg', 'log', - '--rev', 'reverse(::master)', + '--rev', 'reverse(::.)', '--template', hg_log_template]) - hglog = hglog.decode('utf8') + hglog = codecs.decode(hglog, encoding='utf-8', errors='replace') _, out_ext = os.path.splitext(out_file) templates = _get_templates(out_ext)