comparison mercurial/subrepo.py @ 43789:aea70ca7dd85

subrepo: use pycompat.open directly instead of importing open from pycompat Differential Revision: https://phab.mercurial-scm.org/D7544
author Kyle Lippincott <spectral@google.com>
date Tue, 03 Dec 2019 17:10:10 -0800
parents be8552f25cab
children 4b7d5d10c45d
comparison
equal deleted inserted replaced
43788:1fe2e574616e 43789:aea70ca7dd85
17 import sys 17 import sys
18 import tarfile 18 import tarfile
19 import xml.dom.minidom 19 import xml.dom.minidom
20 20
21 from .i18n import _ 21 from .i18n import _
22 from .pycompat import open
23 from . import ( 22 from . import (
24 cmdutil, 23 cmdutil,
25 encoding, 24 encoding,
26 error, 25 error,
27 exchange, 26 exchange,
1432 env[b'GIT_ALLOW_PROTOCOL'] = b'file:git:http:https:ssh' 1431 env[b'GIT_ALLOW_PROTOCOL'] = b'file:git:http:https:ssh'
1433 # unless ui.quiet is set, print git's stderr, 1432 # unless ui.quiet is set, print git's stderr,
1434 # which is mostly progress and useful info 1433 # which is mostly progress and useful info
1435 errpipe = None 1434 errpipe = None
1436 if self.ui.quiet: 1435 if self.ui.quiet:
1437 errpipe = open(os.devnull, b'w') 1436 errpipe = pycompat.open(os.devnull, b'w')
1438 if self.ui._colormode and len(commands) and commands[0] == b"diff": 1437 if self.ui._colormode and len(commands) and commands[0] == b"diff":
1439 # insert the argument in the front, 1438 # insert the argument in the front,
1440 # the end of git diff arguments is used for paths 1439 # the end of git diff arguments is used for paths
1441 commands.insert(1, b'--color') 1440 commands.insert(1, b'--color')
1442 p = subprocess.Popen( 1441 p = subprocess.Popen(