Patchwork [7,of,7] revlog: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 13, 2015, 7:34 a.m.
Message ID <003ce7b3b39413c86a8a.1449992057@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/12010/
State Accepted
Headers show

Comments

Gregory Szorc - Dec. 13, 2015, 7:34 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1449991338 28800
#      Sat Dec 12 23:22:18 2015 -0800
# Node ID 003ce7b3b39413c86a8a5fe87c4be36ad4e68b2c
# Parent  2d07da2009b3176818e6ee2678fbe0f50fbd9e7b
revlog: use absolute_import
Augie Fackler - Dec. 15, 2015, 6:13 p.m.
On Sat, Dec 12, 2015 at 11:34:17PM -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1449991338 28800
> #      Sat Dec 12 23:22:18 2015 -0800
> # Node ID 003ce7b3b39413c86a8a5fe87c4be36ad4e68b2c
> # Parent  2d07da2009b3176818e6ee2678fbe0f50fbd9e7b
> revlog: use absolute_import

These are queued, thanks

>
> diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> --- a/mercurial/revlog.py
> +++ b/mercurial/revlog.py
> @@ -10,14 +10,31 @@
>  This provides efficient delta storage with O(1) retrieve and append
>  and O(changes) merge between branches.
>  """
>
> +from __future__ import absolute_import
> +
> +import collections
> +import errno
> +import struct
> +import zlib
> +
>  # import stuff from node for others to import from revlog
> -import collections
> -from node import bin, hex, nullid, nullrev
> -from i18n import _
> -import ancestor, mdiff, parsers, error, util, templatefilters
> -import struct, zlib, errno
> +from .node import (
> +    bin,
> +    hex,
> +    nullid,
> +    nullrev,
> +)
> +from .i18n import _
> +from . import (
> +    ancestor,
> +    error,
> +    mdiff,
> +    parsers,
> +    templatefilters,
> +    util,
> +)
>
>  _pack = struct.pack
>  _unpack = struct.unpack
>  _compress = zlib.compress
> diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t
> +++ b/tests/test-check-py3-compat.t
> @@ -122,9 +122,8 @@
>    mercurial/mdiff.py not using absolute_import
>    mercurial/patch.py not using absolute_import
>    mercurial/pvec.py not using absolute_import
>    mercurial/py3kcompat.py not using absolute_import
> -  mercurial/revlog.py not using absolute_import
>    mercurial/scmposix.py not using absolute_import
>    mercurial/scmutil.py not using absolute_import
>    mercurial/scmwindows.py not using absolute_import
>    mercurial/store.py not using absolute_import
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -10,14 +10,31 @@ 
 This provides efficient delta storage with O(1) retrieve and append
 and O(changes) merge between branches.
 """
 
+from __future__ import absolute_import
+
+import collections
+import errno
+import struct
+import zlib
+
 # import stuff from node for others to import from revlog
-import collections
-from node import bin, hex, nullid, nullrev
-from i18n import _
-import ancestor, mdiff, parsers, error, util, templatefilters
-import struct, zlib, errno
+from .node import (
+    bin,
+    hex,
+    nullid,
+    nullrev,
+)
+from .i18n import _
+from . import (
+    ancestor,
+    error,
+    mdiff,
+    parsers,
+    templatefilters,
+    util,
+)
 
 _pack = struct.pack
 _unpack = struct.unpack
 _compress = zlib.compress
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -122,9 +122,8 @@ 
   mercurial/mdiff.py not using absolute_import
   mercurial/patch.py not using absolute_import
   mercurial/pvec.py not using absolute_import
   mercurial/py3kcompat.py not using absolute_import
-  mercurial/revlog.py not using absolute_import
   mercurial/scmposix.py not using absolute_import
   mercurial/scmutil.py not using absolute_import
   mercurial/scmwindows.py not using absolute_import
   mercurial/store.py not using absolute_import