# HG changeset patch # User Matt Mackall # Date 2011-10-31 19:22:11 # Node ID 3bece03bf3c60a76138b745d550205fc984d25a9 # Parent eb6c0d47c3d5bd65ba2c7a2f721ecbe3f26660d7 tests: use md5sum.py instead of sha1sum, add check diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -52,6 +52,7 @@ testpats = [ (r'^diff.*-\w*N', "don't use 'diff -N'"), (r'(^| )wc[^|]*$\n(?!.*\(re\))', "filter wc output"), (r'head -c', "don't use 'head -c', use 'dd'"), + (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), (r'ls.*-\w*R', "don't use 'ls -R', use 'find'"), (r'printf.*\\\d\d\d', "don't use 'printf \NNN', use Python"), (r'printf.*\\x', "don't use printf \\x, use Python"), diff --git a/tests/test-lfconvert.t b/tests/test-lfconvert.t --- a/tests/test-lfconvert.t +++ b/tests/test-lfconvert.t @@ -48,9 +48,9 @@ normal $ cat sub/normal2 alsonormal - $ sha1sum large sub/maybelarge.dat - 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 large - 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c sub/maybelarge.dat + $ "$TESTDIR/md5sum.py" large sub/maybelarge.dat + ec87a838931d4d5d2e94a04644788a55 large + 1276481102f218c981e0324180bafd9f sub/maybelarge.dat "lfconvert" adds 'largefiles' to .hg/requires. $ cat .hg/requires @@ -74,8 +74,8 @@ add some changesets to rename/remove/mer $ echo blah >> normal3 $ echo blah >> sub/normal2 $ echo blah >> sub/maybelarge.dat - $ sha1sum sub/maybelarge.dat - 76236b6a2c6102826c61af4297dd738fb3b1de38 sub/maybelarge.dat + $ "$TESTDIR/md5sum.py" sub/maybelarge.dat + 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat $ hg commit -A -m"add normal3, modify sub/*" adding normal3 created new head @@ -151,8 +151,8 @@ lfconvert with rename, merge, and remove $ cat stuff/normal2 alsonormal blah - $ sha1sum stuff/maybelarge.dat - 76236b6a2c6102826c61af4297dd738fb3b1de38 stuff/maybelarge.dat + $ "$TESTDIR/md5sum.py" stuff/maybelarge.dat + 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat $ cat .hglf/stuff/maybelarge.dat 76236b6a2c6102826c61af4297dd738fb3b1de38 $ cd ..