Menu

Team Project Debugging Log in to Edit

Aaron Madlon-Kay

Local svn repo

Create a local svn repo accessible via file:// URL:

svnadmin create testRepo.svn

HTTP access

It is not trivial to serve an svn repo over HTTP, but we have a Docker image set up for it:

docker run --rm -p 1234:80 -e SVN_REPO_NAME=test omegatorg/httpd-svn

The repo is accessible at http://localhost:1234/svn/test.

Note that toxiproxy does not support WebDAV so it cannot proxy an svn repo over HTTP. Thus it is not known how to simulate network problems as is possible with a git HTTP repo.

Local git repo

Create a local git repo accessible via file:// URL:

mkdir -p testRepo.git/omegat
cd testRepo.git
git init
touch omegat/project_save.tmx
git add -A
git commit -m "Initial commit"

HTTP access

Serve a local repo over HTTP with Python 3 like so:

cd .git
python -m http.server 8000

For Python 2, use SimpleHTTPServer instead of http.server.

Now you can access the repo as http://localhost:8000.

Simulating network problems

Simulate network problems with toxiproxy:

toxiproxy-server &
# Create proxy targeting HTTP server started above
toxiproxy-cli create git -l localhost:8001 -u localhost:8000
# Add 1m40s of latency
toxiproxy-cli toxic add git -t latency -a latency=100000

Now you can access the repo as http://localhost:8001 and it will timeout (assuming timeout properly set at less than 1m40s).


Related

Wiki: Home