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/10/29 17:40:45 UTC

svn commit: r1028809 - in /subversion/trunk/subversion: libsvn_wc/adm_crawler.c libsvn_wc/wc_db.c libsvn_wc/wc_db.h libsvn_wc/workqueue.c tests/libsvn_wc/db-test.c tests/libsvn_wc/entries-compat.c

Author: julianfoad
Date: Fri Oct 29 15:40:44 2010
New Revision: 1028809

URL: http://svn.apache.org/viewvc?rev=1028809&view=rev
Log:
Require that repos_id and repos_path columns are always non-null in the
op_depth zero layer of the nodes table.  Now svn_wc__db_base_get_info() will
always return non-null repos info when it is requested.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_scan_base_repos): Update the doc string: it no longer "scans".

* subversion/libsvn_wc/wc_db.c
  (scan_upwards_for_repos): Don't scan upwards, as we know the data is here.
  (insert_incomplete_children): Also set the repos_id and repos_path.
  (insert_base_node): Pass repos_id and repos_path to
    insert_incomplete_children().
  (insert_working_node, db_op_copy): Pass null repos_id and repos_path to
    insert_incomplete_children().
  (commit_node): Adjust a check to assert that the repos info is already
    present.
  (determine_repos_info): Don't scan upwards, as we know the data is here.
    Adjust a check to assert that the repos info is already present.
  (svn_wc__db_global_commit): Adjust a comment.
  (svn_wc__db_base_get_info): Assert that the repos info is being returned,
    if it is requested.

* subversion/libsvn_wc/adm_crawler.c
  (svn_wc_crawl_revisions5): Remove a call to svn_wc__db_scan_base_repos()
    after svn_wc__db_base_get_info().

* subversion/libsvn_wc/workqueue.c
  (run_base_remove): Remove a call to svn_wc__db_scan_base_repos() after
    svn_wc__db_base_get_info().

* subversion/tests/libsvn_wc/db-test.c
  (TESTING_DATA): Fill in repos_id and repos_path columns on base nodes.
  (test_getting_info): Check for correct repos info on base nodes.
  (test_global_relocate): Check for correct repos info on a base node.
    Adjust a comment.

* subversion/tests/libsvn_wc/entries-compat.c
  (TESTING_DATA): Fill in repos_id and repos_path columns on base nodes.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_crawler.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h
    subversion/trunk/subversion/libsvn_wc/workqueue.c
    subversion/trunk/subversion/tests/libsvn_wc/db-test.c
    subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Fri Oct 29 15:40:44 2010
@@ -930,15 +930,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       if (err)
         goto abort_report;
 
