[Blends-commit] r3275 - /blends/trunk/machine_readable/fetch-machine-readable

tille at users.alioth.debian.org tille at users.alioth.debian.org
Fri Apr 6 06:07:23 UTC 2012


Author: tille
Date: Fri Apr  6 06:07:21 2012
New Revision: 3275

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3275
Log:
Exclude some unwanted files like CHANGELOG_upstream; in *.vcs: prepend Vcs-{Git,Svn}, add Vcs-Browser

Modified:
    blends/trunk/machine_readable/fetch-machine-readable

Modified: blends/trunk/machine_readable/fetch-machine-readable
URL: http://svn.debian.org/wsvn/blends/blends/trunk/machine_readable/fetch-machine-readable?rev=3275&op=diff
==============================================================================
--- blends/trunk/machine_readable/fetch-machine-readable (original)
+++ blends/trunk/machine_readable/fetch-machine-readable Fri Apr  6 06:07:21 2012
@@ -23,7 +23,7 @@
   TMPLIST=`mktemp`
   svn list --verbose svn://localhost/$1 --recursive | \
     grep -v -e '/tags/' -e '/branches/' -e '/patches/' | \
-    grep -e "control$" -e "changelog$" -e "copyright$" -e "upstream$" | \
+    grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" | \
     sed 's/^.*[[:space:]]\([^[:space:]]\+\)/\1/' \
     > $TMPLIST
   # debug
@@ -33,9 +33,11 @@
   if grep -q "/trunk/debian/" $TMPLIST ; then
     # for Debian Med and Debian Science layout
     sed 's?/trunk/debian/.*??' $TMPLIST | sed 's?^.*/\([^/]\+\)?\1?' | sort | uniq > $PKGLIST
+    trunklayout="/trunk"
   else
     # for DebiChemn layout
     sed 's?/debian/.*??' $TMPLIST | sort | uniq > $PKGLIST
+    trunklayout=""
   fi
 #  set -x
   for pkg in `cat $PKGLIST` ; do
@@ -47,7 +49,8 @@
         firstletter=`echo $srcname | sed "s/^\(.\).*/\1/"`
         mkdir -p $TARGETDIR/$firstletter
         mv changelog $TARGETDIR/$firstletter/${srcname}.changelog
-        echo "svn://svn.debian.org/$1/" > $TARGETDIR/$firstletter/${srcname}.vcs
+        echo "Vcs-Svn: svn://svn.debian.org/$1/$pkg$trunk/" > $TARGETDIR/$firstletter/${srcname}.vcs
+        echo "Vcs-Browser: http://svn.debian.org/wsvn/$1/$pkg$trunk/" >> $TARGETDIR/$firstletter/${srcname}.vcs
         for file in control copyright upstream ; do
           getfile=`grep -e "/$pkg/trunk/debian/$file$" -e "^$pkg/trunk/debian/$file$" -e "^$pkg/debian/$file$" $TMPLIST 2>/dev/null`
           if [ "" != "$getfile" ] ; then
@@ -78,7 +81,8 @@
     firstletter=`echo $srcname | sed "s/^\(.\).*/\1/"`
     mkdir -p $TARGETDIR/$firstletter
     mv $TMPCHLOG $TARGETDIR/$firstletter/${srcname}.changelog
-    echo "git://git.debian.org/$1" > $TARGETDIR/$firstletter/${srcname}.vcs
+    echo "Vcs-Git: git://git.debian.org$1" > $TARGETDIR/$firstletter/${srcname}.vcs
+    echo "Vcs-Browser: git://git.debian.org"`echo $1 | sed 's+^/+/?p=+'` >> $TARGETDIR/$firstletter/${srcname}.vcs
     for file in `git ls-tree master debian/ 2>/dev/null | grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" | sed 's/^[0-9]\+[[:space:]]\+blob[[:space:]]\+[0-9a-f]\+[[:space:]]\+//'` ; do
       target=$TARGETDIR/$firstletter/${srcname}.`echo $file | sed 's?debian/??'`
       git show HEAD:$file > $target
@@ -99,7 +103,7 @@
 for gitdir in $GITDIRS ; do
   echo $gitdir
   for gitrepo in `find /git/$gitdir -mindepth 1 -maxdepth 1 -type d -name "*.git"` ; do
-    echo $gitrepo
+    # echo $gitrepo
     if [ "$gitrepo" != ".git" ] ; then
       git_checkout_machine_readable $gitrepo
     fi




More information about the Blends-commit mailing list