changeset 52386:6856d88410b2

rebase: stop using the `pycompat.open()` shim
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 05 Dec 2024 12:51:59 -0500
parents 7a5b026c88df
children 648c96d6fa68
files hgext/rebase.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Thu Dec 05 12:49:02 2024 -0500
+++ b/hgext/rebase.py	Thu Dec 05 12:51:59 2024 -0500
@@ -24,7 +24,6 @@
     short,
     wdirrev,
 )
-from mercurial.pycompat import open
 from mercurial import (
     bookmarks,
     cmdutil,
@@ -1857,7 +1856,7 @@
 def isagitpatch(repo, patchname):
     """Return true if the given patch is in git format"""
     mqpatch = os.path.join(repo.mq.path, patchname)
-    for line in patch.linereader(open(mqpatch, b'rb')):
+    for line in patch.linereader(open(mqpatch, 'rb')):
         if line.startswith(b'diff --git'):
             return True
     return False