3 # Invoked from daemons/cloned.pl
10 proj
="${projdir%.git}"
12 cd "$cfg_reporoot/$projdir"
13 trap "echo '@OVER@'; touch .clone_failed" EXIT
16 if [ "$cfg_project_owners" = "source" ]; then
17 echo "$(stat -c %U "$url" 2>/dev/null)" >owner
23 echo "Initiating mirroring..."
26 GIT_DIR
=. git svn init
-s "$url"
27 GIT_DIR
=. git svn fetch
28 # Neat Trick suggested by Miklos Vajna
29 GIT_DIR
=. git config remote.origin.url .
30 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/heads
/*:refs
/heads
/*
31 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/trunk
:refs
/heads
/master
32 GIT_DIR
=. git config remote.origin.fetch
+refs
/remotes
/tags
/*:refs
/tags
/*
36 git remote add
--mirror origin
"$url"
38 git remote prune origin
43 echo "Final touches..."
44 git update-server-info
46 mail -s "[$cfg_name] $proj clone completed" "$mail,$cfg_admin" <<EOT
47 Congratulations! The clone of project $proj just completed.
50 * GitWeb interface: $cfg_gitweburl/$projdir
51 * Project settings: $cfg_webadmurl/editproj.cgi?name=$proj
56 echo "Mirroring finished successfuly!"