[PATCH 4 of 5] branchmap: use absolute_import

Gregory Szorc gregory.szorc at gmail.com
Fri Aug 7 22:17:33 CDT 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1439002315 25200
#      Fri Aug 07 19:51:55 2015 -0700
# Branch stable
# Node ID 5440ae4276449b050696271b49c92efc7511678c
# Parent  1609777cd78864bfbf276e2d68e91774c8e3955e
branchmap: use absolute_import

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -4,15 +4,30 @@
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from node import bin, hex, nullid, nullrev
-import encoding
-import scmutil
-import util
+from __future__ import absolute_import
+
+import array
+import struct
 import time
-from array import array
-from struct import calcsize, pack, unpack
+
+from .node import (
+    bin,
+    hex,
+    nullid,
+    nullrev,
+)
+from . import (
+    encoding,
+    scmutil,
+    util,
+)
+
+array = array.array
+calcsize = struct.calcsize
+pack = struct.pack
+unpack = struct.unpack
 
 def _filename(repo):
     """name of a branchcache file for a given repo or repoview"""
     filename = "cache/branch2"


More information about the Mercurial-devel mailing list