[PATCH] git cvsimport fuzz argument
Add "-z fuzz" argument, passed to cvsps, and clean up argument processing. Also, use "cvsps --cvs-direct", which is is somewhat faster. Give the user the option of specifying the timestamp fuzz passed to cvsps. Looking at the other arguments to it, I can't see anything else that would be sane to play with. Also, use --cvs-direct, which speeds up cvsps for remote repositories and doesn't seem to do anything bad to local repositories. Signed-off-by: Tommy McGuire <mcguire@crsr.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>maint
parent
1cc92ff6ca
commit
9718a00b90
|
@ -1,15 +1,26 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
ARGS=""
|
|
||||||
if [ "$1" == "-v" ]; then
|
usage () {
|
||||||
ARGS=$1
|
echo "Usage: git cvsimport [-v] [-z fuzz] <cvsroot> <module>"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
CVS2GIT=""
|
||||||
|
CVSPS="--cvs-direct -x -A"
|
||||||
|
while true; do
|
||||||
|
case "$1" in
|
||||||
|
-v) CVS2GIT="$1" ;;
|
||||||
|
-z) shift; CVSPS="$CVSPS -z $1" ;;
|
||||||
|
-*) usage ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
shift
|
shift
|
||||||
fi
|
done
|
||||||
|
|
||||||
export CVSROOT="$1"
|
export CVSROOT="$1"
|
||||||
export MODULE="$2"
|
export MODULE="$2"
|
||||||
if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
|
if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
|
||||||
echo "Usage: git cvsimport <cvsroot> <module>"
|
usage
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
|
cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
|
||||||
|
@ -20,8 +31,8 @@ cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
|
||||||
mkdir "$MODULE" || exit 1
|
mkdir "$MODULE" || exit 1
|
||||||
cd "$MODULE"
|
cd "$MODULE"
|
||||||
|
|
||||||
TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result
|
TZ=UTC cvsps $CVSPS $MODULE > .git-cvsps-result
|
||||||
[ -s .git-cvsps-result ] || exit 1
|
[ -s .git-cvsps-result ] || exit 1
|
||||||
git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
|
git-cvs2git $CVS2GIT --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
|
||||||
sh .git-create-script
|
sh .git-create-script
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue