migration from svn to git
>>>>> "Sylvestre" == Sylvestre Ledru <sylvestre.ledru@inria.fr> writes:
Sylvestre> If there is no strong objections, I will migrate the
Sylvestre> current svn to git.
I have migrated sketch, vrr, and bibutils to git. Here a little script
I used. Hopefully those new to git are not too horrified; one does
not need this kind of hackery in normal use. The messy bit is to
transition from a package with only a /debian dir, to one with a full
upstream source compatible with git-buildpackage.
######################################################################
#!/bin/sh
package=bibutils
version=3.40
mkdir $package
cd $package
git-svn init --stdlayout --no-metadata svn://svn.debian.org/debian-science/$package
git-svn fetch
# drop upstream branch from svn
git-branch -d -r upstream
# create a new upstream branch based on recipe from
# http://upsilon.cc/~zack/blog/posts/2008/03/git-buildpackage_from_debian-only_to_debian+upstream/
#
git-symbolic-ref HEAD refs/heads/upstream
git rm --cached -r .
git commit --allow-empty -m 'initial upstream branch'
git checkout -f master
git merge upstream
git-import-orig --pristine-tar --no-dch ../tarballs/${package}_${version}.orig.tar.gz
######################################################################
from the parent directory, I ran
git clone --bare $package $package.git
rsync -cavz $package.git bremner-guest@alioth.debian.org:/git/debian-science/packages
on alioth:
cd /git/debian/science/packages/$package.git
git --bare init --shared
chmod 755 hooks/post-update
git-update-server-info
Reply to: