
On 2006-08-23, Roland Levillain <roland@lrde.epita.fr> wrote:
2006-08-23 Roland Levillain <roland@lrde.epita.fr>
Speed up the updates from the repository.
* maintainer/update_unpacked: Try to update a working copy before retrieving it entirely (with a checkout).
Index: maintainer/update_unpacked =================================================================== --- maintainer/update_unpacked (revision 299) +++ maintainer/update_unpacked (revision 300) @@ -12,12 +12,17 @@ while read package url; do echo $package
- # Extract a fresh copy of the project. - rm -rf "$package.new" - svn checkout -q "$url" "$package.new" - mv -f "$package" "$package.old" - mv -f "$package.new" "$package" - rm -rf "$package.old" + # Try to update the working copy first. + svn update $package
+ # If it fails, extract a fresh copy of the project. + if test $? -ne 0; then + rm -rf "$package.new" + svn checkout -q "$url" "$package.new" + mv -f "$package" "$package.old" + mv -f "$package.new" "$package" + rm -rf "$package.old"
j'aurai verifie que svn checkout marche ou fait un truc du genre: svn checkout -q "$url" "$package.new" && \ mv -f "$package" "$package.old" && \ mv -f "$package.new" "$package" && \ rm -rf "$package.old"
+ fi + done < $SVN_PACKAGES )
Sinon c'est cool d'etre nice with the svn server :) -- SIGOURE Benoit aka Tsuna _____ /EPITA\ Promo 2008.CSI Rock & tRoll