Found it. Hyrum said 207 tests were failing a few days ago. Ah well...
Time to fix things.
On Sun, Mar 1, 2009 at 17:14, Greg Stein <gstein_at_gmail.com> wrote:
> After this change:
>
> Summary of test results:
> Â 819 tests PASSED
> Â 24 tests SKIPPED
> Â 24 tests XFAILED
> Â 279 tests FAILED
> Â 2 tests XPASSED
>
> I believe that is a slight regression from before my change, but I
> can't find the prior numbers. The change moves the code in the right
> trajectory, but may require some further tweaking to bring the tests
> back in line.
>
> Cheers,
> -g
>
> On Sun, Mar 1, 2009 at 16:05, Greg Stein <gstein_at_gmail.com> wrote:
>> Author: gstein
>> Date: Sun Mar  1 07:05:28 2009
>> New Revision: 36217
>>
>> Log:
>> Rebuild read_entries() around the db_read_children() and db_read_info()
>> interfaces. It still peeks into the database on its own, but only for some
>> very limited information that isn't exposed by wc_db (yet?).
>>
>> * subversion/libsvn_wc/entries.c:
>> Â (find_working_add_entry_url_stuffs): removed. wc_db does this now.
>> Â (read_entries): rebuilt. primarily, the second loop over the WORKING
>> Â Â nodes is no longer performed since we now have those children in our
>> Â Â list (from read_children). there are still quite a few hacks and other
>> Â Â oddities to overcome expectations/impedance between the entries and
>> Â Â wc_db interfaces, but those will (hopefully) disappear over time.
>>
>> Modified:
>> Â trunk/subversion/libsvn_wc/entries.c
>>
>> Modified: trunk/subversion/libsvn_wc/entries.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.c?pathrev=36217&r1=36216&r2=36217
>> ==============================================================================
>> --- trunk/subversion/libsvn_wc/entries.c     Sun Mar  1 06:48:44 2009     (r36216)
>> +++ trunk/subversion/libsvn_wc/entries.c     Sun Mar  1 07:05:28 2009     (r36217)
>> @@ -856,60 +856,6 @@ fetch_wc_id(apr_int64_t *wc_id, svn_sqli
>> Â }
>>
>>
>> -/* This function exists for one purpose: to find the expected future url of
>> - Â an entry which is schedule-add. Â In a centralized metadata storage
>> - Â situation, this is pretty easy, but in the current one-db-per-.svn scenario,
>> - Â we need to jump through some hoops, so here it is. */
>> -static svn_error_t *
>> -find_working_add_entry_url_stuffs(const char *adm_access_path,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_entry_t *entry,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â const char *relative_path,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
>> -{
>> - Â const char *wc_db_path = db_path(adm_access_path, scratch_pool);
>> - Â svn_sqlite__stmt_t *stmt;
>> - Â svn_boolean_t have_row;
>> - Â svn_sqlite__db_t *wc_db;
>> -
>> - Â /* Open parent database. */
>> - Â SVN_ERR(svn_sqlite__open(&wc_db, wc_db_path, svn_sqlite__mode_readonly,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â statements,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â SVN_WC__VERSION_EXPERIMENTAL, upgrade_sql,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool, scratch_pool));
>> -
>> - Â /* Check to see if a base_node exists for the directory. */
>> - Â SVN_ERR(svn_sqlite__get_statement(&stmt, wc_db,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â STMT_SELECT_BASE_NODE_BY_RELPATH));
>> - Â SVN_ERR(svn_sqlite__bindf(stmt, "s", SVN_WC_ENTRY_THIS_DIR));
>> - Â SVN_ERR(svn_sqlite__step(&have_row, stmt));
>> -
>> - Â /* If so, cat the url with the existing relative path, put that in
>> - Â Â entry->url and return. */
>> - Â if (have_row)
>> - Â Â {
>> - Â Â Â const char *base = svn_sqlite__column_text(stmt, 0, NULL);
>> -
>> - Â Â Â entry->repos = svn_sqlite__column_text(stmt, 1, result_pool);
>> - Â Â Â entry->uuid = svn_sqlite__column_text(stmt, 2, result_pool);
>> - Â Â Â entry->url = svn_path_join_many(result_pool, entry->repos, base,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â relative_path, NULL);
>> - Â Â Â return svn_sqlite__reset(stmt);
>> - Â Â }
>> - Â SVN_ERR(svn_sqlite__reset(stmt));
>> -
>> - Â /* If not, move a path segement from adm_access_path to relative_path and
>> - Â Â recurse. */
>> - Â return find_working_add_entry_url_stuffs(
>> - Â Â Â Â Â Â Â Â Â Â svn_path_dirname(adm_access_path, scratch_pool),
>> - Â Â Â Â Â Â Â Â Â Â entry,
>> - Â Â Â Â Â Â Â Â Â Â svn_path_join(svn_path_basename(adm_access_path,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool),
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â relative_path, scratch_pool),
>> - Â Â Â Â Â Â Â Â Â Â result_pool, scratch_pool);
>> -}
>> -
>> -
>> Â static svn_error_t *
>> Â determine_incomplete(svn_boolean_t *incomplete,
>> Â Â Â Â Â Â Â Â Â Â Â svn_sqlite__db_t *sdb,
>> @@ -944,7 +890,6 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â apr_hash_t *working_nodes;
>> Â apr_hash_t *actual_nodes;
>> Â svn_sqlite__db_t *wc_db;
>> - Â apr_hash_index_t *hi;
>> Â apr_pool_t *result_pool;
>> Â apr_hash_t *entries;
>> Â const char *wc_db_path;
>> @@ -961,6 +906,8 @@ read_entries(svn_wc_adm_access_t *adm_ac
>>
>> Â result_pool = svn_wc_adm_access_pool(adm_access);
>> Â entries = apr_hash_make(result_pool);
>> +
>> + Â /* ### need database to determine: incomplete, keep_local, ACTUAL info. Â */
>> Â wc_db_path = db_path(svn_wc_adm_access_path(adm_access), scratch_pool);
>>
>> Â /* Open the wc.db sqlite database. */
>> @@ -969,17 +916,8 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â SVN_WC__VERSION_EXPERIMENTAL, upgrade_sql,
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool, scratch_pool));
>>
>> - Â /* The basic strategy here is to get all the node information from the
>> - Â Â database for the directory in question and convert that to
>> - Â Â svn_wc_entry_t structs. Â To do that, we fetch each of the nodes from
>> - Â Â the three node tables into a hash, then iterate over them, linking them
>> - Â Â together as required.
>> -
>> - Â Â TODO: A smarter way would be to craft a query using the correct type of
>> - Â Â outer join so that we can get all the nodes in one fell swoop. Â However,
>> - Â Â that takes more thought and effort than I'm willing to invest right now.
>> - Â Â We can put it on the stack of future optimizations. */
>> -
>> + Â /* ### some of the data is not in the wc_db interface. grab it manually.
>> + Â Â ### trim back the columns fetched? Â */
>> Â SVN_ERR(fetch_working_nodes(&working_nodes, wc_db, scratch_pool,
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
>> Â SVN_ERR(fetch_actual_nodes(&actual_nodes, wc_db, scratch_pool, scratch_pool));
>> @@ -988,26 +926,11 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_path(adm_access),
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
>>
>> - Â SVN_ERR(svn_wc__db_base_get_children(&children, db,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â local_abspath,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool, scratch_pool));
>> + Â SVN_ERR(svn_wc__db_read_children(&children, db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â local_abspath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool, scratch_pool));
>>
>> - Â /* Is the directory also present in the BASE_NODE table? */
>> - Â {
>> - Â Â svn_sqlite__stmt_t *stmt;
>> - Â Â svn_boolean_t have_row;
>> -
>> - Â Â SVN_ERR(svn_sqlite__get_statement(&stmt, wc_db,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â STMT_SELECT_BASE_NODE_DIR_PRESENT));
>> - Â Â SVN_ERR(svn_sqlite__step(&have_row, stmt));
>> - Â Â SVN_ERR(svn_sqlite__reset(stmt));
>> -
>> - Â Â if (have_row)
>> - Â Â Â {
>> - Â Â Â Â /* Yup. Found it. Create an entry for this directory. */
>> - Â Â Â Â APR_ARRAY_PUSH((apr_array_header_t *)children, const char *) = "";
>> - Â Â Â }
>> - Â }
>> + Â APR_ARRAY_PUSH((apr_array_header_t *)children, const char *) = "";
>>
>> Â for (i = children->nelts; i--; )
>> Â Â {
>> @@ -1016,15 +939,19 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â Â Â const char *repos_relpath;
>> Â Â Â svn_checksum_t *checksum;
>> Â Â Â svn_filesize_t translated_size;
>> - Â Â Â const db_working_node_t *working_node;
>> - Â Â Â const db_actual_node_t *actual_node;
>> Â Â Â svn_wc_entry_t *entry = alloc_entry(result_pool);
>> + Â Â Â const char *entry_abspath;
>> + Â Â Â const char *original_repos_relpath;
>> + Â Â Â const char *original_root_url;
>> + Â Â Â svn_boolean_t base_shadowed;
>> +
>> + Â Â Â svn_pool_clear(iterpool);
>>
>> Â Â Â entry->name = APR_ARRAY_IDX(children, i, const char *);
>>
>> - Â Â Â svn_pool_clear(iterpool);
>> + Â Â Â entry_abspath = svn_dirent_join(local_abspath, entry->name, iterpool);
>>
>> - Â Â Â SVN_ERR(svn_wc__db_base_get_info(
>> + Â Â Â SVN_ERR(svn_wc__db_read_info(
>> Â Â Â Â Â Â Â Â &status,
>> Â Â Â Â Â Â Â Â &kind,
>> Â Â Â Â Â Â Â Â &entry->revision,
>> @@ -1038,87 +965,157 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â Â Â Â Â Â Â Â &checksum,
>> Â Â Â Â Â Â Â Â &translated_size,
>> Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â &entry->changelist,
>> + Â Â Â Â Â Â Â Â &original_repos_relpath,
>> + Â Â Â Â Â Â Â Â &original_root_url,
>> + Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â &entry->copyfrom_rev,
>> + Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â &base_shadowed,
>> Â Â Â Â Â Â Â Â db,
>> - Â Â Â Â Â Â Â Â svn_dirent_join(local_abspath, entry->name, iterpool),
>> + Â Â Â Â Â Â Â Â entry_abspath,
>> Â Â Â Â Â Â Â Â result_pool,
>> Â Â Â Â Â Â Â Â iterpool));
>>
>> - Â Â Â /* Grab inherited repository information, if necessary. */
>> - Â Â Â if (repos_relpath == NULL)
>> + Â Â Â if (status == svn_wc__db_status_normal)
>> Â Â Â Â {
>> - Â Â Â Â Â SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->repos,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->uuid,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â db,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_join(local_abspath,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->name,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool),
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
>> - Â Â Â Â }
>> + Â Â Â Â Â /* Plain old BASE node. Â */
>> + Â Â Â Â Â entry->schedule = svn_wc_schedule_normal;
>>
>> - Â Â Â /* ### most of the higher levels seem to want "infinity" for files.
>> - Â Â Â Â ### without this, it seems a report with depth=unknown was sent
>> - Â Â Â Â ### to the server, which then choked. Â */
>> - Â Â Â if (kind == svn_wc__db_kind_file)
>> - Â Â Â Â entry->depth = svn_depth_infinity;
>> + Â Â Â Â Â /* Grab inherited repository information, if necessary. */
>> + Â Â Â Â Â if (repos_relpath == NULL)
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->repos,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->uuid,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry_abspath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
>> + Â Â Â Â Â Â }
>>
>> - Â Â Â /* Get any corresponding working and actual nodes, removing them from
>> - Â Â Â Â their respective hashs to indicate we've seen them.
>> +      /* ### hacky hacky  */
>> + Â Â Â Â Â SVN_ERR(determine_incomplete(&entry->incomplete, wc_db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1 /* wc_id */, entry->name));
>> + Â Â Â Â }
>> + Â Â Â else if (status == svn_wc__db_status_deleted)
>> + Â Â Â Â {
>> + Â Â Â Â Â const db_working_node_t *working_node;
>>
>> - Â Â Â Â ### these are indexed by local_relpath, which is the same as NAME Â */
>> - Â Â Â working_node = apr_hash_get(working_nodes,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->name, APR_HASH_KEY_STRING);
>> - Â Â Â apr_hash_set(working_nodes, entry->name, APR_HASH_KEY_STRING, NULL);
>> - Â Â Â actual_node = apr_hash_get(actual_nodes,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->name, APR_HASH_KEY_STRING);
>> - Â Â Â apr_hash_set(actual_nodes, entry->name, APR_HASH_KEY_STRING, NULL);
>> + Â Â Â Â Â /* ### we don't have to worry about moves, so this is a delete. */
>> + Â Â Â Â Â entry->schedule = svn_wc_schedule_delete;
>>
>> - Â Â Â if (working_node)
>> + Â Â Â Â Â /* ### keep_local */
>> + Â Â Â Â Â working_node = apr_hash_get(working_nodes,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->name, APR_HASH_KEY_STRING);
>> + Â Â Â Â Â if (working_node && working_node->keep_local)
>> + Â Â Â Â Â Â entry->keep_local = TRUE;
>> + Â Â Â Â }
>> + Â Â Â else if (status == svn_wc__db_status_added)
>> Â Â Â Â {
>> - Â Â Â Â Â if (working_node->presence == svn_wc__db_status_not_present)
>> - Â Â Â Â Â Â entry->schedule = svn_wc_schedule_delete;
>> - Â Â Â Â Â else
>> + Â Â Â Â Â svn_wc__db_status_t work_status;
>> +
>> + Â Â Â Â Â if (base_shadowed)
>> Â Â Â Â Â Â entry->schedule = svn_wc_schedule_replace;
>> + Â Â Â Â Â else
>> + Â Â Â Â Â Â entry->schedule = svn_wc_schedule_add;
>> +
>> + Â Â Â Â Â SVN_ERR(svn_wc__db_scan_working(&work_status,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &repos_relpath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->repos,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->uuid,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL, NULL, NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry_abspath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
>> +
>> + Â Â Â Â Â if (work_status == svn_wc__db_status_copied)
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â entry->copied = TRUE;
>> + Â Â Â Â Â Â Â /* ### do children need to be schedule_normal? Â */
>> + Â Â Â Â Â Â }
>> + Â Â Â Â Â if (original_repos_relpath != NULL)
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â entry->copyfrom_url =
>> + Â Â Â Â Â Â Â Â svn_path_url_add_component2(original_root_url,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â original_repos_relpath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool);
>> + Â Â Â Â Â Â }
>> +
>> + Â Â Â Â Â /* ### for some reason, added nodes are supposed to be rev==0. Â */
>> + Â Â Â Â Â entry->revision = 0;
>> + Â Â Â Â }
>> + Â Â Â else if (status == svn_wc__db_status_not_present)
>> + Â Â Â Â {
>> + Â Â Â Â Â entry->schedule = svn_wc_schedule_delete;
>> + Â Â Â Â Â entry->deleted = TRUE;
>> Â Â Â Â }
>> Â Â Â else
>> Â Â Â Â {
>> - Â Â Â Â Â entry->schedule = svn_wc_schedule_normal;
>> + Â Â Â Â Â /* One of the not-present varieties. Skip this node. Â */
>> + Â Â Â Â Â SVN_ERR_ASSERT(status == svn_wc__db_status_absent
>> + Â Â Â Â Â Â Â Â Â Â Â Â || status == svn_wc__db_status_excluded
>> + Â Â Â Â Â Â Â Â Â Â Â Â || status == svn_wc__db_status_incomplete);
>> + Â Â Â Â Â continue;
>> Â Â Â Â }
>>
>> - Â Â Â entry->url = svn_path_join(
>> - Â Â Â Â Â Â Â Â Â Â entry->repos,
>> - Â Â Â Â Â Â Â Â Â Â svn_path_uri_encode(repos_relpath, iterpool),
>> - Â Â Â Â Â Â Â Â Â Â result_pool);
>> -
>> - Â Â Â if (working_node && (working_node->copyfrom_repos_path != NULL))
>> - Â Â Â Â entry->copied = TRUE;
>> -
>> - Â Â Â if (working_node && working_node->keep_local)
>> - Â Â Â Â entry->keep_local = TRUE;
>> + Â Â Â /* ### higher levels want repos information about deleted nodes, even
>> + Â Â Â Â ### tho they are not "part of" a repository any more. Â */
>> + Â Â Â if (entry->schedule == svn_wc_schedule_delete)
>> + Â Â Â Â {
>> + Â Â Â Â Â svn_error_t *err;
>>
>> - Â Â Â if (checksum)
>> - Â Â Â Â entry->checksum = svn_checksum_to_cstring(checksum, result_pool);
>> + Â Â Â Â Â /* Get the information from the underlying BASE node. Â */
>> + Â Â Â Â Â err = svn_wc__db_base_get_info(NULL, &kind,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->revision,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL, NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->cmt_rev,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->cmt_date,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->cmt_author,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->depth,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &checksum,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry_abspath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool);
>> + Â Â Â Â Â if (err)
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
>> + Â Â Â Â Â Â Â Â return err;
>>
>> - Â Â Â if (actual_node && (actual_node->conflict_old != NULL))
>> - Â Â Â Â {
>> - Â Â Â Â Â entry->conflict_old = apr_pstrdup(result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â actual_node->conflict_old);
>> - Â Â Â Â Â entry->conflict_new = apr_pstrdup(result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â actual_node->conflict_new);
>> - Â Â Â Â Â entry->conflict_wrk = apr_pstrdup(result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â actual_node->conflict_working);
>> + Â Â Â Â Â Â Â /* ### no base node? ... maybe this is a deleted child
>> + Â Â Â Â Â Â Â Â ### of a copy. Â what to do? Â */
>> + Â Â Â Â Â Â Â svn_error_clear(err);
>> + Â Â Â Â Â Â }
>> + Â Â Â Â Â else
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->repos,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry->uuid,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â db,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry_abspath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
>> + Â Â Â Â Â Â }
>> Â Â Â Â }
>>
>> - Â Â Â if (actual_node && (actual_node->prop_reject != NULL))
>> - Â Â Â Â entry->prejfile = apr_pstrdup(result_pool, actual_node->prop_reject);
>> + Â Â Â /* ### our writing code (currently, erroneously) puts a 0 into the
>> + Â Â Â Â ### changed_rev column. compensate for now, rather than tweaking
>> + Â Â Â Â ### the writing. Â */
>> + Â Â Â if (entry->cmt_rev == 0)
>> + Â Â Â Â entry->cmt_rev = SVN_INVALID_REVNUM;
>>
>> - Â Â Â if (actual_node && actual_node->changelist != NULL)
>> - Â Â Â Â entry->changelist = apr_pstrdup(result_pool, actual_node->changelist);
>> -
>> - Â Â Â if (actual_node && (actual_node->tree_conflict_data != NULL))
>> - Â Â Â Â entry->tree_conflict_data = apr_pstrdup(result_pool,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â actual_node->tree_conflict_data);
>> + Â Â Â /* ### most of the higher levels seem to want "infinity" for files.
>> + Â Â Â Â ### without this, it seems a report with depth=unknown was sent
>> + Â Â Â Â ### to the server, which then choked. Â */
>> + Â Â Â if (kind == svn_wc__db_kind_file)
>> + Â Â Â Â entry->depth = svn_depth_infinity;
>>
>> Â Â Â if (kind == svn_wc__db_kind_dir)
>> Â Â Â Â entry->kind = svn_node_dir;
>> @@ -1129,54 +1126,48 @@ read_entries(svn_wc_adm_access_t *adm_ac
>> Â Â Â else
>> Â Â Â Â entry->kind = svn_node_unknown;
>>
>> - Â Â Â if (status == svn_wc__db_status_not_present
>> - Â Â Â Â Â Â && entry->kind == svn_node_unknown)
>> - Â Â Â Â entry->deleted = TRUE;
>> + Â Â Â SVN_ERR_ASSERT(repos_relpath != NULL
>> + Â Â Â Â Â Â Â Â Â Â || entry->schedule == svn_wc_schedule_delete);
>> + Â Â Â if (repos_relpath)
>> + Â Â Â Â entry->url = svn_path_url_add_component2(entry->repos,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â repos_relpath,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool);
>>
>> - Â Â Â SVN_ERR(determine_incomplete(&entry->incomplete, wc_db,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1 /* wc_id */, entry->name));
>> + Â Â Â if (checksum)
>> + Â Â Â Â entry->checksum = svn_checksum_to_cstring(checksum, result_pool);
>>
>> - Â Â Â apr_hash_set(entries, entry->name, APR_HASH_KEY_STRING, entry);
>> - Â Â }
>> + Â Â Â /* ### there may be an ACTUAL_NODE to grab info from. Â really, this
>> + Â Â Â Â ### should probably only exist for added/copied files, but it
>> + Â Â Â Â ### seems to always be needed. Just do so, for now. Â */
>> + Â Â Â if (TRUE)
>> + Â Â Â Â {
>> + Â Â Â Â Â const db_actual_node_t *actual_node;
>>
>> - Â /* Loop over any additional working nodes. */
>> - Â for (hi = apr_hash_first(scratch_pool, working_nodes); hi;
>> - Â Â Â Â hi = apr_hash_next(hi))
>> - Â Â {
>> - Â Â Â const db_working_node_t *working_node;
>> - Â Â Â const char *rel_path;
>> - Â Â Â svn_wc_entry_t *entry = alloc_entry(result_pool);
>> + Â Â Â Â Â actual_node = apr_hash_get(actual_nodes,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->name, APR_HASH_KEY_STRING);
>> + Â Â Â Â Â if (actual_node)
>> + Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â if (actual_node->conflict_old != NULL)
>> + Â Â Â Â Â Â Â Â {
>> + Â Â Â Â Â Â Â Â Â entry->conflict_old =
>> + Â Â Â Â Â Â Â Â Â Â apr_pstrdup(result_pool, actual_node->conflict_old);
>> + Â Â Â Â Â Â Â Â Â entry->conflict_new =
>> + Â Â Â Â Â Â Â Â Â Â apr_pstrdup(result_pool, actual_node->conflict_new);
>> + Â Â Â Â Â Â Â Â Â entry->conflict_wrk =
>> + Â Â Â Â Â Â Â Â Â Â apr_pstrdup(result_pool, actual_node->conflict_working);
>> + Â Â Â Â Â Â Â Â }
>>
>> - Â Â Â svn_pool_clear(iterpool);
>> - Â Â Â apr_hash_this(hi, (const void **) &rel_path, NULL,
>> - Â Â Â Â Â Â Â Â Â Â (void **) &working_node);
>> - Â Â Â entry->name = apr_pstrdup(result_pool, working_node->local_relpath);
>> -
>> - Â Â Â /* This node is in WORKING, but not in BASE, so it must be an add. */
>> - Â Â Â entry->schedule = svn_wc_schedule_add;
>> -
>> - Â Â Â if (working_node->copyfrom_repos_path != NULL)
>> - Â Â Â Â entry->copied = TRUE;
>> -
>> - Â Â Â entry->keep_local = working_node->keep_local;
>> -
>> - Â Â Â if (working_node->checksum)
>> - Â Â Â Â entry->checksum = svn_checksum_to_cstring(working_node->checksum,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool);
>> -
>> - Â Â Â SVN_ERR(find_working_add_entry_url_stuffs(
>> - Â Â Â Â Â Â Â Â Â Â Â Â entry->name[0] == 0
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â ? svn_path_dirname(svn_wc_adm_access_path(
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access), iterpool)
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â : svn_wc_adm_access_path(adm_access),
>> - Â Â Â Â Â Â Â Â Â Â Â Â entry,
>> - Â Â Â Â Â Â Â Â Â Â Â Â entry->name[0] == 0
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â ? svn_path_basename(svn_wc_adm_access_path(
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access), iterpool)
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â : entry->name,
>> - Â Â Â Â Â Â Â Â Â Â Â Â result_pool, iterpool));
>> - Â Â Â entry->kind = working_node->kind;
>> - Â Â Â entry->revision = 0;
>> + Â Â Â Â Â Â Â if (actual_node->prop_reject != NULL)
>> + Â Â Â Â Â Â Â Â entry->prejfile =
>> + Â Â Â Â Â Â Â Â Â apr_pstrdup(result_pool, actual_node->prop_reject);
>> +
>> + Â Â Â Â Â Â Â if (actual_node->tree_conflict_data != NULL)
>> + Â Â Â Â Â Â Â Â entry->tree_conflict_data =
>> + Â Â Â Â Â Â Â Â Â apr_pstrdup(result_pool, actual_node->tree_conflict_data);
>> + Â Â Â Â Â Â }
>> + Â Â Â Â }
>> +
>> +    /* ### do something with translated_size  */
>>
>> Â Â Â apr_hash_set(entries, entry->name, APR_HASH_KEY_STRING, entry);
>> Â Â }
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1250790
>>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1251106
Received on 2009-03-01 17:18:48 CET