Improved binary diff from Christopher Li
This is more intelligent/efficient by combining neighboring inserts,
replaces and deletes. Passes test of converting kernel repo, but
doesn't appear to substantially affect compression or performance.
set -ex
export EDITOR=true
rm -rf test branch
mkdir test
cd test
echo foo>foo
hg init
hg addremove
hg commit
hg verify
cd ..
cp -a test branch
cd branch
echo bar>>foo
hg commit
cd ../test
hg merge ../branch
hg verify