241
242
svn_wc__db_t *db,
242
243
const char *anchor_abspath,
243
244
const char *target,
244
const svn_diff_tree_processor_t *processor,
245
const svn_diff_tree_processor_t *diff_processor,
245
246
svn_depth_t depth,
246
247
svn_boolean_t ignore_ancestry,
247
svn_boolean_t show_copies_as_adds,
248
248
svn_boolean_t use_text_base,
249
249
svn_boolean_t reverse_order,
250
250
svn_cancel_func_t cancel_func,
256
256
SVN_ERR_ASSERT(svn_dirent_is_absolute(anchor_abspath));
259
processor = svn_diff__tree_processor_reverse_create(processor, NULL, pool);
261
/* --show-copies-as-adds implies --notice-ancestry */
262
if (show_copies_as_adds)
263
ignore_ancestry = FALSE;
265
if (! show_copies_as_adds)
266
processor = svn_diff__tree_processor_copy_as_changed_create(processor,
269
258
eb = apr_pcalloc(pool, sizeof(*eb));
271
260
eb->anchor_abspath = apr_pstrdup(pool, anchor_abspath);
272
261
eb->target = apr_pstrdup(pool, target);
273
eb->processor = processor;
262
eb->processor = diff_processor;
274
263
eb->depth = depth;
275
264
eb->ignore_ancestry = ignore_ancestry;
276
265
eb->local_before_remote = reverse_order;
1098
1089
processor_parent_baton,
1100
1091
scratch_pool, iterpool));
1101
/* ### skip_children is not used */
1103
SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts, db, local_abspath,
1104
scratch_pool, iterpool));
1106
if (depth_below_here == svn_depth_immediates)
1107
depth_below_here = svn_depth_empty;
1109
children = svn_sort__hash(nodes, svn_sort_compare_items_lexically,
1112
for (i = 0; i < children->nelts; i++)
1093
if ((depth > svn_depth_empty || depth == svn_depth_unknown)
1114
svn_sort__item_t *item = &APR_ARRAY_IDX(children, i, svn_sort__item_t);
1115
const char *name = item->key;
1116
struct svn_wc__db_info_t *info = item->value;
1117
const char *child_abspath;
1118
const char *child_relpath;
1120
svn_pool_clear(iterpool);
1123
SVN_ERR(cancel_func(cancel_baton));
1125
child_abspath = svn_dirent_join(local_abspath, name, iterpool);
1127
if (NOT_PRESENT(info->status))
1132
/* If comparing against WORKING, skip entries that are
1133
schedule-deleted - they don't really exist. */
1134
if (!diff_pristine && info->status == svn_wc__db_status_deleted)
1137
child_relpath = svn_relpath_join(relpath, name, iterpool);
1142
case svn_node_symlink:
1143
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
1147
cancel_func, cancel_baton,
1152
if (depth > svn_depth_files || depth == svn_depth_unknown)
1154
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
1155
child_relpath, depth_below_here,
1158
cancel_func, cancel_baton,
1096
svn_depth_t depth_below_here = depth;
1098
apr_hash_t *conflicts;
1100
if (depth_below_here == svn_depth_immediates)
1101
depth_below_here = svn_depth_empty;
1103
SVN_ERR(svn_wc__db_read_children_info(&nodes, &conflicts,
1105
FALSE /* base_tree_only */,
1106
scratch_pool, iterpool));
1109
children = svn_sort__hash(nodes, svn_sort_compare_items_lexically,
1112
for (i = 0; i < children->nelts; i++)
1114
svn_sort__item_t *item = &APR_ARRAY_IDX(children, i, svn_sort__item_t);
1115
const char *name = item->key;
1116
struct svn_wc__db_info_t *info = item->value;
1117
const char *child_abspath;
1118
const char *child_relpath;
1120
svn_pool_clear(iterpool);
1123
SVN_ERR(cancel_func(cancel_baton));
1125
child_abspath = svn_dirent_join(local_abspath, name, iterpool);
1127
if (NOT_PRESENT(info->status))
1132
/* If comparing against WORKING, skip entries that are
1133
schedule-deleted - they don't really exist. */
1134
if (!diff_pristine && info->status == svn_wc__db_status_deleted)
1137
child_relpath = svn_relpath_join(relpath, name, iterpool);
1142
case svn_node_symlink:
1143
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
1147
cancel_func, cancel_baton,
1152
if (depth > svn_depth_files || depth == svn_depth_unknown)
1154
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
2257
2260
const char *target,
2258
2261
svn_depth_t depth,
2259
2262
svn_boolean_t ignore_ancestry,
2260
svn_boolean_t show_copies_as_adds,
2261
svn_boolean_t use_git_diff_format,
2262
2263
svn_boolean_t use_text_base,
2263
2264
svn_boolean_t reverse_order,
2264
2265
svn_boolean_t server_performs_filtering,
2265
2266
const apr_array_header_t *changelist_filter,
2266
const svn_wc_diff_callbacks4_t *callbacks,
2267
void *callback_baton,
2267
const svn_diff_tree_processor_t *diff_processor,
2268
2268
svn_cancel_func_t cancel_func,
2269
2269
void *cancel_baton,
2270
2270
apr_pool_t *result_pool,
2277
2277
struct svn_wc__shim_fetch_baton_t *sfb;
2278
2278
svn_delta_shim_callbacks_t *shim_callbacks =
2279
2279
svn_delta_shim_callbacks_default(result_pool);
2280
const svn_diff_tree_processor_t *diff_processor;
2282
2281
SVN_ERR_ASSERT(svn_dirent_is_absolute(anchor_abspath));
2284
/* --git implies --show-copies-as-adds */
2285
if (use_git_diff_format)
2286
show_copies_as_adds = TRUE;
2288
SVN_ERR(svn_wc__wrap_diff_callbacks(&diff_processor,
2289
callbacks, callback_baton, TRUE,
2290
result_pool, scratch_pool));
2292
2283
/* Apply changelist filtering to the output */
2293
2284
if (changelist_filter && changelist_filter->nelts)