Greetings, Andrey Repin!
Oh, hi! /sorry, necessary joke. I feel a bit embarrassed talking that much to
myself.
*****************************************************************************
********************************* WARNING ***********************************
This script is NOT ready-to use, nor it is recommended to use in it's current
state.
At the very least, it lack even most basic sanity checks.
Thus only what it could REALLY do is to retrieve latest revision number and
place it to the ~/latest file.
And, however, print out suggested commands which it's supposed to do to update
your project from known "latest" revision to current HEAD of a given branch.
A word about deleted objects. I could, however, include "rm -rf" in script,
but I better won't. Even commented, it's always leaving as potential for bad
happenings. Better don't do that, so I just leave a note for removed objects.
********************************* WARNING ***********************************
*****************************************************************************
Step five:
Quoting the svnexport.sh:
> #! /bin/sh
> echo "#! /bin/sh" > ~/tmp/export.sh
> svn diff --summarize -r `cat ~/latest`:HEAD $1 | sed -E \
> -e "s#^[AM].......?($1)(/*(.*))#echo svn export --force --quiet \1\2 \3#" \
> -e "s#^D.......?$1/*(.*)#echo Removed object: \1#" >> ~/tmp/export.sh
> chmod +x ~/tmp/export.sh
> ~/tmp/export.sh
> rm ~/tmp/export.sh
> svn info $1 | grep "^Revision:" | sed -E "s#^Revision:[[:space:]]+([[:digit:]]+)#\1#" > ~/latest
Two issues I ran in with this script.
1. Difference with sed switches, -r against -E on different platforms.
2. Multiple SVN authorization requests if you have store-passwords = no
Would be handy if SVN could take approach of CVS and sudo and cache entered
password for some time.
Suggestions for script:
0. Add proof-checking for various parameters and execution results.
1. Take SVN path from file or hardcode it in script. Reduce level of mistypes.
--
WBR,
Andrey Repin (anrdaemon_at_freemail.ru) 07.04.2009, <22:40>
Sorry for my terrible english...
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1582002
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-07 21:10:57 CEST