[Pkg-mono-svn-commits] [SCM] mono branch, master-experimental, updated. debian/2.6.3-4-34-gd1bf954

Mirco Bauer meebey at meebey.net
Thu Aug 12 01:17:24 UTC 2010


The following commit has been merged in the master-experimental branch:
commit 9b50f29128145d18ef6b8d1454cb9b0ae3b26d01
Author: Mirco Bauer <meebey at meebey.net>
Date:   Mon Aug 2 18:06:58 2010 +0200

    Implemented tool to test merge all debian patch branches against the upstream branch.

diff --git a/debian/git-test-debian-patches b/debian/git-test-debian-patches
new file mode 100755
index 0000000..200d902
--- /dev/null
+++ b/debian/git-test-debian-patches
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (c) 2010 Mirco Bauer <meebey at debian.org>
+# 
+# Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
+# 
+# This program 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 program 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 program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+CURRENT_BRANCH=$(git branch -l | egrep '^\* ' | cut -d ' ' -f 2)
+UPSTREAM_BRANCH=$(grep -h upstream-branch $(git rev-parse --show-cdup)./debian/gbp.conf ~/.gbp.conf 2> /dev/null | head -n 1 | cut -d '=' -f 2)
+DEBIAN_PATCHES=$(git branch -l | egrep '\s+debian/patches/')
+if [ ! -z $UPSTREAM_BRANCH ]; then
+        git checkout $UPSTREAM_BRANCH
+        if [ $? != 0 ]; then
+                echo "Failed to swtich to upstream branch: $UPSTREAM_BRANCH, bailing out...";
+                exit 1
+        fi
+fi
+for DEBIAN_PATCH in $DEBIAN_PATCHES; do
+        git merge --no-commit --no-ff $DEBIAN_PATCH > /dev/null 2>&1
+        if [ $? != 0 ]; then
+                echo "ERROR: Test merge of $DEBIAN_PATCH failed, branch needs update!"
+        else
+                DELTA=$(git diff HEAD | wc -l)
+                if [ $DELTA = 0 ]; then
+                        echo "WARNING: delta of $DEBIAN_PATCH is 0! Patch already applied upstream, drop branch!"
+                fi
+        fi
+	git reset --hard > /dev/null
+done
+git checkout $CURRENT_BRANCH

-- 
mono



More information about the Pkg-mono-svn-commits mailing list