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

Re: [PATCH][merge-tracking]data confusion(corruption?) when the source of merge has the merges from multiple other sources

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-11-02 05:31:31 CET

On Thu, 02 Nov 2006 01:19:28 +0530, Kamesh Jayachandran
<kamesh@collab.net> wrote:

> Index: subversion/libsvn_fs_util/merge-info-sqlite-index.c
> ===================================================================
> --- subversion/libsvn_fs_util/merge-info-sqlite-index.c(revision 22190)
> +++ subversion/libsvn_fs_util/merge-info-sqlite-index.c(working copy)
> @@ -326,9 +326,10 @@
> mergedfrom = (char *) sqlite3_column_text(stmt, 0);
> startrev = sqlite3_column_int64(stmt, 1);
> endrev = sqlite3_column_int64(stmt, 2);
> + mergedfrom = apr_pstrdup(pool, mergedfrom);
> if (lastmergedfrom && strcmp(mergedfrom, lastmergedfrom) != 0)
> {
> - apr_hash_set(*result, mergedfrom, APR_HASH_KEY_STRING,
> + apr_hash_set(*result, lastmergedfrom, APR_HASH_KEY_STRING,

Really? I think *this* change would cause wrong paths mapped to wrong
rev-ranges. Do you have any tests to prove the need for this change?

Apart from that, I do really see a problem where the first merged from
path will never get set into the *result hash. To counter this, we should
have the if condition as below:

> if (lastmergedfrom == NULL || strcmp(mergedfrom,
> lastmergedfrom) != 0)

What do you think?

Regards,
Madan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 2 05:02:08 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.