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

Reviewing r34562

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 16 Dec 2008 13:50:45 -0500

r34562 (which is proposed for backport to 1.5.x). It adds code that looks
like so:

                 /* abs_added_path had better be a child of abs_target_path
                    or something is *really* wrong. */
                 SVN_ERR_ASSERT(svn_path_is_child(abs_target_path,
                                                  abs_added_path,
                                                  iterpool));
                 common_ancestor_path =
                   svn_path_get_longest_ancestor(abs_added_path,
                                                 abs_target_path,
                                                 iterpool);

I'm a little confused by these two statements, though. If ABS_ADDED_PATH is
a child of ABS_TARGET_PATH, then isn't the longest ancestor common to the
two of them necessarily ABS_TARGET_PATH? Could this be written as:

                 common_ancestor_path =
                   svn_path_get_longest_ancestor(abs_added_path,
                                                 abs_target_path,
                                                 iterpool);
                 SVN_ERR_ASSERT(*common_ancestor_path);

?

-
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=985159

Received on 2008-12-16 19:51:04 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.