[PATCH 1 of 3 STABLE] date: refactor timezone parsing

Yuya Nishihara yuya at tcha.org
Thu Jul 28 09:10:00 EDT 2016


On Wed, 27 Jul 2016 15:48:40 -0500, Matt Mackall wrote:
> # HG changeset patch
> # User Matt Mackall <mpm at selenic.com>
> # Date 1469650459 18000
> #      Wed Jul 27 15:14:19 2016 -0500
> # Branch stable
> # Node ID d88bdf016df204daf510921b38d5250336cc9991
> # Parent  387bdd53c77e9f61bd7b0d491717440f7f57563a
> date: refactor timezone parsing

> +++ b/mercurial/templater.py	Wed Jul 27 15:14:19 2016 -0500
> @@ -670,7 +670,7 @@
>          tzoffset = None
>          tz = evalfuncarg(context, mapping, args[1])
>          if isinstance(tz, str):
> -            tzoffset = util.parsetimezone(tz)
> +            tzoffset, remainder = util.parsetimezone(tz)

{localdate(date, "blahblahGMT")} should be rejected.


More information about the Mercurial-devel mailing list