Page MenuHomePhabricator

Support serving SVN repositories over SSH
ClosedPublic

Authored by epriestley on Nov 11 2013, 5:05 AM.
Tags
None
Referenced Files
F15499618: D7556.id.diff
Sun, Apr 13, 3:03 PM
F15498569: D7556.id17068.diff
Sun, Apr 13, 1:21 PM
F15496464: D7556.id17049.diff
Sun, Apr 13, 6:53 AM
F15495268: D7556.id17048.diff
Sun, Apr 13, 3:31 AM
F15492564: D7556.diff
Sat, Apr 12, 3:57 PM
F15428961: D7556.diff
Mar 23 2025, 11:43 PM
F15421250: D7556.id.diff
Mar 21 2025, 9:59 PM
F15421249: D7556.id17047.diff
Mar 21 2025, 9:59 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

Branch
svnwire
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsrc/applications/diffusion/ssh/DiffusionSSHSubversionServeWorkflow.php:6TXT3Line Too Long
Unit
Tests Passed

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
34–35

derps

40–41

more derps

70

xtra derps

87

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.