If I try to mirror a 3rd-party repo to a local one then while svnsync is uploading a 300M+ file to the slow destination server the source server disconnects and svnsync does not try to reconnect to it and enters infinite loop. How to workaround this?
C:\progs\svnsync-dir>svnsync --version
svnsync, version 1.14.0 (r1876290)
compiled May 24 2020, 17:07:49 on x86-microsoft-windows
C:\progs\svnsync-dir>svnsync --steal-lock sync https://targetreposito.acme.com/s
vn/Reponame
Stole lock previously held by 'my-host-name:ab204a7a-756f-2947-af9c-caf904a8945d
'
Transmitting file data .........................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
............< here it hangs


After compiling the svn communication library
serffrom trunksvnsyncinstead of hanging is now crashing withAn error occurred during decompressionor (if) in
~/.subversion/serversthen withMalformed XML: no element found.After dumping the HTTP conversation between svnsync and the source server I figured out that the source server closed connection while svnsync was flushing partially received delta to the destination server.
The solution is to use the
pvtool withslicedisabled and a huge buffer to hold the full response:pv -q -C -B4GAdd to /etc/hosts:Then run:
Run:
hugebuf.sh (simplified):
Lastly, run the svnsync command with extra args:
Now it's able to commit this very revision.
The above works with msys / git-for-windows too.
https://packages.msys2.org/package/pv?repo=msys&variant=x86_64
https://packages.msys2.org/package/socat?repo=msys&variant=x86_64