Page MenuHomePhabricator

Support serving SVN repositories over SSH
ClosedPublic

Authored by epriestley on Nov 11 2013, 5:05 AM.
Tags
None
Referenced Files
F14404762: D7556.id.diff
Mon, Dec 23, 6:07 AM
F14404761: D7556.id17047.diff
Mon, Dec 23, 6:07 AM
F14404760: D7556.id17049.diff
Mon, Dec 23, 6:07 AM
F14404759: D7556.id17048.diff
Mon, Dec 23, 6:07 AM
F14404665: D7556.diff
Mon, Dec 23, 5:51 AM
Unknown Object (File)
Fri, Dec 13, 6:25 AM
Unknown Object (File)
Thu, Dec 12, 6:51 AM
Unknown Object (File)
Wed, Dec 11, 11:43 PM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP85f505465e53: Support serving SVN repositories over SSH
Summary

Ref T2230. The SVN protocol has a sensible protocol format with a good spec here:

http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_ra_svn/protocol

Particularly, compare this statement to the clown show that is the Mercurial wire protocol:

It is possible to parse an item without knowing its type in advance.

WHAT A REASONABLE STATEMENT TO BE ABLE TO MAKE ABOUT A WIRE PROTOCOL

Although it makes substantially more sense than Mercurial, it's much heavier-weight than the Git or Mercurial protocols, since it isn't distributed.

It's also not possible to figure out if a request is a write request (or even which repository it is against) without proxying some of the protocol frames. Finally, several protocol commands embed repository URLs, and we need to reach into the protocol and translate them.

Test Plan

Ran various SVN commands over SSH (svn log, svn up, svn commit, etc).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I'm going to covert the protocol parsing stuff with some tests, this is just a reasonable checkpoint for the night.

whoops

src/applications/diffusion/protocol/DiffusionSubversionWireProtocol.php
35โ€“36

derps

41โ€“42

more derps

71

xtra derps

88

also derps

epriestley updated this revision to Unknown Object (????).Nov 11 2013, 5:08 AM

Fewer derps.

epriestley updated this revision to Unknown Object (????).Nov 11 2013, 5:09 PM
  • Add unit tests.
  • Move some code to more sensible places.
  • Re-ran various SVN commands: checkout, update, log, diff, commit.