Mercurial > piecrust2
changeset 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 | 46025a1b5434 |
children | 112ff1ab110c |
files | garcon/changelog.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
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)