[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: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-28 23:48:39 CEST

Okay -- we need to always do the cleanup, 'cuz if we don't we could
leave stray records around the merge info index. Which don't actively
harm anything, but perhaps should be deleted...

The API probably shouldn't be named index_merge_info(), then.
update_merge_info() would be better, but is already taken. Should we
merge the two routines into a single routine, or rename the existing
update_merge_info() function to something more specific?

On Fri, 28 Jul 2006, Kamesh Jayachandran wrote:

> - }
> >-
> >+ 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,

  • application/pgp-signature attachment: stored
Received on Fri Jul 28 23:49:14 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.