[PATCH 10 of 21 WIP-PY3K] patch: convert to absolute_import

Matthew Turk matthewturk at gmail.com
Mon Oct 12 16:24:54 CDT 2015


# HG changeset patch
# User Matthew Turk <matthewturk at gmail.com>
# Date 1444684038 18000
#      Mon Oct 12 16:07:18 2015 -0500
# Node ID 7019a7cf1e31fb3898104330cf2066c138bcb234
# Parent  656e51ff0a4f142dc63409a533f89b89f66fb07f
patch: convert to absolute_import

diff -r 656e51ff0a4f -r 7019a7cf1e31 mercurial/patch.py
--- a/mercurial/patch.py	Mon Oct 12 16:05:32 2015 -0500
+++ b/mercurial/patch.py	Mon Oct 12 16:07:18 2015 -0500
@@ -6,14 +6,25 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
+from __future__ import absolute_import
+
 import collections
 import cStringIO, email, os, errno, re, posixpath, copy
 import tempfile, zlib, shutil
 
-from i18n import _
-from node import hex, short
-import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error
-import pathutil
+from .i18n import _
+from .node import hex, short
+from . import (
+    base85,
+    mdiff,
+    scmutil,
+    util,
+    diffhelpers,
+    copies,
+    encoding,
+    error,
+    pathutil
+)
 
 gitre = re.compile('diff --git a/(.*) b/(.*)')
 tabsplitter = re.compile(r'(\t+|[^\t]+)')


More information about the Mercurial-devel mailing list