File: svn_merge_dev.sh

package info (click to toggle)
monkeystudio 1.9.0.4%2Bgit20161218-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 41,500 kB
  • ctags: 22,118
  • sloc: cpp: 144,671; ansic: 33,969; python: 2,922; makefile: 127; sh: 122; php: 73; cs: 69
file content (44 lines) | stat: -rwxr-xr-x 697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#------------

os=`uname`
svn_path=
svn_bin=svn

if [  $os = "Darwin" ]; then
	if [ -d "/usr/local/bin" ]; then
		svn_path=/usr/local/bin
	fi
fi

svn=$svn_bin

if [ -n "$svn_path" ]; then
	svn="$svn_path/$svn_bin"
fi

rev1=$1
rev2=$2

usage()
{
	echo "MkS Svn Merging Tool."
	echo ""
	echo "Usage:	$0 revision1 [revision2]"
	echo ""
	echo "	revision1 is the revision to compare from."
	echo "	revision2 is the revision to compare to, defaulting to HEAD."
}

if [ -z "$rev1" ]; then
	usage
	exit
fi

if [ -z "$rev2" ]; then
	rev2="HEAD";
fi

echo "Merging using first revision at $rev1 and second at $rev2 from trunk to branches/dev..."

$svn merge -r $rev1:$rev2 ../trunk ../branches/dev