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

RE: svn commit: r986466 - /subversion/trunk/subversion/svnrdump/dump_editor.c

From: Bert Huijben <bert_at_vmoo.com>
Date: Tue, 17 Aug 2010 15:30:30 -0700

> -----Original Message-----
> From: artagnon_at_apache.org [mailto:artagnon_at_apache.org]
> Sent: dinsdag 17 augustus 2010 12:49
> To: commits_at_subversion.apache.org
> Subject: svn commit: r986466 -
> /subversion/trunk/subversion/svnrdump/dump_editor.c
>
> Author: artagnon
> Date: Tue Aug 17 19:48:32 2010
> New Revision: 986466
>
> URL: http://svn.apache.org/viewvc?rev=986466&view=rev
> Log:
> * subversion/svnrdump/dump_editor.c
> (open_file): Simplify a block of code that pushes to an array and
> then calls svn_path_compose; use svn_relpath_join instead.
>
> Modified:
> subversion/trunk/subversion/svnrdump/dump_editor.c
>
> Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dum
> p_editor.c?rev=986466&r1=986465&r2=986466&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
> +++ subversion/trunk/subversion/svnrdump/dump_editor.c Tue Aug 17
> 19:48:32 2010
> @@ -499,21 +499,16 @@ open_file(const char *path,
> struct dir_baton *pb = parent_baton;
> const char *copyfrom_path = NULL;
> svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
> - apr_array_header_t *compose_path;
>
> /* Some pending properties to dump? */
> SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE,
> pool));
>
> - compose_path = apr_array_make(pool, 2, sizeof(const char *));
> -
> /* If the parent directory has explicit copyfrom path and rev,
> record the same for this one. */
> if (pb && ARE_VALID_COPY_ARGS(pb->copyfrom_path, pb-
> >copyfrom_rev))
> {
> - APR_ARRAY_PUSH(compose_path, const char *) = pb->copyfrom_path;
> - APR_ARRAY_PUSH(compose_path, const char *) =
> - svn_relpath_basename(path, pool);
> - copyfrom_path = svn_path_compose(compose_path, pool);
> + copyfrom_path = svn_relpath_join(svn_relpath_basename(path, pool),
> + pb->copyfrom_path, pool);
> copyfrom_rev = pb->copyfrom_rev;
> }

copyfrom_path is probably relative from the repository or session root (not sure which in your case). You are now appending the basename of a/paths/basename and then joining the copyfrom_path after it. Shouldn't that be the other way around?

        Bert
Received on 2010-08-18 00:31:57 CEST

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.