changeset 25919:8221fefaea08

bundle2: use absolute_import
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 07 Aug 2015 19:54:08 -0700
parents 47f36e050c2e
children 5aaf51c14fea
files mercurial/bundle2.py
diffstat 1 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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') %