git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Keith Packard <keithp@keithp.com>
Cc: Martin Langhoff <martin.langhoff@gmail.com>,
	Linus Torvalds <torvalds@osdl.org>,
	Nicolas Vilz 'niv' <niv@iaglans.de>, git <git@vger.kernel.org>
Subject: Re: several quick questions
Date: Wed, 15 Feb 2006 00:21:06 -0800	[thread overview]
Message-ID: <87wtfxhw25.wl%cworth@cworth.org> (raw)
In-Reply-To: <1139981145.4341.137.camel@evo.keithp.com>


[-- Attachment #1.1: Type: text/plain, Size: 2040 bytes --]

On Tue, 14 Feb 2006 21:25:45 -0800, Keith Packard wrote:
> On Wed, 2006-02-15 at 17:11 +1300, Martin Langhoff wrote:
> 
> > Did that lead to finding any problems with the import? Can I get my
> > hands on that script you've written to run the comparison?
> 
> The only issues we had were with manual changes to the repository;

For anyone interested, here are the problems our script found after
importing cairo with git-cvsimport:

1) Some "future" files existed at old tags since we had copied ,v
   files to preserve per-file history. This one was no surprise.

2) We had a couple tags in CVS that didn't tag the current head,
   (instead a file had been manually reverted before the tag). In the
   git checkout of the same tag name, we got the results as if HEAD
   had been tagged.

Those two weren't too surprising. We remembered quite clearly what had
happened as soon as we saw the results. I've fixed these up
post-import by making git commits to fix the problems and then moving
the tags.

3) There are some sub-tree tags in cairo's CVS tree as
   well. Obviously, those aren't very interesting for direct
   comparison.

Also not surprising. For these, I just modified the script to
whitelist the tags I actually cared about checking.

4) There was a branch that diverged from the main line two commits
   "late" in the git history.

I'm not sure what caused this, but it's obviously happening in the
cvsps output. I fixed the problem by capturing the cvsps output into a
file, reordering the branching patchset up two positions in the list,
then feeding the result into git-cvsimport with its -P option.

I've attached the script I used to do the git and cvs comparisons. I
was getting perfect results with a local rsync of cairo's CVS
repository. The version here does a pserver checkout instead. When I
run this I'm apparently getting different substitution of some of
those annoying RCS $Id:...$ strings. Looks like the formatting of the
date is different. So your mileage may vary.

But here it is if its of any interest.


[-- Attachment #1.2: git-cvs-compare --]
[-- Type: application/octet-stream, Size: 1976 bytes --]

#!/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

[-- Attachment #1.3: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-02-15  8:22 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 16:28 several quick questions Nicolas Vilz 'niv'
2006-02-14 17:03 ` Andreas Ericsson
2006-02-14 21:30   ` Nicolas Vilz 'niv'
2006-02-14 17:05 ` Linus Torvalds
2006-02-14 17:47   ` Kenneth Johansson
2006-02-14 18:08     ` Andreas Ericsson
2006-02-14 18:21       ` Kenneth Johansson
2006-02-14 18:26     ` Linus Torvalds
2006-02-14 18:10   ` Carl Worth
2006-02-14 18:34     ` Linus Torvalds
2006-02-14 20:10       ` Carl Worth
2006-02-14 20:27         ` Petr Baudis
2006-02-14 20:37           ` Johannes Schindelin
2006-02-14 20:41             ` Junio C Hamano
2006-02-14 20:54               ` Johannes Schindelin
2006-02-14 20:55             ` Petr Baudis
2006-02-14 20:40         ` Linus Torvalds
2006-02-14 21:19           ` Petr Baudis
2006-02-14 21:53           ` Carl Worth
2006-02-14 22:39             ` Junio C Hamano
2006-02-23 20:31               ` [PATCH] New git-seek command with documentation and test Carl Worth
2006-02-24  0:18                 ` J. Bruce Fields
2006-02-24  1:01                   ` [PATCH] git-seek: Eliminate spurious warning. Fix errant reference to git-bisect in docs Carl Worth
2006-02-24  6:02                     ` Junio C Hamano
2006-02-24 10:00                 ` [PATCH] New git-seek command with documentation and test Andreas Ericsson
2006-02-24 11:38                   ` Junio C Hamano
2006-02-24 14:23                   ` Carl Worth
2006-02-24 21:48                     ` Johannes Schindelin
2006-02-24 21:57                       ` J. Bruce Fields
2006-02-14 21:30         ` several quick questions Josef Weidendorfer
2006-02-14 21:40           ` Junio C Hamano
2006-02-14 22:17             ` Josef Weidendorfer
2006-02-14 22:26               ` Junio C Hamano
2006-02-15 19:22                 ` [PATCH] More useful/hinting error messages in git-checkout Josef Weidendorfer
2006-02-14 23:00             ` several quick questions Andreas Ericsson
2006-02-14 23:23               ` Johannes Schindelin
2006-02-15  0:08                 ` Andreas Ericsson
2006-02-15  0:34                   ` Junio C Hamano
2006-02-15  6:27               ` Junio C Hamano
2006-02-15  9:06                 ` Andreas Ericsson
2006-02-15  9:21                   ` Junio C Hamano
2006-02-14 21:41           ` Petr Baudis
2006-02-14 18:44     ` Carl Worth
2006-02-14 19:00       ` Linus Torvalds
2006-02-14 19:38         ` Andreas Ericsson
2006-02-14 20:34           ` Johannes Schindelin
2006-02-14 20:14         ` Carl Worth
2006-02-14 18:55     ` Keith Packard
2006-02-14 19:04       ` Linus Torvalds
2006-02-14 19:39         ` Keith Packard
     [not found]           ` <20060214220154.GJ31278@pasky.or.cz>
     [not found]             ` <1139960934.4341.93.camel@evo.keithp.com>
     [not found]               ` <20060215000737.GF9573@pasky.or.cz>
     [not found]                 ` <1139963183.4341.117.camel@evo.keithp.com>
2006-02-15  1:12                   ` Cogito turbo-introduction Petr Baudis
2006-02-15  1:32                     ` Petr Baudis
2006-02-15  4:11           ` several quick questions Martin Langhoff
2006-02-15  5:25             ` Keith Packard
2006-02-15  8:21               ` Carl Worth [this message]
2006-02-14 19:13     ` Junio C Hamano
2006-02-14 19:46 ` Petr Baudis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wtfxhw25.wl%cworth@cworth.org \
    --to=cworth@cworth.org \
    --cc=git@vger.kernel.org \
    --cc=keithp@keithp.com \
    --cc=martin.langhoff@gmail.com \
    --cc=niv@iaglans.de \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).