Re: Error in abs-path handling in normalize_merge_sources()
"C. Michael Pilato" <[email protected]> Mon, 30 Nov 2009 11:40:09 -0500
| Newsgroups | gmane.comp.version-control.subversion.devel,gmane.comp.version-control.subversion.rapidsvn.devel |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
C. Michael Pilato wrote: > Julian Foad wrote: >> 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 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. >> >> I'm not planning to tackle this. > > The 'source' parameter to normalize_merge_sources is fully expected to be > either a working copy path or a URL. (That there is a second parameter > 'source_url' whose may be identical to 'source's could be misleading to > you.) At any rate, the normalize_merge_sources code should be smarter in > the way it handles 'source', to be sure. Added some related comments in r885486. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2425558 Please start new threads on the <[email protected]> mailing list. To subscribe to the new list, send an empty e-mail to <[email protected]>.
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAksT9WkACgkQokEGqRcG/W6PqwCfb5dVtgsa3HjIc+H30QUvpJcm VRsAnRnqltXRkhXY73vrbe4R+AbG3Jf0 =bkBs -----END PGP SIGNATURE-----