[Cmake-commits] CMake branch, next, updated. v2.8.8-2723-gcffb9da

Brad King brad.king at kitware.com
Thu Apr 26 15:44:22 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  cffb9da3723bd81e37bb5bf18f21aa7b44951417 (commit)
       via  c9072f88cbff819b3414c037b2fefe395ce66d9f (commit)
       via  b7daff9b8b776eeed34385d8ae2019dc9e113c52 (commit)
      from  1c80fc164a17d8e0ee53a9c0a3fb3278bd610db7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cffb9da3723bd81e37bb5bf18f21aa7b44951417
commit cffb9da3723bd81e37bb5bf18f21aa7b44951417
Merge: 1c80fc1 c9072f8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 26 15:44:19 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 26 15:44:19 2012 -0400

    Merge topic 'developer-setup' into next
    
    c9072f8 Merge branch 'setup' into developer-setup
    b7daff9 setup-stage: Optionally reconfigure topic stage


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9072f88cbff819b3414c037b2fefe395ce66d9f
commit c9072f88cbff819b3414c037b2fefe395ce66d9f
Merge: 6aba9fa b7daff9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 26 15:43:29 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 26 15:43:29 2012 -0400

    Merge branch 'setup' into developer-setup


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7daff9b8b776eeed34385d8ae2019dc9e113c52
commit b7daff9b8b776eeed34385d8ae2019dc9e113c52
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 26 15:37:56 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 26 15:39:06 2012 -0400

    setup-stage: Optionally reconfigure topic stage
    
    When the topic stage has already been configured present the current
    configuration and prompt for optional reconfiguration.  While at it,
    make the topic stage remote name configurable by the project.

diff --git a/setup-stage b/setup-stage
index ef53b99..323e47a 100755
--- a/setup-stage
+++ b/setup-stage
@@ -37,17 +37,43 @@ die() {
 cd "${BASH_SOURCE%/*}" &&
 
 # Load the project configuration.
-url=$(git config -f config --get stage.url) &&
-pushurl=$(git config -f config --get stage.pushurl || echo '') ||
+fetchurl=$(git config -f config --get stage.url) &&
+pushurl_=$(git config -f config --get stage.pushurl || echo '') &&
+remote=$(git config -f config --get stage.remote || echo 'stage') ||
 die 'This project is not configured to use a topic stage.'
 
-# Configure the remote if necessary.
-if git config remote.stage.url >/dev/null; then
-	echo 'Topic stage already configured.'
+# Get current stage push URL.
+pushurl=$(git config --get remote."$remote".pushurl ||
+	  git config --get remote."$remote".url || echo '') &&
+
+# Tell user about current configuration.
+if test -n "$pushurl"; then
+	echo 'Remote "'"$remote"'" is currently configured to push to
+
+  '"$pushurl"'
+' &&
+	read -ep 'Reconfigure Topic Stage? [y/N]: ' ans &&
+	if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then
+		setup=1
+	else
+		setup=''
+	fi
 else
+	setup=1
+fi
+
+# Perform setup if necessary.
+if test -n "$setup"; then
 	echo 'Setting up the topic stage...' &&
-	git remote add stage "$url" &&
-	if test -n "$pushurl"; then
-		git config remote.stage.pushurl "$pushurl"
-	fi
-fi || die 'Could not add the topic stage remote.'
+	if test -z "$pushurl"; then
+		git remote add "$remote" "$fetchurl"
+	else
+		git config remote."$remote".url "$fetchurl"
+	fi &&
+	pushurl="${pushurl_}" &&
+	git config remote."$remote".pushurl "$pushurl" &&
+	echo 'Remote "'"$remote"'" is now configured to push to
+
+  '"$pushurl"'
+'
+fi || die 'Could not configure the topic stage remote.'

-----------------------------------------------------------------------

Summary of changes:
 Utilities/GitSetup/setup-stage |   46 +++++++++++++++++++++++++++++++--------
 1 files changed, 36 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list