Index: subversion/include/svn_repos.h =================================================================== --- subversion/include/svn_repos.h (revision 25836) +++ subversion/include/svn_repos.h (working copy) @@ -1026,9 +1026,33 @@ * them; instead, immediately stop traversing history and return * SVN_NO_ERROR. * - * @since New in 1.1. + * If @a cancel_func is non-NULL, invoke it passing @a cancel_baton at + * various places during the operation. + * + * @since New in 1.5. */ svn_error_t * +svn_repos_history3(svn_fs_t *fs, + const char *path, + svn_repos_history_func_t history_func, + void *history_baton, + svn_repos_authz_func_t authz_read_func, + void *authz_read_baton, + svn_revnum_t start, + svn_revnum_t end, + svn_cancel_func_t cancel_func, + void *cancel_baton, + svn_boolean_t cross_copies, + apr_pool_t *pool); + + +/** + * Same as svn_repos_history3(), but with @a cancel_func always set to + * @c NULL. + * + * @deprecated Provided for backward compatibility with the 1.1 API. + */ +svn_error_t * svn_repos_history2(svn_fs_t *fs, const char *path, svn_repos_history_func_t history_func, Index: subversion/svnlook/main.c =================================================================== --- subversion/svnlook/main.c (revision 25836) +++ subversion/svnlook/main.c (working copy) @@ -1390,8 +1390,9 @@ copies. */ args.fs = c->fs; args.show_ids = show_ids; - SVN_ERR(svn_repos_history2(c->fs, path, print_history, &args, - NULL, NULL, 0, c->rev_id, 1, pool)); + SVN_ERR(svn_repos_history3(c->fs, path, print_history, &args, + NULL, NULL, 0, c->rev_id, NULL, NULL, + TRUE, pool)); return SVN_NO_ERROR; } Index: subversion/libsvn_repos/rev_hunt.c =================================================================== --- subversion/libsvn_repos/rev_hunt.c (revision 25836) +++ subversion/libsvn_repos/rev_hunt.c (working copy) @@ -193,6 +193,7 @@ +/* Deprecated. */ svn_error_t * svn_repos_history2(svn_fs_t *fs, const char *path, @@ -205,12 +206,34 @@ svn_boolean_t cross_copies, apr_pool_t *pool) { + return svn_repos_history3(fs, path, history_func, history_baton, + authz_read_func, authz_read_baton, + start, end, NULL, NULL, cross_copies, pool); +} + + + +svn_error_t * +svn_repos_history3(svn_fs_t *fs, + const char *path, + svn_repos_history_func_t history_func, + void *history_baton, + svn_repos_authz_func_t authz_read_func, + void *authz_read_baton, + svn_revnum_t start, + svn_revnum_t end, + svn_cancel_func_t cancel_func, + void *cancel_baton, + svn_boolean_t cross_copies, + apr_pool_t *pool) +{ svn_fs_history_t *history; apr_pool_t *oldpool = svn_pool_create(pool); apr_pool_t *newpool = svn_pool_create(pool); const char *history_path; svn_revnum_t history_rev; svn_fs_root_t *root; + int count = 0; /* Validate the revisions. */ if (! SVN_IS_VALID_REVNUM(start)) @@ -290,6 +313,9 @@ tmppool = oldpool; oldpool = newpool; newpool = tmppool; + + if (cancel_func) + SVN_ERR((*cancel_func)(cancel_baton)); } while (history); /* shouldn't hit this */