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

Re: Error in abs-path handling in normalize_merge_sources()

From: Kannan <kannanr_at_collab.net>
Date: Wed, 02 Dec 2009 19:54:44 +0530

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

Julian Foad wrote:
[..]
>>>> I suggest adding
>>>>
>>>> SVN_ERR_ASSERT(!svn_path_is_url(relative));
>>>>
[..]
>> "Assertions are forever." (A quote from the book "Writing Solid Code".)
>> The purpose of assertions is to catch programming errors (bugs). They
>> don't become obsolete when we have eliminated all known bugs, they stay
>> there to catch any future bugs or any bugs that haven't so far shown up.
>
> (BTW: When I wrote "... at least for debugging ..." in my original
> message, what I meant was we might not want to put that assertion in the
> repository yet, until we fix the bugs that it finds, because if we do
> then all the tests break.)
[..]
> (BTW: THe variable was originally called just "source", and was changed
> to "source_abspath" when the get_absolute() call was added.)
>

 The patch attached herewith fixes the way urls are handled with
 dirents in `svn merge'.

 [[[
 Log:
 Make `svn merge' treat urls gracefully, by checking the type of the
 path obtained and invoking `svn_dirent_get_absolute()' only if its a wc
 path.

 * subversion/libsvn_client/merge.c
  (normalize_merge_sources): As above and rename the variable
   `source_abspath' to `source_abspath_or_url' as it holds either a wc
   abs-path or a url.

 * subversion/libsvn_client/ra.c
  (svn_client__repos_locations): As above.

 Found by: julianf
           me
 Patch by: Kannan R <kannanr_at_collab.net>
 ]]]

 BTW, the FIXME can be removed if the above patch is ok?

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

iQEVAwUBSxZ4rHlTqcY7ytmIAQIljggAnB7ISx1ZelXsp9JsQsXNh2o0DjnxZJTG
aro+jthTs+32iOKVEHZvuet3NMuWB4fj+WPkWGB3JqbdX11UEZevJX6NUs2sxxcL
FW1FWcyXUNFRJ+Xmh4v9gWknfeAb4TuqgqCjQMGMD9PwwEduv5DLGCJyPol3dGX4
X1nsjs/hkNUIx0lPzbf1d93dEdm8iDlaH9+/Pi8SnGTzCoOzE6HwVQF8P1T+SDLv
GgQBrxDa87NuBcMx4zGtQWWuQlyi3BoQYC0dkFBxYkVl5xuEu0T15PxCfKr5p0Eo
ROzjfuTtcQRTvgVFn9+v0qsgIqt+ngPCnWj7loNJoLgdghcm7zABcw==
=GzH3
-----END PGP SIGNATURE-----

Received on 2009-12-02 15:26:58 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.