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

Re: svn commit: r28624 - branches/issue-2897/subversion/libsvn_fs_util

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-12-21 22:31:12 CET

On Dec 21, 2007 12:32 PM, David Glasser <glasser@davidglasser.net> wrote:
> > *commit_rangelist = apr_array_make(pool, 0, sizeof(svn_merge_range_t *));
> > *merge_ranges_list = apr_array_make(pool, 0, sizeof(apr_array_header_t *));
> > merge_rangelist = apr_array_make(pool, 0, sizeof(svn_merge_range_t *));
> >
> > - if (!real_mergeinfo_target)
> > - return SVN_NO_ERROR;
> > -
> > - if (strcmp(real_mergeinfo_target, merge_target) != 0)
> > - {
> > - int parent_merge_src_end;
> > - const char *target_base_name =
> > - merge_target + strlen(real_mergeinfo_target);
> > - parent_merge_src_end = strlen(merge_source) - strlen(target_base_name);
> > - real_merge_source = apr_pstrndup(pool, merge_source,
> > - parent_merge_src_end);
> > - }
> > SVN_ERR(svn_fs__sqlite_prepare(&stmt, db,
> > "SELECT revision, mergedrevstart, "
> > - "mergedrevend, inheritable "
> > - "FROM mergeinfo_changed "
> > - "WHERE mergedfrom = ? AND mergedto = ? "
> > - "AND revision between ? AND ? "
> > - "ORDER BY revision ASC ;", pool));
> > - SVN_ERR(svn_fs__sqlite_bind_text(stmt, 1, real_merge_source));
> > - SVN_ERR(svn_fs__sqlite_bind_text(stmt, 2, real_mergeinfo_target));
> > - SVN_ERR(svn_fs__sqlite_bind_int64(stmt, 3, min_commit_rev + 1));
> > - SVN_ERR(svn_fs__sqlite_bind_int64(stmt, 4, max_commit_rev));
> > + "mergedrevend, inheritable, mergedfrom, "
> > + "mergedto FROM mergeinfo_changed "
> > + "WHERE revision between ? AND ? "
> > + "ORDER BY revision ASC, mergedto ASC; ",
> > + pool));
>
> This will iterate over *every* mergeinfo change *everywhere* in the
> repository between the two revisions. I can't imagine that this is
> efficient for large multi-project multi-branch repositories.

Actually, can't you make this issue a little better by putting LIKEs
on mergedto and mergedfrom?

(Although brief experiments make me think this'll still be a linear
search, not an indexed search, on the paths, if you're doing a
selection on both revision and a path. But doing it in sql *could* be
more efficient.)

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 22 10:39:08 2007

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