This appears to break a couple merge tests. I'll get that fixed up shortly...
On Sat, Apr 18, 2009 at 22:12, Greg Stein <gstein_at_gmail.com> wrote:
> Author: gstein
> Date: Sat Apr 18 13:12:27 2009
> New Revision: 37355
>
> Log:
> Revamp a lot of internal props code to not worry about access batons.
>
> * subversion/libsvn_wc/props.h:
> Â (svn_wc__wcprop_list): revamp the parameter set
> Â (svn_wc__load_props): take an ENTRY instead of an access baton. switch
> Â Â to dual-pool rather than single.
>
> * subversion/libsvn_wc/props.c:
> Â (svn_wc__load_props): take an ENTRY as a param, which means we don't
> Â Â need the logic to test for a missing/unversioned node. switch to
> Â Â dual-pool usage.
> Â (read_wcprops): take a DB and a directory abspath, rather than an access
> Â Â baton. get the wc_format from the DB rather than access baton.
> Â (delete_wcprops): update params to read_wcprops().
> Â (svn_wc__merge_props): update params to svn_wc__load_props(), which also
> Â Â entails fetching an entry.
> Â (svn_wc__wcprop_list): revamp params, and update call to read_wcprops.
> Â (wcprop_get): removed. inlined into svn_wc_prop_get() since all that was
> Â Â really needed is the call to svn_wc__wcprop_list().
> Â (svn_wc__wcprop_set): update call to read_wcprops()
> Â (svn_wc_prop_list): use svn_wc__get_entry() instead of svn_wc_entry.
> Â Â trim out a bunch of crap and update call to svn_wc__load_props.
> Â (svn_wc_prop_get): early-out for incorrect property kinds. use
> Â Â svn_wc__get_entry, but be wary that callers give us a lot of bogus
> Â Â queries, so ignore potential errors. rather than wcprop_get, use
> Â Â svn_wc__wcprop_list to get the prophash. rather than svn_wc_prop_list,
> Â Â use svn_wc__load_props directly.
> Â (svn_wc_prop_set3, svn_wc_get_prop_diffs): update call to svn_wc__load_props
>
> * subversion/libsvn_wc/entries.h:
> Â (svn_wc__get_entry): add ALLOW_UNVERSIONED param. update docstring.
>
> * subversion/libsvn_wc/entries.c:
> Â (svn_wc__get_entry): adjust logic for missing items when
> Â Â ALLOW_UNVERSIONED is true.
>
> * subversion/libsvn_wc/adm_ops.c:
> Â (revert_admin_things): update call to svn_wc__load_props()
>
> * subversion/libsvn_wc/lock.c:
> Â (convert_wcprops): update call to svn_wc__wcprop_list. construct
> Â Â full_path in the subpool.
>
> * subversion/libsvn_wc/update_editor.c:
> Â (struct edit_baton): add a DB handle
> Â (close_directory): update call to svn_wc__load_props(), which also
> Â Â requires fetching the entry.
> Â (add_file_with_history): pass the source entry to svn_wc__load_props.
> Â (make_editor): store the DB into the edit baton
> Â (check_wc_root): allow the entry to be unversioned and test for a NULL
> Â Â entry, rather than detecting the not-found error. update all calls to
> Â Â get_entry()
>
> * subversion/libsvn_wc/copy.c:
> Â (copy_file_administratively): update call to svn_wc__load_props
>
> * subversion/libsvn_wc/wc_db.c:
> Â (svn_wc__db_temp_get_format): if this is called for an unversioned
> Â Â subdir, then we walk up the filesystem until we find a versioned
> Â Â directory, and create a wcroot for that. this works the first time
> Â Â through when parse_local_abspath is called. the second time would fail
> Â Â the assertion. instead, recognize the problem and return failure.
>
> Modified:
> Â trunk/subversion/libsvn_wc/adm_ops.c
> Â trunk/subversion/libsvn_wc/copy.c
> Â trunk/subversion/libsvn_wc/entries.c
> Â trunk/subversion/libsvn_wc/entries.h
> Â trunk/subversion/libsvn_wc/lock.c
> Â trunk/subversion/libsvn_wc/props.c
> Â trunk/subversion/libsvn_wc/props.h
> Â trunk/subversion/libsvn_wc/update_editor.c
> Â trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: trunk/subversion/libsvn_wc/adm_ops.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/adm_ops.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/adm_ops.c     Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/adm_ops.c     Sat Apr 18 13:12:27 2009     (r37355)
> @@ -1703,9 +1703,8 @@ revert_admin_things(svn_wc_adm_access_t
>
> Â Â Â /* Use the revertpath as the new propsbase if it exists. */
>
> - Â Â Â baseprops = apr_hash_make(pool);
> - Â Â Â SVN_ERR(svn_wc__load_props(NULL, NULL, &baseprops,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, fullpath, pool));
> + Â Â Â SVN_ERR(svn_wc__load_props(NULL, NULL, &baseprops, entry, fullpath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
>
> Â Â Â /* Ensure the revert propfile gets removed. */
> Â Â Â SVN_ERR(svn_wc__loggy_props_delete(&log_accum,
>
> Modified: trunk/subversion/libsvn_wc/copy.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/copy.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/copy.c  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/copy.c  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -33,6 +33,7 @@
> Â #include "entries.h"
> Â #include "props.h"
> Â #include "translate.h"
> +#include "lock.h"
>
> Â #include "svn_private_config.h"
> Â #include "private/svn_wc_private.h"
> @@ -528,8 +529,8 @@ copy_file_administratively(const char *s
> Â Â Â }
>
> Â Â /* Load source base and working props. */
> - Â Â SVN_ERR(svn_wc__load_props(&base_props, &props, NULL, src_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â src_path, pool));
> + Â Â SVN_ERR(svn_wc__load_props(&base_props, &props, NULL, src_entry, src_path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
>
> Â Â /* Copy working copy file to temporary location */
> Â Â {
>
> Modified: trunk/subversion/libsvn_wc/entries.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/entries.c     Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/entries.c     Sat Apr 18 13:12:27 2009     (r37355)
> @@ -42,6 +42,7 @@
> Â #include "private/svn_wc_private.h"
> Â #include "private/svn_sqlite.h"
> Â #include "private/svn_skel.h"
> +#include "private/svn_debug.h"
>
> Â #include "wc-metadata.h"
> Â #include "wc-checks.h"
> @@ -1568,6 +1569,7 @@ svn_error_t *
> Â svn_wc__get_entry(const svn_wc_entry_t **entry,
> Â Â Â Â Â Â Â Â Â svn_wc__db_t *db,
> Â Â Â Â Â Â Â Â Â const char *local_abspath,
> + Â Â Â Â Â Â Â Â Â svn_boolean_t allow_unversioned,
> Â Â Â Â Â Â Â Â Â svn_node_kind_t kind,
> Â Â Â Â Â Â Â Â Â svn_boolean_t need_parent_stub,
> Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> @@ -1687,10 +1689,14 @@ svn_wc__get_entry(const svn_wc_entry_t *
>
> Â *entry = apr_hash_get(entries, entry_name, APR_HASH_KEY_STRING);
> Â if (*entry == NULL)
> - Â Â return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("'%s' is not under version control"),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_path_local_style(local_abspath,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
> + Â Â {
> + Â Â Â if (allow_unversioned)
> + Â Â Â Â return SVN_NO_ERROR;
> + Â Â Â return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("'%s' is not under version control"),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_path_local_style(local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
> + Â Â }
>
> Â /* Give the caller a valid entry. Â */
> Â *entry = svn_wc_entry_dup(*entry, result_pool);
>
> Modified: trunk/subversion/libsvn_wc/entries.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.h?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/entries.h     Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/entries.h     Sat Apr 18 13:12:27 2009     (r37355)
> @@ -249,7 +249,11 @@ svn_wc__tweak_entry(svn_wc_adm_access_t
> Â /** Get an ENTRY for the given LOCAL_ABSPATH.
> Â *
> Â * This API does not require an access baton, just a wc_db handle (DB).
> - * The requested entry MUST be present and version-controlled.
> + * The requested entry MUST be present and version-controlled when
> + * ALLOW_UNVERSIONED is FALSE; otherwise, SVN_ERR_WC_PATH_NOT_FOUND is
> + * returned. When ALLOW_UNVERSIONED is TRUE, and the node is not under
> + * version control, *ENTRY will be set to NULL (this is easier for callers
> + * to handle, than detecting the error and clearing it).
> Â *
> Â * If you know the entry is a FILE or DIR, then specify that in KIND. If you
> Â * are unsure, then specific 'svn_node_unknown' for KIND. This value will be
> @@ -284,6 +288,7 @@ svn_error_t *
> Â svn_wc__get_entry(const svn_wc_entry_t **entry,
> Â Â Â Â Â Â Â Â Â svn_wc__db_t *db,
> Â Â Â Â Â Â Â Â Â const char *local_abspath,
> + Â Â Â Â Â Â Â Â Â svn_boolean_t allow_unversioned,
> Â Â Â Â Â Â Â Â Â svn_node_kind_t kind,
> Â Â Â Â Â Â Â Â Â svn_boolean_t need_parent_stub,
> Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
>
> Modified: trunk/subversion/libsvn_wc/lock.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/lock.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/lock.c  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/lock.c  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -120,10 +120,12 @@ convert_wcprops(svn_stringbuf_t *log_acc
> Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> + Â const char *dir_abspath;
> Â apr_hash_t *entries;
> Â apr_hash_index_t *hi;
> Â apr_pool_t *subpool = svn_pool_create(pool);
>
> + Â SVN_ERR(svn_dirent_get_absolute(&dir_abspath, adm_access->path, pool));
> Â SVN_ERR(svn_wc_entries_read(&entries, adm_access, FALSE, pool));
>
> Â /* Walk over the entries, adding a modify-wcprop command for each wcprop.
> @@ -137,19 +139,22 @@ convert_wcprops(svn_stringbuf_t *log_acc
> Â Â Â apr_hash_t *wcprops;
> Â Â Â apr_hash_index_t *hj;
> Â Â Â const char *full_path;
> + Â Â Â const char *local_abspath;
>
> Â Â Â apr_hash_this(hi, NULL, NULL, &val);
> Â Â Â entry = val;
>
> - Â Â Â full_path = svn_dirent_join(adm_access->path, entry->name, pool);
> -
> Â Â Â if (entry->kind != svn_node_file
> Â Â Â Â Â && strcmp(entry->name, SVN_WC_ENTRY_THIS_DIR) != 0)
> Â Â Â Â continue;
>
> Â Â Â svn_pool_clear(subpool);
>
> - Â Â Â SVN_ERR(svn_wc__wcprop_list(&wcprops, entry->name, adm_access, subpool));
> + Â Â Â full_path = svn_dirent_join(adm_access->path, entry->name, subpool);
> + Â Â Â local_abspath = svn_dirent_join(dir_abspath, entry->name, subpool);
> +
> + Â Â Â SVN_ERR(svn_wc__wcprop_list(&wcprops, adm_access->db, local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry->kind, subpool, subpool));
>
> Â Â Â /* Create a subsubpool for the inner loop...
> Â Â Â Â Â No, just kidding. Â There are typically just one or two wcprops
>
> Modified: trunk/subversion/libsvn_wc/props.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/props.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/props.c  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/props.c  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -20,12 +20,14 @@
>
> Â #include <stdlib.h>
> Â #include <string.h>
> +
> Â #include <apr_pools.h>
> Â #include <apr_hash.h>
> Â #include <apr_tables.h>
> Â #include <apr_file_io.h>
> Â #include <apr_strings.h>
> Â #include <apr_general.h>
> +
> Â #include "svn_types.h"
> Â #include "svn_string.h"
> Â #include "svn_pools.h"
> @@ -54,13 +56,9 @@
> Â #include "lock.h"
>
> Â #include "svn_private_config.h"
> +#include "private/svn_debug.h"
>
> -/*---------------------------------------------------------------------*/
> -
> -/*** Deducing local changes to properties ***/
>
> -/*---------------------------------------------------------------------*/
> -
> Â /*** Reading/writing property hashes from disk ***/
>
> Â /* ### HKW/WC-NG: This is a summary of the my efforts to localize accesses to
> @@ -246,27 +244,15 @@ svn_error_t *
> Â svn_wc__load_props(apr_hash_t **base_props_p,
> Â Â Â Â Â Â Â Â Â Â apr_hash_t **props_p,
> Â Â Â Â Â Â Â Â Â Â apr_hash_t **revert_props_p,
> - Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> + Â Â Â Â Â Â Â Â Â const svn_wc_entry_t *entry,
> Â Â Â Â Â Â Â Â Â Â const char *path,
> - Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> + Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> Â svn_node_kind_t kind;
> - Â const svn_wc_entry_t *entry;
> Â apr_hash_t *base_props = NULL; /* Silence uninitialized warning. */
>
> - Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, FALSE, pool));
> - Â /* If there is no entry, we just return empty hashes, since the
> - Â Â property merging can use this function when there is no entry. */
> - Â if (! entry)
> - Â Â {
> - Â Â Â if (base_props_p)
> - Â Â Â Â *base_props_p = apr_hash_make(pool);
> - Â Â Â if (props_p)
> - Â Â Â Â *props_p = apr_hash_make(pool);
> - Â Â Â if (revert_props_p)
> - Â Â Â Â *revert_props_p = apr_hash_make(pool);
> - Â Â Â return SVN_NO_ERROR;
> - Â Â }
> + Â SVN_ERR_ASSERT(entry != NULL);
>
> Â kind = entry->kind;
>
> @@ -274,7 +260,8 @@ svn_wc__load_props(apr_hash_t **base_pro
> Â Â Â them if no (working) prop mods have occurred. */
> Â if (base_props_p != NULL || props_p != NULL)
> Â Â {
> - Â Â Â SVN_ERR(load_props(&base_props, path, kind, svn_wc__props_base, pool));
> + Â Â Â SVN_ERR(load_props(&base_props, path, kind, svn_wc__props_base,
> + Â Â Â Â Â Â Â Â Â Â Â Â result_pool));
>
> Â Â Â if (base_props_p)
> Â Â Â Â *base_props_p = base_props;
> @@ -282,7 +269,8 @@ svn_wc__load_props(apr_hash_t **base_pro
>
> Â if (props_p)
> Â Â {
> - Â Â Â SVN_ERR(load_props(props_p, path, kind, svn_wc__props_working, pool));
> + Â Â Â SVN_ERR(load_props(props_p, path, kind, svn_wc__props_working,
> + Â Â Â Â Â Â Â Â Â Â Â Â result_pool));
>
> Â Â Â /* If the WORKING props are not present, then no modifications have
> Â Â Â Â Â occurred. Simply return a copy of the BASE props.
> @@ -290,17 +278,16 @@ svn_wc__load_props(apr_hash_t **base_pro
> Â Â Â Â Â Note that the WORKING props might be present, but simply empty,
> Â Â Â Â Â signifying that all BASE props have been deleted. */
> Â Â Â if (*props_p == NULL)
> - Â Â Â Â *props_p = apr_hash_copy(pool, base_props);
> + Â Â Â Â *props_p = apr_hash_copy(result_pool, base_props);
> Â Â }
>
> Â if (revert_props_p)
> Â Â {
> Â Â Â if (entry->schedule == svn_wc_schedule_replace)
> Â Â Â Â SVN_ERR(load_props(revert_props_p, path, kind, svn_wc__props_revert,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool));
> Â Â Â else
> - Â Â Â Â *revert_props_p = apr_hash_make(pool);
> -
> + Â Â Â Â *revert_props_p = apr_hash_make(result_pool);
> Â Â }
>
> Â return SVN_NO_ERROR;
> @@ -463,7 +450,8 @@ remove_file_if_present(const char *file,
> Â Â SCRATCH_POOL for temporary allocations. */
> Â static svn_error_t *
> Â read_wcprops(apr_hash_t **all_wcprops,
> - Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> + Â Â Â Â Â Â svn_wc__db_t *db,
> + Â Â Â Â Â Â const char *dir_abspath,
> Â Â Â Â Â Â Â apr_pool_t *result_pool,
> Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> @@ -472,7 +460,8 @@ read_wcprops(apr_hash_t **all_wcprops,
> Â svn_stream_t *stream;
> Â svn_error_t *err;
>
> - Â SVN_ERR(svn_wc__adm_wc_format(&wc_format, adm_access, scratch_pool));
> + Â SVN_ERR(svn_wc__db_temp_get_format(&wc_format, db, dir_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
>
> Â /* If the WC format is too old, there is no 'all_wcprops' file. Â */
> Â if (wc_format <= SVN_WC__WCPROPS_MANY_FILES_VERSION)
> @@ -483,7 +472,7 @@ read_wcprops(apr_hash_t **all_wcprops,
>
> Â *all_wcprops = apr_hash_make(result_pool);
>
> - Â err = svn_wc__open_adm_stream(&stream, svn_wc_adm_access_path(adm_access),
> + Â err = svn_wc__open_adm_stream(&stream, dir_abspath,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â SVN_WC__ADM_ALL_WCPROPS,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool, scratch_pool);
>
> @@ -514,8 +503,7 @@ read_wcprops(apr_hash_t **all_wcprops,
> Â Â Â Â Â Â return svn_error_createf
> Â Â Â Â Â Â Â (SVN_ERR_WC_CORRUPT, NULL,
> Â Â Â Â Â Â Â Â _("Missing end of line in wcprops file for '%s'"),
> - Â Â Â Â Â Â Â svn_path_local_style(svn_wc_adm_access_path(adm_access),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
> + Â Â Â Â Â Â Â svn_path_local_style(dir_abspath, scratch_pool));
> Â Â Â Â Â break;
> Â Â Â Â }
> Â Â Â proplist = apr_hash_make(result_pool);
> @@ -663,14 +651,19 @@ delete_wcprops(const char *path,
> Â /* We use 1 file for all wcprops in a directory,
> Â Â Â use a helper to remove them from that file */
>
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> Â svn_wc_adm_access_t *path_access;
> + Â const char *dir_abspath;
> Â const char *filename;
> Â apr_hash_t *all_wcprops;
>
> Â SVN_ERR(svn_wc_adm_probe_retrieve(&path_access, adm_access, path, pool));
> Â SVN_ERR(wcprops_modify_allowed(path_access, pool));
>
> - Â SVN_ERR(read_wcprops(&all_wcprops, path_access, pool, pool));
> + Â SVN_ERR(svn_dirent_get_absolute(&dir_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_path(path_access),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â SVN_ERR(read_wcprops(&all_wcprops, db, dir_abspath, pool, pool));
>
> Â /* If PATH is a directory, then FILENAME will be NULL.
> Â Â Â If PATH is a file, then FILENAME will be the BASE_NAME of PATH. */
> @@ -1697,9 +1690,9 @@ svn_wc__merge_props(svn_wc_notify_state_
> Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool,
> Â Â Â Â Â Â Â Â Â Â svn_stringbuf_t **entry_accum)
> Â {
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> Â int i;
> Â svn_boolean_t is_dir;
> -
> Â const char *reject_path = NULL;
> Â svn_stream_t *reject_tmp_stream = NULL; Â /* the temporary conflicts stream */
> Â const char *reject_tmp_path = NULL;
> @@ -1711,9 +1704,28 @@ svn_wc__merge_props(svn_wc_notify_state_
>
> Â /* If not provided, load the base & working property files into hashes */
> Â if (! base_props || ! working_props)
> - Â Â SVN_ERR(svn_wc__load_props(base_props ? NULL : &base_props,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â working_props ? NULL : &working_props,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, adm_access, path, pool));
> + Â Â {
> + Â Â Â const char *local_abspath;
> + Â Â Â const svn_wc_entry_t *entry;
> +
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> + Â Â Â SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, TRUE,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_node_unknown, FALSE, pool, pool));
> + Â Â Â if (entry == NULL)
> + Â Â Â Â {
> + Â Â Â Â Â /* No entry... no props. Â */
> + Â Â Â Â Â if (base_props == NULL)
> + Â Â Â Â Â Â base_props = apr_hash_make(pool);
> + Â Â Â Â Â if (working_props == NULL)
> + Â Â Â Â Â Â working_props = apr_hash_make(pool);
> + Â Â Â Â }
> + Â Â Â else
> + Â Â Â Â {
> + Â Â Â Â Â SVN_ERR(svn_wc__load_props(base_props ? NULL : &base_props,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â working_props ? NULL : &working_props,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, entry, path, pool, pool));
> + Â Â Â Â }
> + Â Â }
> Â if (!server_baseprops)
> Â Â server_baseprops = base_props;
>
> @@ -1905,14 +1917,15 @@ svn_wc_merge_prop_diffs(svn_wc_notify_st
>
> Â svn_error_t *
> Â svn_wc__wcprop_list(apr_hash_t **wcprops,
> - Â Â Â Â Â Â Â Â Â Â const char *entryname,
> - Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> + Â Â Â Â Â Â Â Â Â Â svn_wc__db_t *db,
> + Â Â Â Â Â Â Â Â Â Â const char *local_abspath,
> + Â Â Â Â Â Â Â Â Â Â svn_node_kind_t kind,
> + Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> - Â const svn_wc_entry_t *entry;
> + Â const char *dir_abspath;
> + Â const char *entryname;
> Â apr_hash_t *all_wcprops;
> - Â const char *path = svn_dirent_join(svn_wc_adm_access_path(adm_access),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entryname, pool);
>
> Â /* ### note: it is allowed to return a hash table allocated from POOL.
> Â Â Â ### it does not have to be part of ACCESS_POOL.
> @@ -1920,60 +1933,32 @@ svn_wc__wcprop_list(apr_hash_t **wcprops
> Â Â Â ### if there is no cache, then we load individual files into POOL.
> Â Â Â ### therefore, we can return values from POOL, too. Â */
>
> - Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, FALSE, pool));
> - Â if (! entry)
> + Â if (kind == svn_node_dir)
> Â Â {
> - Â Â Â /* No entry exists, therefore no wcprop-file can exist */
> - Â Â Â *wcprops = apr_hash_make(pool);
> - Â Â Â return SVN_NO_ERROR;
> + Â Â Â dir_abspath = local_abspath;
> + Â Â Â entryname = "";
> + Â Â }
> + Â else
> + Â Â {
> + Â Â Â svn_dirent_split(local_abspath, &dir_abspath, &entryname, scratch_pool);
> Â Â }
>
> - Â SVN_ERR(read_wcprops(&all_wcprops, adm_access, pool, pool));
> + Â SVN_ERR(read_wcprops(&all_wcprops, db, dir_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â result_pool, scratch_pool));
> Â if (all_wcprops)
> Â Â {
> Â Â Â *wcprops = apr_hash_get(all_wcprops, entryname, APR_HASH_KEY_STRING);
>
> Â Â Â /* Create an empty proplist if one hasn't been stored. Â */
> Â Â Â if (! *wcprops)
> - Â Â Â Â *wcprops = apr_hash_make(pool);
> + Â Â Â Â *wcprops = apr_hash_make(result_pool);
>
> Â Â Â return SVN_NO_ERROR;
> Â Â }
>
> Â /* Fall back on individual files for backwards compatibility. */
> - Â return load_props(wcprops, path, entry->kind, svn_wc__props_wcprop, pool);
> -}
> -
> -
> -/* Get a single 'wcprop' NAME for versioned object PATH, return in
> - Â *VALUE. Â ADM_ACCESS is an access baton set that contains PATH. */
> -static svn_error_t *
> -wcprop_get(const svn_string_t **value,
> - Â Â Â Â Â Â Â Â Â const char *name,
> - Â Â Â Â Â Â Â Â Â const char *path,
> - Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> -{
> - Â apr_hash_t *prophash;
> - Â const svn_wc_entry_t *entry;
> -
> - Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, FALSE, pool));
> - Â if (! entry)
> - Â Â {
> - Â Â Â *value = NULL;
> - Â Â Â return SVN_NO_ERROR;
> - Â Â }
> - Â if (entry->kind == svn_node_dir)
> - Â Â SVN_ERR(svn_wc_adm_retrieve(&adm_access, adm_access, path, pool));
> - Â else
> - Â Â SVN_ERR(svn_wc_adm_retrieve(&adm_access, adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_dirname(path, pool), pool));
> -
> - Â SVN_ERR_W(svn_wc__wcprop_list(&prophash, entry->name, adm_access, pool),
> - Â Â Â Â Â Â _("Failed to load properties from disk"));
> -
> - Â *value = apr_hash_get(prophash, name, APR_HASH_KEY_STRING);
> - Â return SVN_NO_ERROR;
> + Â return load_props(wcprops, local_abspath, kind, svn_wc__props_wcprop,
> + Â Â Â Â Â Â Â Â Â Â result_pool);
> Â }
>
>
> @@ -1984,9 +1969,11 @@ svn_wc__wcprop_set(const char *name,
> Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const svn_wc_entry_t *entry;
> + Â const char *dir_abspath;
> Â apr_hash_t *all_wcprops;
> Â apr_hash_t *prophash;
> - Â const svn_wc_entry_t *entry;
>
> Â SVN_ERR(svn_wc__entry_versioned(&entry, path, adm_access, FALSE, pool));
>
> @@ -1998,7 +1985,10 @@ svn_wc__wcprop_set(const char *name,
>
> Â SVN_ERR(wcprops_modify_allowed(adm_access, pool));
>
> - Â SVN_ERR(read_wcprops(&all_wcprops, adm_access, pool, pool));
> + Â SVN_ERR(svn_dirent_get_absolute(&dir_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_path(adm_access),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â SVN_ERR(read_wcprops(&all_wcprops, db, dir_abspath, pool, pool));
> Â if (all_wcprops == NULL)
> Â Â {
> Â Â Â /* Nothing is on disk. Start an empty hash-of-hashes. Â */
> @@ -2037,25 +2027,22 @@ svn_wc_prop_list(apr_hash_t **props,
> Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const char *local_abspath;
> Â const svn_wc_entry_t *entry;
>
> - Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, FALSE, pool));
> -
> Â /* if there is no entry, 'path' is not under version control and
> Â Â Â therefore has no props. */
> - Â if (! entry)
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> + Â SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, TRUE, svn_node_unknown,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â FALSE, pool, pool));
> + Â if (entry == NULL)
> Â Â {
> Â Â Â *props = apr_hash_make(pool);
> Â Â Â return SVN_NO_ERROR;
> Â Â }
>
> - Â if (entry->kind == svn_node_dir)
> - Â Â SVN_ERR(svn_wc_adm_retrieve(&adm_access, adm_access, path, pool));
> - Â else
> - Â Â SVN_ERR(svn_wc_adm_retrieve(&adm_access, adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_dirname(path, pool), pool));
> -
> - Â return svn_wc__load_props(NULL, props, NULL, adm_access, path, pool);
> + Â return svn_wc__load_props(NULL, props, NULL, entry, path, pool, pool);
> Â }
>
> Â svn_error_t *
> @@ -2065,37 +2052,57 @@ svn_wc_prop_get(const svn_string_t **val
> Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const char *local_abspath;
> + Â svn_error_t *err;
> Â apr_hash_t *prophash;
> Â enum svn_prop_kind kind = svn_property_kind(NULL, name);
> Â const svn_wc_entry_t *entry;
>
> - Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, FALSE, pool));
> + Â if (kind == svn_prop_entry_kind)
> + Â Â {
> + Â Â Â /* we don't do entry properties here */
> + Â Â Â return svn_error_createf(SVN_ERR_BAD_PROP_KIND, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("Property '%s' is an entry property"), name);
> + Â Â }
>
> - Â if (entry == NULL)
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> + Â err = svn_wc__get_entry(&entry, db, local_abspath, TRUE, svn_node_unknown,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â FALSE, pool, pool);
> + Â if (err)
> Â Â {
> + Â Â Â /* ### holy crap. people pass some really weird shit into this
> + Â Â Â Â ### function. generally, we get pointed at directories that
> + Â Â Â Â ### are not working copies. rather than throwing an error,
> + Â Â Â Â ### we'll ignore it, and pretend an entry was not returned. Â */
> + Â Â Â svn_error_clear(err);
> + Â Â Â entry = NULL;
> + Â Â }
> + Â if (entry == NULL || svn_wc__entry_is_hidden(entry))
> + Â Â {
> + Â Â Â /* The node is not present, or not really "here". Therefore, the
> + Â Â Â Â property is not present. Â */
> Â Â Â *value = NULL;
> Â Â Â return SVN_NO_ERROR;
> Â Â }
>
> Â if (kind == svn_prop_wc_kind)
> Â Â {
> - Â Â Â return wcprop_get(value, name, path, adm_access, pool);
> - Â Â }
> - Â if (kind == svn_prop_entry_kind)
> - Â Â {
> -    return svn_error_createf  /* we don't do entry properties here */
> - Â Â Â Â (SVN_ERR_BAD_PROP_KIND, NULL,
> - Â Â Â Â _("Property '%s' is an entry property"), name);
> + Â Â Â SVN_ERR_W(svn_wc__wcprop_list(&prophash, db, local_abspath, entry->kind,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool),
> + Â Â Â Â Â Â Â Â _("Failed to load properties from disk"));
> Â Â }
> -  else  /* regular prop */
> + Â else
> Â Â {
> - Â Â Â SVN_ERR_W(svn_wc_prop_list(&prophash, path, adm_access, pool),
> + Â Â Â /* regular prop */
> + Â Â Â SVN_ERR_W(svn_wc__load_props(NULL, &prophash, NULL, entry, path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool),
> Â Â Â Â Â Â Â Â _("Failed to load properties from disk"));
> + Â Â }
>
> - Â Â Â *value = apr_hash_get(prophash, name, APR_HASH_KEY_STRING);
> + Â *value = apr_hash_get(prophash, name, APR_HASH_KEY_STRING);
>
> - Â Â Â return SVN_NO_ERROR;
> - Â Â }
> + Â return SVN_NO_ERROR;
> Â }
>
>
> @@ -2308,8 +2315,8 @@ svn_wc_prop_set3(const char *name,
> Â Â Â /* If not, we'll set the file to read-only at commit time. */
> Â Â }
>
> - Â SVN_ERR_W(svn_wc__load_props(&base_prophash, &prophash, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, path, pool),
> + Â SVN_ERR_W(svn_wc__load_props(&base_prophash, &prophash, NULL, entry, path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool),
> Â Â Â Â Â Â _("Failed to load properties from disk"));
>
> Â /* If we're changing this file's list of expanded keywords, then
> @@ -2699,7 +2706,7 @@ svn_wc_get_prop_diffs(apr_array_header_t
> Â Â }
>
> Â SVN_ERR(svn_wc__load_props(&baseprops, propchanges ? &props : NULL, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, path, pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry, path, pool, pool));
>
> Â if (original_props != NULL)
> Â Â *original_props = baseprops;
>
> Modified: trunk/subversion/libsvn_wc/props.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/props.h?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/props.h  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/props.h  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -21,10 +21,12 @@
> Â #define SVN_LIBSVN_WC_PROPS_H
>
> Â #include <apr_pools.h>
> +
> Â #include "svn_types.h"
> Â #include "svn_string.h"
> Â #include "svn_props.h"
>
> +#include "wc_db.h"
>
> Â #ifdef __cplusplus
> Â extern "C" {
> @@ -82,16 +84,17 @@ svn_error_t *svn_wc__merge_props(svn_wc_
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_stringbuf_t **entry_accum);
>
>
> -/* Return a list of wc props for ENTRYNAME in ADM_ACCESS.
> - Â ENTRYNAME must be the name of a file or SVN_WC_ENTRY_THIS_DIR.
> +/* Return a list of wc props for the node at LOCAL_ABSPATH, which is KIND.
>
> - Â The returned WCPROPS may be allocated in POOL, or may be the props
> - Â cached in ADM_ACCESS. Â */
> + Â The returned WCPROPS will be allocated in RESULT_POOL, and any temporary
> + Â allocations will be made in SCRATCH_POOL. Â */
> Â svn_error_t *
> Â svn_wc__wcprop_list(apr_hash_t **wcprops,
> - Â Â Â Â Â Â Â Â Â Â const char *entryname,
> - Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool);
> + Â Â Â Â Â Â Â Â Â Â svn_wc__db_t *db,
> + Â Â Â Â Â Â Â Â Â Â const char *local_abspath,
> + Â Â Â Â Â Â Â Â Â Â svn_node_kind_t kind,
> + Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool);
>
> Â /* Set a single 'wcprop' NAME to VALUE for versioned object PATH.
> Â Â If VALUE is null, remove property NAME. Â ADM_ACCESS is an access
> @@ -175,17 +178,19 @@ svn_wc__working_props_committed(const ch
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_boolean_t sync_entries,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool);
>
> -/* Load the base, working and revert props for PATH in ADM_ACCESS returning
> +/* Load the base, working and revert props for ENTRY at PATH returning
> Â Â them in *BASE_PROPS_P, *PROPS_P and *REVERT_PROPS_P respectively.
> - Â Any of BASE_PROPS, PROPS and REVERT_PROPS may be null.
> - Â Do all allocations in POOL. Â */
> + Â Any of BASE_PROPS, PROPS and REVERT_PROPS may be NULL.
> + Â Returned hashes/values are allocated in RESULT_POOL. All temporary
> + Â allocations are made in SCRATCH_POOL. Â */
> Â svn_error_t *
> Â svn_wc__load_props(apr_hash_t **base_props_p,
> Â Â Â Â Â Â Â Â Â Â apr_hash_t **props_p,
> Â Â Â Â Â Â Â Â Â Â apr_hash_t **revert_props_p,
> - Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> + Â Â Â Â Â Â Â Â Â const svn_wc_entry_t *entry,
> Â Â Â Â Â Â Â Â Â Â const char *path,
> - Â Â Â Â Â Â Â Â Â apr_pool_t *pool);
> + Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool);
>
> Â #ifdef __cplusplus
> Â }
>
> Modified: trunk/subversion/libsvn_wc/update_editor.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/update_editor.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/update_editor.c  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/update_editor.c  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -152,6 +152,9 @@ struct edit_baton
> Â const char *anchor;
> Â const char *target;
>
> + Â /* The DB handle for managing the working copy state. Â */
> + Â svn_wc__db_t *db;
> +
> Â /* ADM_ACCESS is an access baton that includes the ANCHOR directory */
> Â svn_wc_adm_access_t *adm_access;
>
> @@ -2805,11 +2808,24 @@ close_directory(void *dir_baton,
> Â Â Â deleted (issue #1672). */
> Â if (db->was_incomplete)
> Â Â {
> + Â Â Â const char *local_abspath;
> + Â Â Â const svn_wc_entry_t *entry;
> Â Â Â int i;
> Â Â Â apr_hash_t *props_to_delete;
>
> - Â Â Â SVN_ERR(svn_wc__load_props(&base_props, &working_props, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, db->path, pool));
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, db->path, pool));
> + Â Â Â SVN_ERR(svn_wc__get_entry(&entry, db->edit_baton->db, local_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â TRUE, svn_node_unknown, FALSE, pool, pool));
> + Â Â Â if (entry == NULL)
> + Â Â Â Â {
> + Â Â Â Â Â base_props = apr_hash_make(pool);
> + Â Â Â Â Â working_props = apr_hash_make(pool);
> + Â Â Â Â }
> + Â Â Â else
> + Â Â Â Â {
> + Â Â Â Â Â SVN_ERR(svn_wc__load_props(&base_props, &working_props, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â entry, db->path, pool, pool));
> + Â Â Â Â }
>
> Â Â Â /* Calculate which base props weren't also in the incoming
> Â Â Â Â Â propchanges. */
> @@ -3322,7 +3338,7 @@ add_file_with_history(const char *path,
> Â Â Â Â Â SVN_ERR(svn_wc__get_revert_contents(&source_text_base, src_path,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â subpool, subpool));
> Â Â Â Â Â SVN_ERR(svn_wc__load_props(NULL, NULL, &base_props,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â src_access, src_path, pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â src_entry, src_path, pool, subpool));
> Â Â Â Â Â /* The old working props are lost, just like the old
> Â Â Â Â Â Â Â working file text is. Â Just use the base props. */
> Â Â Â Â Â working_props = base_props;
> @@ -3332,7 +3348,7 @@ add_file_with_history(const char *path,
> Â Â Â Â Â SVN_ERR(svn_wc_get_pristine_contents(&source_text_base, src_path,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â subpool, subpool));
> Â Â Â Â Â SVN_ERR(svn_wc__load_props(&base_props, &working_props, NULL,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â src_access, src_path, pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â src_entry, src_path, pool, subpool));
> Â Â Â Â }
>
> Â Â Â SVN_ERR(svn_stream_copy3(source_text_base, copied_stream,
> @@ -4716,6 +4732,7 @@ make_editor(svn_revnum_t *target_revisio
>  eb->switch_url        = switch_url;
>  eb->repos           = entry ? entry->repos : NULL;
>  eb->uuid           = entry ? entry->uuid : NULL;
> +  eb->db            = svn_wc__adm_get_db(adm_access);
>  eb->adm_access        = adm_access;
>  eb->anchor          = anchor;
>  eb->target          = target;
> @@ -5134,9 +5151,10 @@ check_wc_root(svn_boolean_t *wc_root,
> Â Â Â otherwise hidden), treat it as if it were a file so that the anchor
> Â Â Â will be the parent directory. If the node is a FILE, then it is
> Â Â Â definitely not a root. Â */
> - Â err = svn_wc__get_entry(&entry, db, abspath, svn_node_unknown, FALSE,
> + Â err = svn_wc__get_entry(&entry, db, abspath, TRUE, svn_node_unknown, FALSE,
> Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool);
> - Â if (err || entry->kind == svn_node_file || svn_wc__entry_is_hidden(entry))
> + Â if (err || entry == NULL || entry->kind == svn_node_file
> + Â Â Â || svn_wc__entry_is_hidden(entry))
> Â Â {
> Â Â Â if (err)
> Â Â Â Â {
> @@ -5148,7 +5166,7 @@ check_wc_root(svn_boolean_t *wc_root,
> Â Â Â Â Â Â Â Â Â instead. We can pretend this is a file so the parent will
> Â Â Â Â Â Â Â Â Â be the anchor. Â */
> Â Â Â Â Â Â }
> - Â Â Â Â Â else if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
> + Â Â Â Â Â else
> Â Â Â Â Â Â return err;
> Â Â Â Â Â svn_error_clear(err);
> Â Â Â Â }
> @@ -5177,7 +5195,7 @@ check_wc_root(svn_boolean_t *wc_root,
> Â svn_dirent_split(abspath, &parent, &base_name, pool);
>
> Â /* If we cannot get an entry for PATH's parent, PATH is a WC root. */
> - Â err = svn_wc__get_entry(&p_entry, db, parent, svn_node_dir, FALSE,
> + Â err = svn_wc__get_entry(&p_entry, db, parent, FALSE, svn_node_dir, FALSE,
> Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool);
> Â if (err)
> Â Â {
> @@ -5203,7 +5221,7 @@ check_wc_root(svn_boolean_t *wc_root,
>
> Â /* If PATH's parent in the repository is not its parent in the WC,
> Â Â Â PATH is a WC root. */
> - Â err = svn_wc__get_entry(&p_entry, db, abspath, svn_node_dir, TRUE,
> + Â err = svn_wc__get_entry(&p_entry, db, abspath, FALSE, svn_node_dir, TRUE,
> Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool);
> Â if (err || svn_wc__entry_is_hidden(p_entry))
> Â Â {
>
> Modified: trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc_db.c?pathrev=37355&r1=37354&r2=37355
> ==============================================================================
> --- trunk/subversion/libsvn_wc/wc_db.c  Sat Apr 18 10:11:47 2009     (r37354)
> +++ trunk/subversion/libsvn_wc/wc_db.c  Sat Apr 18 13:12:27 2009     (r37355)
> @@ -3461,8 +3461,11 @@ svn_wc__db_temp_get_format(int *format,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_sqlite__mode_readonly,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool, scratch_pool);
>
> - Â Â Â /* If we hit an error examining this directory, or if the information
> - Â Â Â Â returned is not for THIS directory, then bail out. Â */
> + Â Â Â /* If we hit an error examining this directory, then declare this
> + Â Â Â Â directory to not be a working copy. Â */
> + Â Â Â /* ### for per-dir layouts, the wcroot should be this directory,
> + Â Â Â Â ### so bail if the PDH is a parent (and, thus, local_relpath is
> + Â Â Â Â ### something besides ""). Â */
> Â Â Â if (err || *local_relpath != '\0')
> Â Â Â Â {
> Â Â Â Â Â if (err && err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
> @@ -3479,7 +3482,17 @@ svn_wc__db_temp_get_format(int *format,
>
> Â Â Â SVN_ERR_ASSERT(pdh->wcroot != NULL);
> Â Â }
> - Â SVN_ERR_ASSERT(strcmp(local_dir_abspath, pdh->wcroot->abspath) == 0);
> +
> + Â /* ### for per-dir layouts, the wcroot should be this directory. Â */
> + Â if (strcmp(local_dir_abspath, pdh->wcroot->abspath) != 0)
> + Â Â {
> + Â Â Â *format = 0;
> + Â Â Â return svn_error_createf(SVN_ERR_WC_MISSING, NULL,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("'%s' is not a working copy"),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_local_style(local_dir_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
> + Â Â }
> +
> Â SVN_ERR_ASSERT(pdh->wcroot->format >= 1);
>
> Â *format = pdh->wcroot->format;
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1795382
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1795419
Received on 2009-04-18 22:17:26 CEST