Skip to Content.
Sympa Menu

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

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 (55a7f6f649d1c799daeca04f35425c06417f6c93)
  • Date: Fri, 28 Mar 2008 10:10:30 -0500

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

ChangeLog | 2
var/lib/sorcery/modules/url_handlers/url_git_local | 100
+++++++++++++++++++++
2 files changed, 102 insertions(+)

New commits:
commit 55a7f6f649d1c799daeca04f35425c06417f6c93
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

url_git_local: fixed the comments and removed the netselect function

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

url_git_local: added an url handler for local git urls, patch by Andraž
Levstik #14397

diff --git a/ChangeLog b/ChangeLog
index 98a6e85..8a91d88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
Lipnevich #8521
* libgrimoire: real_rm_source_dir: use local variables and a simpler
loop
* gaze, gaze.1: added size -all, initial patch from Danilo Vidovic
#13556
+ * url_git_local: added an url handler for local git urls, patch by
Andraž
+ Levstik #14397; fixed the comments and removed the netselect
function

2008-03-27 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* changed uses of plain sort|uniq to the featurewise equivalent sort
-u
diff --git a/var/lib/sorcery/modules/url_handlers/url_git_local
b/var/lib/sorcery/modules/url_handlers/url_git_local
new file mode 100644
index 0000000..f138d91
--- /dev/null
+++ b/var/lib/sorcery/modules/url_handlers/url_git_local
@@ -0,0 +1,100 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Url handler functions for downloading from local git urls
+##
+##=head1 DESCRIPTION
+##
+## This file contains functions for downloading and verifying
+## local git urls. This file uses the "git" program.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2002 by the Source Mage Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#---------------------------------------------------------------------
+
+#---------------------------------------------------------------------
+##=item url_git_local_crack <url>
+##
+## Parse the specified git url.
+##
+## @Global URL
+## @Global GIT_ROOT
+## @Global GIT_DIRECTORY
+## @Global GIT_TAG
+##
+#---------------------------------------------------------------------
+function url_git_local_crack() {
+
+ URL=`url_strip_prefix "$1" git_local`
+ GIT_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"`
+ local GIT_DIRECTORY_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
+ GIT_DIRECTORY=`echo $GIT_DIRECTORY_TAG | cut -d : -f2`
+ local GIT_TAGNAME=`echo $GIT_DIRECTORY_TAG | cut -d : -f3`
+ GIT_TAG=${GIT_TAGNAME:=master}
+
+}
+
+#---------------------------------------------------------------------
+##=item url_git_local_bucketize <url>
+##
+## echoes the download handler - git
+##
+#---------------------------------------------------------------------
+function url_git_local_bucketize() {
+ echo git
+}
+
+#---------------------------------------------------------------------
+##=item url_git_local_verify <url>
+##
+## Verifies the specified git url. Returns true if the url exists
+## OR if the url is an empty string.
+##
+#---------------------------------------------------------------------
+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
+ if ! [[ ${!item} ]] ; then
+ return 1
+ fi
+ done
+}
+
+#---------------------------------------------------------------------
+##=item url_<prefix>_hostname <url>
+##
+## Gets the hostname out of the url
+#---------------------------------------------------------------------
+function url_git_local_hostname() {
+ echo $1|sed 's:^.*//\([^/]*\).*$:\1:'
+}
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (55a7f6f649d1c799daeca04f35425c06417f6c93), Jaka Kranjc, 03/28/2008

Archive powered by MHonArc 2.6.24.

Top of Page