From: paul Date: Fri, 13 Apr 2012 08:16:47 +0000 (+0000) Subject: stubs for implementing GIT support (if only GIT would support that...) X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=801bd5e8a7cd366e4e469ddbf423f7e037ed411e;p=busy stubs for implementing GIT support (if only GIT would support that...) svn path=/trunk/; revision=43 --- diff --git a/Admin.page b/Admin.page index f7bacc2..8bc7e4f 100644 --- a/Admin.page +++ b/Admin.page @@ -24,8 +24,8 @@ else
Code Browser
SVN Repository

-
GIT Repository
-

+
GIT Repository
+

Donations diff --git a/Git.page b/Git.page new file mode 100755 index 0000000..236f767 --- /dev/null +++ b/Git.page @@ -0,0 +1,48 @@ +#!/bin/zsh +url="$(sed -rn 's:\+: :g;s:%:\\x:g;s:^(.*&)?i=([^&]+)(&.*)?$:\2:p' <<<"${QUERY_STRING}")" +url="$(echo -e "${url}" |sed -rn '1{s:\t: :g;s:\r::g;s:\\:\\\\:g;p}')" +rev="$(sed -rn 's:\+: :g;s:%:\\x:g;s:^(.*&)?r=([0-9a-fA-F]+)(&.*)?$:\2:p' <<<"${QUERY_STRING}")" + +baseuri=$(sed -rn 's:^gitRepo=(.*)$:\1:p' project.meta) +[ -z "$rev" ] && rev="HEAD" + +cat < +

Path:

+ [root] + $(tmp=$url + until [ -z "$tmp" -o "$tmp" = // ]; do + echo "/$(basename "$tmp") " + tmp=$(dirname "$tmp")/ + done |tac) +
+

Tags:

+ $(for i in {1.."$lastrev"}; do + echo "$i" + done) + +

Branches:

+ $(for i in {1.."$lastrev"}; do + echo "$i" + done) + + + :g; + s:^r([0-9]+) \| ([a-zA-Z0-9]+) \| ([0-9: -]+) .+$:

Revision \1 by \2
at \3

:g;p}') +
+ +
+

$(basename "$url"), Revision "$rev":

+ $(if (egrep -q '^(.*/|)$' <<<"$url"); then #are we showing a directory + svn ls -r "$rev" "${baseuri}/${url}" |sed -r "s:^.*$:&
:g" + echo '
' + else #or are we showing a file + lang=$(source-highlight --lang-list |cut -d\ -f1 |grep -x "$(sed 's:.*\.::g' <<<"$url")" || echo sh) + grep -q '\.' <<<"$url" || lang=txt + svn cat -r "$rev" "${baseuri}/${url}" |source-highlight -s "$lang" + fi) +
+SVNEND diff --git a/project.meta b/project.meta index b985f72..157ca58 100644 --- a/project.meta +++ b/project.meta @@ -2,7 +2,7 @@ name=Busy slogan=Letting You do the Work. repoType=svn svnRepo=http://svn.plutz.net/busy -gitRepo= +gitRepo=http://d00m.org/~someone/git/qtc.git useFlattr=yes flattrThingURL=http://flattr.com/thing/599434/Busy-Software-Project-Management usePaypal=