[PATCH 5 of 8] py3: make contrib/hgperf use absolute_import

Pulkit Goyal 7895pulkit at gmail.com
Thu May 12 16:54:58 EDT 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1463086108 -19800
#      Fri May 13 02:18:28 2016 +0530
# Node ID 32da1f4d94f5034c1db8a42f85461b884dee0fa6
# Parent  6bb265962b9ffb4b36137233dc1513079d8a250c
py3: make contrib/hgperf use absolute_import

diff --git a/contrib/hgperf b/contrib/hgperf
--- a/contrib/hgperf
+++ b/contrib/hgperf
@@ -30,6 +30,8 @@
 execution of the target command correctly.
 '''
 
+from __future__ import absolute_import
+
 import os
 import sys
 
@@ -52,10 +54,12 @@
     sys.stderr.write("(check your install and PYTHONPATH)\n")
     sys.exit(-1)
 
-import mercurial.util
-import mercurial.dispatch
+import time
 
-import time
+from mercurial import (
+    disptach,
+    util,
+)
 
 def timer(func, title=None):
     results = []


More information about the Mercurial-devel mailing list