comparison tests/test-mq @ 5026:48ebd6a83994

Test qnew --git
author Patrick Mezard <pmezard@gmail.com>
date Sat, 28 Jul 2007 20:15:54 +0200
parents bbdcacf7cef8
children 17d71a79a257
comparison
equal deleted inserted replaced
5025:7041869a1bf6 5026:48ebd6a83994
336 hg mv bleh barney 336 hg mv bleh barney
337 hg qrefresh --git 337 hg qrefresh --git
338 cat .hg/patches/bar 338 cat .hg/patches/bar
339 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r . 339 hg log -vC --template '{rev} {file_copies%filecopy}\n' -r .
340 340
341 echo % create a git patch
342 echo a > alexander
343 hg add alexander
344 hg qnew -f --git addalexander
345 cat .hg/patches/addalexander | grep diff
346
347 echo % create a git binary patch
348 cat > writebin.py <<EOF
349 import sys
350 path = sys.argv[1]
351 open(path, 'wb').write('BIN\x00ARY')
352 EOF
353 python writebin.py bucephalus
354
355 python "$TESTDIR/md5sum.py" bucephalus
356 hg add bucephalus
357 hg qnew -f --git addbucephalus
358 cat .hg/patches/addbucephalus | grep diff
359
360 echo % check binary patches can be popped and pushed
361 hg qpop
362 ! test -f bucephalus || echo % bucephalus should not be there
363 hg qpush
364 test -f bucephalus || echo % bucephalus should be there
365 python "$TESTDIR/md5sum.py" bucephalus
366
367
341 echo '% strip again' 368 echo '% strip again'
342 cd .. 369 cd ..
343 hg init strip 370 hg init strip
344 cd strip 371 cd strip
345 touch foo 372 touch foo