Skip to content
SVNKit based Subversion API for Clojure
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

subversion-clj Build Status

Clojure library for working with Subversion repositories

This code is initially extracted from caching daemon[1]. It's a work in progress, so be careful with updates to new versions. The API may change, although I'm trying to keep thing compatible.

Based on SVNKit, tested with Subversion up to 1.7.9.

[1] Post in Beanstalk's blog about this


Available from Clojars.


API documentation with some examples, generated by awesome Marginalia.

; This needs to be pointed to your repo, not working copy
(repo-for "file:///some/path/on-your/disk/repo")

; Connecting to remote repository with authentication
(repo-for "" "my-login" "my-password")

; Finds revision 100 in repo and returns it
(revision-for repo 100)

; Finds all revisions in the repo
(revisions-for repo)

; Finds youngest revision of the repo
(youngest repo)

; Gets UUID of the repo
(uuid repo)


Revision records

; Deleted directory
{:revision 7
:author "dsabanin"
:message "removed directory"
:changes [["dir" "some-directory" :delete]]}

; Edited files
{:revision 11
:author "dsabanin"
:message "editing files"
:changes [["file" "file-abc" :edit]
          ["file" "file-def" :edit]]}

; Copied directory
{:revision 6
:author "dsabanin"
:message "copied dir"
:changes [["dir" ["new-directory" "old-directory" 5] :copy]]}

Create a Branch

(def repo "")
(def client (core/client-manager "ledet" "password"))
(copy-url client (str repo "/trunk") (str repo "/branches/new-feature") "Created new-feature branch from trunk")


SVNKit by TMate Software for a very powerful API to build upon.


Copyright (C) 2013 Dima Sabanin

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.