comparison fetch_command.py @ 169:f1919e1c35bf

fetch_command: cancel patching when encountering binary diffs Mercurial patching code does not support hunks with embedded nul characters.
author Patrick Mezard <pmezard@gmail.com>
date Tue, 30 Dec 2008 20:33:56 -0600
parents 4f26fa049452
children f80132c5fea5
comparison
equal deleted inserted replaced
168:4f26fa049452 169:f1919e1c35bf
227 raise BadPatchApply('subversion diffing code is not supported') 227 raise BadPatchApply('subversion diffing code is not supported')
228 except core.SubversionException, e: 228 except core.SubversionException, e:
229 if (hasattr(e, 'apr_err') and e.apr_err != 160013): 229 if (hasattr(e, 'apr_err') and e.apr_err != 160013):
230 raise 230 raise
231 raise BadPatchApply('previous revision does not exist') 231 raise BadPatchApply('previous revision does not exist')
232 if '\0' in d:
233 raise BadPatchApply('binary diffs are not supported')
232 files_data = {} 234 files_data = {}
233 binary_files = {} 235 binary_files = {}
234 touched_files = {} 236 touched_files = {}
235 for m in binary_file_re.findall(d): 237 for m in binary_file_re.findall(d):
236 # we have to pull each binary file by hand as a fulltext, 238 # we have to pull each binary file by hand as a fulltext,