-      if (!parent_repos_relpath)
-        err = svn_wc__db_scan_base_repos(&parent_repos_relpath, NULL,
-                                         NULL,
-                                         db, parent_abspath,
-                                         scratch_pool, scratch_pool);
-
-      if (err)
-        goto abort_report;
-
       if (strcmp(repos_relpath,
                  svn_relpath_join(parent_repos_relpath, base,
                                   scratch_pool)) != 0)

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Oct 29 15:40:44 2010
@@ -230,6 +230,8 @@ static svn_error_t *
 insert_incomplete_children(svn_sqlite__db_t *sdb,
                            apr_int64_t wc_id,
                            const char *local_relpath,
+                           apr_int64_t repos_id,
+                           const char *repos_relpath,
                            svn_revnum_t revision,
                            const apr_array_header_t *children,
                            apr_int64_t op_depth,
@@ -562,9 +564,8 @@ repos_location_from_columns(const char *
 }
 
 
-/* Scan from LOCAL_RELPATH upwards through parent nodes until we find a parent
-   that has values in the 'repos_id' and 'repos_relpath' columns.  Return
-   that information in REPOS_ID and REPOS_RELPATH (either may be NULL). */
+/* Set *REPOS_ID and *REPOS_RELPATH to the BASE node of LOCAL_RELPATH.
+ * Either of REPOS_ID and REPOS_RELPATH may be NULL if not wanted. */
 static svn_error_t *
 scan_upwards_for_repos(apr_int64_t *repos_id,
                        const char **repos_relpath,
@@ -573,92 +574,34 @@ scan_upwards_for_repos(apr_int64_t *repo
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
 {
-  const char *relpath_suffix = "";
-  const char *current_basename = svn_dirent_basename(local_relpath, NULL);
-  const char *current_relpath = local_relpath;
   svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
 
   SVN_ERR_ASSERT(wcroot->sdb != NULL && wcroot->wc_id != UNKNOWN_WC_ID);
   SVN_ERR_ASSERT(repos_id != NULL || repos_relpath != NULL);
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_SELECT_BASE_NODE));
-  while (TRUE)
-    {
-      svn_boolean_t have_row;
-
-      /* Get the current node's repository information.  */
-      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, current_relpath));
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-      if (!have_row)
-        {
-          svn_error_t *err;
-
-          /* If we moved upwards at least once, or we're looking at the
-             root directory of this WCROOT, then something is wrong.  */
-          if (*relpath_suffix != '\0' || *local_relpath == '\0')
-            {
-              err = svn_error_createf(
-                SVN_ERR_WC_CORRUPT, NULL,
-                _("Parent(s) of '%s' should have been present."),
-                path_for_error_message(wcroot, local_relpath, scratch_pool));
-            }
-          else
-            {
-              err = svn_error_createf(
-                SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                _("The node '%s' was not found."),
-                path_for_error_message(wcroot, local_relpath, scratch_pool));
-            }
-
-          return svn_error_compose_create(err, svn_sqlite__reset(stmt));
-        }
-
-      /* Did we find some non-NULL repository columns? */
-      if (!svn_sqlite__column_is_null(stmt, 0))
-        {
-          /* If one is non-NULL, then so should the other. */
-          SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 1));
-
-          if (repos_id)
-            *repos_id = svn_sqlite__column_int64(stmt, 0);
-
-          /* Given the node's relpath, append all the segments that
-             we stripped as we scanned upwards. */
-          if (repos_relpath)
-            *repos_relpath = svn_relpath_join(svn_sqlite__column_text(stmt, 1,
-                                                                      NULL),
-                                              relpath_suffix,
-                                              result_pool);
-          return svn_sqlite__reset(stmt);
-        }
-
-      SVN_ERR(svn_sqlite__reset(stmt));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-      if (*current_relpath == '\0')
-        {
-          /* We scanned all the way up, and did not find the information.
-             Something is corrupt in the database. */
-          return svn_error_createf(
-            SVN_ERR_WC_CORRUPT, NULL,
-            _("Parent(s) of '%s' should have repository information."),
+  if (!have_row)
+    {
+      svn_error_t *err = svn_error_createf(
+            SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+            _("The node '%s' was not found."),
             path_for_error_message(wcroot, local_relpath, scratch_pool));
-        }
 
-      /* Strip a path segment off the end, and append it to the suffix
-         that we'll use when we finally find a base relpath.  */
-      svn_relpath_split(&current_relpath, &current_basename, current_relpath,
-                        scratch_pool);
-      relpath_suffix = svn_relpath_join(relpath_suffix, current_basename,
-                                        scratch_pool);
+      return svn_error_compose_create(err, svn_sqlite__reset(stmt));
+    }
 
-      /* Loop to try the parent.  */
+  SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 0));
+  SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 1));
 
-      /* ### strictly speaking, moving to the parent could send us to a
-         ### different SDB, and (thus) we would need to fetch STMT again.
-         ### but we happen to know the parent is *always* in the same db,
-         ### and will have the repos info.  */
-    }
+  if (repos_id)
+    *repos_id = svn_sqlite__column_int64(stmt, 0);
+  if (repos_relpath)
+    *repos_relpath = svn_sqlite__column_text(stmt, 1, result_pool);
+  return svn_sqlite__reset(stmt);
 }
 
 
