Hi All,
Find the attached patch and log.
With regards
Kamesh Jayachandran
[[[
Data confusion(corruption?) while iterating over records.
This is visible if you have source of copy having merge from 2 different
merge sources.
* subversion/libsvn_fs_util/merge-info-sqlite-index.c
(parse_mergeinfo_from_db):
- Sqlite while looping through the records, reuses the same memory
and hence causes data confusion while iterating.
Just duplicate the data to our memory to avoid this confusion.
- we set the *result with 'mergedfrom' as the key which should
have been 'lastmergedfrom' or else mergeinfo would be incorrectly
set for each paths.
Patch by: Kamesh Jayachandran <kamesh@collab.net>
]]]
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,
pathranges);
pathranges = apr_array_make(pool, 1,
sizeof(svn_merge_range_t *));
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 1 20:50:15 2006