summaryrefslogtreecommitdiffstats
path: root/scripts/svnchangesince
blob: eec267e5f9ad73e12b9eeb5e07f9a0d16c61b0df (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
#
# Written by Thiago Macieira <thiago@kde.org>
# This file is in the public domain.
#
# Shows the changes to the subversion repository since the local copy
# was last updated.
#

showdiff=false
showlog=true

while test $# -ge 1; do
  case "$1" in
    -d)
      showdiff=true
      shift
      ;;
      
    -D)
      showdiff=false
      shift
      ;;
      
    -l)
      showlog=true
      shift
      ;;
    
    -L)
      showlog=false
      shift
      ;;
      
    -h)
      cat <<EOF
svnchangesince - Shows the changes to the SVN repository since the last update
Usage:
  svnchangesince [-d|-D] [-l|-L] [-h] [filenames]
  
where:
  -d        include diffs in output
  -D        don't include diffs in output [default]
  -l        include logs in output [default]
  -L        don't include logs in output
  -h        show this help string
EOF
      exit 0
      ;;
      
    *)
      break
      ;;
  esac
done

if $showlog; then
  svn log -v -r HEAD:BASE "$@"
fi

if $showdiff; then
  svn diff -r BASE:HEAD "$@"
fi