[PATCH 7 of 7] py3: use absolute_import in hgk.py

Sean Farley sean at farley.io
Sun Apr 17 13:30:45 EDT 2016


Robert Stanca <robert.stanca7 at gmail.com> writes:

> # HG changeset patch
> # User Robert Stanca <robert.stanca7 at gmail.com>
> # Date 1460912371 -10800
> #      Sun Apr 17 19:59:31 2016 +0300
> # Node ID ab63599d55a290f5bdfdbc28d1b4c1b5b9c33ad0
> # Parent  c6c5a02fe55672055d74551a0a00730ada9f871a
> py3: use absolute_import in hgk.py

FYI, the code freeze for 3.8 has already started:

https://www.mercurial-scm.org/wiki/TimeBasedReleasePlan#Code_Freeze

There's a Google calendar link with the dates as well on that wiki page.

>
> diff -r c6c5a02fe556 -r ab63599d55a2 hgext/hgk.py
> --- a/hgext/hgk.py	Sun Apr 17 19:58:42 2016 +0300
> +++ b/hgext/hgk.py	Sun Apr 17 19:59:31 2016 +0300
> @@ -34,10 +34,22 @@
>  vdiff on hovered and selected revisions.
>  '''
>  
> +from __future__ import absolute_import
>  import os
> -from mercurial import cmdutil, commands, patch, scmutil, obsolete
> -from mercurial.node import nullid, nullrev, short
> -from mercurial.i18n import _
> +from mercurial.i18n import (
> +    _,
> +)
> +from mercurial import (
> +    cmdutil,
> +    commands,
> +    node,
> +    obsolete,
> +    patch,
> +    scmutil,
> +)
> +nullid = node.nullid
> +nullrev = node.nullrev
> +short = node.short
>  
>  cmdtable = {}
>  command = cmdutil.command(cmdtable)
> diff -r c6c5a02fe556 -r ab63599d55a2 tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t	Sun Apr 17 19:58:42 2016 +0300
> +++ b/tests/test-check-py3-compat.t	Sun Apr 17 19:59:31 2016 +0300
> @@ -16,7 +16,6 @@
>    hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
>    hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
>    hgext/hgcia.py not using absolute_import
> -  hgext/hgk.py not using absolute_import
>    hgext/highlight/__init__.py not using absolute_import
>    hgext/highlight/highlight.py not using absolute_import
>    hgext/largefiles/__init__.py not using absolute_import
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list