Commit 70aa4bb3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: clone all branches locally

parent f85efbbd
...@@ -237,8 +237,16 @@ if [ -n "$CLONEGIT" ] ; then ...@@ -237,8 +237,16 @@ if [ -n "$CLONEGIT" ] ; then
INITLETTER=$(echo $PKGNAME | sed "s/^\(.\).*/\1/g") INITLETTER=$(echo $PKGNAME | sed "s/^\(.\).*/\1/g")
# http://git.altlinux.org/srpms/N/NAME.git # http://git.altlinux.org/srpms/N/NAME.git
echo "Remote clone from /srpms/$INITLETTER/$PKGNAME.git ..." echo "Remote clone from /srpms/$INITLETTER/$PKGNAME.git ..."
ssh $GIRARHOST clone /srpms/$INITLETTER/$PKGNAME.git packages/$PKGNAME.git || fatal "Can't remote clone." ssh $GIRARHOST clone /srpms/$INITLETTER/$PKGNAME.git packages/$PKGNAME.git || warning "Can't remote clone."
git clone git.alt:packages/$PKGNAME.git git clone git.alt:packages/$PKGNAME.git
if cd $PKGNAME ; then
CURRENTBRANCH=$(get_current_branch)
for i in $(git branch -a | grep "remotes/origin/.*[0-9]\$") ; do
git checkout -b $(echo $i | sed -e "s|remotes.*/||g") $i
done
git checkout $CURRENTBRANCH
cd - >/dev/null
fi
echo "See other repos at $GIRARHOST:" echo "See other repos at $GIRARHOST:"
list_git_package $PKGNAME list_git_package $PKGNAME
exit 0 exit 0
......
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