[PATCH 3 of 6] py3: make raise statement python3 compatible

Yuya Nishihara yuya at tcha.org
Sat May 14 04:33:28 EDT 2016


On Thu, 12 May 2016 17:07:21 -0500, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1463089684 -19800
> #      Fri May 13 03:18:04 2016 +0530
> # Node ID badb396cbcc981bfc5c4ed3d0c83c4133042b6ca
> # Parent  996bc5cc90f3564ee364fdfefff7f9bde240245e
> py3: make raise statement python3 compatible
> 
> In python3
> 	raise error, message
> has been changed to
> 	raise error(message)
> 
> In additional to that nodes.SkipNode is changed to nodes.SkipNode() so that it creates an instance directly.

I've wrapped the commit message to 80 col.

> diff --git a/doc/hgmanpage.py b/doc/hgmanpage.py
> --- a/doc/hgmanpage.py
> +++ b/doc/hgmanpage.py
> @@ -415,7 +415,7 @@
>          else:
>              self._docinfo[name] = node.astext()
>          self._docinfo_keys.append(name)
> -        raise nodes.SkipNode
> +        raise nodes.SkipNode()

Perhaps we generally do "raise StopIteration" or "raise nodes.SkipNode"
(with no parens), but I don't care much about it.


More information about the Mercurial-devel mailing list