summaryrefslogtreecommitdiff
path: root/git-cvsimport-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 22:11:28 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-07 22:11:28 (GMT)
commitd4f8b390a4326625f0c3d65a8d120336e38928d7 (patch)
treecaca1a07914b67b9d3c0ec2143e3a739d2b71c4f /git-cvsimport-script
parent001d4a27dbfaaa59c25dc35dafc69bd9b9bc21d3 (diff)
downloadgit-d4f8b390a4326625f0c3d65a8d120336e38928d7.zip
git-d4f8b390a4326625f0c3d65a8d120336e38928d7.tar.gz
git-d4f8b390a4326625f0c3d65a8d120336e38928d7.tar.bz2
Add CVS import scripts and programs
This gets the "cvs2git" program from the old git-tools archive, and adds a nice script around it that makes it much easier to use. With this, you should be able to import a CVS archive using just a simple git cvsimport <cvsroot> <module> and you're done. At least it worked for my one single test. NOTE!! This may need tweaking. It currently expects (and verifies) that cvsps version 2.1 is installed, but you can't actually set any of the cvsps parameters, like the time fuzz.
Diffstat (limited to 'git-cvsimport-script')
-rwxr-xr-xgit-cvsimport-script25
1 files changed, 25 insertions, 0 deletions
diff --git a/git-cvsimport-script b/git-cvsimport-script
new file mode 100755
index 0000000..7a43e65
--- /dev/null
+++ b/git-cvsimport-script
@@ -0,0 +1,25 @@
+#!/bin/sh
+ARGS=""
+if [ "$1" == "-v" ]; then
+ ARGS=$1
+ shift
+fi
+
+export CVSROOT="$1"
+export MODULE="$2"
+if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] || [ ! -d $CVSROOT ] || [ ! -d $CVSROOT/CVSROOT ] || [ ! -d $CVSROOT/$MODULE ] ; then
+ echo "Usage: git cvsimport <cvsroot> <module>"
+ exit 1
+fi
+
+cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
+ echo "I need cvsps version 2.1"
+ exit 1
+}
+
+mkdir "$MODULE" || exit 1
+cd "$MODULE"
+
+TZ=UTC cvsps -A $MODULE | git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" > .git-create-script || exit 1
+sh .git-create-script
+