+# makes diff from kde svn path
+# requires: wget, tee
+kdediff() {
+ local url="$1"
+ # --- branches/KDE/3.5/kdepim/kpilot/conduits/vcalconduit/vcalRecord.cc #624744:624745
+ url=${url#*--- }
+ echo >&2 "Process $url"
+ r1=${url#*#}
+ r2=${r1#*:}
+ r1=${r1%:*}
+
+ # http://websvn.kde.org/branches/KDE/3.5/kdepim/kpilot/conduits/vcalconduit/vcalRecord.cc?rev=624745&r1=612579&r2=624745&makepatch=1&diff_format=u
+ url=http://websvn.kde.org/${url% *}
+ url="$url?r1=$r1&r2=$r2&makepatch=1&diff_format=u"
+
+ if [ -t 1 ]; then
+ wget "$url" -O -| tee m.patch | diffcol
+ else
+ wget "$url" -O -
+ fi
+}
+
+# merges two patches
+# requires: patchutils
+pmerge() {
+ combinediff -p1 $1 $2 > m.patch || return
+ pclean m.patch
+ dif $1 m.patch
+}
+