subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1661037 - in /subversion/branches/fsx-1.10/subversion/libsvn_fs_x: dag.c dag.h dag_cache.c tree.c
Date Fri, 20 Feb 2015 00:11:41 GMT
Author: stefan2
Date: Fri Feb 20 00:11:40 2015
New Revision: 1661037

URL: http://svn.apache.org/r1661037
Log:
On the fsx-1.10 branch:
Switch the last batch of DAG functions from returning an error code to
returning the requested information.

* subversion/libsvn_fs_x/dag.h
  (svn_fs_x__dag_get_copyroot): No error return needed.
  (svn_fs_x__dag_get_copyfrom_rev,
   svn_fs_x__dag_get_copyfrom_path): Replace the error return with the
                                     former output value.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_get_copyroot,
   svn_fs_x__dag_get_copyfrom_rev,
   svn_fs_x__dag_get_copyfrom_path): Update implementation.

* subversion/libsvn_fs_x/dag_cache.c
  (get_copy_inheritance,
   svn_fs_x__make_path_mutable): Update callers.

* subversion/libsvn_fs_x/tree.c
  (x_copied_from,
   find_youngest_copyroot,
   history_prev): Same.

Modified:
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c
    subversion/branches/fsx-1.10/subversion/libsvn_fs_x/tree.c

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c?rev=1661037&r1=1661036&r2=1661037&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.c Fri Feb 20 00:11:40 2015
@@ -1063,31 +1063,25 @@ svn_fs_x__dag_things_different(svn_boole
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
+void
 svn_fs_x__dag_get_copyroot(svn_revnum_t *rev,
                            const char **path,
                            dag_node_t *node)
 {
   *rev = node->node_revision->copyroot_rev;
   *path = node->node_revision->copyroot_path;
-
-  return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs_x__dag_get_copyfrom_rev(svn_revnum_t *rev,
-                               dag_node_t *node)
+svn_revnum_t
+svn_fs_x__dag_get_copyfrom_rev(dag_node_t *node)
 {
-  *rev = node->node_revision->copyfrom_rev;
-  return SVN_NO_ERROR;
+  return node->node_revision->copyfrom_rev;
 }
 
-svn_error_t *
-svn_fs_x__dag_get_copyfrom_path(const char **path,
-                                dag_node_t *node)
+const char *
+svn_fs_x__dag_get_copyfrom_path(dag_node_t *node)
 {
-  *path = node->node_revision->copyfrom_path;
-  return SVN_NO_ERROR;
+  return node->node_revision->copyfrom_path;
 }
 
 svn_error_t *

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h?rev=1661037&r1=1661036&r2=1661037&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag.h Fri Feb 20 00:11:40 2015
@@ -526,22 +526,20 @@ svn_fs_x__dag_things_different(svn_boole
 /* Set *REV and *PATH to the copyroot revision and path of node NODE, or
    to SVN_INVALID_REVNUM and NULL if no copyroot exists.
  */
-svn_error_t *
+void
 svn_fs_x__dag_get_copyroot(svn_revnum_t *rev,
                            const char **path,
                            dag_node_t *node);
 
-/* Set *REV to the copyfrom revision associated with NODE.
+/* Return the copyfrom revision associated with NODE.
  */
-svn_error_t *
-svn_fs_x__dag_get_copyfrom_rev(svn_revnum_t *rev,
-                               dag_node_t *node);
+svn_revnum_t
+svn_fs_x__dag_get_copyfrom_rev(dag_node_t *node);
 
-/* Set *PATH to the copyfrom path associated with NODE.
+/* Return the copyfrom path associated with NODE.
  */
-svn_error_t *
-svn_fs_x__dag_get_copyfrom_path(const char **path,
-                                dag_node_t *node);
+const char *
+svn_fs_x__dag_get_copyfrom_path(dag_node_t *node);
 
 /* Update *TARGET so that SOURCE is it's predecessor.
 

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c?rev=1661037&r1=1661036&r2=1661037&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/dag_cache.c Fri Feb 20 00:11:40 2015
@@ -824,8 +824,7 @@ get_copy_inheritance(svn_fs_x__copy_id_i
      branch as its parent if the child itself is not a branch point,
      or if it is a branch point that we are accessing via its original
      copy destination path. */
-  SVN_ERR(svn_fs_x__dag_get_copyroot(&copyroot_rev, &copyroot_path,
-                                     child->node));
+  svn_fs_x__dag_get_copyroot(&copyroot_rev, &copyroot_path, child->node);
   SVN_ERR(svn_fs_x__revision_root(&copyroot_root, fs, copyroot_rev, pool));
   SVN_ERR(svn_fs_x__get_dag_node(&copyroot_node, copyroot_root,
                                  copyroot_path, pool));
@@ -1073,8 +1072,8 @@ svn_fs_x__make_path_mutable(svn_fs_root_
         }
 
       /* Determine what copyroot our new child node should use. */
-      SVN_ERR(svn_fs_x__dag_get_copyroot(&copyroot_rev, &copyroot_path,
-                                          parent_path->node));
+      svn_fs_x__dag_get_copyroot(&copyroot_rev, &copyroot_path,
+                                 parent_path->node);
       SVN_ERR(svn_fs_x__revision_root(&copyroot_root, root->fs,
                                       copyroot_rev, subpool));
       SVN_ERR(svn_fs_x__get_dag_node(&copyroot_node, copyroot_root,

Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/tree.c?rev=1661037&r1=1661036&r2=1661037&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/tree.c Fri Feb 20 00:11:40 2015
@@ -1721,11 +1721,10 @@ x_copied_from(svn_revnum_t *rev_p,
 {
   dag_node_t *node;
 
-  /* There is no cached entry, look it up the old-fashioned
-      way. */
+  /* There is no cached entry, look it up the old-fashioned way. */
   SVN_ERR(svn_fs_x__get_dag_node(&node, root, path, pool));
-  SVN_ERR(svn_fs_x__dag_get_copyfrom_rev(rev_p, node));
-  SVN_ERR(svn_fs_x__dag_get_copyfrom_path(path_p, node));
+  *rev_p = svn_fs_x__dag_get_copyfrom_rev(node);
+  *path_p = svn_fs_x__dag_get_copyfrom_path(node);
 
   return SVN_NO_ERROR;
 }
@@ -2403,8 +2402,7 @@ find_youngest_copyroot(svn_revnum_t *rev
                                    dag_path->parent));
 
   /* Find our copyroot. */
-  SVN_ERR(svn_fs_x__dag_get_copyroot(&rev_mine, &path_mine,
-                                     dag_path->node));
+  svn_fs_x__dag_get_copyroot(&rev_mine, &path_mine, dag_path->node);
 
   /* If a parent and child were copied to in the same revision, prefer
      the child copy target, since it is the copy relevant to the
@@ -2650,8 +2648,8 @@ history_prev(svn_fs_history_t **prev_his
           /* If we get here, then our current path is the destination
              of, or the child of the destination of, a copy.  Fill
              in the return values and get outta here.  */
-          SVN_ERR(svn_fs_x__dag_get_copyfrom_rev(&src_rev, node));
-          SVN_ERR(svn_fs_x__dag_get_copyfrom_path(&copy_src, node));
+          src_rev = svn_fs_x__dag_get_copyfrom_rev(node);
+          copy_src = svn_fs_x__dag_get_copyfrom_path(node);
 
           dst_rev = copyroot_rev;
           src_path = svn_fspath__join(copy_src, remainder_path, scratch_pool);



Mime
View raw message