comparison tests/test-git-import @ 12574:77600d697d0e stable

patch: fix rename text to binary file (issue2400)
author Patrick Mezard <pmezard@gmail.com>
date Mon, 27 Sep 2010 22:47:10 +0200
parents 377d879e9d1b
children
comparison
equal deleted inserted replaced
12571:2702bea2ee76 12574:77600d697d0e
1 #!/bin/sh 1 #!/bin/sh
2
3 . $TESTDIR/helpers.sh
2 4
3 hg init a 5 hg init a
4 cd a 6 cd a
5 7
6 echo % new file 8 echo % new file
224 similarity index 100% 226 similarity index 100%
225 copy from foo2 227 copy from foo2
226 copy to foo3 228 copy to foo3
227 EOF 229 EOF
228 hg tip -q 230 hg tip -q
229
230 cat foo3 231 cat foo3
232
233 echo % move text file and patch as binary
234 echo a > text2
235 hg ci -Am0
236 hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
237 diff --git a/text2 b/binary2
238 rename from text2
239 rename to binary2
240 index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
241 GIT binary patch
242 literal 5
243 Mc$`b*O5$Pw00T?_*Z=?k
244
245 EOF
246 cat binary2 | repr
247 hg st --copies --change .