#!/bin/sh set -e CVSROOT=:pserver:anoncvs@cairographics.org:/cvs/cairo GITMASTER=git://git.cairographics.org/cairo if [ ! -e cairo-cvs ]; then echo -n "Performing CVS checkout to cairo-cvs..." cvs -d $CVSROOT co -d cairo-cvs cairo > /dev/null echo "done." fi if [ ! -e cairo-git ]; then echo -n "Cloning git repository to cairo-git..." git clone $GITMASTER cairo-git echo "done." fi # This is what you probably want to check all tags #for tag in $(ls cairo-git/.git/refs/tags); do # Instead, for cairo we whitelist the tags to check since there are # some bogus partial-tree tags that just aren't interesting. for tag in SNAPSHOT_0_1_16 SNAPSHOT_0_1_20 SNAPSHOT_0_1_21 SNAPSHOT_0_1_22 SNAPSHOT_0_1_23 LGPL_CHANGE_BEFORE LGPL_CHANGE_AFTER SNAPSHOT_0_2_0 SNAPSHOT_0_3_0 SNAPSHOT_0_4_0 SNAPSHOT_0_5_0 SNAPSHOT_0_5_1 SNAPSHOT_0_5_2 SNAPSHOT_0_6_0 RELEASE_0_9_0 RELEASE_0_9_2 RELEASE_1_0_0 RELEASE_1_0_2; do echo -n "Performing cvs update to $tag..." (cd cairo-cvs; cvs -Q update -r $tag > /dev/null) echo "done." echo -n "Performing git checkout of $tag..." # Linus says this is the most efficient way to do this, but it # seems to leave some empty directories around that shouldn't be # there. # (cd cairo-git; git checkout -b cvs-compare >& /dev/null || true; git checkout cvs-compare; git reset --hard $tag) # This might be slower, but it's plenty fast still and it does the right thing (cd cairo-git; git checkout master; git branch -D cvs-compare >& /dev/null || true; git checkout -b cvs-compare $tag) echo "done." echo -n "Comparing cvs and git trees for $tag..." if diff -r -x CVS -x .git cairo-cvs cairo-git >& cairo.diff; then echo "perfect." rm cairo.diff else echo "different. :(" echo " Saving trees to cairo-git-$tag & cairo-cvs-$tag and diff to cairo-$tag.diff" cp -a cairo-git cairo-git-$tag cp -a cairo-cvs cairo-cvs-$tag mv cairo.diff cairo-$tag.diff fi done