diff 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
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -229,6 +229,8 @@ def stupid_diff_branchrev(ui, svn, hg_ed
         if (hasattr(e, 'apr_err') and e.apr_err != 160013):
             raise
         raise BadPatchApply('previous revision does not exist')
+    if '\0' in d:
+        raise BadPatchApply('binary diffs are not supported')
     files_data = {}
     binary_files = {}
     touched_files = {}