login
Header Space

 
 

git-cvsimport doesn't quite work, wrt branches

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: Matthias Urlichs <smurf@...>
Date: Tuesday, June 13, 2006 - 12:41 pm

Here's a test case that shows how git-cvsimport is misbehaving.
The script below demonstrates the problem with git-1.3.3 as
well as with 1.4.0.rc2.g5e3a6.  As for cvsps, I'm using version 2.1.

The script creates a simple cvs module, with one file on the trunk,
and one file on a branch, then runs git-cvsimport on that.  The error
is that the resulting git repository has both files on the branch.

FYI, this started when I tried to convert the GNU coreutils repository
(which takes barely an hour with git-cvsimport -- very quick, for 45K
revisions and 90MB of ,v files), but found that with a git-based working
directory, not all files on the b5_9x branch showed up after `git checkout
b5_9x' -- plus, there were some files there that didn't belong.

-----------------------------
#!/bin/sh
# Show that git-cvsimport doesn't quite work when
# there is one file on a branch, and another on the trunk.
# The resulting git repository has both files on the branch.

export PATH=/p/p/git/bin:$PATH

cvs='cvs -f -Q'

t=/tmp/.k
rm -rf $t
mkdir -p $t/git $t/cvs
R=$t/repo
$cvs -d $R init
mkdir -p $R/m

cd $t/cvs
$cvs -d $R co m
cd m
# Add a file on the trunk.
touch on-trunk
$cvs add on-trunk
$cvs ci -m. on-trunk

# Add another file, but destined for a branch.
touch on-br
$cvs add on-br
$cvs ci -m. on-br
$cvs tag -b B on-br
$cvs up -r B
echo x > on-br
$cvs ci -m. on-br
# Back to trunk.
$cvs up -A
# Remove our only-on-branch file from the trunk.
$cvs rm -f on-br
$cvs ci -m. on-br

$cvs up -r B

cd $t/git && git-cvsimport -p -x -v -d $R m >& $t/import-log
cd $t/git && git checkout B

cd $t

(cd cvs/m; ls -1 on-*)        > cvs-files
(cd git;   git-ls-files|sort) > git-files

diff -u1 cvs-files git-files

# The problem: diff reports the following differences.
# It should find none.
# --- cvs-files   2006-06-13 17:48:47.000000000 +0200
# +++ git-files   2006-06-13 17:48:47.000000000 +0200
# @@ -1 +1,2 @@
#  ./on-br
# +./on-trunk
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git-cvsimport doesn't quite work, wrt branches, Jim Meyering, (Tue Jun 13, 12:41 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Linus Torvalds, (Tue Jun 13, 1:20 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Yann Dirson, (Tue Jun 13, 5:13 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Keith Packard, (Tue Jun 13, 2:46 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Yann Dirson, (Thu Jun 15, 3:18 am)
Re: git-cvsimport doesn't quite work, wrt branches, Martin Langhoff, (Tue Jun 13, 6:55 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Keith Packard, (Tue Jun 13, 7:30 pm)
Re: git-cvsimport doesn't quite work, wrt branches, Martin Langhoff, (Tue Jun 13, 9:56 pm)
speck-geostationary