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

Re: svn commit: r20893 - branches/merge-tracking/subversion/libsvn_fs_fs

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-07-28 11:08:27 CEST

- }
> -
> + SVN_ERR(index_merge_info(cb, new_rev, pool));
>
Fails to cleanup the earlier failed merge commits.
Attached patch does it.

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

r20893 fails to do a cleanup of some earlier commit with the rev as
current one.

* subversion/libsvn_fs_fs/fs_fs.c
  (index_merge_info)
   One extra parameter 'contains_merge_info' is added.
   Adds the mergeinfo if the commit has some merge info.

  (commit_body): calls index_merge_info unconditionally by passing
   the 'contains_merge_info'.
]]]

Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 20894)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -4119,7 +4119,7 @@
    current transaction. */
 static svn_error_t *
 index_merge_info(struct commit_baton *cb, svn_revnum_t new_rev,
- apr_pool_t *pool)
+ svn_boolean_t contains_merge_info, apr_pool_t *pool)
 {
   const char *deletestring;
   fs_txn_data_t *ftd = cb->txn->fsap_data;
@@ -4143,7 +4143,8 @@
   SVN_ERR(fs_sqlite_exec(ftd->mtd, deletestring, NULL, NULL));
 
   /* Record any merge info from the current transaction. */
- SVN_ERR(update_mergeinfo_index(cb->txn, new_rev, pool));
+ if (contains_merge_info)
+ SVN_ERR(update_mergeinfo_index(cb->txn, new_rev, pool));
       
   /* This is moved here from commit_txn, because we don't want to
      write the final current file if the sqlite commit fails.
@@ -4273,8 +4274,7 @@
   SVN_ERR(svn_fs_fs__move_into_place(revprop_filename, final_revprop,
                                      old_rev_filename, pool));
   
- if (contains_merge_info)
- SVN_ERR(index_merge_info(cb, new_rev, pool));
+ SVN_ERR(index_merge_info(cb, new_rev, contains_merge_info, pool));
 
   /* Update the 'current' file. */
   SVN_ERR(write_final_current(cb->fs, cb->txn->id, new_rev, start_node_id,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 28 23:39:25 2006

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