##// END OF EJS Templates
util: use absolute_import
Gregory Szorc -
r27358:ac839ee4 default
parent child Browse files
Show More
@@ -13,26 +13,47 This contains helper routines that are i
13 13 hide platform-specific details from the core.
14 14 """
15 15
16 import i18n
17 _ = i18n._
18 import error, osutil, encoding, parsers
19 import errno, shutil, sys, tempfile, traceback
16 from __future__ import absolute_import
17
18 import bz2
19 import calendar
20 import collections
21 import datetime
22 import errno
23 import gc
24 import hashlib
25 import imp
26 import os
20 27 import re as remod
21 import os, time, datetime, calendar, textwrap, signal, collections
22 import imp, socket, urllib
23 import gc
24 import bz2
28 import shutil
29 import signal
30 import socket
31 import subprocess
32 import sys
33 import tempfile
34 import textwrap
35 import time
36 import traceback
37 import urllib
25 38 import zlib
26 import hashlib
39
40 from . import (
41 encoding,
42 error,
43 i18n,
44 osutil,
45 parsers,
46 )
27 47
28 48 if os.name == 'nt':
29 import windows as platform
49 from . import windows as platform
30 50 else:
31 import posix as platform
51 from . import posix as platform
32 52
33 53 md5 = hashlib.md5
34 54 sha1 = hashlib.sha1
35 55 sha512 = hashlib.sha512
56 _ = i18n._
36 57
37 58 cachestat = platform.cachestat
38 59 checkexec = platform.checkexec
@@ -200,7 +221,6 except NameError:
200 221 def buffer(sliceable, offset=0):
201 222 return memoryview(sliceable)[offset:]
202 223
203 import subprocess
204 224 closefds = os.name == 'posix'
205 225
206 226 _chunksize = 4096
@@ -326,7 +346,7 def popen4(cmd, env=None, newlines=False
326 346 def version():
327 347 """Return version information if available."""
328 348 try:
329 import __version__
349 from . import __version__
330 350 return __version__.version
331 351 except ImportError:
332 352 return 'unknown'
@@ -128,7 +128,6
128 128 mercurial/scmwindows.py not using absolute_import
129 129 mercurial/similar.py not using absolute_import
130 130 mercurial/store.py not using absolute_import
131 mercurial/util.py not using absolute_import
132 131 mercurial/windows.py not using absolute_import
133 132 setup.py not using absolute_import
134 133 tests/filterpyflakes.py requires print_function
General Comments 0
You need to be logged in to leave comments. Login now