subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1717616 - in /subversion/branches/ra-git/subversion/libsvn_fs_git: git-fs.c gitdb.c
Date Wed, 02 Dec 2015 11:45:06 GMT
Author: rhuijben
Date: Wed Dec  2 11:45:06 2015
New Revision: 1717616

URL: http://svn.apache.org/viewvc?rev=1717616&view=rev
Log:
On the git-ra branch: Tweak fs_git disk layout a bit, to avoid having to
create a 'fs-type' file inside the git repository directory.

I now create a 'git' subdir within the standard 'db' subdir of a
repository, which holds the git repository. A nice side effect is
that this allows using a symlink here.

This allows removing the initial '.' of the sqlite database as we
no longer have to hide it.

* subversion/libsvn_fs_git/git-fs.c
  (includes): Add svn_dirent_uri.h.
  (svn_fs_git__create,
   svn_fs_git__open): Pass new dir.

* subversion/libsvn_fs_git/gitdb.c
  (svn_fs_git__db_open,
   svn_fs_git__db_create): Tweak name.

Modified:
    subversion/branches/ra-git/subversion/libsvn_fs_git/git-fs.c
    subversion/branches/ra-git/subversion/libsvn_fs_git/gitdb.c

Modified: subversion/branches/ra-git/subversion/libsvn_fs_git/git-fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_fs_git/git-fs.c?rev=1717616&r1=1717615&r2=1717616&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_fs_git/git-fs.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_fs_git/git-fs.c Wed Dec  2 11:45:06 2015
@@ -28,6 +28,7 @@
 #include <apr_pools.h>
 
 #include "svn_fs.h"
+#include "svn_dirent_uri.h"
 #include "svn_version.h"
 #include "svn_pools.h"
 #include "svn_hash.h"
@@ -329,7 +330,9 @@ svn_fs_git__create(svn_fs_t *fs,
 
   fs->path = apr_pstrdup(fs->pool, path);
 
-  GIT2_ERR(git_repository_init(&fgf->repos, path, TRUE /* is_bare */));
+  GIT2_ERR(git_repository_init(&fgf->repos,
+                               svn_dirent_join(path, "git", scratch_pool),
+                               TRUE /* is_bare */));
 
   SVN_ERR(svn_fs_git__db_create(fs, scratch_pool));
 
@@ -345,7 +348,8 @@ svn_fs_git__open(svn_fs_t *fs,
 
   fs->path = apr_pstrdup(fs->pool, path);
 
-  GIT2_ERR(git_repository_open(&fgf->repos, path));
+  GIT2_ERR(git_repository_open(&fgf->repos,
+                               svn_dirent_join(path, "git", scratch_pool)));
 
   SVN_ERR(svn_fs_git__db_open(fs, scratch_pool));
 

Modified: subversion/branches/ra-git/subversion/libsvn_fs_git/gitdb.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_fs_git/gitdb.c?rev=1717616&r1=1717615&r2=1717616&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_fs_git/gitdb.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_fs_git/gitdb.c Wed Dec  2 11:45:06 2015
@@ -268,7 +268,7 @@ svn_fs_git__db_open(svn_fs_t *fs,
 {
   svn_fs_git_fs_t *fgf = fs->fsap_data;
   svn_sqlite__stmt_t *stmt;
-  const char *db_path = svn_dirent_join(fs->path, ".svn-git-fs.db",
+  const char *db_path = svn_dirent_join(fs->path, "svn-git-fs.db",
                                         scratch_pool);
 
   SVN_ERR(svn_sqlite__open(&fgf->sdb, db_path, svn_sqlite__mode_readwrite,
@@ -321,7 +321,7 @@ svn_fs_git__db_create(svn_fs_t *fs,
                       apr_pool_t *scratch_pool)
 {
   svn_fs_git_fs_t *fgf = fs->fsap_data;
-  const char *db_path = svn_dirent_join(fs->path, ".svn-git-fs.db",
+  const char *db_path = svn_dirent_join(fs->path, "svn-git-fs.db",
                                         scratch_pool);
 
   SVN_ERR(svn_sqlite__open(&fgf->sdb, db_path, svn_sqlite__mode_rwcreate,



Mime
View raw message