@@ -776,6 +719,9 @@ insert_base_node(void *baton, svn_sqlite
     (*pibb->local_relpath == '\0') ? NULL
     : svn_relpath_dirname(pibb->local_relpath, scratch_pool);
 
+  SVN_ERR_ASSERT(pibb->repos_id != INVALID_REPOS_ID);
+  SVN_ERR_ASSERT(pibb->repos_relpath != NULL);
+
   /* ### we can't handle this right now  */
   SVN_ERR_ASSERT(pibb->conflict == NULL);
 
@@ -817,6 +763,8 @@ insert_base_node(void *baton, svn_sqlite
   if (pibb->kind == svn_wc__db_kind_dir && pibb->children)
     SVN_ERR(insert_incomplete_children(sdb, pibb->wc_id,
                                        pibb->local_relpath,
+                                       pibb->repos_id,
+                                       pibb->repos_relpath,
                                        pibb->revision,
                                        pibb->children,
                                        0 /* BASE */,
@@ -885,13 +833,17 @@ copy_working_from_base(void *baton,
 
 /* Insert a row in NODES for each (const char *) child name in CHILDREN,
    whose parent directory is LOCAL_RELPATH, at op_depth=OP_DEPTH.  Set each
-   child's presence to 'incomplete', kind to 'unknown', and revision to
-   REVISION (which should match the parent's revision).  The child's
-   repos_id and repos_relpath will be inherited from the parent. */
+   child's presence to 'incomplete', kind to 'unknown', repos_id to REPOS_ID,
+   repos_path by appending the child name to REPOS_PATH, and revision to
+   REVISION (which should match the parent's revision).
+
+   If REPOS_ID is INVALID_REPOS_ID, set each child's repos_id to null. */
 static svn_error_t *
 insert_incomplete_children(svn_sqlite__db_t *sdb,
                            apr_int64_t wc_id,
                            const char *local_relpath,
+                           apr_int64_t repos_id,
+                           const char *repos_path,
                            svn_revnum_t revision,
                            const apr_array_header_t *children,
                            apr_int64_t op_depth,
@@ -900,6 +852,10 @@ insert_incomplete_children(svn_sqlite__d
   svn_sqlite__stmt_t *stmt;
   int i;
 
+  SVN_ERR_ASSERT(repos_path != NULL || op_depth > 0);
+  SVN_ERR_ASSERT((repos_id != INVALID_REPOS_ID)
+                 == (repos_path != NULL));
+
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_NODE));
 
   for (i = children->nelts; i--; )
@@ -916,6 +872,14 @@ insert_incomplete_children(svn_sqlite__d
                                 "incomplete", /* 8, presence */
                                 "unknown"));  /* 10, kind */
 
+      if (repos_id != INVALID_REPOS_ID)
+        {
+          SVN_ERR(svn_sqlite__bind_int64(stmt, 5, repos_id));
+          SVN_ERR(svn_sqlite__bind_text(stmt, 6,
+                                        svn_relpath_join(repos_path, name,
+                                                         scratch_pool)));
+        }
+
       SVN_ERR(svn_sqlite__insert(NULL, stmt));
     }
 
@@ -987,6 +951,8 @@ insert_working_node(void *baton,
   if (piwb->kind == svn_wc__db_kind_dir && piwb->children)
     SVN_ERR(insert_incomplete_children(sdb, piwb->wc_id,
                                        piwb->local_relpath,
+                                       INVALID_REPOS_ID /* inherit repos_id */,
+                                       NULL /* inherit repos_path */,
                                        piwb->original_revnum,
                                        piwb->children,
                                        piwb->op_depth,
@@ -1901,6 +1867,9 @@ svn_wc__db_base_get_info(svn_wc__db_stat
       err = repos_location_from_columns(repos_root_url, repos_uuid, revision,
                                         repos_relpath,
                                         pdh, stmt, 0, 4, 1, result_pool);
+      SVN_ERR_ASSERT(!repos_root_url || *repos_root_url);
+      SVN_ERR_ASSERT(!repos_uuid || *repos_uuid);
+      SVN_ERR_ASSERT(!repos_relpath || *repos_relpath);
       if (lock)
         {
           *lock = lock_from_columns(stmt, 14, 15, 16, 17, result_pool);
@@ -2987,6 +2956,8 @@ db_op_copy(svn_wc__db_pdh_t *src_pdh,
         SVN_ERR(insert_incomplete_children(dst_pdh->wcroot->sdb,
                                            dst_pdh->wcroot->wc_id,
                                            dst_relpath,
+                                           INVALID_REPOS_ID /* inherit repos_id */,
+                                           NULL /* inherit repos_path */,
                                            copyfrom_rev,
                                            children,
                                            op_depth,
@@ -5879,13 +5850,10 @@ commit_node(void *baton, svn_sqlite__db_
         new_depth_str = svn_sqlite__column_text(stmt_base, 10, scratch_pool);
     }
 
-  /* Get the repository information. REPOS_RELPATH will indicate whether
-     we bind REPOS_ID/REPOS_RELPATH as null values in the database (in order
-     to inherit values from the parent node), or that we have actual data.
-     Note: only inherit if we're not at the root.  */
-  if (have_base && !svn_sqlite__column_is_null(stmt_base, 0))
+  /* Check that the repository information is not being changed.  */
+  if (have_base)
     {
-      /* If 'repos_id' is valid, then 'repos_relpath' should be, too.  */
+      SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt_base, 0));
       SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt_base, 1));
 
       /* A commit cannot change these values.  */
@@ -6021,11 +5989,9 @@ commit_node(void *baton, svn_sqlite__db_
 
 
 /* Set *REPOS_ID and *REPOS_RELPATH to the BASE repository location of
- * (PDH, LOCAL_RELPATH), scanning upwards through parents if no BASE row
- * exists for this node or if it inherits the info.
- *
- * Similar to scan_upwards_for_repos() except that the node need not exist
- * in BASE. */
+ * (PDH, LOCAL_RELPATH), directly if its BASE row exists or implied from
+ * its parent's BASE row if not. In the latter case, error if the parent
+ * BASE row does not exist. */
 static svn_error_t *
 determine_repos_info(apr_int64_t *repos_id,
                      const char **repos_relpath,
@@ -6047,9 +6013,9 @@ determine_repos_info(apr_int64_t *repos_
   SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
-  if (have_row && !svn_sqlite__column_is_null(stmt, 0))
+  if (have_row)
     {
-      /* If one is non-NULL, then so should the other. */
+      SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 0));
       SVN_ERR_ASSERT(!svn_sqlite__column_is_null(stmt, 1));
 
       *repos_id = svn_sqlite__column_int64(stmt, 0);
@@ -6118,19 +6084,12 @@ svn_wc__db_global_commit(svn_wc__db_t *d
   cb.no_unlock = no_unlock;
   cb.work_items = work_items;
 
-  /* If we are adding a directory (no BASE_NODE), then we need to get
-     repository information from an ancestor node (start scanning from the
-     parent node since "this node" does not have a BASE). We cannot simply
-     inherit that information (across SDB boundaries).
-
-     If we're adding a file, then leaving the fields as null (in order to
-     inherit) would be possible.
+  /* If we are adding a file or directory, then we need to get
+     repository information from the parent node since "this node" does
+     not have a BASE).
 
      For existing nodes, we should retain the (potentially-switched)
-     repository information.
-
-     ### this always returns values. we should switch to null if/when
-     ### possible.  */
+     repository information.  */
   SVN_ERR(determine_repos_info(&cb.repos_id, &cb.repos_relpath,
                                pdh, local_relpath,
                                scratch_pool, scratch_pool));

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Fri Oct 29 15:40:44 2010
@@ -1888,12 +1888,7 @@ svn_wc__db_lock_remove(svn_wc__db_t *db,
    @{
 */
 
-/* Scan for a BASE node's repository information.
-
-   In the typical case, a BASE node has unspecified repository information,
-   meaning that it is implied by its parent's information. When the info is
-   needed, this function can be used to scan up the BASE tree to find
-   the data.
+/* Read a BASE node's repository information.
 
    For the BASE node implied by LOCAL_ABSPATH, its location in the repository
    returned in *REPOS_ROOT_URL and *REPOS_UUID will be returned in

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Fri Oct 29 15:40:44 2010
@@ -620,12 +620,6 @@ run_base_remove(svn_wc__db_t *db,
                                        NULL, NULL,
                                        db, local_abspath,
                                        scratch_pool, scratch_pool));
-
-      if (!repos_relpath)
-        SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                           &repos_uuid,
-                                           db, local_abspath, scratch_pool,
-                                           scratch_pool));
     }
 
   SVN_ERR(remove_base_node(db, local_abspath,

Modified: subversion/trunk/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/db-test.c?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Fri Oct 29 15:40:44 2010
@@ -97,27 +97,27 @@ static const char * const TESTING_DATA =
   "  null, null, 'dir', '()', 'infinity', null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'A', 0, '', null, null, 1, 'normal',"
+  "  1, 'A', 0, '', 1, 'A', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  10, null, null, null);"
   "insert into nodes values ("
-  "  1, 'B', 0, '', null, null, null, 'excluded',"
+  "  1, 'B', 0, '', 1, 'B', null, 'excluded',"
   "  null, null, 'symlink', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'C', 0, '', null, null, null, 'absent',"
+  "  1, 'C', 0, '', 1, 'C', null, 'absent',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'D', 0, '', null, null, null, 'not-present',"
+  "  1, 'D', 0, '', 1, 'D', null, 'not-present',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'E', 0, '', null, null, null, 'incomplete',"
+  "  1, 'E', 0, '', 1, 'E', null, 'incomplete',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'F', 0, '', null, null, 1, 'normal',"
+  "  1, 'F', 0, '', 1, 'F', 1, 'normal',"
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
@@ -125,51 +125,51 @@ static const char * const TESTING_DATA =
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 2, " TIME_2s ", '" AUTHOR_2 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'H', 0, '', null, null, 1, 'normal',"
+  "  1, 'H', 0, '', 1, 'H', 1, 'normal',"
   "  null, null, 'symlink', '()', null, null, 'H-target', 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'I', 0, '', null, null, 1, 'normal',"
+  "  1, 'I', 0, '', 1, 'I', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J', 0, '', null, null, 1, 'normal',"
+  "  1, 'J', 0, '', 1, 'J', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e', 0, 'J', null, null, 1, 'normal',"
+  "  1, 'J/J-e', 0, 'J', 1, 'J/J-e', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-a', 0, 'J/J-e', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-a', 0, 'J/J-e', 1, 'J/J-e/J-e-a', 1, 'normal',"
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-b', 0, 'J/J-e', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-b', 0, 'J/J-e', 1, 'J/J-e/J-e-b', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', 1, 'J/J-e/J-e-b/Jeba', 1, 'normal',"
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-f', 0, 'J', null, null, 1, 'normal',"
+  "  1, 'J/J-f', 0, 'J', 1, 'J/J-f', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-f/J-f-a', 0, 'J/J-f', null, null, 1, 'normal',"
+  "  1, 'J/J-f/J-f-a', 0, 'J/J-f', 1, 'J/J-f/J-f-a', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K', 0, '', null, null, 1, 'normal',"
+  "  1, 'K', 0, '', 1, 'K', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K/K-a', 0, 'K', null, null, 1, 'normal',"
+  "  1, 'K/K-a', 0, 'K', 1, 'K/K-a', 1, 'normal',"
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K/K-b', 0, 'K', null, null, 1, 'normal',"
+  "  1, 'K/K-b', 0, 'K', 1, 'K/K-b', 1, 'normal',"
   "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   ""
@@ -265,7 +265,7 @@ static const char * const TESTING_DATA =
    "'" I_TC_DATA "', null, null, null, null);"
    "  "
    "insert into nodes values ("
-   "  1, 'M', 0, '', null, null, null, 'normal', "
+   "  1, 'M', 0, '', 1, 'M', null, 'normal', "
    "  1, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
    "  null, null, null, null);"
    "insert into nodes values ("
@@ -402,7 +402,7 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(target == NULL);
   SVN_TEST_ASSERT(lock == NULL);
 
-  /* Test: NULL params, file-specific values, inherit repos info. */
+  /* Test: file-specific values. */
   SVN_ERR(svn_wc__db_base_get_info(
             NULL, &kind, NULL,
             &repos_relpath, &repos_root_url, &repos_uuid,
@@ -411,17 +411,8 @@ test_getting_info(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "A", pool),
             pool, pool));
   SVN_TEST_ASSERT(kind == svn_wc__db_kind_file);
-  SVN_TEST_ASSERT(repos_relpath == NULL);
-  SVN_TEST_ASSERT(repos_root_url == NULL);
-  SVN_TEST_ASSERT(repos_uuid == NULL);
   SVN_TEST_STRING_ASSERT(MD5_1, svn_checksum_to_cstring(checksum, pool));
   SVN_TEST_ASSERT(translated_size == 10);
-
-  /* Grab the inherited info. */
-  SVN_ERR(svn_wc__db_scan_base_repos(
-            &repos_relpath, &repos_root_url, &repos_uuid,
-            db, svn_dirent_join(local_abspath, "A", pool),
-            pool, pool));
   SVN_TEST_STRING_ASSERT(repos_relpath, "A");
   SVN_TEST_STRING_ASSERT(repos_root_url, ROOT_ONE);
   SVN_TEST_STRING_ASSERT(repos_uuid, UUID_ONE);
@@ -437,9 +428,9 @@ test_getting_info(apr_pool_t *pool)
   SVN_TEST_ASSERT(kind == svn_wc__db_kind_symlink);
   SVN_TEST_ASSERT(status == svn_wc__db_status_excluded);
   SVN_TEST_ASSERT(!SVN_IS_VALID_REVNUM(revision));
-  SVN_TEST_ASSERT(repos_relpath == NULL);
-  SVN_TEST_ASSERT(repos_root_url == NULL);
-  SVN_TEST_ASSERT(repos_uuid == NULL);
+  SVN_TEST_STRING_ASSERT(repos_relpath, "B");
+  SVN_TEST_STRING_ASSERT(repos_root_url, ROOT_ONE);
+  SVN_TEST_STRING_ASSERT(repos_uuid, UUID_ONE);
   SVN_TEST_ASSERT(!SVN_IS_VALID_REVNUM(changed_rev));
   SVN_TEST_ASSERT(changed_date == 0);
   SVN_TEST_ASSERT(changed_author == NULL);
@@ -1268,12 +1259,7 @@ test_global_relocate(apr_pool_t *pool)
   /* The UUID should still be the same. */
   SVN_TEST_STRING_ASSERT(repos_uuid, UUID_ONE);
 
-  /* While we're at it, let's see if the children have been relocated, too.
-
-     ### Relocate doesn't change anything in the child since the
-         repos_id is inherited (null).  Should we have some children
-         where the repos_id is not null but equal to the parent or
-         root? */
+  /* While we're at it, let's see if the children have been relocated, too. */
   SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL,
                                &repos_relpath, &repos_root_url, &repos_uuid,
                                NULL, NULL, NULL, NULL,
@@ -1283,9 +1269,9 @@ test_global_relocate(apr_pool_t *pool)
                                db, svn_dirent_join(local_abspath, "F",
                                                    pool),
                                pool, pool));
-  SVN_TEST_STRING_ASSERT(repos_relpath, NULL);
-  SVN_TEST_STRING_ASSERT(repos_root_url, NULL);
-  SVN_TEST_STRING_ASSERT(repos_uuid, NULL);
+  SVN_TEST_STRING_ASSERT(repos_relpath, "F");
+  SVN_TEST_STRING_ASSERT(repos_root_url, ROOT_THREE);
+  SVN_TEST_STRING_ASSERT(repos_uuid, UUID_ONE);
 
   /* Alternate repository is not relocated. */
   SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL,

Modified: subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c?rev=1028809&r1=1028808&r2=1028809&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/entries-compat.c Fri Oct 29 15:40:44 2010
@@ -97,27 +97,27 @@ static const char * const TESTING_DATA =
   "  null, null, 'dir', '()', 'infinity', null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'A', 0, '', null, null, 1, 'normal',"
+  "  1, 'A', 0, '', 1, 'A', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  10, null, null, null);"
   "insert into nodes values ("
-  "  1, 'B', 0, '', null, null, null, 'excluded',"
+  "  1, 'B', 0, '', 1, 'B', null, 'excluded',"
   "  null, null, 'symlink', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'C', 0, '', null, null, null, 'absent',"
+  "  1, 'C', 0, '', 1, 'C', null, 'absent',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'D', 0, '', null, null, null, 'not-present',"
+  "  1, 'D', 0, '', 1, 'D', null, 'not-present',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'E', 0, '', null, null, null, 'incomplete',"
+  "  1, 'E', 0, '', 1, 'E', null, 'incomplete',"
   "  null, null, 'unknown', null, null, null, null, null, null, null,"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'F', 0, '', null, null, 1, 'normal',"
+  "  1, 'F', 0, '', 1, 'F', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
@@ -125,51 +125,51 @@ static const char * const TESTING_DATA =
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", '" AUTHOR_2 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'H', 0, '', null, null, 1, 'normal',"
+  "  1, 'H', 0, '', 1, 'H', 1, 'normal',"
   "  null, null, 'symlink', '()', null, null, 'H-target', 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'I', 0, '', null, null, 1, 'normal',"
+  "  1, 'I', 0, '', 1, 'I', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J', 0, '', null, null, 1, 'normal',"
+  "  1, 'J', 0, '', 1, 'J', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e', 0, 'J', null, null, 1, 'normal',"
+  "  1, 'J/J-e', 0, 'J', 1, 'J/J-e', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-a', 0, 'J/J-e', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-a', 0, 'J/J-e', 1, 'J/J-e/J-e-a', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-b', 0, 'J/J-e', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-b', 0, 'J/J-e', 1, 'J/J-e/J-e-b', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', null, null, 1, 'normal',"
+  "  1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', 1, 'J/J-e/J-e-b/Jeba', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-f', 0, 'J', null, null, 1, 'normal',"
+  "  1, 'J/J-f', 0, 'J', 1, 'J/J-f', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'J/J-f/J-f-a', 0, 'J/J-f', null, null, 1, 'normal',"
+  "  1, 'J/J-f/J-f-a', 0, 'J/J-f', 1, 'J/J-f/J-f-a', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K', 0, '', null, null, 1, 'normal',"
+  "  1, 'K', 0, '', 1, 'K', 1, 'normal',"
   "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  null, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K/K-a', 0, 'K', null, null, 1, 'normal',"
+  "  1, 'K/K-a', 0, 'K', 1, 'K/K-a', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
-  "  1, 'K/K-b', 0, 'K', null, null, 1, 'normal',"
+  "  1, 'K/K-b', 0, 'K', 1, 'K/K-b', 1, 'normal',"
   "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", '" AUTHOR_1 "',"
   "  15, null, null, null);"
   ""
@@ -265,11 +265,11 @@ static const char * const TESTING_DATA =
    "'" I_TC_DATA "', null, null, null, null);"
    "  "
    "insert into nodes values ("
-   "  1, 'M', 0, '', null, null, 1, 'normal', "
+   "  1, 'M', 0, '', 1, 'M', 1, 'normal', "
    "  null, null, 'dir', '()', null, null, null, 1, " TIME_1s ", '" AUTHOR_1 "', "
    "  null, null, null, null);"
    "insert into nodes values ("
-   "  1, 'M/M-a', 0, 'M', null, null, 1, 'not-present', "
+   "  1, 'M/M-a', 0, 'M', 1, 'M/M-a', 1, 'not-present', "
    "  null, null, 'file', '()', null, null, null, 1, null, null, "
    "  null, null, null, null);"
    );