You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/11/24 17:23:54 UTC
svn commit: r1038674 -
/subversion/trunk/subversion/libsvn_delta/path_driver.c
Author: julianfoad
Date: Wed Nov 24 16:23:54 2010
New Revision: 1038674
URL: http://svn.apache.org/viewvc?rev=1038674&view=rev
Log:
Fix an invalid use of a relpath function: here, the path is sometimes a relpath
and sometimes a fspath.
* subversion/libsvn_delta/path_driver.c
(svn_fspath__get_longest_ancestor): New, temporary macro.
(svn_delta_path_driver): Use _fspath__ or _relpath_ function as appropriate.
Modified:
subversion/trunk/subversion/libsvn_delta/path_driver.c
Modified: subversion/trunk/subversion/libsvn_delta/path_driver.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/path_driver.c?rev=1038674&r1=1038673&r2=1038674&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/path_driver.c (original)
+++ subversion/trunk/subversion/libsvn_delta/path_driver.c Wed Nov 24 16:23:54 2010
@@ -129,6 +129,14 @@ count_components(const char *path)
/*** Public interfaces ***/
+
+/* ### Temporary definition, until this is available in dirent_uri.h */
+#define svn_fspath__get_longest_ancestor(path1, path2, pool) \
+ apr_pstrcat((pool), \
+ "/", \
+ svn_relpath_get_longest_ancestor((path1)+1, (path2)+1, (pool)), \
+ NULL)
+
svn_error_t *
svn_delta_path_driver(const svn_delta_editor_t *editor,
void *edit_baton,
@@ -194,7 +202,9 @@ svn_delta_path_driver(const svn_delta_ed
current one. For the first iteration, this is just the
empty string. ***/
if (i > 0)
- common = svn_relpath_get_longest_ancestor(last_path, path, iterpool);
+ common = (last_path[0] == '/')
+ ? svn_fspath__get_longest_ancestor(last_path, path, iterpool)
+ : svn_relpath_get_longest_ancestor(last_path, path, iterpool);
common_len = strlen(common);
/*** Step B - Close any directories between the last path and