| Index: sitescripts/extensions/bin/createNightlies.py |
| =================================================================== |
| --- a/sitescripts/extensions/bin/createNightlies.py |
| +++ b/sitescripts/extensions/bin/createNightlies.py |
| @@ -68,19 +68,19 @@ class NightlyBuild(object): |
| return subprocess.check_output(command) |
| def getChanges(self): |
| """ |
| retrieve changes between the current and previous ("first") revision |
| """ |
| command = ['hg', 'log', '-R', self.config.repository, '-r', 'tip:0', |
| - '-b', 'default', '-l', '50', |
| + '-b', 'default', '-l', '50', '--encoding', 'utf-8', |
| '--template', '{date|isodate}\\0{author|person}\\0{rev}\\0{desc}\\0\\0'] |
| - result = subprocess.check_output(command) |
| + result = subprocess.check_output(command).decode('utf-8') |
| for change in result.split('\0\0'): |
| if change: |
| date, author, revision, description = change.split('\0') |
| yield {'date': date, 'author': author, 'revision': revision, 'description': description} |
| def copyRepository(self): |
| ''' |
| @@ -99,17 +99,17 @@ class NightlyBuild(object): |
| baseDir = os.path.join(self.config.nightliesDirectory, self.basename) |
| if not os.path.exists(baseDir): |
| os.makedirs(baseDir) |
| changelogFile = "%s-%s.changelog.xhtml" % (self.basename, self.version) |
| changelogPath = os.path.join(baseDir, changelogFile) |
| self.changelogURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + changelogFile) |
| template = get_template(get_config().get('extensions', 'changelogTemplate')) |
| - template.stream({'changes': changes}).dump(changelogPath) |
| + template.stream({'changes': changes}).dump(changelogPath, encoding='utf-8') |
| linkPath = os.path.join(baseDir, '00latest.changelog.xhtml') |
| if hasattr(os, 'symlink'): |
| if os.path.exists(linkPath): |
| os.remove(linkPath) |
| os.symlink(os.path.basename(changelogPath), linkPath) |
| else: |
| shutil.copyfile(changelogPath, linkPath) |