#!/bin/sh # Test interactions between mq and patch.eol echo "[extensions]" >> $HGRCPATH echo "mq=" >> $HGRCPATH echo "[diff]" >> $HGRCPATH echo "nodates=1" >> $HGRCPATH cat > makepatch.py < cateol.py <') line = line.replace('\n', '') print line EOF hg init repo cd repo echo '\.diff' > .hgignore echo '\.rej' >> .hgignore # Test different --eol values python -c 'file("a", "wb").write("a\nb\nc\nd\ne")' hg ci -Am adda python ../makepatch.py hg qimport eol.diff echo % should fail in strict mode hg qpush hg qpop echo % invalid eol hg --config patch.eol='LFCR' qpush hg qpop echo % force LF hg --config patch.eol='CRLF' qpush hg qrefresh python ../cateol.py .hg/patches/eol.diff python ../cateol.py a hg qpop echo % push again forcing LF and compare revisions hg --config patch.eol='CRLF' qpush python ../cateol.py a hg qpop echo % push again without LF and compare revisions hg qpush python ../cateol.py a hg qpop