contrib: python-hook-examples use absolute_import
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 16 Mar 2016 04:13:28 +0530
changeset 28562 2b585677220e
parent 28561 330584235c22
child 28563 62250a48dc7f
contrib: python-hook-examples use absolute_import
contrib/python-hook-examples.py
tests/test-check-py3-compat.t
--- a/contrib/python-hook-examples.py	Wed Mar 16 04:12:16 2016 +0530
+++ b/contrib/python-hook-examples.py	Wed Mar 16 04:13:28 2016 +0530
@@ -1,7 +1,11 @@
 '''
 Examples of useful python hooks for Mercurial.
 '''
-from mercurial import patch, util
+from __future__ import absolute_import
+from mercurial import (
+    patch,
+    util,
+)
 
 def diffstat(ui, repo, **kwargs):
     '''Example usage:
--- a/tests/test-check-py3-compat.t	Wed Mar 16 04:12:16 2016 +0530
+++ b/tests/test-check-py3-compat.t	Wed Mar 16 04:13:28 2016 +0530
@@ -5,7 +5,6 @@
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
   contrib/import-checker.py not using absolute_import
   contrib/import-checker.py requires print_function
-  contrib/python-hook-examples.py not using absolute_import
   contrib/revsetbenchmarks.py not using absolute_import
   contrib/revsetbenchmarks.py requires print_function
   contrib/synthrepo.py not using absolute_import