Author: rhuijben
Date: Tue Nov 25 13:16:50 2014
New Revision: 1641616
URL: http://svn.apache.org/r1641616
Log:
Avoid using svn_(uri|dirent|relpath)_split() with only one output argument.
* subversion/libsvn_client/info.c
(svn_client_info4): Just use svn_uri_basename().
* subversion/libsvn_delta/path_driver.c
(svn_delta_path_driver2): Don't calculate unused basename.
Modified:
subversion/trunk/subversion/libsvn_client/info.c
subversion/trunk/subversion/libsvn_delta/path_driver.c
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=1641616&r1=1641615&r2=1641616&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Tue Nov 25 13:16:50 2014
@@ -388,8 +388,7 @@ svn_client_info4(const char *abspath_or_
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &pathrev,
abspath_or_url, NULL, peg_revision,
revision, ctx, pool));
-
- svn_uri_split(NULL, &base_name, pathrev->url, pool);
+ base_name = svn_uri_basename(pathrev->url, pool);
/* Get the dirent for the URL itself. */
SVN_ERR(svn_ra_stat(ra_session, "", pathrev->rev, &the_ent, pool));
Modified: subversion/trunk/subversion/libsvn_delta/path_driver.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/path_driver.c?rev=1641616&r1=1641615&r2=1641616&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/path_driver.c (original)
+++ subversion/trunk/subversion/libsvn_delta/path_driver.c Tue Nov 25 13:16:50
2014
@@ -187,7 +187,7 @@ svn_delta_path_driver2(const svn_delta_e
driving the editor. */
for (; i < paths->nelts; i++)
{
- const char *pdir, *bname;
+ const char *pdir;
const char *common = "";
size_t common_len;
@@ -224,9 +224,10 @@ svn_delta_path_driver2(const svn_delta_e
/*** Step C - Open any directories between the common ancestor
and the parent of the current path. ***/
if (*path == '/')
- svn_fspath__split(&pdir, &bname, path, iterpool);
+ pdir = svn_fspath__dirname(path, iterpool);
else
- svn_relpath_split(&pdir, &bname, path, iterpool);
+ pdir = svn_relpath_dirname(path, iterpool);
+
if (strlen(pdir) > common_len)
{
const char *piece = pdir + common_len + 1;