Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (5fa17a85c0f5375a7bc45ae8a4ea671bf835993e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (5fa17a85c0f5375a7bc45ae8a4ea671bf835993e)
  • Date: Tue, 26 May 2009 05:40:14 -0500

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 4 +++
var/lib/sorcery/modules/dl_handlers/dl_git | 27
+++++++++++++++------
var/lib/sorcery/modules/url_handlers/url_git | 4 +--
var/lib/sorcery/modules/url_handlers/url_git_http | 4 +--
var/lib/sorcery/modules/url_handlers/url_git_local | 2 -
var/lib/sorcery/modules/url_handlers/url_hg_http | 4 +--
6 files changed, 31 insertions(+), 14 deletions(-)

New commits:
commit 5fa17a85c0f5375a7bc45ae8a4ea671bf835993e
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

dl_git: updated for newer git, initial patch from Andraž Levstik #15208

commit d8083d4b6d3848d053a2cd72ff6dd21b673865c7
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

url_*: fixed url_verify_* to not break on empty optional parameters

diff --git a/ChangeLog b/ChangeLog
index 7b4ff80..561fee6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-12 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * url_*: fixed url_verify_* to not break on empty optional parameters
+ * dl_git: updated for newer git, initial patch from Andraž Levstik
#15208
+
2009-04-22 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* dl_svn: check the prefix of the correct url
* dl_aria2: added no-check-certificate source hint
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_git
b/var/lib/sorcery/modules/dl_handlers/dl_git
index e3ddd24..d6e7d4b 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_git
+++ b/var/lib/sorcery/modules/dl_handlers/dl_git
@@ -43,10 +43,21 @@ function dl_git_get () {
if test -d $GIT_DIRECTORY; then
message "${MESSAGE_COLOR}Running git pull...${DEFAULT_COLOR}"
( cd $GIT_DIRECTORY &&
- echo git checkout $GIT_TAG &&
- git checkout $GIT_TAG &&
- echo git pull $GIT_ROOT $GIT_TAG &&
- git pull $GIT_ROOT $GIT_TAG )
+ match=$(git branch | grep -F " $GIT_TAG"; true) &&
+ if [[ $match ]]; then
+ # no need to checkout a branch if we're already on it
+ if [[ ${match:0:1} != '*' ]]; then
+ echo git checkout $GIT_TAG &&
+ git checkout $GIT_TAG
+ else
+ # already on the correct branch
+ fi
+ else
+ echo git checkout -b $GIT_TAG origin/$GIT_TAG &&
+ git checkout -b $GIT_TAG origin/$GIT_TAG
+ fi
+ echo git pull &&
+ git pull )
rc=$?
eval "$dl_target=\"$GIT_DIRECTORY\""
else
@@ -54,10 +65,12 @@ function dl_git_get () {
echo git clone $GIT_ROOT $GIT_DIRECTORY
git clone $GIT_ROOT $GIT_DIRECTORY &&
cd $GIT_DIRECTORY &&
- echo git checkout $GIT_TAG &&
- git checkout $GIT_TAG &&
- cd ../
+ if ! git branch | grep -qF " $GIT_TAG"; then
+ echo git checkout -b $GIT_TAG origin/$GIT_TAG &&
+ git checkout -b $GIT_TAG origin/$GIT_TAG
+ fi
rc=$?
+ cd ../
eval "$dl_target=\"$GIT_DIRECTORY\""
fi
[[ $rc == 0 ]] && break
diff --git a/var/lib/sorcery/modules/url_handlers/url_git
b/var/lib/sorcery/modules/url_handlers/url_git
index 8934911..f07dd76 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git
+++ b/var/lib/sorcery/modules/url_handlers/url_git
@@ -61,9 +61,9 @@ function url_git_bucketize() {
##
#---------------------------------------------------------------------
function url_git_verify() {
- local URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+ local URL GIT_ROOT item
url_git_crack $1
- for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+ for item in URL GIT_ROOT; do
if ! [[ ${!item} ]] ; then
return 1
fi
diff --git a/var/lib/sorcery/modules/url_handlers/url_git_http
b/var/lib/sorcery/modules/url_handlers/url_git_http
index 12765a2..c88e073 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git_http
+++ b/var/lib/sorcery/modules/url_handlers/url_git_http
@@ -61,9 +61,9 @@ function url_git_http_bucketize() {
##
#---------------------------------------------------------------------
function url_git_http_verify() {
- local URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+ local URL GIT_ROOT item
url_git_http_crack $1
- for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+ for item in URL GIT_ROOT; do
if ! [[ ${!item} ]] ; then
return 1
fi
diff --git a/var/lib/sorcery/modules/url_handlers/url_git_local
b/var/lib/sorcery/modules/url_handlers/url_git_local
index f138d91..5dc2a0d 100644
--- a/var/lib/sorcery/modules/url_handlers/url_git_local
+++ b/var/lib/sorcery/modules/url_handlers/url_git_local
@@ -62,7 +62,7 @@ function url_git_local_bucketize() {
function url_git_local_verify() {
local URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
url_git_local_crack $1
- for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+ for item in URL GIT_ROOT; do
if ! [[ ${!item} ]] ; then
return 1
fi
diff --git a/var/lib/sorcery/modules/url_handlers/url_hg_http
b/var/lib/sorcery/modules/url_handlers/url_hg_http
index c250557..c70b2cc 100644
--- a/var/lib/sorcery/modules/url_handlers/url_hg_http
+++ b/var/lib/sorcery/modules/url_handlers/url_hg_http
@@ -59,9 +59,9 @@ function url_hg_http_bucketize() {
##
#---------------------------------------------------------------------
function url_hg_http_verify() {
- local URL HG_ROOT HG_DIRECTORY HG_TAG item
+ local URL HG_ROOT item
url_hg_http_crack $1
- for item in URL HG_ROOT HG_DIRECTORY HG_TAG ; do
+ for item in URL HG_ROOT; do
if ! [[ ${!item} ]] ; then
return 1
fi



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (5fa17a85c0f5375a7bc45ae8a4ea671bf835993e), Jaka Kranjc, 05/26/2009

Archive powered by MHonArc 2.6.24.

Top of Page