Gmane
From: Felix Fietkau <nbd <at> openwrt.org>
Subject: Re: madwifi git repository (Was: DFS status)
Newsgroups: gmane.linux.drivers.madwifi.devel
Date: 2008-07-17 13:14:49 GMT (25 weeks, 1 day, 14 hours and 50 minutes ago)
Georg Lukas wrote:
> I'm also using git-svn for madwifi, and I love it. However, I do not see
> too much use in creating a read-only git clone of the repository,
> besides of providing an option to accelerate the initial checkout and
> encourage users/developers to get familiar with git (which is an
> important point).
> 
> I am also not sure if it is possible to dcommit from such a cloned git
> into the main svn.
I use the attached script to fetch a git clone of an svn repository and fix 
up the git-svn metadata, so that git-svn dcommit works. On average my 
checkouts with this script take about half the time of a single svn 
revision checkout, yet include the whole history.

- Felix
#!/bin/sh
branches=
case "$1" in
	-b) branches=1; shift;;
esac

[ "$#" -eq 3 ] || {
	echo "Usage: $0 [-b] <giturl> <svnurl> <target>"
}

r() {
	local cmd="$1"; shift
	$cmd "$@" || exit "$?"
}

dir="${2##*/}"
url="${2%%/}"
[ trunk = "$dir" ] && {
	opts="-T trunk"
	url="${url%%trunk}"
}
[ -n "$branches" ] && opts="-T trunk -t tags -b branches"

r git clone "$1" "$3" $GSC_GIT_OPTIONS
r cd "$3"
r git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
r git fetch origin
r git-svn init "$url" $opts
r git-svn fetch
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-devel mailing list
Madwifi-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/madwifi-devel