bundle2: use absolute_import
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 07 Aug 2015 19:54:08 -0700
changeset 25919 8221fefaea08
parent 25918 47f36e050c2e
child 25920 5aaf51c14fea
bundle2: use absolute_import
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Fri Aug 07 19:51:55 2015 -0700
+++ b/mercurial/bundle2.py	Fri Aug 07 19:54:08 2015 -0700
@@ -145,19 +145,25 @@
 preserve.
 """
 
+from __future__ import absolute_import
+
 import errno
-import sys
-import util
-import struct
-import urllib
+import re
 import string
-import obsolete
-import pushkey
-import url
-import re
+import struct
+import sys
+import urllib
 
-import changegroup, error, tags
-from i18n import _
+from .i18n import _
+from . import (
+    changegroup,
+    error,
+    obsolete,
+    pushkey,
+    tags,
+    url,
+    util,
+)
 
 _pack = struct.pack
 _unpack = struct.unpack
@@ -1233,7 +1239,7 @@
     # we need to make sure we trigger the creation of a transaction object used
     # for the whole processing scope.
     op.gettransaction()
-    import exchange
+    from . import exchange
     cg = exchange.readbundle(op.repo.ui, real_part, raw_url)
     if not isinstance(cg, changegroup.cg1unpacker):
         raise util.Abort(_('%s: not a bundle version 1.0') %