[PATCH 1 of 3] util: add versiontuple() for returning parsed version information
Yuya Nishihara
yuya at tcha.org
Wed Dec 2 14:35:01 UTC 2015
On Fri, 27 Nov 2015 22:46:39 +0900, Yuya Nishihara wrote:
> On Tue, 24 Nov 2015 15:19:08 -0800, Gregory Szorc wrote:
> > # HG changeset patch
> > # User Gregory Szorc <gregory.szorc at gmail.com>
> > # Date 1448403831 28800
> > # Tue Nov 24 14:23:51 2015 -0800
> > # Node ID 9a38b970471b77e566d28f95643d9d21213f97a8
> > # Parent df9b73d2d444ae82fe8d3fe6cf682a93b2c4a7ef
> > util: add versiontuple() for returning parsed version information
> > + parts = v.split('+')
> > + if len(parts) == 1:
> > + vparts, extra = parts[0], None
> > + else:
> > + vparts, extra = parts
>
> Unchanged. I'm not sure if ValueError is intended here for len(parts) > 2.
Oops, I found a version could be "3.6.1+306-fc3381d38833+20151202" if working
copy is dirty. I'll push the fixed version soon.
More information about the Mercurial-devel
mailing list