comparison tests/fixtures/binaryfiles.sh @ 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
children
comparison
equal deleted inserted replaced
168:4f26fa049452 169:f1919e1c35bf
1 #!/bin/sh
2 #
3 # Generate binaryfiles.svndump
4 #
5
6 mkdir temp
7 cd temp
8
9 mkdir project-orig
10 cd project-orig
11 mkdir trunk
12 cd ..
13
14 svnadmin create testrepo
15 svnurl=file://`pwd`/testrepo
16 svn import project-orig $svnurl -m "init project"
17
18 svn co $svnurl project
19 cd project/trunk
20 # Add a regular binary file, and an unflagged one
21 python -c "file('binary1', 'wb').write('a\0\0\nb\0b')"
22 python -c "file('binary2', 'wb').write('b\0\0\nc\0d')"
23 svn add binary1 binary2
24 svn propset svn:mime-type application/octet-stream binary1
25 svn propdel svn:mime-type binary2
26 svn ci -m 'add binaries'
27 # Update them
28 python -c "file('binary1', 'wb').write('a\0\0\nc\0d')"
29 python -c "file('binary2', 'wb').write('b\0\0\0\nd\0e')"
30 svn ci -m 'change binaries'
31 # Remove them
32 svn rm binary1 binary2
33 svn ci -m 'remove binaries'
34 cd ../..
35
36 svnadmin dump testrepo > ../binaryfiles.svndump