Patchwork [2,of,7] manifest: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 23, 2015, 12:31 a.m.
Message ID <355447b7041d7767c1b8.1450830705@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/12254/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Gregory Szorc - Dec. 23, 2015, 12:31 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1450762546 28800
#      Mon Dec 21 21:35:46 2015 -0800
# Node ID 355447b7041d7767c1b8e7d8cb719563b220dc3e
# Parent  d2fed40aef8387dda33f0758728b69bae86ff163
manifest: use absolute_import

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -4,13 +4,23 @@ 
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from i18n import _
-import mdiff, parsers, error, revlog, util
-import array, struct
+from __future__ import absolute_import
+
+import array
+import heapq
 import os
-import heapq
+import struct
+
+from .i18n import _
+from . import (
+    error,
+    mdiff,
+    parsers,
+    revlog,
+    util,
+)
 
 propertycache = util.propertycache
 
 def _parsev1(data):
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
@@ -115,9 +115,8 @@ 
   mercurial/lsprof.py requires print_function
   mercurial/lsprofcalltree.py not using absolute_import
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function
-  mercurial/manifest.py not using absolute_import
   setup.py not using absolute_import
   tests/filterpyflakes.py requires print_function
   tests/generate-working-copy-states.py requires print_function
   tests/get-with-headers.py requires print_function