Carlos Martín Nieto <cmn\ at \>


r1583639 | stsp | 2014-04-01 06:51:43 -0500 (Tue, 01 Apr 2014)

Create the ra-git branch: git repository access for Subversion

This allows Subversion clients to interact with git repositories,
paving the way towards better integration of both systems.

This code originated in a private git repository maintained by me and Carlos.
Due to popular demand we're now moving development of this library to Since the Subversion project has finally been convinced
that git has the better backend[1], we hope to accelerate development of
the git repository access layer by joining forces on this project with
the other SVN and libgit2 developers.


We hope to get libsvn_ra_git production ready in time for Subversion 1.9.0.

The long-term intention is that git will become the default repository
backend for Subversion 1.10 and later, lifting much of the burden of
backend development off the SVN team. BDB has already been deprecated in
1.8 because of this burden. Development of the FSFS successor FSX has been
slower than anticipated but FSX will stay as an optional backend in case
empirical data demonstrates that it outperforms git in large deployments.
But the default migration path for the current FSFS userbase will be git.

See the BRANCH-README for design and implementation notes and a list
of remaining TODO items.

Patch by: me
          Carlos Martín Nieto <cmn\ at \>


  build.conf, Add libgit2 to the build system.

* subversion/include/svn_ra.h
  (svn_ra_get_wc_adm_subdir_func_t): New function which allows the RA
    layer to obtain the absolute path to the working copy admin area.
  (svn_ra_callbacks2_t): Add svn_ra_get_wc_adm_subdir_func_t.
  (svn_ra_git_init): Declare.

* subversion/libsvn_client/ra.c
  (get_wc_adm_subdir): Implementation of svn_ra_get_wc_adm_subdir_func_t.
  (svn_client__open_ra_session_internal): Hook up get_wc_adm_subdir.
* subversion/libsvn_ra/deprecated.c
  (svn_ra_git__deprecated_init): New.

* subversion/libsvn_ra/ra_loader.c
  (git_schemes): New table of git URL schemes.
  (ra_lib_defn): Add ra_git.
  (+svn_ra_git_init): New.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra_git__init): Declare.

* subversion/libsvn_ra_git/ra_git.h,
  subversion/libsvn_ra_git/reporter.c: New files. WIP implementation of ra_git.

* tools/dev/unix-build/Makefile.svn: libgit2 support for my custom build script.