This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository pkg-perl-tools.

commit 87ad5a7f6d6a20318761d3d43dab02b968ea1db9
Author: Axel Beckert <a...@deuxchevaux.org>
Date:   Sun Jun 7 13:45:19 2015 +0200

    dpt-alioth-repo: Check first if a remote named "origin" already exists
---
 debian/changelog    | 2 ++
 scripts/alioth-repo | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8034358..5b4cc8f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ pkg-perl-tools (0.21) UNRELEASED; urgency=medium
   [ Axel Beckert ]
   * Also push git notes with "dpt push" for use with Niko Tyni's
     git-debcherry variant (see #784159)
+  * dpt-alioth-repo: Check if a remote named "origin" already exists
+    before creating the remote repository.
 
   [ gregor herrmann ]
   * dpt-import-orig: use Gbp-Dch for changelog commit message.
diff --git a/scripts/alioth-repo b/scripts/alioth-repo
index e34735d..77a3099 100755
--- a/scripts/alioth-repo
+++ b/scripts/alioth-repo
@@ -38,6 +38,13 @@ set -e
 
 [ -n "$DIST" ]
 
+# Check if there is already a remote called "origin" before proceeding
+if git remote | egrep -q '^origin$'; then
+    echo 'A remote called "origin" already exists. Aborting.' 1>&2
+    echo 'You may want to rename it with "git remote rename origin 
origin-old".' 1>&2
+    exit 1;
+fi
+
 ssh git.debian.org /git/pkg-perl/setup-repository $PKG \"Debian packaging of 
$DIST CPAN distribution\"
 
 git remote add origin ssh://git.debian.org/git/pkg-perl/packages/$PKG.git || [ 
$? = 128 ]

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to