Codumentor logo Codumentor

SVN Plugin

The SVN plugin adds Subversion repository support: it checks out (or updates) SVN working copies before ingestion, and it lists and switches branches so Branch Switching works on SVN repos.

The plugin has no args of its own. Credentials and revision pinning live on each repos[] entry.

Requirements

The svn CLI must be installed as a system package. It cannot be installed via pip/uv.

Ubuntu/Debian:  sudo apt-get install subversion
Fedora/RHEL:    sudo dnf install subversion
macOS:          brew install subversion
Windows:        winget install TortoiseSVN.TortoiseSVN  (or SlikSVN / VisualSVN)

If svn is missing at runtime, Codumentor raises an error with those installation instructions.

Configuration

Plugin registration

plugins:
  - module: codumentor.plugins.svn
    class: SvnPlugin

Repository entries

Add SVN repos to the repos list with scm: svn:

repos:
  - scm: svn
    url: https://svn.example.com/repos/myproject
    name: myproject

  # With authentication (${ENV_VAR} expansion is supported)
  - scm: svn
    url: https://svn.example.com/repos/internal
    name: internal
    options:
      username: ${SVN_USER}
      password: ${SVN_PASS}

  # Pinned to a specific revision
  - scm: svn
    url: https://svn.example.com/repos/legacy
    name: legacy
    commit: "4200"

Repository options

OptionDescription
usernameSVN username. Supports ${ENV_VAR} expansion.
passwordSVN password. Supports ${ENV_VAR} expansion.
revisionRevision to check out (alternative to the top-level commit field).

commit (top-level repo field) or options.revision both pin the working copy to a specific revision.

What the plugin does

Checkout/update — Before ingestion, the plugin runs svn checkout for new working copies or svn update for existing ones. A 300-second timeout applies.

Branch listing — Discovers trunk/Trunk and entries under branches//Branches/ (casing as used in the repo). Names are relative to the project prefix (e.g. Trunk, Branches/feature-x).

Branch switching — Switches the working copy to the selected branch. If the working copy is a subdirectory of a branch (e.g. …/Trunk/DbStructure), the same subdirectory is kept on the new branch.

Branch diff — Summarizes added, modified, and deleted files between two refs (used for branch-specific search overlays).

Multi-project repos — Supports layouts where several projects share one repository root (e.g. https://svn.example.com/front/WS/FrontWS1.3.1/trunk). The plugin derives the project prefix automatically and exposes short branch names.

Credentials

When options.username / options.password are set, they are passed to every SVN network command and not written to ~/.subversion/auth/ (--no-auth-cache). Keep those values in config (or env vars) so later checkout, update, list, and switch still authenticate.

When credentials are omitted, SVN runs non-interactively and uses whatever is already cached under ~/.subversion/auth/.

Troubleshooting

The 'svn' command-line tool is not installed — Install subversion via your OS package manager (see Requirements above).

SVN command failed — Check the error for authentication or network issues. Verify the url is reachable and credentials are still present in config (they are not cached after a successful checkout).

Branch list shows only trunk / Trunk — Listing branches/ may have failed (network, auth, or a non-standard layout). Check logs for list_branches failed warnings.