Properly initialize version string in python-hglib setup.py

Yuya Nishihara yuya at tcha.org
Thu Jul 23 08:12:25 CDT 2015


On Tue, 21 Jul 2015 21:09:20 +0000 (UTC), Peter Elmers wrote:
> # HG changeset patch
> # User Peter Elmers <peter.elmers at yahoo.com>
> # Date 1437512568 25200
> #      Tue Jul 21 14:02:48 2015 -0700
> # Node ID 1b327fa07920e0717cf72438f07cb2afa985a833
> # Parent  ec935041d1ff0fd2aa8cb666d79e6dcca398ddba
> Issue 3924: parse PKG-INFO for version information.

We prefer "topic: summary (issueXXXX)", for example,

setup: parse PKG-INFO for version information (issue3924)

https://mercurial.selenic.com/wiki/ContributingChanges#Submission_checklist

> +elif os.path.exists('PKG-INFO'):
> +    kw = dict([[t.strip() for t in l.split(':', 1)]
> +               for l in open('PKG-INFO') if ':' in l])
> +    version = kw.get('Version', version)

The patch looks good to me, but it can't be applied because all
whitespaces are damaged. Please consider using the patchbomb extension.

https://mercurial.selenic.com/wiki/PatchbombExtension


More information about the Mercurial-devel mailing list