On Mon, 2010-08-09, sbut...@apache.org wrote: > Fix issue 2333 "diff URL1 URL2 not reverse of diff URL2 URL1". When > the repository reports a deleted directory, recursively walk the > directory (in the repository) and report files as deleted. > > TODO: Handle non-infinite depth correctly. > > Review by: rhuijben > stsp > > * subversion/libsvn_client/repos_diff.c > (edit_baton): Add a boolean field to control whether this workaround > should be used. Add a func and baton for cancellation. > (diff_deleted_dir): New function. > (delete_entry): Call diff_deleted_dir() if needed. > (svn_client__get_diff_editor): Set the new edit_baton fields. > > * subversion/tests/cmdline/diff_tests.py > (diff_multiple_reverse): Remove a comment that made this test the moral > equivalent of an XFAIL. > (diff_renamed_dir): Add more test cases. Correct the expectations for > diffs within a moved directory. > (test_list): Remove XFail from diff_renamed_dir.
[...] > +/* Recursively walk tree rooted at DIR (at REVISION) in the repository, > + * reporting all files as deleted. Part of a workaround for issue 2333. > + * > + * DIR is a repository path relative to the URL in RA_SESSION. REVISION > + * may be NULL, in which case it defaults to HEAD. EDIT_BATON is the Does REVISION really need to be able to default to HEAD? I wouldn't have thought so. (If so, that would be SVN_INVALID_REVNUM not NULL.) > + * overall crawler editor baton. If CANCEL_FUNC is not NULL, then it > + * should refer to a cancellation function (along with CANCEL_BATON). > + */ > +/* ### TODO: Handle depth. */ > +static svn_error_t * > +diff_deleted_dir(const char *dir, > + svn_revnum_t revision, > + svn_ra_session_t *ra_session, > + void *edit_baton, > + svn_cancel_func_t cancel_func, > + void *cancel_baton, > + apr_pool_t *pool) - Julian