Add additional validation for Git and SVN repos.

Review Request #13223 — Created Aug. 18, 2023 and submitted — Latest diff uploaded


Review Board


We have two cases that have come up semi-frequently, tripping up users
when they're trying to configure their repositories:

  1. Users were putting in a raw file path to an SVN repository, where it
    needs a file:// URL.
  2. When configuring a Git repo, they'd enter their SVN clone address but
    leave out the raw file URL. This one is especially confusing because
    a lot of people expect Git to just work, and don't read our
    documentation about why it doesn't.

This change adds new repository form subclasses that can validate these

  • Verified that I wasn't able to save an SVN repo pointing to a bare
    filesystem path, but could with file:// and https://
  • Verified that trying to save a Git repo with a path but no raw file
    URL would fail.
  • Made sure that saving with a raw file URL or Git repos on a hosting
    service still worked correctly.
  • Ran unit tests.