D7544: subrepo: use pycompat.open directly instead of importing open from pycompat

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Dec 4 01:16:55 EST 2019


spectral retitled this revision from "py3: remove incorrect b prefix on second argument to open in subrepo.py" to "subrepo: use pycompat.open directly instead of importing open from pycompat".
spectral updated this revision to Diff 18468.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7544?vs=18464&id=18468

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7544/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7544

AFFECTED FILES
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -19,7 +19,6 @@
 import xml.dom.minidom
 
 from .i18n import _
-from .pycompat import open
 from . import (
     cmdutil,
     encoding,
@@ -1434,7 +1433,7 @@
         # which is mostly progress and useful info
         errpipe = None
         if self.ui.quiet:
-            errpipe = open(os.devnull, b'w')
+            errpipe = pycompat.open(os.devnull, b'w')
         if self.ui._colormode and len(commands) and commands[0] == b"diff":
             # insert the argument in the front,
             # the end of git diff arguments is used for paths



To: spectral, #hg-reviewers
Cc: mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list