[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH][merge-tracking] svnadmin hotcopy fails to copy mergeinfo.db for 'bdb' repositories

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-10-06 10:50:00 CEST

Hi All,
Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>

  Define the sqlite mergeinfo db name(PATH_MERGEINFO_DB) in one file and consume
  it from elsewhere.
  svnadmin hotcopy for 'bdb' repositories should copy mergeinfo db also.

* subversion/include/private/svn_fs_merge_info.h
  (PATH_MERGEINFO_DB): New macro.

* subversion/libsvn_fs_fs/fs_fs.c
  (PATH_MERGEINFO_DB): Removed.

* subversion/libsvn_fs_util/merge-info-sqlite-index.c
  (PATH_MERGEINFO_DB): Removed.

* subversion/libsvn_fs_base/fs.c
  (base_hotcopy):
   copy the PATH_MERGEINFO_DB to destination.
]]]

Index: subversion/include/private/svn_fs_merge_info.h
===================================================================
--- subversion/include/private/svn_fs_merge_info.h (revision 21795)
+++ subversion/include/private/svn_fs_merge_info.h (working copy)
@@ -24,6 +24,8 @@
 extern "C" {
 #endif /* __cplusplus */
 
+#define PATH_MERGEINFO_DB "mergeinfo.db" /* sqlite mergeinfo db. */
+
 /* Create the merge info index under PATH. Use POOL for any temporary
    allocations. */
 svn_error_t *
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 21795)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -67,7 +67,6 @@
 #define PATH_REVPROPS_DIR "revprops" /* Directory of revprops */
 #define PATH_TXNS_DIR "transactions" /* Directory of transactions */
 #define PATH_LOCKS_DIR "locks" /* Directory of locks */
-#define PATH_MERGEINFO_DB "mergeinfo.db" /* Contains mergeinfo. */
 
 /* Names of special files and file extensions for transactions */
 #define PATH_CHANGES "changes" /* Records changes made so far */
Index: subversion/libsvn_fs_util/merge-info-sqlite-index.c
===================================================================
--- subversion/libsvn_fs_util/merge-info-sqlite-index.c (revision 21795)
+++ subversion/libsvn_fs_util/merge-info-sqlite-index.c (working copy)
@@ -37,9 +37,6 @@
 /* Following are defines that specify the textual elements of the
    native filesystem directories and revision files. */
 
-/* Names of special files in the filesystem. */
-#define PATH_MERGEINFO_DB "mergeinfo.db" /* Contains mergeinfo. */
-
 /* We want to cache that we saw no mergeinfo for a path as well,
    so we use a -1 converted to a pointer to represent this. */
 #define NEGATIVE_CACHE_RESULT ((void *)(-1))
Index: subversion/libsvn_fs_base/fs.c
===================================================================
--- subversion/libsvn_fs_base/fs.c (revision 21795)
+++ subversion/libsvn_fs_base/fs.c (working copy)
@@ -1029,6 +1029,9 @@
   /* Copy the DB_CONFIG file. */
   SVN_ERR(svn_io_dir_file_copy(src_path, dest_path, "DB_CONFIG", pool));
 
+ /* Copy the merge tracking info. */
+ SVN_ERR(svn_io_dir_file_copy(src_path, dest_path, PATH_MERGEINFO_DB, pool));
+
   /* In order to copy the database files safely and atomically, we
      must copy them in chunks which are multiples of the page-size
      used by BDB. See sleepycat docs for details, or svn issue #1818. */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 6 10:49:45 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.