aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2011-02-25 20:33:58 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2011-02-25 21:15:08 +0530
commite7d55899f3ef1516c197c0288d0059150191b821 (patch)
tree70a905aef37bcf41e6929b6ca32c681e5a473632
parentsquelch useless "undefined" warnings (diff)
downloadgitolite-gentoo-e7d55899f3ef1516c197c0288d0059150191b821.tar.gz
gitolite-gentoo-e7d55899f3ef1516c197c0288d0059150191b821.tar.bz2
gitolite-gentoo-e7d55899f3ef1516c197c0288d0059150191b821.zip
fork adc acquired some good ideas from the KDE folks
-rwxr-xr-xcontrib/adc/fork5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/adc/fork b/contrib/adc/fork
index 63a66b8..ff2a9cb 100755
--- a/contrib/adc/fork
+++ b/contrib/adc/fork
@@ -3,6 +3,7 @@
. $(dirname $0)/adc.common-functions
[ -z "$GL_RC" ] && die "ENV GL_RC not set"
+[ -z "$2" ] && die "Usage: fork source_repo target_repo"
# get_rights_and_owner now also sets $repo; see comments in common functions
get_rights_and_owner $1; from=$repo
@@ -15,6 +16,8 @@ get_rights_and_owner $2; to=$repo
git clone --bare -l $GL_REPO_BASE_ABS/$from.git $GL_REPO_BASE_ABS/$to.git
[ $? -ne 0 ] && exit 1
+echo "$from forked to $to"
+
# fix up creator, gitweb owner, and hooks
cd $GL_REPO_BASE_ABS/$to.git
echo $GL_USER > gl-creater
@@ -27,6 +30,8 @@ if [ -n "$GL_WILDREPOS_DEFPERMS" ]; then
echo "$GL_WILDREPOS_DEFPERMS" > gl-perms
fi
+echo "$from" > gl-forked-from
+
# run gitolite's post-init hook if you can (hook code expects GL_REPO to be set)
export GL_REPO; GL_REPO="$to"
[ -x hooks/gl-post-init ] && hooks/gl-post-init