I've written a script using Dulwich to fix up and push an SVN repo to Gitlab. It's converted via git-svn, I use Dulwich to fix up branch and tag refs and do the push. It's in Python 3.5, latest Dulwich installed in a virtualenv via pip.
My problem is that when I do the push to the HTTPS repo, I get a HTTP 502 response. Digging around a bit, it looks like this is due to the server timing out on a massive HTTPS POST (it's a big repo with big files). We're talking 300s (5min) between two machines on the same local network.
If I use Git from the command line (my current workaround), I get no such error (via HTTPS or SSH). If I use Dulwich via SSH, I get no error, but SSH is a pain because it requires interactivity (known hosts prompt) and extra configuration (keys, config).
I don't really have access to the server; I have some say but honestly I'd rather fix my script that have an arms race with the timeout.
Is there some way I can break up the transfer? I've tried writing a write_pack_objects() function for send_pack() that does or doesn't deltify the packs, but it didn't make a difference. Pushing the master alone will trigger the 502, so looping over the refs I'm sending won't do it. I suspect, but haven't tested, that no individual commit would be over the limit though. What else can I try?
Thanks,
Jason