comparison mercurial/patch.py @ 37463:bbd240f81ac5

procutil: make explainexit() simply return a message (API) Almost all callers want it.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 07 Apr 2018 21:23:42 +0900
parents 00e4bd97b095
children ef661ce45cdb
comparison
equal deleted inserted replaced
37462:c0d0fd87ba7c 37463:bbd240f81ac5
2131 if files: 2131 if files:
2132 scmutil.marktouched(repo, files, similarity) 2132 scmutil.marktouched(repo, files, similarity)
2133 code = fp.close() 2133 code = fp.close()
2134 if code: 2134 if code:
2135 raise PatchError(_("patch command failed: %s") % 2135 raise PatchError(_("patch command failed: %s") %
2136 procutil.explainexit(code)[0]) 2136 procutil.explainexit(code))
2137 return fuzz 2137 return fuzz
2138 2138
2139 def patchbackend(ui, backend, patchobj, strip, prefix, files=None, 2139 def patchbackend(ui, backend, patchobj, strip, prefix, files=None,
2140 eolmode='strict'): 2140 eolmode='strict'):
2141 if files is None: 2141 if files is None: