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 2015/11/11 16:36:43 UTC

svn commit: r1713874 - in /subversion/branches/move-tracking-2/subversion: include/private/svn_element.h libsvn_delta/branch_compat.c libsvn_delta/element.c

Author: julianfoad
Date: Wed Nov 11 15:36:42 2015
New Revision: 1713874

URL: http://svn.apache.org/viewvc?rev=1713874&view=rev
Log:
On the 'move-tracking-2' branch: Remove the 'pathrev' data type and
functions from the public API.

* subversion/include/private/svn_element.h,
  subversion/libsvn_delta/element.c
  (svn_pathrev_t): Move to branch_compat.c.
  (svn_pathrev_dup): Delete, as unused.
  (svn_pathrev_equal): Move and rename into branch_compat.c.

* subversion/libsvn_delta/branch_compat.c
  (svn_pathrev_t): Move to here.
  (pathrev_equal): Move and rename to here.
  (pathrev_str): Rename from 'peg_path_str' and comment out as the calls to
    it are commented out.
  (drive_changes_r): Track the renames.

Modified:
    subversion/branches/move-tracking-2/subversion/include/private/svn_element.h
    subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_compat.c
    subversion/branches/move-tracking-2/subversion/libsvn_delta/element.c

Modified: subversion/branches/move-tracking-2/subversion/include/private/svn_element.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/include/private/svn_element.h?rev=1713874&r1=1713873&r2=1713874&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/include/private/svn_element.h (original)
+++ subversion/branches/move-tracking-2/subversion/include/private/svn_element.h Wed Nov 11 15:36:42 2015
@@ -104,16 +104,6 @@ svn_eid__hash_sort_compare_items_by_eid(
 
 /* ====================================================================== */
 
-/** A location in a committed revision.
- *
- * @a rev shall not be #SVN_INVALID_REVNUM unless the interface using this
- * type specifically allows it and defines its meaning. */
-typedef struct svn_pathrev_t
-{
-  svn_revnum_t rev;
-  const char *relpath;
-} svn_pathrev_t;
-
 /**
  */
 typedef struct svn_element_branch_ref_t
@@ -123,17 +113,6 @@ typedef struct svn_element_branch_ref_t
   int eid;
 } svn_element_branch_ref_t;
 
-/* Return a duplicate of OLD, allocated in RESULT_POOL. */
-svn_pathrev_t
-svn_pathrev_dup(svn_pathrev_t old,
-                apr_pool_t *result_pool);
-
-/* Return true iff PEG_PATH1 and PEG_PATH2 are both the same location.
- */
-svn_boolean_t
-svn_pathrev_equal(svn_pathrev_t *peg_path1,
-                  svn_pathrev_t *peg_path2);
-
 /** Versioned payload of an element, excluding tree structure information.
  *
  * This specifies the properties and the text of a file or target of a

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_compat.c?rev=1713874&r1=1713873&r2=1713874&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_compat.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/branch_compat.c Wed Nov 11 15:36:42 2015
@@ -45,15 +45,45 @@
 #define VERIFY(expr) SVN_ERR_ASSERT(expr)
 
 
+/*
+ * ===================================================================
+ * Minor data types
+ * ===================================================================
+ */
+
+/** A location in a committed revision.
+ *
+ * @a rev shall not be #SVN_INVALID_REVNUM unless the interface using this
+ * type specifically allows it and defines its meaning. */
+typedef struct svn_pathrev_t
+{
+  svn_revnum_t rev;
+  const char *relpath;
+} svn_pathrev_t;
+
+/* Return true iff PEG_PATH1 and PEG_PATH2 are both the same location.
+ */
+static svn_boolean_t
+pathrev_equal(const svn_pathrev_t *p1,
+              const svn_pathrev_t *p2)
+{
+  if (p1->rev != p2->rev)
+    return FALSE;
+  if (strcmp(p1->relpath, p2->relpath) != 0)
+    return FALSE;
+
+  return TRUE;
+}
+
 #ifdef SVN_DEBUG
 /* Return a human-readable string representation of LOC. */
-static const char *
-peg_path_str(svn_pathrev_t loc,
-             apr_pool_t *result_pool)
+/*static const char *
+pathrev_str(svn_pathrev_t loc,
+            apr_pool_t *result_pool)
 {
   return apr_psprintf(result_pool, "%s@%ld",
                       loc.relpath, loc.rev);
-}
+}*/
 #endif
 
 
@@ -1349,7 +1379,7 @@ drive_changes_r(const char *rrpath,
 
   /*SVN_DBG(("rrpath '%s' current=%s, final=e%d)",
            rrpath,
-           pred_loc ? peg_path_str(*pred_loc, scratch_pool) : "<nil>",
+           pred_loc ? pathrev_str(*pred_loc, scratch_pool) : "<nil>",
            final_el_rev ? final_el_rev->eid : -1));*/
 
   SVN_ERR_ASSERT(!pred_loc
@@ -1384,7 +1414,7 @@ drive_changes_r(const char *rrpath,
                                    (which also implies the same kind) */
   if (pred_loc && final_copy_from.relpath)
     {
-      succession = svn_pathrev_equal(pred_loc, &final_copy_from);
+      succession = pathrev_equal(pred_loc, &final_copy_from);
     }
   else if (pred_loc && final_el_rev)
     {
@@ -1543,7 +1573,7 @@ drive_changes_r(const char *rrpath,
                }
               /*(("child '%s' current=%s final? %d%s",
                        name,
-                       child_pred ? peg_path_str(*child_pred, scratch_pool)
+                       child_pred ? pathrev_str(*child_pred, scratch_pool)
                                   : "<nil>",
                        (svn_hash_gets(final_children, name) != NULL),
                        final_copy_from.relpath

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/element.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/element.c?rev=1713874&r1=1713873&r2=1713874&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/element.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/element.c Wed Nov 11 15:36:42 2015
@@ -103,34 +103,6 @@ svn_eid__hash_sort_compare_items_by_eid(
 
 /*
  * ===================================================================
- * Minor data types
- * ===================================================================
- */
-
-svn_pathrev_t
-svn_pathrev_dup(svn_pathrev_t p,
-                apr_pool_t *result_pool)
-{
-  /* The object P is passed by value so we can modify it in place */
-  p.relpath = apr_pstrdup(result_pool, p.relpath);
-  return p;
-}
-
-svn_boolean_t
-svn_pathrev_equal(svn_pathrev_t *peg_path1,
-                  svn_pathrev_t *peg_path2)
-{
-  if (peg_path1->rev != peg_path2->rev)
-    return FALSE;
-  if (strcmp(peg_path1->relpath, peg_path2->relpath) != 0)
-    return FALSE;
-
-  return TRUE;
-}
-
-
-/*
- * ===================================================================
  * Element payload
  * ===================================================================
  */