You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/08/02 21:09:24 UTC
svn commit: r1368653 [2/4] - in /subversion/branches/master-passphrase: ./
contrib/client-side/svn-push/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/swig/ subversion/bindings/swig/...
Modified: subversion/branches/master-passphrase/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_repos/log.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_repos/log.c Thu Aug 2 19:09:21 2012
@@ -1177,7 +1177,7 @@ send_log(svn_revnum_t rev,
{
const char *mergeinfo_path =
svn__apr_hash_index_key(hi2);
- apr_array_header_t *rangelist =
+ svn_rangelist_t *rangelist =
svn__apr_hash_index_val(hi2);
/* Check whether CHANGED_PATH at revision REV is a child of
@@ -1397,7 +1397,7 @@ struct path_list_range
the paths can be accessed by revision. */
struct rangelist_path
{
- apr_array_header_t *rangelist;
+ svn_rangelist_t *rangelist;
const char *path;
};
@@ -1735,8 +1735,8 @@ reduce_search(apr_array_header_t *paths,
for (i = 0; i < paths->nelts; ++i)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
- apr_array_header_t *ranges = apr_hash_get(processed, path,
- APR_HASH_KEY_STRING);
+ svn_rangelist_t *ranges = apr_hash_get(processed, path,
+ APR_HASH_KEY_STRING);
int j;
if (!ranges)
@@ -1807,8 +1807,8 @@ store_search(svn_mergeinfo_t processed,
for (i = 0; i < paths->nelts; ++i)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
- apr_array_header_t *ranges = apr_array_make(processed_pool, 1,
- sizeof(svn_merge_range_t*));
+ svn_rangelist_t *ranges = apr_array_make(processed_pool, 1,
+ sizeof(svn_merge_range_t*));
svn_merge_range_t *range = apr_palloc(processed_pool,
sizeof(svn_merge_range_t));
Modified: subversion/branches/master-passphrase/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_repos/rev_hunt.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_repos/rev_hunt.c Thu Aug 2 19:09:21 2012
@@ -1291,7 +1291,7 @@ find_merged_revisions(apr_array_header_t
hi = apr_hash_next(hi))
{
apr_pool_t *iterpool3;
- apr_array_header_t *rangelist;
+ svn_rangelist_t *rangelist;
const char *path;
int j;
Modified: subversion/branches/master-passphrase/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_subr/deprecated.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_subr/deprecated.c Thu Aug 2 19:09:21 2012
@@ -1073,8 +1073,8 @@ svn_mergeinfo_inheritable(svn_mergeinfo_
}
svn_error_t *
-svn_rangelist_inheritable(apr_array_header_t **inheritable_rangelist,
- const apr_array_header_t *rangelist,
+svn_rangelist_inheritable(svn_rangelist_t **inheritable_rangelist,
+ const svn_rangelist_t *rangelist,
svn_revnum_t start,
svn_revnum_t end,
apr_pool_t *pool)
@@ -1086,8 +1086,8 @@ svn_rangelist_inheritable(apr_array_head
}
svn_error_t *
-svn_rangelist_merge(apr_array_header_t **rangelist,
- const apr_array_header_t *changes,
+svn_rangelist_merge(svn_rangelist_t **rangelist,
+ const svn_rangelist_t *changes,
apr_pool_t *pool)
{
return svn_error_trace(svn_rangelist_merge2(*rangelist, changes,
Modified: subversion/branches/master-passphrase/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_subr/mergeinfo.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_subr/mergeinfo.c Thu Aug 2 19:09:21 2012
@@ -243,7 +243,7 @@ get_type_of_intersection(const svn_merge
*/
static svn_error_t *
combine_with_lastrange(const svn_merge_range_t *new_range,
- apr_array_header_t *rangelist,
+ svn_rangelist_t *rangelist,
svn_boolean_t consider_inheritance,
apr_pool_t *result_pool)
{
@@ -491,7 +491,7 @@ range_to_string(const svn_merge_range_t
*/
static svn_error_t *
parse_rangelist(const char **input, const char *end,
- apr_array_header_t *rangelist,
+ svn_rangelist_t *rangelist,
apr_pool_t *pool)
{
const char *curr = *input;
@@ -599,7 +599,7 @@ parse_rangelist(const char **input, cons
}
svn_error_t *
-svn_rangelist__parse(apr_array_header_t **rangelist,
+svn_rangelist__parse(svn_rangelist_t **rangelist,
const char *str,
apr_pool_t *result_pool)
{
@@ -616,9 +616,9 @@ parse_revision_line(const char **input,
apr_pool_t *scratch_pool)
{
const char *pathname = "";
- apr_array_header_t *existing_rangelist;
- apr_array_header_t *rangelist = apr_array_make(scratch_pool, 1,
- sizeof(svn_merge_range_t *));
+ svn_rangelist_t *existing_rangelist;
+ svn_rangelist_t *rangelist = apr_array_make(scratch_pool, 1,
+ sizeof(svn_merge_range_t *));
SVN_ERR(parse_pathname(input, end, &pathname, scratch_pool));
@@ -767,7 +767,7 @@ svn_mergeinfo_parse(svn_mergeinfo_t *mer
Any new elements inserted into RANGELIST are allocated in RESULT_POOL.*/
static void
-adjust_remaining_ranges(apr_array_header_t *rangelist,
+adjust_remaining_ranges(svn_rangelist_t *rangelist,
int *range_index,
apr_pool_t *result_pool)
{
@@ -911,8 +911,8 @@ adjust_remaining_ranges(apr_array_header
}
svn_error_t *
-svn_rangelist_merge2(apr_array_header_t *rangelist,
- const apr_array_header_t *changes,
+svn_rangelist_merge2(svn_rangelist_t *rangelist,
+ const svn_rangelist_t *changes,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1187,7 +1187,7 @@ range_swap_endpoints(svn_merge_range_t *
}
svn_error_t *
-svn_rangelist_reverse(apr_array_header_t *rangelist, apr_pool_t *pool)
+svn_rangelist_reverse(svn_rangelist_t *rangelist, apr_pool_t *pool)
{
int i, swap_index;
svn_merge_range_t range;
@@ -1213,7 +1213,7 @@ svn_rangelist_reverse(apr_array_header_t
}
void
-svn_rangelist__set_inheritance(apr_array_header_t *rangelist,
+svn_rangelist__set_inheritance(svn_rangelist_t *rangelist,
svn_boolean_t inheritable)
{
if (rangelist)
@@ -1243,7 +1243,7 @@ svn_mergeinfo__set_inheritance(svn_merge
hi;
hi = apr_hash_next(hi))
{
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
if (rangelist)
svn_rangelist__set_inheritance(rangelist, inheritable);
@@ -1263,7 +1263,7 @@ svn_mergeinfo__set_inheritance(svn_merge
If CONSIDER_INHERITANCE is true, then take the inheritance of the
ranges in RANGELIST1 and RANGELIST2 into account when comparing them
- for intersection, see the doc string for svn_rangelist_intersection().
+ for intersection, see the doc string for svn_rangelist_intersect().
If CONSIDER_INHERITANCE is false, then ranges with differing inheritance
may intersect, but the resulting intersection is non-inheritable only
@@ -1285,9 +1285,9 @@ svn_mergeinfo__set_inheritance(svn_merge
Allocate the contents of *OUTPUT in POOL. */
static svn_error_t *
-rangelist_intersect_or_remove(apr_array_header_t **output,
- const apr_array_header_t *rangelist1,
- const apr_array_header_t *rangelist2,
+rangelist_intersect_or_remove(svn_rangelist_t **output,
+ const svn_rangelist_t *rangelist1,
+ const svn_rangelist_t *rangelist2,
svn_boolean_t do_remove,
svn_boolean_t consider_inheritance,
apr_pool_t *pool)
@@ -1469,9 +1469,9 @@ rangelist_intersect_or_remove(apr_array_
svn_error_t *
-svn_rangelist_intersect(apr_array_header_t **output,
- const apr_array_header_t *rangelist1,
- const apr_array_header_t *rangelist2,
+svn_rangelist_intersect(svn_rangelist_t **output,
+ const svn_rangelist_t *rangelist1,
+ const svn_rangelist_t *rangelist2,
svn_boolean_t consider_inheritance,
apr_pool_t *pool)
{
@@ -1480,9 +1480,9 @@ svn_rangelist_intersect(apr_array_header
}
svn_error_t *
-svn_rangelist_remove(apr_array_header_t **output,
- const apr_array_header_t *eraser,
- const apr_array_header_t *whiteboard,
+svn_rangelist_remove(svn_rangelist_t **output,
+ const svn_rangelist_t *eraser,
+ const svn_rangelist_t *whiteboard,
svn_boolean_t consider_inheritance,
apr_pool_t *pool)
{
@@ -1491,8 +1491,8 @@ svn_rangelist_remove(apr_array_header_t
}
svn_error_t *
-svn_rangelist_diff(apr_array_header_t **deleted, apr_array_header_t **added,
- const apr_array_header_t *from, const apr_array_header_t *to,
+svn_rangelist_diff(svn_rangelist_t **deleted, svn_rangelist_t **added,
+ const svn_rangelist_t *from, const svn_rangelist_t *to,
svn_boolean_t consider_inheritance,
apr_pool_t *pool)
{
@@ -1553,12 +1553,12 @@ mergeinfo_hash_diff_cb(const void *key,
/* hash_a is FROM mergeinfo,
hash_b is TO mergeinfo. */
struct mergeinfo_diff_baton *cb = baton;
- apr_array_header_t *from_rangelist, *to_rangelist;
+ svn_rangelist_t *from_rangelist, *to_rangelist;
const char *path = key;
if (status == svn_hash_diff_key_both)
{
/* Record any deltas (additions or deletions). */
- apr_array_header_t *deleted_rangelist, *added_rangelist;
+ svn_rangelist_t *deleted_rangelist, *added_rangelist;
from_rangelist = apr_hash_get(cb->from, path, APR_HASH_KEY_STRING);
to_rangelist = apr_hash_get(cb->to, path, APR_HASH_KEY_STRING);
SVN_ERR(svn_rangelist_diff(&deleted_rangelist, &added_rangelist,
@@ -1696,7 +1696,7 @@ svn_mergeinfo_merge2(svn_mergeinfo_t mer
if (res == 0)
{
- apr_array_header_t *rl1, *rl2;
+ svn_rangelist_t *rl1, *rl2;
rl1 = elt1.value;
rl2 = elt2.value;
@@ -1814,8 +1814,8 @@ svn_mergeinfo_intersect2(svn_mergeinfo_t
hi; hi = apr_hash_next(hi))
{
const char *path = svn__apr_hash_index_key(hi);
- apr_array_header_t *rangelist1 = svn__apr_hash_index_val(hi);
- apr_array_header_t *rangelist2;
+ svn_rangelist_t *rangelist1 = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist2;
svn_pool_clear(iterpool);
rangelist2 = apr_hash_get(mergeinfo2, path, APR_HASH_KEY_STRING);
@@ -1850,7 +1850,7 @@ svn_mergeinfo_remove2(svn_mergeinfo_t *m
svn_error_t *
svn_rangelist_to_string(svn_string_t **output,
- const apr_array_header_t *rangelist,
+ const svn_rangelist_t *rangelist,
apr_pool_t *pool)
{
svn_stringbuf_t *buf = svn_stringbuf_create_empty(pool);
@@ -1977,7 +1977,7 @@ svn_mergeinfo_dup(svn_mergeinfo_t mergei
{
const char *path = svn__apr_hash_index_key(hi);
apr_ssize_t pathlen = svn__apr_hash_index_klen(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
apr_hash_set(new_mergeinfo, apr_pstrmemdup(pool, path, pathlen), pathlen,
svn_rangelist_dup(rangelist, pool));
@@ -2005,8 +2005,8 @@ svn_mergeinfo_inheritable2(svn_mergeinfo
{
const char *key = svn__apr_hash_index_key(hi);
apr_ssize_t keylen = svn__apr_hash_index_klen(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
- apr_array_header_t *inheritable_rangelist;
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *inheritable_rangelist;
if (!path || svn_path_compare_paths(path, key) == 0)
SVN_ERR(svn_rangelist_inheritable2(&inheritable_rangelist, rangelist,
@@ -2028,8 +2028,8 @@ svn_mergeinfo_inheritable2(svn_mergeinfo
svn_error_t *
-svn_rangelist_inheritable2(apr_array_header_t **inheritable_rangelist,
- const apr_array_header_t *rangelist,
+svn_rangelist_inheritable2(svn_rangelist_t **inheritable_rangelist,
+ const svn_rangelist_t *rangelist,
svn_revnum_t start,
svn_revnum_t end,
svn_boolean_t inheritable,
@@ -2066,7 +2066,7 @@ svn_rangelist_inheritable2(apr_array_hea
{
/* We want only the non-inheritable ranges bound by START
and END removed. */
- apr_array_header_t *ranges_inheritable =
+ svn_rangelist_t *ranges_inheritable =
svn_rangelist__initialize(start, end, inheritable, scratch_pool);
if (rangelist->nelts)
@@ -2092,7 +2092,7 @@ svn_mergeinfo__remove_empty_rangelists(s
for (hi = apr_hash_first(pool, mergeinfo); hi; hi = apr_hash_next(hi))
{
const char *path = svn__apr_hash_index_key(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
if (rangelist->nelts == 0)
{
@@ -2208,7 +2208,7 @@ svn_mergeinfo__add_suffix_to_mergeinfo(s
hi = apr_hash_next(hi))
{
const char *fspath = svn__apr_hash_index_key(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
apr_hash_set(*out_mergeinfo,
svn_fspath__join(fspath, suffix_relpath, result_pool),
@@ -2219,11 +2219,11 @@ svn_mergeinfo__add_suffix_to_mergeinfo(s
return SVN_NO_ERROR;
}
-apr_array_header_t *
-svn_rangelist_dup(const apr_array_header_t *rangelist, apr_pool_t *pool)
+svn_rangelist_t *
+svn_rangelist_dup(const svn_rangelist_t *rangelist, apr_pool_t *pool)
{
- apr_array_header_t *new_rl = apr_array_make(pool, rangelist->nelts,
- sizeof(svn_merge_range_t *));
+ svn_rangelist_t *new_rl = apr_array_make(pool, rangelist->nelts,
+ sizeof(svn_merge_range_t *));
int i;
for (i = 0; i < rangelist->nelts; i++)
@@ -2362,7 +2362,7 @@ svn_mergeinfo__get_range_endpoints(svn_r
for (hi = apr_hash_first(pool, mergeinfo); hi; hi = apr_hash_next(hi))
{
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
if (rangelist->nelts)
{
@@ -2438,7 +2438,7 @@ svn_mergeinfo__filter_mergeinfo_by_range
if (mergeinfo)
{
apr_hash_index_t *hi;
- apr_array_header_t *filter_rangelist =
+ svn_rangelist_t *filter_rangelist =
svn_rangelist__initialize(oldest_rev, youngest_rev, TRUE,
scratch_pool);
@@ -2447,11 +2447,11 @@ svn_mergeinfo__filter_mergeinfo_by_range
hi = apr_hash_next(hi))
{
const char *path = svn__apr_hash_index_key(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
if (rangelist->nelts)
{
- apr_array_header_t *new_rangelist;
+ svn_rangelist_t *new_rangelist;
SVN_ERR(rangelist_intersect_or_remove(
&new_rangelist, filter_rangelist, rangelist,
@@ -2486,8 +2486,8 @@ svn_mergeinfo__adjust_mergeinfo_rangelis
{
int i;
const char *path = svn__apr_hash_index_key(hi);
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
- apr_array_header_t *adjusted_rangelist =
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *adjusted_rangelist =
apr_array_make(result_pool, rangelist->nelts,
sizeof(svn_merge_range_t *));
@@ -2532,7 +2532,7 @@ svn_mergeinfo__is_noninheritable(svn_mer
hi;
hi = apr_hash_next(hi))
{
- apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
int i;
for (i = 0; i < rangelist->nelts; i++)
@@ -2547,13 +2547,13 @@ svn_mergeinfo__is_noninheritable(svn_mer
return FALSE;
}
-apr_array_header_t *
+svn_rangelist_t *
svn_rangelist__initialize(svn_revnum_t start,
svn_revnum_t end,
svn_boolean_t inheritable,
apr_pool_t *result_pool)
{
- apr_array_header_t *rangelist =
+ svn_rangelist_t *rangelist =
apr_array_make(result_pool, 1, sizeof(svn_merge_range_t *));
svn_merge_range_t *range = apr_pcalloc(result_pool, sizeof(*range));
@@ -2577,7 +2577,7 @@ svn_mergeinfo__mergeinfo_from_segments(s
{
svn_location_segment_t *segment =
APR_ARRAY_IDX(segments, i, svn_location_segment_t *);
- apr_array_header_t *path_ranges;
+ svn_rangelist_t *path_ranges;
svn_merge_range_t *range;
const char *source_path;
@@ -2615,7 +2615,7 @@ svn_mergeinfo__mergeinfo_from_segments(s
}
svn_error_t *
-svn_rangelist__merge_many(apr_array_header_t *merged_rangelist,
+svn_rangelist__merge_many(svn_rangelist_t *merged_rangelist,
svn_mergeinfo_t merge_history,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -2629,7 +2629,7 @@ svn_rangelist__merge_many(apr_array_head
hi;
hi = apr_hash_next(hi))
{
- apr_array_header_t *subtree_rangelist = svn__apr_hash_index_val(hi);
+ svn_rangelist_t *subtree_rangelist = svn__apr_hash_index_val(hi);
svn_pool_clear(iterpool);
SVN_ERR(svn_rangelist_merge2(merged_rangelist, subtree_rangelist,
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/adm_files.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/adm_files.c Thu Aug 2 19:09:21 2012
@@ -528,23 +528,22 @@ svn_wc__adm_destroy(svn_wc__db_t *db,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- const char *adm_abspath;
+ svn_boolean_t is_wcroot;
SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
- SVN_ERR(svn_wc__db_get_wcroot(&adm_abspath, db, dir_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, dir_abspath, scratch_pool));
/* Well, the coast is clear for blowing away the administrative
directory, which also removes remaining locks */
/* Now close the DB, and we can delete the working copy */
- if (strcmp(adm_abspath, dir_abspath) == 0)
+ if (is_wcroot)
{
- SVN_ERR(svn_wc__db_drop_root(db, adm_abspath, scratch_pool));
- SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(adm_abspath, NULL,
+ SVN_ERR(svn_wc__db_drop_root(db, dir_abspath, scratch_pool));
+ SVN_ERR(svn_io_remove_dir2(svn_wc__adm_child(dir_abspath, NULL,
scratch_pool),
FALSE,
cancel_func, cancel_baton,
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/adm_ops.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/adm_ops.c Thu Aug 2 19:09:21 2012
@@ -109,11 +109,19 @@ svn_wc__get_committed_queue_pool(const s
* - queue deletion of the old pristine texts by the remembered checksums.
*
* CHECKSUM is the checksum of the new text base for LOCAL_ABSPATH, and must
- * be provided if there is one, else NULL. */
+ * be provided if there is one, else NULL.
+ *
+ * STATUS, KIND, PROP_MODS and OLD_CHECKSUM are the current in-db values of
+ * the node LOCAL_ABSPATH.
+ */
static svn_error_t *
process_committed_leaf(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t via_recurse,
+ svn_wc__db_status_t status,
+ svn_kind_t kind,
+ svn_boolean_t prop_mods,
+ const svn_checksum_t *old_checksum,
svn_revnum_t new_revnum,
apr_time_t new_changed_date,
const char *new_changed_author,
@@ -123,26 +131,11 @@ process_committed_leaf(svn_wc__db_t *db,
const svn_checksum_t *checksum,
apr_pool_t *scratch_pool)
{
- svn_wc__db_status_t status;
- svn_kind_t kind;
- const svn_checksum_t *copied_checksum;
svn_revnum_t new_changed_rev = new_revnum;
- svn_boolean_t have_base;
- svn_boolean_t have_work;
- svn_boolean_t had_props;
- svn_boolean_t prop_mods;
svn_skel_t *work_item = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, &copied_checksum,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, &had_props, &prop_mods,
- &have_base, NULL, &have_work,
- db, local_abspath,
- scratch_pool, scratch_pool));
-
{
const char *adm_abspath;
@@ -156,11 +149,12 @@ process_committed_leaf(svn_wc__db_t *db,
if (status == svn_wc__db_status_deleted)
{
return svn_error_trace(
- svn_wc__db_op_remove_node(
+ svn_wc__db_base_remove(
db, local_abspath,
- (have_base && !via_recurse)
+ FALSE /* keep_as_working */,
+ (! via_recurse)
? new_revnum : SVN_INVALID_REVNUM,
- kind,
+ NULL, NULL,
scratch_pool));
}
else if (status == svn_wc__db_status_not_present)
@@ -187,9 +181,9 @@ process_committed_leaf(svn_wc__db_t *db,
{
/* It was copied and not modified. We must have a text
base for it. And the node should have a checksum. */
- SVN_ERR_ASSERT(copied_checksum != NULL);
+ SVN_ERR_ASSERT(old_checksum != NULL);
- checksum = copied_checksum;
+ checksum = old_checksum;
/* Is the node completely unmodified and are we recursing? */
if (via_recurse && !prop_mods)
@@ -251,26 +245,41 @@ svn_wc__process_committed_internal(svn_w
const svn_wc_committed_queue_t *queue,
apr_pool_t *scratch_pool)
{
+ svn_wc__db_status_t status;
svn_kind_t kind;
+ const svn_checksum_t *old_checksum;
+ svn_boolean_t prop_mods;
+
+ SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, &old_checksum, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, &prop_mods, NULL, NULL, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
/* NOTE: be wary of making crazy semantic changes in this function, since
svn_wc_process_committed4() calls this. */
SVN_ERR(process_committed_leaf(db, local_abspath, !top_of_recurse,
+ status, kind, prop_mods, old_checksum,
new_revnum, new_date, rev_author,
new_dav_cache,
no_unlock, keep_changelist,
sha1_checksum,
scratch_pool));
- /* Only check kind after processing the node itself. The node might
- have been deleted */
- SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
- TRUE /* allow_missing */,
- TRUE /* show_hidden */,
- scratch_pool));
+ /* Only check for recursion on nodes that have children */
+ if (kind != svn_kind_file
+ || status == svn_wc__db_status_not_present
+ || status == svn_wc__db_status_excluded
+ || status == svn_wc__db_status_server_excluded
+ /* Node deleted -> then no longer a directory */
+ || status == svn_wc__db_status_deleted)
+ {
+ return SVN_NO_ERROR;
+ }
- if (recurse && kind == svn_kind_dir)
+ if (recurse)
{
const apr_array_header_t *children;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -285,38 +294,17 @@ svn_wc__process_committed_internal(svn_w
{
const char *name = APR_ARRAY_IDX(children, i, const char *);
const char *this_abspath;
- svn_wc__db_status_t status;
+ const committed_queue_item_t *cqi;
svn_pool_clear(iterpool);
this_abspath = svn_dirent_join(local_abspath, name, iterpool);
- SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- db, this_abspath,
- iterpool, iterpool));
-
- /* We come to this branch since we have committed a copied tree.
- svn_depth_exclude is possible in this situation. So check and
- skip */
- if (status == svn_wc__db_status_excluded)
- continue;
-
sha1_checksum = NULL;
- if (kind != svn_kind_dir && queue != NULL)
- {
- const committed_queue_item_t *cqi;
+ cqi = apr_hash_get(queue->queue, this_abspath, APR_HASH_KEY_STRING);
- cqi = apr_hash_get(queue->queue, this_abspath,
- APR_HASH_KEY_STRING);
- if (cqi != NULL)
- {
- sha1_checksum = cqi->sha1_checksum;
- }
- }
+ if (cqi != NULL)
+ sha1_checksum = cqi->sha1_checksum;
/* Recurse. Pass NULL for NEW_DAV_CACHE, because the
ones present in the current call are only applicable to
@@ -653,8 +641,8 @@ create_delete_wq_items(svn_skel_t **work
SVN_ERR(svn_wc__wq_build_file_remove(&work_item, db,
local_abspath,
marker_abspath,
- scratch_pool,
- result_pool));
+ result_pool,
+ scratch_pool));
*work_items = svn_wc__wq_merge(*work_items, work_item,
result_pool);
@@ -1964,12 +1952,14 @@ revert_internal(svn_wc__db_t *db,
when local_abspath is the working copy root. */
{
const char *dir_abspath;
+ svn_boolean_t is_wcroot;
- SVN_ERR(svn_wc__db_get_wcroot(&dir_abspath, db, local_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, scratch_pool));
- if (svn_dirent_is_child(dir_abspath, local_abspath, NULL))
+ if (! is_wcroot)
dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+ else
+ dir_abspath = local_abspath;
SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
}
@@ -2322,214 +2312,68 @@ svn_error_t *
svn_wc__internal_remove_from_revision_control(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t destroy_wf,
- svn_boolean_t instant_error,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- svn_error_t *err;
svn_boolean_t left_something = FALSE;
- svn_wc__db_status_t status;
- svn_kind_t kind;
-
- /* ### This whole function should be rewritten to run inside a transaction,
- ### to allow a stable cancel behavior.
- ###
- ### Subversion < 1.7 marked the directory as incomplete to allow updating
- ### it from a canceled state. But this would not work because update
- ### doesn't retrieve deleted items.
- ###
- ### WC-NG doesn't support a delete+incomplete state, but we can't build
- ### transactions over multiple databases yet. */
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+ svn_boolean_t is_root;
+ svn_error_t *err = NULL;
- /* Check cancellation here, so recursive calls get checked early. */
- if (cancel_func)
- SVN_ERR(cancel_func(cancel_baton));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_root, db, local_abspath, scratch_pool));
- SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- db, local_abspath, scratch_pool, scratch_pool));
-
- if (kind == svn_kind_file || kind == svn_kind_symlink)
- {
- svn_boolean_t text_modified_p = FALSE;
-
- if (instant_error || destroy_wf)
- {
- svn_node_kind_t on_disk;
- SVN_ERR(svn_io_check_path(local_abspath, &on_disk, scratch_pool));
- if (on_disk == svn_node_file)
- {
- /* Check for local mods. before removing entry */
- SVN_ERR(svn_wc__internal_file_modified_p(&text_modified_p, db,
- local_abspath, FALSE,
- scratch_pool));
- if (text_modified_p && instant_error)
- return svn_error_createf(SVN_ERR_WC_LEFT_LOCAL_MOD, NULL,
- _("File '%s' has local modifications"),
- svn_dirent_local_style(local_abspath, scratch_pool));
- }
- }
+ SVN_ERR(svn_wc__db_op_remove_node(&left_something,
+ db, local_abspath,
+ destroy_wf /* destroy_wc */,
+ destroy_wf /* destroy_changes */,
+ SVN_INVALID_REVNUM,
+ svn_wc__db_status_not_present,
+ svn_kind_none,
+ NULL, NULL,
+ cancel_func, cancel_baton,
+ scratch_pool));
- /* Remove NAME from DB */
- SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
- SVN_INVALID_REVNUM,
- svn_kind_unknown,
- scratch_pool));
-
- /* If we were asked to destroy the working file, do so unless
- it has local mods. */
- if (destroy_wf)
- {
- /* Don't kill local mods. */
- if (text_modified_p)
- return svn_error_create(SVN_ERR_WC_LEFT_LOCAL_MOD, NULL, NULL);
- else /* The working file is still present; remove it. */
- SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
- }
+ SVN_ERR(svn_wc__wq_run(db, local_abspath,
+ cancel_func, cancel_baton,
+ scratch_pool));
- } /* done with file case */
- else /* looking at THIS_DIR */
+ if (is_root)
{
- apr_pool_t *iterpool = svn_pool_create(scratch_pool);
- const apr_array_header_t *children;
- int i;
-
- /* ### sanity check: check 2 places for DELETED flag? */
-
- /* Walk over every entry. */
- SVN_ERR(svn_wc__db_read_children(&children, db, local_abspath,
- scratch_pool, iterpool));
-
- for (i = 0; i < children->nelts; i++)
- {
- const char *node_name = APR_ARRAY_IDX(children, i, const char*);
- const char *node_abspath;
- svn_wc__db_status_t node_status;
- svn_kind_t node_kind;
-
- svn_pool_clear(iterpool);
-
- node_abspath = svn_dirent_join(local_abspath, node_name, iterpool);
-
- SVN_ERR(svn_wc__db_read_info(&node_status, &node_kind, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
- db, node_abspath,
- iterpool, iterpool));
-
- if (node_status == svn_wc__db_status_normal
- && node_kind == svn_kind_dir)
- {
- svn_boolean_t is_root;
-
- SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL,
- db, node_abspath, iterpool));
-
- if (is_root)
- continue; /* Just skip working copies as obstruction */
- }
-
- if (node_status != svn_wc__db_status_normal
- && node_status != svn_wc__db_status_added
- && node_status != svn_wc__db_status_incomplete)
- {
- /* The node is already 'deleted', so nothing to do on
- versioned nodes */
- SVN_ERR(svn_wc__db_op_remove_node(db, node_abspath,
- SVN_INVALID_REVNUM,
- svn_kind_unknown,
- iterpool));
-
- continue;
- }
-
- err = svn_wc__internal_remove_from_revision_control(
- db, node_abspath,
- destroy_wf, instant_error,
- cancel_func, cancel_baton,
- iterpool);
-
- if (err && (err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD))
- {
- if (instant_error)
- return svn_error_trace(err);
- else
- {
- svn_error_clear(err);
- left_something = TRUE;
- }
- }
- else if (err)
- return svn_error_trace(err);
- }
-
- /* At this point, every directory below this one has been
- removed from revision control. */
-
- /* Remove self from parent's entries file, but only if parent is
- a working copy. If it's not, that's fine, we just move on. */
- {
- svn_boolean_t is_root;
-
- SVN_ERR(svn_wc__check_wc_root(&is_root, NULL, NULL,
- db, local_abspath, iterpool));
-
- /* If full_path is not the top of a wc, then its parent
- directory is also a working copy and has an entry for
- full_path. We need to remove that entry: */
- if (! is_root)
- {
- SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
- SVN_INVALID_REVNUM,
- svn_kind_unknown,
- iterpool));
- }
- else
- {
- /* Remove the entire administrative .svn area, thereby removing
- _this_ dir from revision control too. */
- SVN_ERR(svn_wc__adm_destroy(db, local_abspath,
- cancel_func, cancel_baton, iterpool));
- }
- }
-
- /* If caller wants us to recursively nuke everything on disk, go
- ahead, provided that there are no dangling local-mod files
- below */
- if (destroy_wf && (! left_something))
- {
- /* If the dir is *truly* empty (i.e. has no unversioned
- resources, all versioned files are gone, all .svn dirs are
- gone, and contains nothing but empty dirs), then a
- *non*-recursive dir_remove should work. If it doesn't,
- no big deal. Just assume there are unversioned items in
- there and set "left_something" */
- err = svn_io_dir_remove_nonrecursive(local_abspath, iterpool);
- if (err)
- {
- if (!APR_STATUS_IS_ENOENT(err->apr_err))
- left_something = TRUE;
- svn_error_clear(err);
- }
- }
-
- svn_pool_destroy(iterpool);
+ /* Destroy the administrative area */
+ SVN_ERR(svn_wc__adm_destroy(db, local_abspath, cancel_func, cancel_baton,
+ scratch_pool));
- } /* end of directory case */
+ /* And if we didn't leave something interesting, remove the directory */
+ if (!left_something && destroy_wf)
+ err = svn_io_dir_remove_nonrecursive(local_abspath, scratch_pool);
+ }
- if (left_something)
- return svn_error_create(SVN_ERR_WC_LEFT_LOCAL_MOD, NULL, NULL);
+ if (left_something || err)
+ return svn_error_create(SVN_ERR_WC_LEFT_LOCAL_MOD, err, NULL);
return SVN_NO_ERROR;
}
+/* Implements svn_wc_status_func4_t for svn_wc_remove_from_revision_control2 */
+static svn_error_t *
+remove_from_revision_status_callback(void *baton,
+ const char *local_abspath,
+ const svn_wc_status3_t *status,
+ apr_pool_t *scratch_pool)
+{
+ /* For legacy reasons we only check the file contents for changes */
+ if (status->versioned
+ && status->kind == svn_node_file
+ && (status->text_status == svn_wc_status_modified
+ || status->text_status == svn_wc_status_conflicted))
+ {
+ return svn_error_createf(SVN_ERR_WC_LEFT_LOCAL_MOD, NULL,
+ _("File '%s' has local modifications"),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+ }
+ return SVN_NO_ERROR;
+}
svn_error_t *
svn_wc_remove_from_revision_control2(svn_wc_context_t *wc_ctx,
@@ -2540,11 +2384,18 @@ svn_wc_remove_from_revision_control2(svn
void *cancel_baton,
apr_pool_t *scratch_pool)
{
+ if (instant_error)
+ {
+ SVN_ERR(svn_wc_walk_status(wc_ctx, local_abspath, svn_depth_infinity,
+ FALSE, FALSE, FALSE, NULL,
+ remove_from_revision_status_callback, NULL,
+ cancel_func, cancel_baton,
+ scratch_pool));
+ }
return svn_error_trace(
svn_wc__internal_remove_from_revision_control(wc_ctx->db,
local_abspath,
destroy_wf,
- instant_error,
cancel_func,
cancel_baton,
scratch_pool));
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/cleanup.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/cleanup.c Thu Aug 2 19:09:21 2012
@@ -142,7 +142,7 @@ cleanup_internal(svn_wc__db_t *db,
apr_pool_t *scratch_pool)
{
int wc_format;
- const char *cleanup_abspath;
+ svn_boolean_t is_wcroot;
/* Can we even work with this directory? */
SVN_ERR(can_be_cleaned(&wc_format, db, dir_abspath, scratch_pool));
@@ -157,8 +157,7 @@ cleanup_internal(svn_wc__db_t *db,
SVN_ERR(svn_wc__wq_run(db, dir_abspath, cancel_func, cancel_baton,
scratch_pool));
- SVN_ERR(svn_wc__db_get_wcroot(&cleanup_abspath, db, dir_abspath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, dir_abspath, scratch_pool));
#ifdef SVN_DEBUG
SVN_ERR(svn_wc__db_verify(db, dir_abspath, scratch_pool));
@@ -169,7 +168,7 @@ cleanup_internal(svn_wc__db_t *db,
svn_wc__check_wcroot() as that function, will just return true
once we start sharing databases with externals.
*/
- if (strcmp(cleanup_abspath, dir_abspath) == 0)
+ if (is_wcroot)
{
/* Cleanup the tmp area of the admin subdir, if running the log has not
removed it! The logs have been run, so anything left here has no hope
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c Thu Aug 2 19:09:21 2012
@@ -1155,7 +1155,7 @@ svn_wc__conflict_create_markers(svn_skel
SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
scratch_pool, scratch_pool));
else
- old_props = their_props;
+ old_props = their_original_props;
prop_data = prop_conflict_skel_new(result_pool);
@@ -1828,7 +1828,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
scratch_pool, scratch_pool));
else
- old_props = their_props;
+ old_props = old_their_props;
iterpool = svn_pool_create(scratch_pool);
@@ -2084,10 +2084,9 @@ svn_wc__read_conflicts(const apr_array_h
and clearing the conflict filenames from the entry. The latter needs to
be done whether or not the conflict files exist.
- PATH is the path to the item to be resolved, BASE_NAME is the basename
- of PATH, and CONFLICT_DIR is the access baton for PATH. ORIG_ENTRY is
- the entry prior to resolution. RESOLVE_TEXT and RESOLVE_PROPS are TRUE
- if text and property conflicts respectively are to be resolved.
+ LOCAL_ABSPATH in DB is the path to the item to be resolved.
+ RESOLVE_TEXT, RESOLVE_PROPS and RESOLVE_TREE are TRUE iff text, property
+ and tree conflicts respectively are to be resolved.
If this call marks any conflict as resolved, set *DID_RESOLVE to true,
else do not change *DID_RESOLVE.
@@ -2107,6 +2106,7 @@ resolve_conflict_on_node(svn_boolean_t *
apr_pool_t *scratch_pool)
{
svn_skel_t *conflicts;
+ svn_wc_operation_t operation;
svn_boolean_t text_conflicted;
svn_boolean_t prop_conflicted;
svn_boolean_t tree_conflicted;
@@ -2122,7 +2122,7 @@ resolve_conflict_on_node(svn_boolean_t *
if (!conflicts)
return SVN_NO_ERROR;
- SVN_ERR(svn_wc__conflict_read_info(NULL, NULL, &text_conflicted,
+ SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, &text_conflicted,
&prop_conflicted, &tree_conflicted,
db, local_abspath, conflicts,
scratch_pool, scratch_pool));
@@ -2265,12 +2265,87 @@ resolve_conflict_on_node(svn_boolean_t *
{
svn_node_kind_t node_kind;
const char *prop_reject_file;
+ apr_hash_t *mine_props;
+ apr_hash_t *their_old_props;
+ apr_hash_t *their_props;
+ apr_hash_t *conflicted_props;
+#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
+ apr_hash_t *old_props;
+ apr_hash_t *resolve_from = NULL;
+#endif
SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_file,
- NULL, NULL, NULL, NULL,
+ &mine_props, &their_old_props,
+ &their_props, &conflicted_props,
db, local_abspath, conflicts,
scratch_pool, scratch_pool));
+#if SVN_WC__VERSION >= SVN_WC__USES_CONFLICT_SKELS
+ if (operation == svn_wc_operation_merge)
+ SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+ else
+ old_props = their_old_props;
+
+ /* We currently handle *_conflict as *_full as this argument is currently
+ always applied for all conflicts on a node at the same time. Giving
+ an error would break some tests that assumed that this would just
+ resolve property conflicts to working.
+
+ An alternative way to handle these conflicts would be to just copy all
+ property state from mine/theirs on the _full option instead of just the
+ conflicted properties. In some ways this feels like a sensible option as
+ that would take both properties and text from mine/theirs, but when not
+ both properties and text are conflicted we would fail in doing so.
+ */
+ switch (conflict_choice)
+ {
+ case svn_wc_conflict_choose_base:
+ resolve_from = their_old_props ? their_old_props : old_props;
+ break;
+ case svn_wc_conflict_choose_mine_full:
+ case svn_wc_conflict_choose_mine_conflict:
+ resolve_from = mine_props;
+ break;
+ case svn_wc_conflict_choose_theirs_full:
+ case svn_wc_conflict_choose_theirs_conflict:
+ resolve_from = their_props;
+ break;
+ case svn_wc_conflict_choose_merged:
+ resolve_from = NULL;
+ break;
+ default:
+ return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
+ _("Invalid 'conflict_result' argument"));
+ }
+
+ if (conflicted_props && apr_hash_count(conflicted_props) && resolve_from)
+ {
+ apr_hash_index_t *hi;
+ apr_hash_t *actual_props;
+
+ SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
+ scratch_pool, scratch_pool));
+
+ for (hi = apr_hash_first(scratch_pool, conflicted_props);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *propname = svn__apr_hash_index_key(hi);
+ svn_string_t *new_value = NULL;
+
+ new_value = apr_hash_get(resolve_from, propname,
+ APR_HASH_KEY_STRING);
+
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
+ new_value);
+ }
+ SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, actual_props,
+ FALSE, NULL, NULL,
+ scratch_pool));
+ }
+#endif
+
/* Legacy behavior: Only report property conflicts as resolved when the
property reject file exists
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c Thu Aug 2 19:09:21 2012
@@ -31,24 +31,10 @@
#include "svn_path.h"
#include "wc.h"
+#include "workqueue.h"
#include "svn_private_config.h"
-/* Evaluate EXPR. If it returns an error, return that error, unless
- the error's code is SVN_ERR_WC_LEFT_LOCAL_MOD, in which case clear
- the error and do not return. */
-#define IGNORE_LOCAL_MOD(expr) \
- do { \
- svn_error_t *__temp = (expr); \
- if (__temp) \
- { \
- if (__temp->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD) \
- svn_error_clear(__temp); \
- else \
- return svn_error_trace(__temp); \
- } \
- } while (0)
-
/* Helper function that crops the children of the LOCAL_ABSPATH, under the
* constraint of NEW_DEPTH. The DIR_PATH itself will never be cropped. The
* whole subtree should have been locked.
@@ -121,29 +107,25 @@ crop_children(svn_wc__db_t *db,
? svn_depth_immediates
: svn_depth_files;
if (new_depth < remove_below)
- SVN_ERR(svn_wc__db_op_remove_node(db, local_abspath,
- SVN_INVALID_REVNUM,
- svn_kind_unknown,
- iterpool));
+ SVN_ERR(svn_wc__db_base_remove(db, local_abspath, FALSE,
+ SVN_INVALID_REVNUM,
+ NULL, NULL, iterpool));
continue;
}
else if (kind == svn_kind_file)
{
- /* We currently crop on a directory basis. So don't worry about
- svn_depth_exclude here. And even we permit excluding a single
- file in the future, svn_wc_remove_from_revision_control() can
- also handle it. We only need to skip the notification in that
- case. */
if (new_depth == svn_depth_empty)
- IGNORE_LOCAL_MOD(
- svn_wc__internal_remove_from_revision_control(
- db,
- child_abspath,
- TRUE, /* destroy */
- FALSE, /* instant error */
- cancel_func, cancel_baton,
- iterpool));
+ SVN_ERR(svn_wc__db_op_remove_node(NULL,
+ db, child_abspath,
+ TRUE /* destroy */,
+ FALSE /* destroy_changes */,
+ SVN_INVALID_REVNUM,
+ svn_wc__db_status_not_present,
+ svn_kind_none,
+ NULL, NULL,
+ cancel_func, cancel_baton,
+ iterpool));
else
continue;
@@ -152,15 +134,16 @@ crop_children(svn_wc__db_t *db,
{
if (new_depth < svn_depth_immediates)
{
- IGNORE_LOCAL_MOD(
- svn_wc__internal_remove_from_revision_control(
- db,
- child_abspath,
- TRUE, /* destroy */
- FALSE, /* instant error */
- cancel_func,
- cancel_baton,
- iterpool));
+ SVN_ERR(svn_wc__db_op_remove_node(NULL,
+ db, child_abspath,
+ TRUE /* destroy */,
+ FALSE /* destroy_changes */,
+ SVN_INVALID_REVNUM,
+ svn_wc__db_status_not_present,
+ svn_kind_none,
+ NULL, NULL,
+ cancel_func, cancel_baton,
+ iterpool));
}
else
{
@@ -272,27 +255,21 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
break; /* Ok to exclude */
}
- /* ### This could use some kind of transaction */
-
/* Remove all working copy data below local_abspath */
- IGNORE_LOCAL_MOD(svn_wc__internal_remove_from_revision_control(
- wc_ctx->db,
- local_abspath,
- TRUE,
- FALSE,
+ SVN_ERR(svn_wc__db_op_remove_node(NULL,
+ wc_ctx->db, local_abspath,
+ TRUE /* destroy */,
+ FALSE /* destroy_changes */,
+ revision,
+ svn_wc__db_status_excluded,
+ kind,
+ NULL, NULL,
cancel_func, cancel_baton,
scratch_pool));
- SVN_ERR(svn_wc__db_base_add_excluded_node(wc_ctx->db,
- local_abspath,
- repos_relpath,
- repos_root,
- repos_uuid,
- revision,
- kind,
- svn_wc__db_status_excluded,
- NULL, NULL,
- scratch_pool));
+ SVN_ERR(svn_wc__wq_run(wc_ctx->db, local_abspath,
+ cancel_func, cancel_baton,
+ scratch_pool));
if (notify_func)
{
@@ -372,7 +349,11 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
SVN_ERR_MALFUNCTION();
}
- return crop_children(db, local_abspath, dir_depth, depth,
- notify_func, notify_baton,
- cancel_func, cancel_baton, scratch_pool);
+ SVN_ERR(crop_children(db, local_abspath, dir_depth, depth,
+ notify_func, notify_baton,
+ cancel_func, cancel_baton, scratch_pool));
+
+ return svn_error_trace(svn_wc__wq_run(db, local_abspath,
+ cancel_func, cancel_baton,
+ scratch_pool));
}
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/externals.c Thu Aug 2 19:09:21 2012
@@ -1309,7 +1309,7 @@ svn_wc__external_remove(svn_wc_context_t
if (kind == svn_kind_dir)
SVN_ERR(svn_wc_remove_from_revision_control2(wc_ctx, local_abspath,
- TRUE, FALSE,
+ TRUE, TRUE,
cancel_func, cancel_baton,
scratch_pool));
else
@@ -1554,7 +1554,7 @@ svn_wc__resolve_relative_external_url(co
/* The remaining URLs are relative to either the scheme or server root
and can only refer to locations inside that scope, so backpaths are
not allowed. */
- if (svn_path_is_backpath_present(url + 2))
+ if (svn_path_is_backpath_present(url))
return svn_error_createf(SVN_ERR_BAD_URL, 0,
_("The external relative URL '%s' cannot have "
"backpaths, i.e. '..'"),
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/merge.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/merge.c Thu Aug 2 19:09:21 2012
@@ -241,13 +241,11 @@ detranslate_wc_file(const char **detrans
if (force_copy || keywords || eol || special)
{
- const char *wcroot_abspath, *temp_dir_abspath;
+ const char *temp_dir_abspath;
const char *detranslated;
/* Force a copy into the temporary wc area to avoid having
temporary files created below to appear in the actual wc. */
- SVN_ERR(svn_wc__db_get_wcroot(&wcroot_abspath, mt->db, mt->wri_abspath,
- scratch_pool, scratch_pool));
SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir_abspath, mt->db,
mt->wri_abspath,
scratch_pool, scratch_pool));
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/node.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/node.c Thu Aug 2 19:09:21 2012
@@ -1379,6 +1379,15 @@ svn_wc__internal_get_origin(svn_boolean_
return SVN_NO_ERROR; /* Local addition */
}
+ /* We don't know how the following error condition can be fulfilled
+ * but we have seen that happening in the wild. Better to create
+ * an error than a SEGFAULT. */
+ if (status == svn_wc__db_status_incomplete && !original_repos_relpath)
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("Incomplete copy information on path '%s'."),
+ svn_dirent_local_style(local_abspath,
+ scratch_pool));
+
*repos_relpath = svn_relpath_join(
original_repos_relpath,
svn_dirent_skip_ancestor(op_root_abspath,
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/props.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/props.c Thu Aug 2 19:09:21 2012
@@ -1207,7 +1207,7 @@ svn_wc__merge_props(svn_skel_t **conflic
*new_actual_props = NULL;
if (!server_baseprops)
- server_baseprops = pristine_props;
+ server_baseprops = apr_hash_copy(scratch_pool, pristine_props);
their_props = apr_hash_copy(scratch_pool, server_baseprops);
@@ -1227,7 +1227,9 @@ svn_wc__merge_props(svn_skel_t **conflic
const char *propname;
svn_boolean_t conflict_remains;
const svn_prop_t *incoming_change;
- const svn_string_t *from_val, *to_val, *base_val;
+ const svn_string_t *base_val; /* Pristine in WC */
+ const svn_string_t *from_val; /* Merge left */
+ const svn_string_t *to_val; /* Merge right */
svn_pool_clear(iterpool);
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c Thu Aug 2 19:09:21 2012
@@ -286,13 +286,6 @@ struct dir_baton
/* Absolute path of this directory */
const char *local_abspath;
- /* Absolute path to the new location of the directory if it was moved away,
- * and the op-root of the move operation.
- * This is set on the root of a move operation and all children.
- * If the directory was not moved away, this is NULL. */
- const char *moved_to_abspath;
- const char *moved_to_op_root_abspath;
-
/* The repository relative path this directory will correspond to. */
const char *new_relpath;
@@ -630,8 +623,6 @@ make_dir_baton(struct dir_baton **d_p,
d->adding_dir = adding;
d->changed_rev = SVN_INVALID_REVNUM;
d->not_present_files = apr_hash_make(dir_pool);
- d->moved_to_abspath = NULL;
- d->moved_to_op_root_abspath = NULL;
/* Copy some flags from the parent baton */
if (pb)
@@ -714,10 +705,6 @@ struct file_baton
/* Absolute path to this file */
const char *local_abspath;
- /* Absolute path to the new location of the file if it was moved away.
- * If the file was not moved away, this is NULL. */
- const char *moved_to_abspath;
-
/* The repository relative path this file will correspond to. */
const char *new_relpath;
@@ -1215,25 +1202,6 @@ open_root(void *edit_baton,
pool));
}
- /* Check if this directory was moved away. */
- err = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
- eb->db, db->local_abspath, pool, pool);
- if (err)
- {
- if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- svn_error_clear(err);
- else
- return svn_error_trace(err);
- }
- else if (status == svn_wc__db_status_deleted)
- SVN_ERR(svn_wc__db_scan_deletion(NULL, &db->moved_to_abspath, NULL,
- &db->moved_to_op_root_abspath,
- eb->db, db->local_abspath, db->pool, pool));
-
return SVN_NO_ERROR;
}
@@ -1386,7 +1354,6 @@ check_tree_conflict(svn_skel_t **pconfli
svn_kind_t working_kind,
svn_boolean_t exists_in_repos,
svn_wc_conflict_action_t action,
- const char *moved_to_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -1437,24 +1404,7 @@ check_tree_conflict(svn_skel_t **pconfli
case svn_wc__db_status_deleted:
- if (!moved_to_abspath)
- reason = svn_wc_conflict_reason_deleted;
- else if (action == svn_wc_conflict_action_delete)
- {
- svn_boolean_t all_edits_are_deletes = FALSE;
-
- /* The update wants to delete a node which was locally moved
- * away. We allow this only if the node wasn't modified post-move.
- * If the only post-move changes within a subtree are deletions,
- * allow the update to delete the entire subtree. */
- SVN_ERR(node_has_local_mods(&modified, &all_edits_are_deletes,
- TRUE, eb->db, moved_to_abspath,
- eb->cancel_func, eb->cancel_baton,
- scratch_pool));
-
- if (modified && !all_edits_are_deletes)
- reason = svn_wc_conflict_reason_moved_away_and_edited;
- }
+ reason = svn_wc_conflict_reason_deleted;
break;
case svn_wc__db_status_incomplete:
@@ -1630,7 +1580,6 @@ delete_entry(const char *path,
const char *base = svn_relpath_basename(path, NULL);
const char *local_abspath;
const char *repos_relpath;
- const char *moved_to_abspath = NULL;
svn_kind_t kind, base_kind;
svn_revnum_t old_revision;
svn_boolean_t conflicted;
@@ -1733,13 +1682,6 @@ delete_entry(const char *path,
return SVN_NO_ERROR;
}
- /* Has the to-be-deleted node been moved away? */
- if (status == svn_wc__db_status_deleted)
- SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath, NULL,
- NULL, eb->db, local_abspath,
- pool, pool));
-
-
/* Is this path the victim of a newly-discovered tree conflict? If so,
* remember it and notify the client. Then (if it was existing and
* modified), re-schedule the node to be added back again, as a (modified)
@@ -1752,7 +1694,7 @@ delete_entry(const char *path,
SVN_ERR(check_tree_conflict(&tree_conflict, eb, local_abspath,
status, kind, TRUE,
svn_wc_conflict_action_delete,
- moved_to_abspath, pb->pool, scratch_pool));
+ pb->pool, scratch_pool));
}
if (tree_conflict != NULL)
@@ -1800,24 +1742,6 @@ delete_entry(const char *path,
else
SVN_ERR_MALFUNCTION(); /* other reasons are not expected here */
}
- else if (moved_to_abspath)
- {
- /* No tree conflict was flagged, and the node was moved-away.
- * Automatically merge the incoming deletion with the local move
- * by deleting the node from the moved-away subtree. */
- /* ### This should probably use a work queue. */
- SVN_ERR(svn_wc__db_op_delete(eb->db, moved_to_abspath, NULL,
- FALSE, NULL, NULL,
- eb->cancel_func, eb->cancel_baton,
- NULL, NULL, /* notify below */
- scratch_pool));
- if (kind == svn_kind_dir)
- SVN_ERR(svn_io_remove_dir2(moved_to_abspath, TRUE,
- eb->cancel_func, eb->cancel_baton,
- scratch_pool));
- else
- SVN_ERR(svn_io_remove_file2(moved_to_abspath, TRUE, scratch_pool));
- }
SVN_ERR(complete_conflict(tree_conflict, pb, local_abspath, repos_relpath,
old_revision,
@@ -1873,8 +1797,7 @@ delete_entry(const char *path,
else
node_kind = svn_node_file;
- do_notification(eb, moved_to_abspath ? moved_to_abspath : local_abspath,
- node_kind, action, scratch_pool);
+ do_notification(eb, local_abspath, node_kind, action, scratch_pool);
}
svn_pool_destroy(scratch_pool);
@@ -2143,7 +2066,7 @@ add_directory(const char *path,
db->local_abspath,
status, wc_kind, FALSE,
svn_wc_conflict_action_add,
- NULL, pool, pool));
+ pool, pool));
}
if (tree_conflict == NULL)
@@ -2194,8 +2117,8 @@ add_directory(const char *path,
pool));
/* Make sure there is a real directory at LOCAL_ABSPATH, unless we are just
- updating the DB or the parent was moved away. */
- if (!db->shadowed && !pb->moved_to_abspath)
+ updating the DB */
+ if (!db->shadowed)
SVN_ERR(svn_wc__ensure_directory(db->local_abspath, pool));
if (tree_conflict != NULL)
@@ -2204,17 +2127,6 @@ add_directory(const char *path,
do_notification(eb, db->local_abspath, svn_node_dir,
svn_wc_notify_tree_conflict, pool);
}
- else if (wc_kind == svn_kind_unknown &&
- versioned_locally_and_present == FALSE &&
- pb->moved_to_abspath)
- {
- /* The parent directory of the directory we're adding was moved.
- * Add the new directory at the new location. */
- db->moved_to_abspath = svn_dirent_join(pb->moved_to_abspath,
- db->name, db->pool);
- db->moved_to_op_root_abspath = pb->moved_to_op_root_abspath;
- }
-
/* If this add was obstructed by dir scheduled for addition without
@@ -2235,9 +2147,7 @@ add_directory(const char *path,
db->already_notified = TRUE;
- do_notification(eb, db->moved_to_abspath ? db->moved_to_abspath
- : db->local_abspath,
- svn_node_dir, action, pool);
+ do_notification(eb, db->local_abspath, svn_node_dir, action, pool);
}
return SVN_NO_ERROR;
@@ -2258,7 +2168,6 @@ open_directory(const char *path,
svn_skel_t *tree_conflict = NULL;
svn_wc__db_status_t status, base_status;
svn_kind_t wc_kind;
- svn_error_t *err;
SVN_ERR(make_dir_baton(&db, path, eb, pb, FALSE, pool));
*child_baton = db;
@@ -2334,33 +2243,13 @@ open_directory(const char *path,
/* Is this path a fresh tree conflict victim? If so, skip the tree
with one notification. */
- /* Check if this directory was moved away. */
- err = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
- eb->db, db->local_abspath, pool, pool);
- if (err)
- {
- if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- svn_error_clear(err);
- else
- return svn_error_trace(err);
- }
- else if (status == svn_wc__db_status_deleted)
- SVN_ERR(svn_wc__db_scan_deletion(NULL, &db->moved_to_abspath, NULL,
- &db->moved_to_op_root_abspath,
- eb->db, db->local_abspath,
- db->pool, pool));
-
/* Check for conflicts only when we haven't already recorded
* a tree-conflict on a parent node. */
if (!db->shadowed)
SVN_ERR(check_tree_conflict(&tree_conflict, eb, db->local_abspath,
status, wc_kind, TRUE,
svn_wc_conflict_action_edit,
- db->moved_to_abspath, db->pool, pool));
+ db->pool, pool));
/* Remember the roots of any locally deleted trees. */
if (tree_conflict != NULL)
@@ -2820,41 +2709,6 @@ close_directory(void *dir_baton,
new_actual_props,
all_work_items,
scratch_pool));
-
- if (db->moved_to_abspath)
- {
- /* Perform another in-DB move of the directory to sync meta-data
- * of the moved-away node with the new BASE node. */
- apr_array_header_t *children = NULL;
- apr_hash_t *children_hash = apr_hash_get(eb->dir_dirents,
- db->new_relpath,
- APR_HASH_KEY_STRING);
- /* The op-root of the move needs to retain its moved-here flag.
- * Its children are normal copied children. */
- svn_boolean_t is_move = (strcmp(db->moved_to_op_root_abspath,
- db->moved_to_abspath) == 0);
-
- /* Add the new directory as a copy and create it on disk. */
- if (children_hash)
- SVN_ERR(svn_hash_keys(&children, children_hash, scratch_pool));
- SVN_ERR(svn_wc__db_op_copy_dir(eb->db, db->moved_to_abspath,
- new_actual_props ? new_actual_props
- : actual_props,
- db->changed_rev,
- db->changed_date,
- db->changed_author,
- db->new_relpath,
- eb->repos_root,
- eb->repos_uuid,
- *eb->target_revision,
- children,
- is_move,
- db->ambient_depth,
- NULL /* conflict */,
- NULL, /* no work, just modify DB */
- scratch_pool));
- SVN_ERR(svn_wc__ensure_directory(db->moved_to_abspath, pool));
- }
}
/* Process all of the queued work items for this directory. */
@@ -3270,7 +3124,7 @@ add_file(const char *path,
SVN_ERR(check_tree_conflict(&tree_conflict, eb,
fb->local_abspath,
status, wc_kind, FALSE,
- svn_wc_conflict_action_add, NULL,
+ svn_wc_conflict_action_add,
scratch_pool, scratch_pool));
}
@@ -3334,15 +3188,6 @@ add_file(const char *path,
do_notification(eb, fb->local_abspath, svn_node_file,
svn_wc_notify_tree_conflict, scratch_pool);
}
- else if (wc_kind == svn_kind_unknown &&
- versioned_locally_and_present == FALSE &&
- pb->moved_to_abspath)
- {
- /* The parent directory of the file we're adding was moved.
- * Add the new file at the new location. */
- fb->moved_to_abspath = svn_dirent_join(pb->moved_to_abspath,
- fb->name, fb->pool);
- }
svn_pool_destroy(scratch_pool);
@@ -3422,12 +3267,6 @@ open_file(const char *path,
eb->db, fb->local_abspath,
fb->pool, scratch_pool));
- /* If the file has moved locally look up its new location. */
- if (status == svn_wc__db_status_deleted)
- SVN_ERR(svn_wc__db_scan_deletion(NULL, &fb->moved_to_abspath, NULL, NULL,
- eb->db, fb->local_abspath,
- fb->pool, scratch_pool));
-
/* Is this path a conflict victim? */
if (conflicted)
SVN_ERR(node_already_conflicted(&conflicted, eb->db,
@@ -3455,7 +3294,7 @@ open_file(const char *path,
SVN_ERR(check_tree_conflict(&tree_conflict, eb, fb->local_abspath,
status, wc_kind, TRUE,
svn_wc_conflict_action_edit,
- fb->moved_to_abspath, fb->pool, scratch_pool));
+ fb->pool, scratch_pool));
/* Is this path the victim of a newly-discovered tree conflict? */
if (tree_conflict != NULL)
@@ -3804,8 +3643,6 @@ merge_file(svn_skel_t **work_items,
struct dir_baton *pb = fb->dir_baton;
svn_boolean_t is_locally_modified;
enum svn_wc_merge_outcome_t merge_outcome = svn_wc_merge_unchanged;
- const char *working_abspath = fb->moved_to_abspath ? fb->moved_to_abspath
- : fb->local_abspath;
SVN_ERR_ASSERT(! fb->shadowed && !fb->obstruction_found);
@@ -3850,7 +3687,7 @@ merge_file(svn_skel_t **work_items,
files that do not exist and for directories. */
SVN_ERR(svn_wc__internal_file_modified_p(&is_locally_modified,
- eb->db, working_abspath,
+ eb->db, fb->local_abspath,
FALSE /* exact_comparison */,
scratch_pool));
}
@@ -3895,7 +3732,7 @@ merge_file(svn_skel_t **work_items,
conflict_skel,
&merge_outcome,
eb->db,
- working_abspath,
+ fb->local_abspath,
pb->local_abspath,
fb->new_text_base_sha1_checksum,
fb->add_existed
@@ -3926,7 +3763,7 @@ merge_file(svn_skel_t **work_items,
SVN_ERR(svn_wc__get_translate_info(NULL, NULL,
&keywords,
NULL,
- eb->db, working_abspath,
+ eb->db, fb->local_abspath,
actual_props, TRUE,
scratch_pool, scratch_pool));
if (magic_props_changed || keywords)
@@ -3946,7 +3783,7 @@ merge_file(svn_skel_t **work_items,
/* Copy and DEtranslate the working file to a temp text-base.
Note that detranslation is done according to the old props. */
SVN_ERR(svn_wc__internal_translated_file(
- &tmptext, working_abspath, eb->db, working_abspath,
+ &tmptext, fb->local_abspath, eb->db, fb->local_abspath,
SVN_WC_TRANSLATE_TO_NF
| SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
eb->cancel_func, eb->cancel_baton,
@@ -4025,8 +3862,6 @@ close_file(void *file_baton,
apr_pool_t *scratch_pool = fb->pool; /* Destroyed at function exit */
svn_boolean_t keep_recorded_info = FALSE;
const svn_checksum_t *new_checksum;
- const char *working_abspath = fb->moved_to_abspath ? fb->moved_to_abspath
- : fb->local_abspath;
if (fb->skip_this)
{
@@ -4120,7 +3955,7 @@ close_file(void *file_baton,
if ((!fb->adding_file || fb->add_existed)
&& !fb->shadowed)
SVN_ERR(svn_wc__get_actual_props(&local_actual_props,
- eb->db, working_abspath,
+ eb->db, fb->local_abspath,
scratch_pool, scratch_pool));
if (local_actual_props == NULL)
local_actual_props = apr_hash_make(scratch_pool);
@@ -4225,7 +4060,7 @@ close_file(void *file_baton,
&new_base_props,
&new_actual_props,
eb->db,
- working_abspath,
+ fb->local_abspath,
svn_kind_file,
NULL /* server_baseprops (update, not merge) */,
current_base_props,
@@ -4253,7 +4088,7 @@ close_file(void *file_baton,
if (eb->notify_func)
{
svn_wc_notify_t *notify =svn_wc_create_notify(
- working_abspath,
+ fb->local_abspath,
svn_wc_notify_update_skip_access_denied,
scratch_pool);
@@ -4300,7 +4135,7 @@ close_file(void *file_baton,
SVN_ERR(svn_wc__wq_build_file_install(&work_item,
eb->db,
- working_abspath,
+ fb->local_abspath,
install_from,
eb->use_commit_times,
record_fileinfo,
@@ -4316,7 +4151,7 @@ close_file(void *file_baton,
Note: this will also update the executable flag, but ... meh. */
SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, eb->db,
- working_abspath,
+ fb->local_abspath,
scratch_pool, scratch_pool));
all_work_items = svn_wc__wq_merge(all_work_items, work_item,
scratch_pool);
@@ -4334,10 +4169,10 @@ close_file(void *file_baton,
/* Remove the INSTALL_FROM file, as long as it doesn't refer to the
working file. */
if (install_from != NULL
- && strcmp(install_from, working_abspath) != 0)
+ && strcmp(install_from, fb->local_abspath) != 0)
{
SVN_ERR(svn_wc__wq_build_file_remove(&work_item, eb->db,
- working_abspath, install_from,
+ fb->local_abspath, install_from,
scratch_pool, scratch_pool));
all_work_items = svn_wc__wq_merge(all_work_items, work_item,
scratch_pool);
@@ -4443,28 +4278,6 @@ close_file(void *file_baton,
/* Deal with the WORKING tree, based on updates to the BASE tree. */
- if (fb->moved_to_abspath)
- {
- /* Perform another in-DB move of the file to sync meta-data
- * of the moved-away node with the new BASE node. */
- SVN_ERR(svn_wc__db_op_copy_file(eb->db, fb->moved_to_abspath,
- new_actual_props,
- fb->changed_rev,
- fb->changed_date,
- fb->changed_author,
- fb->new_relpath,
- eb->repos_root,
- eb->repos_uuid,
- *eb->target_revision,
- new_checksum,
- FALSE /* update_actual_props */,
- NULL /* new_actual_props */,
- TRUE /* is_move */,
- NULL /* conflict */,
- NULL, /* no work, just modify DB */
- scratch_pool));
- }
-
apr_hash_set(fb->dir_baton->not_present_files, fb->name,
APR_HASH_KEY_STRING, NULL);
@@ -4501,7 +4314,7 @@ close_file(void *file_baton,
/* If the file was moved-away, notify for the moved-away node.
* The original location only had its BASE info changed and
* we don't usually notify about such changes. */
- notify = svn_wc_create_notify(working_abspath, action, scratch_pool);
+ notify = svn_wc_create_notify(fb->local_abspath, action, scratch_pool);
notify->kind = svn_node_file;
notify->content_state = content_state;
notify->prop_state = prop_state;
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc-queries.sql?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc-queries.sql Thu Aug 2 19:09:21 2012
@@ -163,6 +163,28 @@ WHERE wc_id = ?1 AND IS_STRICT_DESCENDAN
AND op_depth > 0)
ORDER BY local_relpath DESC
+-- STMT_SELECT_WORKING_PRESENT
+SELECT local_relpath, kind, checksum, translated_size, last_mod_time
+FROM nodes n
+WHERE wc_id = ?1
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+ AND presence in ('normal', 'incomplete')
+ AND op_depth = (SELECT MAX(op_depth)
+ FROM NODES w
+ WHERE w.wc_id = ?1
+ AND w.local_relpath = n.local_relpath)
+ORDER BY local_relpath DESC
+
+-- STMT_DELETE_NODE_RECURSIVE
+DELETE FROM NODES
+WHERE wc_id = ?1
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+
+-- STMT_DELETE_NODE
+DELETE
+FROM NODES
+WHERE wc_id = ?1 AND local_relpath = ?2
+
-- STMT_DELETE_ACTUAL_FOR_BASE_RECURSIVE
/* The ACTUAL_NODE applies to BASE, unless there is in at least one op_depth
a WORKING node that could have a conflict */
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/wc.h?rev=1368653&r1=1368652&r2=1368653&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/wc.h Thu Aug 2 19:09:21 2012
@@ -564,7 +564,6 @@ svn_error_t *
svn_wc__internal_remove_from_revision_control(svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t destroy_wf,
- svn_boolean_t instant_error,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);