##// END OF EJS Templates
patch: stop using the `pycompat.open()` shim
Matt Harbison -
r53276:c921c23a default
parent child Browse files
Show More
@@ -22,7 +22,6 from .node import (
22 sha1nodeconstants,
22 sha1nodeconstants,
23 short,
23 short,
24 )
24 )
25 from .pycompat import open
26 from . import (
25 from . import (
27 copies,
26 copies,
28 diffhelper,
27 diffhelper,
@@ -2382,7 +2381,7 def patchbackend(
2382
2381
2383 store = filestore()
2382 store = filestore()
2384 try:
2383 try:
2385 fp = open(patchobj, b'rb')
2384 fp = open(patchobj, 'rb')
2386 except TypeError:
2385 except TypeError:
2387 fp = patchobj
2386 fp = patchobj
2388 try:
2387 try:
@@ -2458,7 +2457,7 def patch(
2458 def changedfiles(ui, repo, patchpath, strip=1, prefix=b''):
2457 def changedfiles(ui, repo, patchpath, strip=1, prefix=b''):
2459 backend = fsbackend(ui, repo.root)
2458 backend = fsbackend(ui, repo.root)
2460 prefix = _canonprefix(repo, prefix)
2459 prefix = _canonprefix(repo, prefix)
2461 with open(patchpath, b'rb') as fp:
2460 with open(patchpath, 'rb') as fp:
2462 changed = set()
2461 changed = set()
2463 for state, values in iterhunks(fp):
2462 for state, values in iterhunks(fp):
2464 if state == b'file':
2463 if state == b'file':
General Comments 0
You need to be logged in to leave comments. Login now