Patchwork [3,of,8,v3] convert: filemap use absolute_import

login
register
mail settings
Submitter timeless@mozdev.org
Date March 2, 2016, 8:55 p.m.
Message ID <273acc6554784fa0fdb6.1456952152@waste.org>
Download mbox | patch
Permalink /patch/13557/
State Accepted
Delegated to: Augie Fackler
Headers show

Comments

timeless@mozdev.org - March 2, 2016, 8:55 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1456909258 0
#      Wed Mar 02 09:00:58 2016 +0000
# Node ID 273acc6554784fa0fdb6642b88c5650aa03b2f13
# Parent  298def167fbd74168a580f77906a4f5d8f7a0165
convert: filemap use absolute_import

Patch

diff --git a/hgext/convert/filemap.py b/hgext/convert/filemap.py
--- a/hgext/convert/filemap.py
+++ b/hgext/convert/filemap.py
@@ -3,12 +3,16 @@ 
 #
 # 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 posixpath
 import shlex
+from mercurial import (
+    error,
+)
 from mercurial.i18n import _
-from mercurial import error
-from common import SKIPREV, converter_source
+from . import common
+SKIPREV = common.SKIPREV
 
 def rpairs(path):
     '''Yield tuples with path split at '/', starting with the full path.
@@ -164,7 +168,7 @@ 
 #   touch files we're interested in, but also merges that merge two
 #   or more interesting revisions.
 
-class filemap_source(converter_source):
+class filemap_source(common.converter_source):
     def __init__(self, ui, baseconverter, filemap):
         super(filemap_source, self).__init__(ui)
         self.base = baseconverter
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -40,7 +40,6 @@ 
   hgext/convert/cvs.py not using absolute_import
   hgext/convert/cvsps.py not using absolute_import
   hgext/convert/darcs.py not using absolute_import
-  hgext/convert/filemap.py not using absolute_import
   hgext/convert/hg.py not using absolute_import
   hgext/convert/monotone.py not using absolute_import
   hgext/convert/p4.py not using absolute_import