-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julian Foad wrote:
>> I spotted an error in the conversion to use abs-paths:
>>
>> [[[
>> static svn_error_t *
>> normalize_merge_sources(apr_array_header_t **merge_sources_p,
> [...]
>>   SVN_ERR(svn_dirent_get_absolute(&source_abspath, source, pool));
>> ]]]
>>
>> In that last line shown, 'source' can be (and often is) a URL so this is
>> wrong.

  I've already reported this case here(though proposed as a patch):
http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=2414438&dsForumId=462

> I suggest adding
> 
>   SVN_ERR_ASSERT(!svn_path_is_url(relative));
> 
> inside svn_dirent_get_absolute(), at least for debugging, as we should
> never be calling it on any path that looks like a URL. When I tried
> doing that, almost all tests failed, presumably because some universal
> operation is calling it on a URL.

  In cases of handling both URLs and wc paths, there's a check made on
  the type of the path based on which the desired dirent/URI method is
  invoked right(except for the rare case above)? Indeed the 'assert'
  suggested above is useful for debugging, but if we're to check the
  type of the path before making a call to this method, which confirms
  it's not a URL then, won't the 'assert' here become obsolete?

  Also for the above case, may I suggest the following change?
  [[[
  if(!svn_path_is_url(source)
    SVN_ERR(svn_dirent_get_absolute(&source_abspath, source, pool));
  else
    source_abspath = source;
  ]]]

  If the above fix seems fine, may I send it as a formal patch?


> I'm not planning to tackle this.
> 
> - Julian
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2424621
> 
> Please start new threads on the <dev@subversion.apache.org> mailing list.
> To subscribe to the new list, send an empty e-mail to 
> <dev-subscr...@subversion.apache.org>.


- --
Thanks & Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSxASpnlTqcY7ytmIAQIOPQf/dVJO6GWqCCVS+V8QXLr1wK+FZ+sqynGS
hVvgwndyxJonHOqXxTN/zYJVF5yhEH0hDVd86JONPw0qMf0HVgdumOeUgK5oVCXN
G3/6NeEO6zVWdUKr1V1x4QVhe1sSDb6VMxvb1jQ/0YlXxPySlJavVIYXRlYdh7TR
nm/UXJmLcB/WJkAEJvMWNenGQpeA78Y59//ZPiD5nQ4QuAucDpOg8FXzA7br43fF
7HCwvHYl+d8xu1VsKGMp31dLzM9fZjQDS9v78RBMTDgpG41LMSQL/JYw0jI/gRwi
6KuDuyUIauONM/i9r7EmFL+/X3eGn80+q4Lex+iezxI6NPVDrFZixQ==
=s3bS
-----END PGP SIGNATURE-----

Reply via email to