Commit a974e5cd authored by Laura Arjona Reina's avatar Laura Arjona Reina

Remove CVS to git conversion tool, done

parent 77545408
#!/bin/bash
set -ex
CVSROOT=larjona@cvs.debian.org:/cvs/webwml
MODULE=webwml
gitdir=$(pwd)/gitdir
cvspsdir=$(pwd)/cvspsdir
cvspsmoddir=$(pwd)/cvspsmoddir
cvspsfile=$(pwd)/cvspsfile
rsyncdir=$(pwd)/rsyncdir
rm -rf $gitdir $cvspsmoddir $cvspsfile insert input
mkdir $cvspsmoddir
> $cvspsfile
if [ ! -e $rsyncdir ] ; then
rsync -avS --delete --delay-updates --rsh=ssh ${CVSROOT}/CVSROOT ${CVSROOT}/$MODULE $rsyncdir
sed -i /^LockDir=/d $rsyncdir/CVSROOT/config
fi
if [ ! -d $cvspsdir ] ; then
mkdir $cvspsdir
cvsps -p $cvspsdir --norc --cvs-direct -u -A --root $rsyncdir $MODULE
fi
i=1
while [ -f $cvspsdir/$i.patch ] ; do
cp -f $cvspsdir/$i.patch input
echo 'CVS version numbers' > insert
echo >> insert
sed -r -e '1,/^Members/d;$d' -e 's/^\s+//' -e 's/:/: /' -e 's/->/ -> /' input >> insert
echo >> insert
sed -e '/^Members/r insert' -e 'x;$G' -e '1d' input > $cvspsmoddir/$i.patch
cat $cvspsmoddir/$i.patch >> $cvspsfile
i=$((i+1))
done
git cvsimport -A ./cvs_authors_20170820.txt -P $cvspsfile -akmRv -d $rsyncdir -C $gitdir -o master $MODULE &> log
cp "$0" $gitdir
cd $gitdir
git add .
git commit -m 'Add CVS to git conversion tool'
git revert --no-commit @
git commit -m 'Remove CVS to git conversion tool, done'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment