[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-dev
Subject: [PATCH] Fix issue 2426 version 2
From: Erik Huelsmann <ehuels () gmail ! com>
Date: 2005-10-30 23:33:03
Message-ID: aea328ab0510301533v1fa5c281x6464f9cfae921074 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
Iteration 2 of the patch. I've addressed Zhakov's concerns and am
looking for more nits.
bye,
Erik.
Log:
[[[
Fix issue #2426: revert_tests.py test 1 fails.
* subversion/libsvn_wc/adm_files.h
* subversion/libsvn_wc/adm_files.c
(svn_wc__wcprop_path, svn_wc__prop_path, svn_wc__prop_base_path,
svn_wc__prop_revert_path): Change function signature to take an explicitly
specified node kind, indicating which property file we want, instead of
deducing that from path and adm_access.
* subversion/libsvn_wc/props.c
* subversion/libsvn_wc/diff.c
* subversion/libsvn_wc/copy.c
* subversion/libsvn_wc/adm_crawler.c
* subversion/libsvn_wc/log.c
* subversion/libsvn_wc/adm_ops.c
* subversion/libsvn_wc/update_editor.c
* subversion/libsvn_wc/questions.c:
Adjust callers.
]]]
["issue-2426.patch.txt" (text/plain)]
Log:
[[[
Fix issue #2426: revert_tests.py test 1 fails.
* subversion/libsvn_wc/adm_files.h
* subversion/libsvn_wc/adm_files.c
(svn_wc__wcprop_path, svn_wc__prop_path, svn_wc__prop_base_path,
svn_wc__prop_revert_path): Change function signature to take an explicitly
specified node kind, indicating which property file we want, instead of
deducing that from path and adm_access.
* subversion/libsvn_wc/props.c
* subversion/libsvn_wc/diff.c
* subversion/libsvn_wc/copy.c
* subversion/libsvn_wc/adm_crawler.c
* subversion/libsvn_wc/log.c
* subversion/libsvn_wc/adm_ops.c
* subversion/libsvn_wc/update_editor.c
* subversion/libsvn_wc/questions.c:
Adjust callers.
]]]
Index: subversion/libsvn_wc/props.c
===================================================================
--- subversion/libsvn_wc/props.c (revision 17105)
+++ subversion/libsvn_wc/props.c (working copy)
@@ -219,7 +219,9 @@
const char *tmp_path, *tmp_name;
/* Get path to /temporary/ local prop file */
- SVN_ERR (svn_wc__prop_path (&tmp_path, full_path, adm_access, TRUE, pool));
+ SVN_ERR (svn_wc__prop_path (&tmp_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
+ TRUE, pool));
/* Reserve a .prej file based on it. */
SVN_ERR (svn_io_open_unique_file (fp, reject_tmp_path, tmp_path,
@@ -408,9 +410,11 @@
/* Load the base & working property files into hashes */
working_props = apr_hash_make (pool);
base_props = apr_hash_make (pool);
- SVN_ERR (svn_wc__prop_path (&local_propfile_path, full_path, adm_access,
- FALSE, pool));
- SVN_ERR (svn_wc__prop_base_path (&base_propfile_path, full_path, adm_access,
+ SVN_ERR (svn_wc__prop_path (&local_propfile_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
+ FALSE, pool));
+ SVN_ERR (svn_wc__prop_base_path (&base_propfile_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
FALSE, pool));
SVN_ERR (svn_wc__load_prop_file (base_propfile_path, base_props, pool));
SVN_ERR (svn_wc__load_prop_file (local_propfile_path, working_props, pool));
@@ -589,8 +593,9 @@
paths computed are ABSOLUTE pathnames, which is what our disk
routines require.*/
SVN_ERR (svn_wc__prop_path (&local_prop_tmp_path, full_path,
- adm_access, TRUE, pool));
-
+ is_dir ? svn_node_dir : svn_node_file,
+ TRUE, pool));
+
/* Write the merged working prop hash to path/.svn/tmp/props/name or
path/.svn/tmp/dir-props */
SVN_ERR (svn_wc__save_prop_file (local_prop_tmp_path, working_props, pool));
@@ -616,7 +621,8 @@
const char *tmp_prop_base, *real_prop_base;
SVN_ERR (svn_wc__prop_base_path (&base_prop_tmp_path, full_path,
- adm_access, TRUE, pool));
+ is_dir ? svn_node_dir : svn_node_file,
+ TRUE, pool));
SVN_ERR (svn_wc__save_prop_file (base_prop_tmp_path, base_props, pool));
tmp_prop_base = apr_pstrdup (pool, base_prop_tmp_path + access_len);
@@ -760,10 +766,12 @@
}
/* Get paths to the local and pristine property files. */
- SVN_ERR (svn_wc__prop_path (&local_propfile_path, full_path, adm_access,
+ SVN_ERR (svn_wc__prop_path (&local_propfile_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
FALSE, pool));
- SVN_ERR (svn_wc__prop_base_path (&base_propfile_path, full_path, adm_access,
+ SVN_ERR (svn_wc__prop_base_path (&base_propfile_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
FALSE, pool));
/* Load the base & working property files into hashes */
@@ -889,8 +897,9 @@
paths computed are ABSOLUTE pathnames, which is what our disk
routines require.*/
- SVN_ERR (svn_wc__prop_path (&local_prop_tmp_path, full_path, adm_access, TRUE,
- pool));
+ SVN_ERR (svn_wc__prop_path (&local_prop_tmp_path, full_path,
+ is_dir ? svn_node_dir : svn_node_file,
+ TRUE, pool));
/* Write the merged local prop hash to path/.svn/tmp/props/name or
path/.svn/tmp/dir-props */
@@ -914,7 +923,8 @@
if (base_merge)
{
SVN_ERR (svn_wc__prop_base_path (&base_prop_tmp_path, full_path,
- adm_access, TRUE, pool));
+ is_dir ? svn_node_dir : svn_node_file,
+ TRUE, pool));
SVN_ERR (svn_wc__save_prop_file (base_prop_tmp_path, basehash, pool));
tmp_prop_base = apr_pstrdup (pool, base_prop_tmp_path + access_len);
@@ -1075,7 +1085,8 @@
{
svn_node_kind_t kind, pkind;
const char *prop_path;
-
+ const svn_wc_entry_t *entry;
+
*props = apr_hash_make (pool);
/* Check validity of PATH */
@@ -1094,10 +1105,17 @@
#endif
/* Construct a path to the relevant property file */
- SVN_ERR( svn_wc__wcprop_path (&prop_path, path, adm_access, FALSE, pool) );
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
+ /*### Maybe assert (entry) here; calling wcprop_list
+ for an unversioned resource is bogus */
+ if (! entry)
+ /* No entry exists, therefore no wcprop-file can exist */
+ return SVN_NO_ERROR;
+ SVN_ERR (svn_wc__wcprop_path (&prop_path, path, entry->kind, FALSE, pool));
+
/* Does the property file exist? */
- SVN_ERR( svn_io_check_path (prop_path, &pkind, pool) );
+ SVN_ERR (svn_io_check_path (prop_path, &pkind, pool));
if (pkind == svn_node_none)
/* No property file exists. Just go home, with an empty hash. */
@@ -1105,7 +1123,7 @@
/* else... */
- SVN_ERR( svn_wc__load_prop_file (prop_path, *props, pool) );
+ SVN_ERR (svn_wc__load_prop_file (prop_path, *props, pool));
return SVN_NO_ERROR;
}
@@ -1189,12 +1207,22 @@
apr_pool_t *pool)
{
const char *prop_path;
+ const svn_wc_entry_t *entry;
*props = apr_hash_make (pool);
/* Construct a path to the relevant property file */
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, pool));
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, TRUE, pool));
+ /* if there is no entry, 'path' is not under version control and
+ therefore has no props */
+ /*### Maybe assert (entry); calling svn_wc_prop_list for
+ an unversioned is bogus */
+ if (! entry)
+ return SVN_NO_ERROR;
+
+ SVN_ERR (svn_wc__prop_path (&prop_path, path, entry->kind, FALSE, pool));
+
/* svn_wc__load_prop_file checks if the prop file exists */
return svn_wc__load_prop_file (prop_path, *props, pool);
}
@@ -1628,8 +1656,19 @@
{
svn_boolean_t is_empty;
const char *prop_path;
+ const svn_wc_entry_t *entry;
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, pool));
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
+
+ /*### Maybe assert (entry); calling svn_wc__has_props
+ for an unversioned path is bogus */
+ if (! entry)
+ {
+ *has_props = FALSE;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR (svn_wc__prop_path (&prop_path, path, entry->kind, FALSE, pool));
SVN_ERR (empty_props_p (&is_empty, prop_path, pool));
if (is_empty)
@@ -1654,9 +1693,20 @@
const svn_wc_entry_t *entry;
apr_pool_t *subpool = svn_pool_create (pool);
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, TRUE, subpool));
+
+ /*### Maybe assert (entry); calling svn_wc_props_modified_p
+ for an unversioned path is bogus */
+ if (! entry)
+ {
+ /* There's no entry: the props cannot be modified! */
+ *modified_p = FALSE;
+ goto cleanup;
+ }
+
/* First, get the paths of the working and 'base' prop files. */
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, subpool));
- SVN_ERR (svn_wc__prop_base_path (&prop_base_path, path, adm_access, FALSE,
+ SVN_ERR (svn_wc__prop_path (&prop_path, path, entry->kind, FALSE, subpool));
+ SVN_ERR (svn_wc__prop_base_path (&prop_base_path, path, entry->kind, FALSE,
subpool));
/* Decide if either path is "empty" of properties. */
@@ -1666,7 +1716,6 @@
/* If something is scheduled for replacement, we do *not* want to
pay attention to any base-props; they might be residual from the
old deleted file. */
- SVN_ERR (svn_wc_entry (&entry, path, adm_access, TRUE, subpool));
if (entry && (entry->schedule == svn_wc_schedule_replace))
{
*modified_p = wempty ? FALSE : TRUE;
@@ -1804,12 +1853,27 @@
{
const char *prop_path, *prop_base_path;
apr_array_header_t *local_propchanges;
+ const svn_wc_entry_t *entry;
apr_hash_t *localprops = apr_hash_make (pool);
apr_hash_t *baseprops = apr_hash_make (pool);
+ /*### Maybe assert (entry); calling svn_wc_get_prop_diffs
+ for an unversioned path is bogus */
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, pool));
- SVN_ERR (svn_wc__prop_base_path (&prop_base_path, path, adm_access, FALSE,
+ if (! entry)
+ {
+ if (original_props)
+ *original_props = baseprops;
+
+ if (propchanges)
+ *propchanges = apr_array_make (pool, 0, sizeof (svn_prop_t));
+
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR (svn_wc__prop_path (&prop_path, path, entry->kind, FALSE, pool));
+ SVN_ERR (svn_wc__prop_base_path (&prop_base_path, path, entry->kind, FALSE,
pool));
SVN_ERR (svn_wc__load_prop_file (prop_path, localprops, pool));
Index: subversion/libsvn_wc/diff.c
===================================================================
--- subversion/libsvn_wc/diff.c (revision 17105)
+++ subversion/libsvn_wc/diff.c (working copy)
@@ -351,8 +351,11 @@
/* also notice we're ignoring error here; there's a chance that
this path might not exist in the working copy, in which case
the baseprops remains an empty hash. */
- svn_error_t *err = svn_wc_prop_list (&(b->baseprops), b->path,
- b->edit_baton->anchor, b->pool);
+ svn_error_t *err = svn_wc_prop_list
+ (&(b->baseprops),
+ svn_path_join (svn_wc_adm_access_path (b->edit_baton->anchor),
+ b->path, b->pool),
+ b->edit_baton->anchor, b->pool);
if (err)
svn_error_clear (err);
b->fetched_baseprops = TRUE;
@@ -384,7 +387,11 @@
apr_pool_t *pool)
{
const svn_string_t *working_val;
+ const svn_wc_entry_t *entry;
+ /*### Maybe assert (entry); calling get_local_mimetypes
+ for an unversioned path is bogus */
+
if (working_mimetype)
{
if (b)
@@ -432,8 +439,15 @@
const char *props_base_path;
apr_hash_t *baseprops = apr_hash_make (pool);
- SVN_ERR (svn_wc__prop_base_path (&props_base_path, path, adm_access,
- FALSE, pool));
+ SVN_ERR (svn_wc_entry (&entry, path, adm_access, TRUE, pool));
+ if (! entry)
+ {
+ *pristine_mimetype = NULL;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR (svn_wc__prop_base_path (&props_base_path, path,
+ entry->kind, FALSE, pool));
SVN_ERR (svn_wc__load_prop_file (props_base_path, baseprops, pool));
pristine_val = apr_hash_get (baseprops, SVN_PROP_MIME_TYPE,
strlen(SVN_PROP_MIME_TYPE));
Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c (revision 17105)
+++ subversion/libsvn_wc/copy.c (working copy)
@@ -56,7 +56,7 @@
/* Remove this_dir's wcprops */
SVN_ERR (svn_wc__wcprop_path (&wcprop_path,
svn_wc_adm_access_path (adm_access),
- adm_access, FALSE, subpool));
+ svn_node_dir, FALSE, subpool));
err = svn_io_remove_file (wcprop_path, subpool);
if (err)
svn_error_clear (err);
@@ -84,8 +84,8 @@
/* If a file, remove it from wcprops. */
if (current_entry->kind == svn_node_file)
{
- SVN_ERR (svn_wc__wcprop_path (&wcprop_path, child_path, adm_access,
- FALSE, subpool));
+ SVN_ERR (svn_wc__wcprop_path (&wcprop_path, child_path,
+ svn_node_file, FALSE, subpool));
err = svn_io_remove_file (wcprop_path, subpool);
if (err)
svn_error_clear (err);
@@ -145,12 +145,6 @@
const char *src_txtb = svn_wc__text_base_path (src_path, FALSE, pool);
const char *tmp_txtb = svn_wc__text_base_path (dst_path, TRUE, pool);
- /* Discover the paths to the two source prop files */
- SVN_ERR (svn_wc__prop_path (&src_wprop, src_path,
- src_access, FALSE, pool));
- SVN_ERR (svn_wc__prop_base_path (&src_bprop, src_path,
- src_access, FALSE, pool));
-
/* Sanity check: if dst file exists already, don't allow overwrite. */
SVN_ERR (svn_io_check_path (dst_path, &dst_kind, pool));
if (dst_kind != svn_node_none)
@@ -190,6 +184,12 @@
svn_path_local_style (src_path, pool));
+ /* Discover the paths to the two source prop files */
+ SVN_ERR (svn_wc__prop_path (&src_wprop, src_path,
+ src_entry->kind, FALSE, pool));
+ SVN_ERR (svn_wc__prop_base_path (&src_bprop, src_path,
+ src_entry->kind, FALSE, pool));
+
/* Schedule the new file for addition in its parent, WITH HISTORY. */
{
char *copyfrom_url;
Index: subversion/libsvn_wc/adm_crawler.c
===================================================================
--- subversion/libsvn_wc/adm_crawler.c (revision 17105)
+++ subversion/libsvn_wc/adm_crawler.c (working copy)
@@ -898,7 +898,7 @@
SVN_ERR (svn_wc_adm_probe_retrieve (&adm_access, adm_access, path, pool));
/* First, get the prop_path from the original path */
- SVN_ERR (svn_wc__prop_path (&props, path, adm_access, FALSE, pool));
+ SVN_ERR (svn_wc__prop_path (&props, path, entry->kind, FALSE, pool));
/* Get the full path of the prop-base `pristine' file */
if (entry->schedule == svn_wc_schedule_replace)
@@ -910,11 +910,11 @@
}
else
/* the real prop-base hash */
- SVN_ERR (svn_wc__prop_base_path (&props_base, path, adm_access, FALSE,
+ SVN_ERR (svn_wc__prop_base_path (&props_base, path, entry->kind, FALSE,
pool));
/* Copy the local prop file to the administrative temp area */
- SVN_ERR (svn_wc__prop_path (&props_tmp, path, adm_access, TRUE, pool));
+ SVN_ERR (svn_wc__prop_path (&props_tmp, path, entry->kind, TRUE, pool));
SVN_ERR (svn_io_copy_file (props, props_tmp, FALSE, pool));
/* Alert the caller that we have created a temporary file that might
Index: subversion/libsvn_wc/log.c
===================================================================
--- subversion/libsvn_wc/log.c (revision 17105)
+++ subversion/libsvn_wc/log.c (working copy)
@@ -703,8 +703,18 @@
const char *pfile;
svn_node_kind_t pfile_kind;
apr_time_t prop_time;
+ const svn_wc_entry_t *tfile_entry;
- err = svn_wc__prop_path (&pfile, tfile, loggy->adm_access, FALSE,
+ err = svn_wc_entry (&tfile_entry, tfile, loggy->adm_access,
+ FALSE, loggy->pool);
+
+ if (err)
+ signal_error (loggy, err);
+
+ if (! entry)
+ return SVN_NO_ERROR;
+
+ err = svn_wc__prop_path (&pfile, tfile, tfile_entry->kind, FALSE,
loggy->pool);
if (err)
signal_error (loggy, err);
@@ -1117,12 +1127,12 @@
(&wf,
is_this_dir
? svn_wc_adm_access_path (loggy->adm_access) : full_path,
- loggy->adm_access, FALSE, pool));
+ entry->kind , FALSE, pool));
SVN_ERR (svn_wc__prop_base_path
(&basef,
is_this_dir
? svn_wc_adm_access_path (loggy->adm_access) : full_path,
- loggy->adm_access, FALSE, pool));
+ entry->kind, FALSE, pool));
/* If this file was replaced in the commit, then we definitely
need to begin by removing any old residual prop-base file. */
@@ -1138,7 +1148,7 @@
(&tmpf,
is_this_dir
? svn_wc_adm_access_path (loggy->adm_access) : full_path,
- loggy->adm_access, TRUE, pool));
+ entry->kind, TRUE, pool));
if ((err = svn_io_check_path (tmpf, &kind, pool)))
return svn_error_createf (pick_error_code (loggy), err,
_("Error checking existence of '%s'"),
Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c (revision 17105)
+++ subversion/libsvn_wc/adm_ops.c (working copy)
@@ -178,10 +178,18 @@
apr_pool_t * pool)
{
const char * revert_file;
+ const svn_wc_entry_t *entry;
svn_node_kind_t kind;
-
+
+ SVN_ERR (svn_wc_entry (&entry, base_name, adm_access, FALSE, pool));
+
+ /*### Maybe assert (entry); calling remove_revert_file
+ for an unversioned file is bogus */
+ if (! entry)
+ return SVN_NO_ERROR;
+
if (is_prop)
- SVN_ERR (svn_wc__prop_revert_path (&revert_file, base_name, adm_access,
+ SVN_ERR (svn_wc__prop_revert_path (&revert_file, base_name, entry->kind,
FALSE, pool));
else
revert_file = svn_wc__text_revert_path (base_name, FALSE, pool);
@@ -913,9 +921,9 @@
const char *prop_base, *prop_revert;
SVN_ERR (svn_wc__prop_base_path (&prop_base, base_name,
- adm_access, FALSE, pool));
+ was_kind, FALSE, pool));
SVN_ERR (svn_wc__prop_revert_path (&prop_revert, base_name,
- adm_access, FALSE, pool));
+ was_kind, FALSE, pool));
if (was_kind != svn_node_dir) /* Dirs don't have text-bases */
/* Restore the original text-base */
@@ -1132,7 +1140,8 @@
if (orig_entry && (! copyfrom_url))
{
const char *prop_path;
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, pool));
+ SVN_ERR (svn_wc__prop_path (&prop_path, path,
+ orig_entry->kind, FALSE, pool));
SVN_ERR (remove_file_if_present (prop_path, pool));
}
@@ -1329,31 +1338,25 @@
apr_hash_t *modify_entry_atts = apr_hash_make (pool);
svn_stringbuf_t *log_accum = svn_stringbuf_create ("", pool);
const char *bprop, *rprop, *wprop; /* full paths */
- const char *local_bprop, *local_rprop, *local_wprop; /* relative paths */
const char *adm_path = svn_wc_adm_access_path (adm_access);
- int access_len = strlen (adm_path) + 1;
/* Build the full path of the thing we're reverting. */
fullpath = svn_wc_adm_access_path (adm_access);
if (strcmp (name, SVN_WC_ENTRY_THIS_DIR) != 0)
fullpath = svn_path_join (fullpath, name, pool);
- SVN_ERR (svn_wc__prop_base_path (&bprop, fullpath, adm_access, FALSE, pool));
- local_bprop = apr_pstrdup(pool, bprop + access_len);
+ SVN_ERR (svn_wc__prop_base_path (&bprop, name, entry->kind, FALSE, pool));
- SVN_ERR (svn_wc__prop_revert_path (&rprop, fullpath,
- adm_access, FALSE, pool));
- local_rprop = apr_pstrdup(pool, rprop + access_len);
+ SVN_ERR (svn_wc__prop_revert_path (&rprop, name, entry->kind, FALSE, pool));
- SVN_ERR (svn_wc__prop_path (&wprop, fullpath, adm_access, FALSE, pool));
- local_wprop = apr_pstrdup(pool, wprop + access_len);
+ SVN_ERR (svn_wc__prop_path (&wprop, name, entry->kind, FALSE, pool));
/* Look for a revert base file. If it exists use it for
* the prop base for the file. If it doesn't use the normal
* prop base. */
SVN_ERR (svn_wc__loggy_move (&log_accum, NULL, adm_access,
- local_rprop, local_bprop, FALSE, pool));
+ rprop, bprop, FALSE, pool));
/* Check for prop changes. */
SVN_ERR (svn_wc_props_modified_p (&modified_p, fullpath, adm_access, pool));
@@ -1379,7 +1382,7 @@
file. */
SVN_ERR (svn_wc__loggy_copy (&log_accum, NULL,
adm_access, svn_wc__copy_normal,
- local_bprop, local_wprop, TRUE, pool));
+ bprop, wprop, TRUE, pool));
/* Log to update prop-time attribute */
apr_hash_set (modify_entry_atts, SVN_WC__ENTRY_ATTR_PROP_TIME,
@@ -1409,7 +1412,7 @@
then we need to restore them. */
SVN_ERR (svn_wc__loggy_copy (&log_accum, &tgt_modified,
adm_access, svn_wc__copy_normal,
- local_bprop, local_wprop, FALSE, pool));
+ bprop, wprop, FALSE, pool));
if (tgt_modified)
{
@@ -1854,18 +1857,22 @@
SVN_ERR (remove_file_if_present (svn_thang, pool));
/* Working prop file. */
- SVN_ERR (svn_wc__prop_path (&svn_thang, full_path, adm_access, FALSE,
- pool));
+ SVN_ERR (svn_wc__prop_path (&svn_thang, full_path,
+ is_file ? svn_node_file : svn_node_dir,
+ FALSE, pool));
SVN_ERR (remove_file_if_present (svn_thang, pool));
/* Prop base file. */
- SVN_ERR (svn_wc__prop_base_path (&svn_thang, full_path, adm_access,
+ SVN_ERR (svn_wc__prop_base_path (&svn_thang, full_path,
+ is_file ? svn_node_file
+ : svn_node_dir,
FALSE, pool));
SVN_ERR (remove_file_if_present (svn_thang, pool));
/* wc-prop file. */
- SVN_ERR (svn_wc__wcprop_path (&svn_thang, full_path, adm_access, FALSE,
- pool));
+ SVN_ERR (svn_wc__wcprop_path (&svn_thang, full_path,
+ is_file ? svn_node_file : svn_node_dir,
+ FALSE, pool));
SVN_ERR (remove_file_if_present (svn_thang, pool));
}
Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c (revision 17105)
+++ subversion/libsvn_wc/adm_files.c (working copy)
@@ -361,17 +361,12 @@
static svn_error_t *
prop_path_internal (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
prop_path_kind_t path_kind,
svn_boolean_t tmp,
apr_pool_t *pool)
{
- const svn_wc_entry_t *entry;
- const char *entry_name;
-
- SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
-
- if (entry && entry->kind == svn_node_dir) /* It's a working copy dir */
+ if (kind == svn_node_dir) /* It's a working copy dir */
{
static const char * names[] = {
SVN_WC__ADM_DIR_PROP_BASE, /* prop_path_kind_base */
@@ -388,7 +383,7 @@
names[path_kind],
NULL);
}
- else /* It's either a file, or a non-wc dir (i.e., maybe an ex-file) */
+ else /* It's a file */
{
static const char * extensions[] = {
SVN_WC__BASE_EXT, /* prop_path_kind_base */
@@ -404,14 +399,16 @@
SVN_WC__ADM_PROPS /* prop_path_kind_working */
};
- svn_path_split (path, prop_path, &entry_name, pool);
+ const char *base_name;
+
+ svn_path_split (path, prop_path, &base_name, pool);
*prop_path = extend_with_adm_name
(*prop_path,
extensions[path_kind],
tmp,
pool,
dirs[path_kind],
- entry_name,
+ base_name,
NULL);
}
@@ -424,11 +421,11 @@
svn_error_t *
svn_wc__wcprop_path (const char **wcprop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool)
{
- return prop_path_internal (wcprop_path, path, adm_access,
+ return prop_path_internal (wcprop_path, path, kind,
prop_path_kind_wcprop, tmp, pool);
}
@@ -438,11 +435,11 @@
svn_error_t *
svn_wc__prop_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool)
{
- return prop_path_internal (prop_path, path, adm_access,
+ return prop_path_internal (prop_path, path, kind,
prop_path_kind_working, tmp, pool);
}
@@ -450,11 +447,11 @@
svn_error_t *
svn_wc__prop_base_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool)
{
- return prop_path_internal (prop_path, path, adm_access,
+ return prop_path_internal (prop_path, path, kind,
prop_path_kind_base, tmp, pool);
}
@@ -462,11 +459,11 @@
svn_error_t *
svn_wc__prop_revert_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool)
{
- return prop_path_internal (prop_path, path, adm_access,
+ return prop_path_internal (prop_path, path, kind,
prop_path_kind_revert, tmp, pool);
}
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 17105)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -1283,9 +1283,9 @@
const char *pristine_prop_path;
/* Get the current pristine props. */
- old_pristine_props = apr_hash_make (db->pool);
+ old_pristine_props = apr_hash_make (db->pool);
SVN_ERR (svn_wc__prop_base_path (&pristine_prop_path,
- db->path, adm_access,
+ db->path, svn_node_dir,
FALSE, db->pool));
SVN_ERR (svn_wc__load_prop_file (pristine_prop_path,
old_pristine_props, db->pool));
@@ -1914,9 +1914,9 @@
int i;
/* Get the current pristine props. */
- old_pristine_props = apr_hash_make (pool);
+ old_pristine_props = apr_hash_make (pool);
SVN_ERR (svn_wc__prop_base_path (&pristine_prop_path,
- file_path, adm_access,
+ file_path, svn_node_file,
FALSE, pool));
SVN_ERR (svn_wc__load_prop_file (pristine_prop_path,
old_pristine_props, pool));
@@ -2880,10 +2880,10 @@
svn_node_kind_t kind;
SVN_ERR (svn_wc__prop_revert_path (&dst_rprop, base_name,
- adm_access, FALSE, pool));
+ svn_node_file, FALSE, pool));
SVN_ERR (svn_wc__prop_base_path (&dst_bprop, base_name,
- adm_access, FALSE, pool));
+ svn_node_file, FALSE, pool));
SVN_ERR (svn_wc__loggy_move (&log_accum, NULL,
adm_access, dst_txtb, dst_rtext,
@@ -2935,7 +2935,7 @@
SVN_ERR (svn_wc__save_prop_file (tmp_prop_path, new_props, pool));
/* Rename temporary props file to working props. */
- SVN_ERR (svn_wc__prop_path (&prop_path, base_name, adm_access,
+ SVN_ERR (svn_wc__prop_path (&prop_path, base_name, svn_node_file,
FALSE, pool));
SVN_ERR (svn_wc__loggy_move (&log_accum, NULL, adm_access,
tmp_prop_path + adm_path_len, prop_path,
Index: subversion/libsvn_wc/adm_files.h
===================================================================
--- subversion/libsvn_wc/adm_files.h (revision 17105)
+++ subversion/libsvn_wc/adm_files.h (working copy)
@@ -80,10 +80,10 @@
/* Return a path to the 'wcprop' file for PATH, possibly in TMP area.
- ADM_ACCESS is an access baton set that contains PATH. */
+ Valid values for KIND are svn_node_dir and svn_node_file. */
svn_error_t *svn_wc__wcprop_path (const char **wcprop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool);
@@ -91,11 +91,11 @@
/* Set *PROP_PATH to PATH's working properties file.
If TMP is set, return a path to the tmp working property file.
PATH can be a directory or file, and even have changed w.r.t. the
- working copy's adm knowledge. ADM_ACCESS is an access baton set
- that contains PATH. */
+ working copy's adm knowledge. Valid values for KIND are svn_node_dir
+ and svn_node_file. */
svn_error_t *svn_wc__prop_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool);
@@ -103,11 +103,11 @@
/* Set *PROP_PATH to PATH's `pristine' properties file.
If TMP is set, return a path to the tmp working property file.
PATH can be a directory or file, and even have changed w.r.t. the
- working copy's adm knowledge. ADM_ACCESS is an access baton set
- that contains PATH. */
+ working copy's adm knowledge. Valid values for KIND are svn_node_dir
+ and svn_node_file. */
svn_error_t *svn_wc__prop_base_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool);
@@ -115,11 +115,11 @@
/* Set *PROP_PATH to PATH's revert properties file.
If TMP is set, return a path to the tmp working property file.
PATH can be a directory or file, and even have changed w.r.t. the
- working copy's adm knowledge. ADM_ACCESS is an access baton set
- that contains PATH. */
+ working copy's adm knowledge. Valid values for KIND are svn_node_dir
+ and svn_node_file. */
svn_error_t *svn_wc__prop_revert_path (const char **prop_path,
const char *path,
- svn_wc_adm_access_t *adm_access,
+ svn_node_kind_t kind,
svn_boolean_t tmp,
apr_pool_t *pool);
Index: subversion/libsvn_wc/questions.c
===================================================================
--- subversion/libsvn_wc/questions.c (revision 17105)
+++ subversion/libsvn_wc/questions.c (working copy)
@@ -182,7 +182,7 @@
{
const char *prop_path;
- SVN_ERR (svn_wc__prop_path (&prop_path, path, adm_access, FALSE, pool));
+ SVN_ERR (svn_wc__prop_path (&prop_path, path, entry->kind, FALSE, pool));
SVN_ERR (svn_io_file_affected_time (&wfile_time, prop_path, pool));
entrytime = entry->prop_time;
}
Index: subversion/tests/clients/cmdline/revert_tests.py
===================================================================
--- subversion/tests/clients/cmdline/revert_tests.py (revision 17105)
+++ subversion/tests/clients/cmdline/revert_tests.py (working copy)
@@ -522,7 +522,7 @@
# list all tests here, starting with None:
test_list = [ None,
- XFail(revert_from_wc_root),
+ revert_from_wc_root,
XFail(revert_reexpand_keyword),
revert_replaced_file_without_props,
XFail(revert_moved_file),
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic