dev@glassfish.java.net

workaround (was Re: svn checkout trouble)

From: Bobby Bissett <bobby.bissett_at_oracle.com>
Date: Wed, 23 Jun 2010 15:03:25 -0400

On Jun 18, 2010, at 10:21 AM, Tim Quinn wrote:
>
> Does svn set the exit status correctly when it fails so that a
> script could loop (perhaps with an upper limit of retries) until
> success? (No, I am not volunteering to write, publish, and support
> such a script :-) .)


At the risk of having to support something, I threw this together and
it's worked for me. Note that it always does at least one update no
matter what. Here's an example of me running it on the shoal workspace
(with a lot of output omitted):

hostname% python [...]/svngetter.py https://shoal.dev.java.net/[...]/gms
running: svn co https://shoal.dev.java.net/s[...]/gms
[svn output omitted]
svn: REPORT of '/svn/shoal/!svn/vcc/default': Could not read response
body: Connection reset by peer (https://shoal.dev.java.net)
running: svn up gms
[svn output omitted]
Updated to revision 1010.
Checkout worked: False
Number of updates: 1

So it does a checkout, exits if nothing was checked out at all, else
does an update on the dir you checked out over and over until it
works. Then it tells you what happened. Here's the end of a v3 checkout:

Updated to revision 38080.
Checkout worked: False
Number of updates: 9

Cheers,
Bobby