Patchwork [6,of,9] diffhelpers: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 12, 2015, 6:47 p.m.
Message ID <3316f0cee2f31025baf3.1449946069@gps-mbp.local>
Download mbox | patch
Permalink /patch/11988/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Gregory Szorc - Dec. 12, 2015, 6:47 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1449945341 18000
#      Sat Dec 12 13:35:41 2015 -0500
# Node ID 3316f0cee2f31025baf33174d426f4da659d7cb1
# Parent  2fa9b220087a948d54ecbdb47a186c3833633c27
diffhelpers: use absolute_import

Patch

diff --git a/mercurial/pure/diffhelpers.py b/mercurial/pure/diffhelpers.py
--- a/mercurial/pure/diffhelpers.py
+++ b/mercurial/pure/diffhelpers.py
@@ -4,8 +4,10 @@ 
 #
 # 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
+
 def addlines(fp, hunk, lena, lenb, a, b):
     while True:
         todoa = lena - len(a)
         todob = lenb - len(b)
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
@@ -121,9 +121,8 @@ 
   mercurial/mail.py requires print_function
   mercurial/manifest.py not using absolute_import
   mercurial/mdiff.py not using absolute_import
   mercurial/patch.py not using absolute_import
-  mercurial/pure/diffhelpers.py not using absolute_import
   mercurial/pure/mpatch.py not using absolute_import
   mercurial/pure/osutil.py not using absolute_import
   mercurial/pure/parsers.py not using absolute_import
   mercurial/pvec.py not using absolute_import