[PATCH 1 of 8 v3] convert: git use absolute_import

Yuya Nishihara yuya at tcha.org
Fri Mar 4 09:14:53 EST 2016


On Wed, 02 Mar 2016 14:55:50 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1456951333 0
> #      Wed Mar 02 20:42:13 2016 +0000
> # Node ID 836d43c8127b9c323d8fb5c00e875dbbc1a27536
> # Parent  c7f89ad87baef87f00c507545dfd4cc824bc3131
> convert: git use absolute_import
> 
> diff --git a/hgext/convert/git.py b/hgext/convert/git.py
> --- a/hgext/convert/git.py
> +++ b/hgext/convert/git.py
> @@ -4,14 +4,21 @@
>  #
>  # This software may be used and distributed according to the terms of the
>  # GNU General Public License version 2 or any later version.
> +from __future__ import absolute_import
>  
>  import os
>  import subprocess
> -from mercurial import util, config, error
> -from mercurial.node import hex, nullid
> +from mercurial import (
> +    config,
> +    error,
> +    node as nodemod,

Did we decide to ban "from node import xxx" ?
I think node.py is small enough to bypass the demand loading.

I'm afraid of importing your tons of absoulte_import patches because they
change the import style of the node module.


More information about the Mercurial-devel mailing list