[sysadmin-bin: 140/168] Don't allow pushes to archived repositories



commit 635bc1ddb8e1530cac93b7c9145401ab786e8fdc
Author: Olav Vitters <olav vitters nl>
Date:   Tue Aug 31 23:04:42 2010 +0200

    Don't allow pushes to archived repositories
    
    And at the same time update contact method

 gnome-pre-receive  |   18 ++++++++++++++++--
 receive-pack-force |    2 +-
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/gnome-pre-receive b/gnome-pre-receive
index a5ad6b5..a28c0dd 100755
--- a/gnome-pre-receive
+++ b/gnome-pre-receive
@@ -17,8 +17,22 @@ export GIT_CONFIG
 
 # Use the directory name with .git stripped as a short identifier
 absdir=$(cd $GIT_DIR && pwd)
+basedir=$(dirname $absdir)
 projectshort=$(basename ${absdir%.git})
 
+if [ $basedir = '/git/archive' ]; then
+    cat <<EOF 1>&2
+---
+$projectshort has been archived. No pushed can be made against this module.
+
+If this module should not have been archived, file a bug for assistance at:
+https://bugzilla.gnome.org/enter_bug.cgi?product=sysadmin&component=Git
+---
+EOF
+fi
+
+
+
 # Make sure that the user used --exec=import for importing repositories,
 # and not otherwise. This forces people to be aware of the 'pending'
 # state.
@@ -41,8 +55,8 @@ if [ \! -e "$GIT_DIR/pending" -a -n "$GNOME_GIT_IMPORT" ] ; then
 ---
 $projectshort is no longer in the process of being imported. You
 can push to $projectshort normally. If you accidentally ran
-finish-import too early, please contact gitmaster gnome org
-for assistance.
+finish-import too early, please file a bug for assistance at:
+https://bugzilla.gnome.org/enter_bug.cgi?product=sysadmin&component=Git
 ----
 EOF
     exit 1
diff --git a/receive-pack-force b/receive-pack-force
index 2d09cb0..b0ecfc8 100755
--- a/receive-pack-force
+++ b/receive-pack-force
@@ -9,7 +9,7 @@ done
 
 if ! $in_gitadmin ; then
     echo 1>&2 "You must be in the gitadmin group to force a push"
-    echo 1>&2 "Please contact contact gitmaster gnome org for assistance"
+    echo 1>&2 "For assistance, file a bug at https://bugzilla.gnome.org/enter_bug.cgi?product=sysadmin&component=Git";
     exit 1
 fi
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]