::zerowing-base=336
[divverent/netradiant.git] / merge-from-zerowing.sh
1 #!/bin/sh
2
3 basecommit=`git log --pretty=format:%H --grep=::zerowing-base`
4 baserev=`git log --pretty=format:%s --grep=::zerowing-base | cut -d = -f 2 | cut -d ' ' -f 1`
5
6 newbaserev=`svn info https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/ | grep ^Revision | cut -d ' ' -f 2`
7
8 echo "$baserev -> $newbaserev"
9
10 merge()
11 {
12         if ! svn diff -r"$baserev":"$newbaserev" "$1" | git apply --reject --ignore-space-change --directory="$2"; then
13                 if find . -name \*.rej | grep .; then
14                         echo "you have to fix these conflicts"
15                         bash
16                         echo "succeeded?"
17                         read -r LINE
18                         if [ x"$LINE" != x"y" ]; then
19                                 exit 1
20                         fi
21                 fi
22         fi
23 }
24
25 # GtkRadiant 1.5 changes
26 git clean  -xdf
27
28 # ZeroRadiant's q3map2 changes
29 merge https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/branches/1.5 /
30 merge https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk/tools/quake3 tools/quake3
31 merge https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk/libs/picomodel libs/picomodel
32
33 git commit -a -m"::zerowing-base=$newbaserev" -e