Mercurial > hg
comparison mercurial/posix.py @ 25967:224a33452ed4
posix: use absolute_import
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Aug 2015 19:56:58 -0700 |
parents | 328739ea70c3 |
children | 99b6afff09ae |
comparison
equal
deleted
inserted
replaced
25966:f14cea32e1d4 | 25967:224a33452ed4 |
---|---|
3 # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others | 3 # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others |
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from i18n import _ | 8 from __future__ import absolute_import |
9 import encoding | 9 |
10 import os, sys, errno, stat, getpass, pwd, grp, socket, tempfile, unicodedata | 10 import errno |
11 import fcntl | |
12 import getpass | |
13 import grp | |
14 import os | |
15 import pwd | |
16 import re | |
11 import select | 17 import select |
12 import fcntl, re | 18 import socket |
19 import stat | |
20 import sys | |
21 import tempfile | |
22 import unicodedata | |
23 | |
24 from .i18n import _ | |
25 from . import ( | |
26 encoding, | |
27 ) | |
13 | 28 |
14 posixfile = open | 29 posixfile = open |
15 normpath = os.path.normpath | 30 normpath = os.path.normpath |
16 samestat = os.path.samestat | 31 samestat = os.path.samestat |
17 oslink = os.link | 32 oslink = os.link |
457 def gethgcmd(): | 472 def gethgcmd(): |
458 return sys.argv[:1] | 473 return sys.argv[:1] |
459 | 474 |
460 def termwidth(): | 475 def termwidth(): |
461 try: | 476 try: |
462 import termios, array | 477 import array |
478 import termios | |
463 for dev in (sys.stderr, sys.stdout, sys.stdin): | 479 for dev in (sys.stderr, sys.stdout, sys.stdin): |
464 try: | 480 try: |
465 try: | 481 try: |
466 fd = dev.fileno() | 482 fd = dev.fileno() |
467 except AttributeError: | 483 except AttributeError: |