added simple script to port trunk changes into branches
authorMartin Willi <martin@strongswan.org>
Fri, 3 Nov 2006 14:03:51 +0000 (14:03 -0000)
committerMartin Willi <martin@strongswan.org>
Fri, 3 Nov 2006 14:03:51 +0000 (14:03 -0000)
scripts/merge [new file with mode: 0755]

diff --git a/scripts/merge b/scripts/merge
new file mode 100755 (executable)
index 0000000..1f11289
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+REPO="svn+ssh://svn.strongswan.org/strongswan"
+PORT=`svn propget trunk-rev-backport`
+HEAD=`svn info $REPO | grep Revision: | awk '{ print $2 }'`
+
+
+if [ "$1" == "diff" ]
+then
+       echo "showing diff I would merge from trunk revisions $PORT:$HEAD"
+       svn diff $REPO/trunk -r $PORT:$HEAD
+elif [ "$1" == "dry" ]
+then
+       echo "showing files I would merge from trunk revisions $PORT:$HEAD"
+       svn merge $REPO/trunk -r $PORT:$HEAD --dry-run
+elif [ "$1" == "run" ]
+then
+       echo "merging files from trunk revisions $PORT:$HEAD to branch"
+       svn merge $REPO/trunk -r $PORT:$HEAD && svn propset trunk-rev-backport $HEAD .
+else
+       echo "Usage: $0 diff|dry|run"
+fi