Question

When svn update fails, executing svn cleanup is often required before resuming the update. If failures are frequent, this can get really annoying.

I'm looking for a way to make the SVN update command more robust. Ideally, it would be nice if there were a --cleanup-and-continue-on-failure switch, but I don't see anything in the docs that looks like it would help. Is there some tool I could be using instead of the command line or Tortoise that would do this for me?

For reference, below are the particular errors that are causing my woes, which sound like they might be caused by interrupted connections. They usually occur after a few dozen files are pulled down during a fresh checkout, roughly every 60 seconds.

svn: E140001: zlib (uncompress): corrupt data: Decompression of svndiff data failed

svn: E175009: XML parsing failed: (200 OK)

svn: E185004: Unexpected end of svndiff input

Update:

It looks like a recent version of SVN fixes this to a degree, such that the repository is left in an inconsistent state only a small faction of the time, but it would still be nice to be able to force an update to retry upon failure.

Has anyone already hacked together a script-based solution for this? Anyone want to take a crack at it?

Was it helpful?

Solution

After dealing with this problem for a while, it came to a head again recently and I went for the quick and dirty solution (Windows/DOS only):

:Beginning
@ECHO ON
svn cleanup %1
svn update %1
@ECHO OFF
IF ERRORLEVEL 1 GOTO Beginning

I named it angry-update.bat and stuck in my "scripts" folder (which is in my PATH). Shell integration would be nice, but I'm okay with changing my workflow for big updates.

Hopefully someone else finds this useful one day!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top