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

svn_fs_history_prev() and svn_fs_copied_from() question (was: Re: [PATCH] Re: test failure 1.6.14 (svnsync test 29 with bdb; copyfrom))

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 18 Nov 2010 15:43:36 +0200

Yes, that's what I meant, but I see that Philip already committed a fix.

Question to FS people:

Is the svn_fs_history_location(svn_fs_history_prev()) approach
equivalent to the svn_fs_copied_from() approach?

Stefan Sperling wrote on Thu, Nov 18, 2010 at 11:51:19 +0100:
> On Thu, Nov 18, 2010 at 06:34:30AM +0200, Daniel Shahaf wrote:
> > Daniel Shahaf wrote on Thu, Nov 18, 2010 at 06:07:07 +0200:
> > > + SVN_ERR(svn_fs_node_history(&history, copyto_root, copyto_path, pool));
> > > + SVN_ERR(svn_fs_history_prev(&history_prev, history, TRUE /* cross copies */,
> > > + pool));
> > > + SVN_ERR(svn_fs_history_location(copyfrom_path_p, copyfrom_rev_p,
> > > + history_prev, pool));
> >
> > Tests running (trunk plus the patch).
> >
> >
> > But perhaps I should have used this function instead:
> >
> > 1439 svn_error_t *
> > 1440 svn_fs_copied_from(svn_revnum_t *rev_p,
> > 1441 const char **path_p,
> > 1442 svn_fs_root_t *root,
> > 1443 const char *path,
> > 1444 apr_pool_t *pool);
>
> You mean like this? Seems to work here.
>
> Index: subversion/libsvn_repos/replay.c
> ===================================================================
> --- subversion/libsvn_repos/replay.c (revision 1036389)
> +++ subversion/libsvn_repos/replay.c (working copy)
> @@ -225,10 +225,14 @@ add_subdir(svn_fs_root_t *source_root,
> continue;
> else if (change->change_kind == svn_fs_path_change_replace)
> {
> - /* ### Can this assert fail? */
> - SVN_ERR_ASSERT(change->copyfrom_known);
> - copyfrom_path = change->copyfrom_path;
> - copyfrom_rev = change->copyfrom_rev;
> + if (change->copyfrom_known)
> + {
> + copyfrom_path = change->copyfrom_path;
> + copyfrom_rev = change->copyfrom_rev;
> + }
> + else
> + SVN_ERR(svn_fs_copied_from(&copyfrom_rev, &copyfrom_path,
> + target_root, new_path, pool));
> }
> }
>
Received on 2010-11-18 14:46:54 CET

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.