subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1068040 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Date Mon, 07 Feb 2011 18:14:50 GMT
Author: cmpilato
Date: Mon Feb  7 18:14:49 2011
New Revision: 1068040

URL: http://svn.apache.org/viewvc?rev=1068040&view=rev
Log:
Continue saving the Universe from deprecated svn_path_* API usage.
(Just one more source file to go after this one...)

* subversion/libsvn_repos/reporter.c
  (report_baton_t): Tweak comments to reveal path types.
  (delta_dirs, drive, write_path_info): Review and correct path API
    consumption.

Modified:
    subversion/trunk/subversion/libsvn_repos/reporter.c

Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1068040&r1=1068039&r2=1068040&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Mon Feb  7 18:14:49 2011
@@ -102,8 +102,8 @@ typedef struct report_baton_t
 {
   /* Parameters remembered from svn_repos_begin_report2 */
   svn_repos_t *repos;
-  const char *fs_base;         /* FS path corresponding to wc anchor */
-  const char *s_operand;       /* Anchor-relative wc target (may be empty) */
+  const char *fs_base;         /* fspath corresponding to wc anchor */
+  const char *s_operand;       /* anchor-relative wc target (may be empty) */
   svn_revnum_t t_rev;          /* Revnum which the edit will bring the wc to */
   const char *t_path;          /* FS path the edit will bring the wc to */
   svn_boolean_t text_deltas;   /* Whether to report text deltas */
@@ -1062,10 +1062,10 @@ delta_dirs(report_baton_t *b, svn_revnum
               continue;
             }
 
-          e_fullpath = svn_path_join(e_path, name, subpool);
-          t_fullpath = svn_path_join(t_path, name, subpool);
+          e_fullpath = svn_relpath_join(e_path, name, subpool);
+          t_fullpath = svn_fspath__join(t_path, name, subpool);
           t_entry = apr_hash_get(t_entries, name, APR_HASH_KEY_STRING);
-          s_fullpath = s_path ? svn_path_join(s_path, name, subpool) : NULL;
+          s_fullpath = s_path ? svn_fspath__join(s_path, name, subpool) : NULL;
           s_entry = s_entries ?
             apr_hash_get(s_entries, name, APR_HASH_KEY_STRING) : NULL;
 
@@ -1129,11 +1129,11 @@ delta_dirs(report_baton_t *b, svn_revnum
                     continue;
 
                   /* There is no corresponding target entry, so delete. */
-                  e_fullpath = svn_path_join(e_path, s_entry->name, subpool);
+                  e_fullpath = svn_relpath_join(e_path, s_entry->name, subpool);
                   SVN_ERR(svn_repos_deleted_rev(svn_fs_root_fs(b->t_root),
-                                                svn_path_join(t_path,
-                                                              s_entry->name,
-                                                              subpool),
+                                                svn_fspath__join(t_path,
+                                                                 s_entry->name,
+                                                                 subpool),
                                                 s_rev, b->t_rev,
                                                 &deleted_rev, subpool));
 
@@ -1177,12 +1177,12 @@ delta_dirs(report_baton_t *b, svn_revnum
                   apr_hash_get(s_entries, t_entry->name, APR_HASH_KEY_STRING)
                   : NULL;
               s_fullpath = s_entry ?
-                  svn_path_join(s_path, t_entry->name, subpool) : NULL;
+                  svn_fspath__join(s_path, t_entry->name, subpool) : NULL;
             }
 
           /* Compose the report, editor, and target paths for this entry. */
-          e_fullpath = svn_path_join(e_path, t_entry->name, subpool);
-          t_fullpath = svn_path_join(t_path, t_entry->name, subpool);
+          e_fullpath = svn_relpath_join(e_path, t_entry->name, subpool);
+          t_fullpath = svn_fspath__join(t_path, t_entry->name, subpool);
 
           SVN_ERR(update_entry(b, s_rev, s_fullpath, s_entry, t_fullpath,
                                t_entry, dir_baton, e_fullpath, NULL,
@@ -1210,7 +1210,7 @@ drive(report_baton_t *b, svn_revnum_t s_
 
   /* Compute the target path corresponding to the working copy anchor,
      and check its authorization. */
-  t_anchor = *b->s_operand ? svn_dirent_dirname(b->t_path, pool) : b->t_path;
+  t_anchor = *b->s_operand ? svn_fspath__dirname(b->t_path, pool) : b->t_path;
   SVN_ERR(check_auth(b, &allowed, t_anchor, pool));
   if (!allowed)
     return svn_error_create
@@ -1218,7 +1218,7 @@ drive(report_baton_t *b, svn_revnum_t s_
        _("Not authorized to open root of edit operation"));
 
   /* Collect information about the source and target nodes. */
-  s_fullpath = svn_path_join(b->fs_base, b->s_operand, pool);
+  s_fullpath = svn_fspath__join(b->fs_base, b->s_operand, pool);
   SVN_ERR(get_source_root(b, &s_root, s_rev));
   SVN_ERR(fake_dirent(&s_entry, s_root, s_fullpath, pool));
   SVN_ERR(fake_dirent(&t_entry, b->t_root, b->t_path, pool));
@@ -1337,7 +1337,7 @@ write_path_info(report_baton_t *b, const
 
   /* Munge the path to be anchor-relative, so that we can use edit paths
      as report paths. */
-  path = svn_path_join(b->s_operand, path, pool);
+  path = svn_relpath_join(b->s_operand, path, pool);
 
   lrep = lpath ? apr_psprintf(pool, "+%" APR_SIZE_T_FMT ":%s",
                               strlen(lpath), lpath) : "-";
@@ -1450,11 +1450,11 @@ svn_repos_begin_report2(void **report_ba
      keep track of them. */
   b = apr_palloc(pool, sizeof(*b));
   b->repos = repos;
-  b->fs_base = apr_pstrdup(pool, fs_base);
+  b->fs_base = svn_fspath__canonicalize(fs_base, pool);
   b->s_operand = apr_pstrdup(pool, s_operand);
   b->t_rev = revnum;
-  b->t_path = switch_path ? switch_path
-    : svn_path_join(fs_base, s_operand, pool);
+  b->t_path = switch_path ? svn_fspath__canonicalize(switch_path, pool)
+                          : svn_fspath__join(fs_base, s_operand, pool);
   b->text_deltas = text_deltas;
   b->requested_depth = depth;
   b->ignore_ancestry = ignore_ancestry;



Mime
View raw message