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

Re: [PATCH] ra_serf:commit.c: add missing strdup

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Wed, 25 Dec 2013 13:54:35 +0100

On Tue, Dec 24, 2013 at 11:18 PM, Roman Kagan <rkagan_at_mail.ru> wrote:

> The file context created in add_file() is supposed to survive beyond the
> end of function, so it needs its own copy of copy_path.
>
> The failure scenario was observed in git-svn usage, with errors like
>
> perl: subversion/libsvn_subr/dirent_uri.c:2489: svn_fspath__skip_ancestor:
> Assertion `svn_fspath__is_canonical(child_fspath)' failed.
>
> See e.g.
>
> http://stackoverflow.com/questions/17693255/git-svn-dcommit-fails-because-of-assertion-error-svn-fspath-is-canonicalchild
> or
>
> http://git.661346.n2.nabble.com/Fwd-Error-with-git-svn-pushing-a-rename-tt7599382.html
>
> The second link also includes my analysis and a workaround for git-svn
> at
>
> http://git.661346.n2.nabble.com/Fwd-Error-with-git-svn-pushing-a-rename-tt7599382.html#a7601204
>
> Index: subversion/libsvn_ra_serf/commit.c
> ===================================================================
> --- subversion/libsvn_ra_serf/commit.c (revision 1553332)
> +++ subversion/libsvn_ra_serf/commit.c (working copy)
> @@ -1872,7 +1872,7 @@ add_file(const char *path,
> new_file->name = svn_relpath_basename(new_file->relpath, NULL);
> new_file->added = TRUE;
> new_file->base_revision = SVN_INVALID_REVNUM;
> - new_file->copy_path = copy_path;
> + new_file->copy_path = apr_pstrdup(new_file->pool, copy_path);
> new_file->copy_revision = copy_revision;
> new_file->changed_props = apr_hash_make(new_file->pool);
> new_file->removed_props = apr_hash_make(new_file->pool);
>

Thanks for the patch! Committed as r1553376.

-- Stefan^2.
Received on 2013-12-25 13:55:18 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.