david: doc/kde-client/svn-instructions checkout_proko2.sh,1.1,1.2
cvs at intevation.de
cvs at intevation.de
Mon May 9 22:19:31 CEST 2005
Author: david
Update of /kolabrepository/doc/kde-client/svn-instructions
In directory doto:/tmp/cvs-serv5646
Modified Files:
checkout_proko2.sh
Log Message:
Final version? :)
Index: checkout_proko2.sh
===================================================================
RCS file: /kolabrepository/doc/kde-client/svn-instructions/checkout_proko2.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- checkout_proko2.sh 9 May 2005 16:10:56 -0000 1.1
+++ checkout_proko2.sh 9 May 2005 20:19:29 -0000 1.2
@@ -2,38 +2,45 @@
# The script can even check out kdepim for you if needed.
# David Faure <faure at kde.org>, LGPL v2.
-# Edit those lines. PROTOCOL can be either svn+ssh or https
-PROTOCOL=https
-SVNUSER=
+# Edit those lines or set the env vars out of the script.
+# SVNPROTOCOL can be either svn+ssh or https.
+#
+#SVNPROTOCOL=https
+#SVNUSER=
if test -z "$SVNUSER"; then
- echo "you must set SVNUSER in the script!"
+ echo "You must set SVNUSER!"
+ exit 1
+fi
+
+if test -z "$SVNPROTOCOL"; then
+ echo "You must set SVNPROTOCOL!"
exit 1
fi
+SVN=svn
+
if ! test -d kdepim; then
echo "kdepim not found. Press ENTER to check it out from SVN."
read && \
- svn checkout $PROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/KDE/3.3/kdepim || exit 1
+ $SVN --username $SVNUSER checkout $SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/KDE/3.3/kdepim || exit 1
fi
cd kdepim
function switch_dir() {
- ( cd $1 && svn switch "$PROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$1" )
-}
-function new_dir() {
- ( cd $1 && svn checkout "$PROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$1/$2" )
+ ( cd $1 && $SVN --username $SVNUSER switch "$SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$1" )
}
+
function update() {
file=`basename $1`
dir=`dirname $1`
- ( cd $dir && svn checkout "$PROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$dir/$file" )
+ ( cd $dir && $SVN --username $SVNUSER checkout "$SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$dir/$file" )
}
function switch_file() {
file=`basename $1`
dir=`dirname $1`
- ( cd $dir && svn switch "$PROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$dir/$file" $file )
+ ( cd $dir && $SVN --username $SVNUSER switch "$SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/$dir/$file" $file )
}
switch_dir certmanager/lib
@@ -47,8 +54,15 @@
switch_dir doc/kaddressbook
switch_dir libkdepim
switch_dir libkcal
-new_dir kresources kolab
-new_dir kontact data
+switch_dir kontact/src
+
+# The downside of checking out a subdir is that "svn up" won't update it...
+# Hence the major hack: replacing imap with kolab in .svn/entries
+( cd kresources &&
+ $SVN --username $SVNUSER checkout "$SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/kdepim/proko2/kdepim/kresources/kolab" &&
+ perl -pi -e 's/imap/kolab/' .svn/entries &&
+ rm -rf imap
+)
for f in \
kaddressbook/{kabcore.cpp,kabcore.h,kaddressbook_part.rc} \
@@ -58,7 +72,7 @@
kaddressbook/features/distributionlistwidget.{cpp,h} \
kaddressbook/features/resourceselection.{cpp,h} \
certmanager/{aboutdata.cpp,certificatewizard{.ui,impl.cpp},lib/backends/qgpgme/qgpgmejob.cpp} \
- kontact/Makefile.am kontact/src/{main.cpp,Makefile.am} \
+ kontact/Makefile.am \
korganizer/{freebusymanager.cpp,version.h,actionmanager.cpp} \
korganizer/{kodialogmanager.cpp,koagenda.cpp} \
korganizer/{kogroupware.{cpp,h},calendarview.{cpp,h}} \
@@ -68,3 +82,8 @@
plugins/kmail/bodypartformatter/text_calendar.cpp \
wizards/{Makefile.am,kolabwizard.cpp,kolabwizard.h,kmailchanges.cpp,kolab.kcfg} \
; do switch_file $f ; done
+
+### How to finish the branching of a dir where some files were branched:
+# ( cd pure-proko2/kdepim/$subdir && ls -1 > /tmp/alreadythere )
+# ( cd kdepim-proko2/kdepim/$subdir && ls -1 | while read a; do if grep -q ^$a$ /tmp/alreadythere; then : ; else echo $a ; fi ; done > /tmp/tocp )
+# ( cd pure-proko2/kdepim/$subdir && cat /tmp/tocp | while read f ; do svn cp $SVNPROTOCOL://$SVNUSER@svn.kde.org/home/kde/branches/KDE/3.3/kdepim/$subdir/$f . ; done
More information about the commits
mailing list