diff -r 4f13ed6ee544 -r 441dc7becd43 tests/test-win32text --- a/tests/test-win32text Thu Apr 23 15:40:10 2009 -0500 +++ b/tests/test-win32text Fri Apr 24 00:06:01 2009 -0700 @@ -1,5 +1,8 @@ #!/bin/sh +hg init t +cd t + cat > unix2dos.py <').replace('\r', '').replace('\0', '')) EOF -hg init echo '[hooks]' >> .hg/hgrc echo 'pretxncommit.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc echo 'pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc @@ -23,14 +25,41 @@ echo hello > f hg add f +echo commit should succeed hg ci -m 1 -d'0 0' echo +hg clone . ../zoz +cp .hg/hgrc ../zoz/.hg + python unix2dos.py f +echo commit should fail +hg ci -m 2.1 -d'0 0' +echo + +mv .hg/hgrc .hg/hgrc.bak +echo commits should succeed hg ci -m 2 -d'0 0' -hg revert -a +hg cp f g +hg ci -m 2.2 -d'0 0' echo +echo push should fail +hg push ../zoz +echo + +mv .hg/hgrc.bak .hg/hgrc +echo hello > f +hg rm g +echo commit should succeed +hg ci -m 2.3 -d'0 0' +echo + +echo push should succeed +hg push ../zoz +echo + +echo and now for something completely different mkdir d echo hello > d/f2 python unix2dos.py d/f2