--- a/mercurial/patch.py Wed Dec 04 22:11:31 2024 -0500
+++ b/mercurial/patch.py Wed Dec 04 22:13:05 2024 -0500
@@ -22,7 +22,6 @@
sha1nodeconstants,
short,
)
-from .pycompat import open
from . import (
copies,
diffhelper,
@@ -2382,7 +2381,7 @@
store = filestore()
try:
- fp = open(patchobj, b'rb')
+ fp = open(patchobj, 'rb')
except TypeError:
fp = patchobj
try:
@@ -2458,7 +2457,7 @@
def changedfiles(ui, repo, patchpath, strip=1, prefix=b''):
backend = fsbackend(ui, repo.root)
prefix = _canonprefix(repo, prefix)
- with open(patchpath, b'rb') as fp:
+ with open(patchpath, 'rb') as fp:
changed = set()
for state, values in iterhunks(fp):
if state == b'file':