# HG changeset patch # User Alexis S. L. Carvalho # Date 1171713298 7200 # Node ID 0934fef871f3180a3f88a5d59b44c384a4c91e13 # Parent 544838cc1158b14b3475f85e596556633c398845 add test for diffing identical binary files diff -r 544838cc1158 -r 0934fef871f3 tests/test-diff-binary-file --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-diff-binary-file Sat Feb 17 09:54:58 2007 -0200 @@ -0,0 +1,25 @@ +#!/bin/sh + +hg init a +cd a +cp $TESTDIR/binfile.bin . +hg add binfile.bin +hg ci -m 'add binfile.bin' -d '0 0' + +echo >> binfile.bin +hg ci -m 'change binfile.bin' -d '0 0' + +hg revert -r 0 binfile.bin +hg ci -m 'revert binfile.bin' -d '0 0' + +echo % diff -r 0 -r 1 +hg diff --nodates -r 0 -r 1 + +echo % diff -r 0 -r 2 +hg diff --nodates -r 0 -r 2 + +echo % diff --git -r 0 -r 1 +hg diff --git -r 0 -r 1 + +echo % diff --git -r 0 -r 2 +hg diff --git -r 0 -r 2 diff -r 544838cc1158 -r 0934fef871f3 tests/test-diff-binary-file.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-diff-binary-file.out Sat Feb 17 09:54:58 2007 -0200 @@ -0,0 +1,24 @@ +% diff -r 0 -r 1 +diff -r 48b371597640 -r acea2ab458c8 binfile.bin +Binary file binfile.bin has changed +% diff -r 0 -r 2 +% diff --git -r 0 -r 1 +diff --git a/binfile.bin b/binfile.bin +index 37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9..58dc31a9e2f40f74ff3b45903f7d620b8e5b7356 +GIT binary patch +literal 594 +zc$@)J0W$NUkd +zX$nnYLt$-$V!?uy+1V%`z&Eh=ah|duER<4|QWhju3gb^nF*8iYobxWG-qqXl=2~5M +z*IoDB)sG^CfNuoBmqLTVU^<;@nwHP!1wrWd`{(mHo6VNXWtyh{alzqmsH*yYzpvLT +zLdYlXB*ODN003Z&P17_@)3Pi=i0wb04