Patchwork [4,of,5] branchmap: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Aug. 8, 2015, 3:17 a.m.
Message ID <5440ae4276449b050696.1439003853@vm-ubuntu-main.gateway.sonic.net>
Download mbox | patch
Permalink /patch/10161/
State Accepted
Headers show

Comments

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

Patch

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"