svn_repos.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2000-2006 CollabNet.  All rights reserved.
00005  *
00006  * This software is licensed as described in the file COPYING, which
00007  * you should have received as part of this distribution.  The terms
00008  * are also available at http://subversion.tigris.org/license-1.html.
00009  * If newer versions of this license are posted there, you may use a
00010  * newer version instead, at your option.
00011  *
00012  * This software consists of voluntary contributions made by many
00013  * individuals.  For exact contribution history, see the revision
00014  * history and logs, available at http://subversion.tigris.org/.
00015  * ====================================================================
00016  * @endcopyright
00017  *
00018  * @file svn_repos.h
00019  * @brief tools built on top of the filesystem.
00020  */
00021 
00022 
00023 #ifndef SVN_REPOS_H
00024 #define SVN_REPOS_H
00025 
00026 #include <apr_pools.h>
00027 #include <apr_hash.h>
00028 #include "svn_fs.h"
00029 #include "svn_delta.h"
00030 #include "svn_types.h"
00031 #include "svn_error.h"
00032 #include "svn_version.h"
00033 
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif /* __cplusplus */
00038 
00039 /* ---------------------------------------------------------------*/
00040 
00041 /**
00042  * Get libsvn_repos version information.
00043  *
00044  * @since New in 1.1.
00045  */
00046 const svn_version_t *svn_repos_version(void);
00047 
00048 
00049 
00050 /** Callback type for checking authorization on paths produced by (at
00051  * least) svn_repos_dir_delta().
00052  *
00053  * Set @a *allowed to TRUE to indicate that some operation is
00054  * authorized for @a path in @a root, or set it to FALSE to indicate
00055  * unauthorized (presumably according to state stored in @a baton).
00056  * 
00057  * Do not assume @a pool has any lifetime beyond this call.
00058  *
00059  * The exact operation being authorized depends on the callback
00060  * implementation.  For read authorization, for example, the caller
00061  * would implement an instance that does read checking, and pass it as
00062  * a parameter named [perhaps] 'authz_read_func'.  The receiver of
00063  * that parameter might also take another parameter named
00064  * 'authz_write_func', which although sharing this type, would be a
00065  * different implementation.
00066  *
00067  * @note If someday we want more sophisticated authorization states
00068  * than just yes/no, @a allowed can become an enum type.
00069  */
00070 typedef svn_error_t *(*svn_repos_authz_func_t)(svn_boolean_t *allowed,
00071                                                svn_fs_root_t *root,
00072                                                const char *path,
00073                                                void *baton,
00074                                                apr_pool_t *pool);
00075 
00076 
00077 /** An enum defining the kinds of access authz looks up.
00078  *
00079  * @since New in 1.3.
00080  */
00081 typedef enum
00082 {
00083   /** No access. */
00084   svn_authz_none = 0,
00085 
00086   /** Path can be read. */
00087   svn_authz_read = 1,
00088 
00089   /** Path can be altered. */
00090   svn_authz_write = 2,
00091 
00092   /** The other access credentials are recursive. */
00093   svn_authz_recursive = 4
00094 } svn_repos_authz_access_t;
00095 
00096 
00097 /** Callback type for checking authorization on paths produced by
00098  * the repository commit editor.
00099  *
00100  * Set @a *allowed to TRUE to indicate that the @a required access on
00101  * @a path in @a root is authorized, or set it to FALSE to indicate
00102  * unauthorized (presumable according to state stored in @a baton).
00103  *
00104  * If @a path is NULL, the callback should perform a global authz
00105  * lookup for the @a required access.  That is, the lookup should
00106  * check if the @a required access is granted for at least one path of
00107  * the repository, and set @a *allowed to TRUE if so.  @a root may
00108  * also be NULL if @a path is NULL.
00109  *
00110  * This callback is very similar to svn_repos_authz_func_t, with the
00111  * exception of the addition of the @a required parameter.
00112  * This is due to historical reasons: when authz was first implemented
00113  * for svn_repos_dir_delta(), it seemed there would need only checks
00114  * for read and write operations, hence the svn_repos_authz_func_t
00115  * callback prototype and usage scenario.  But it was then realized
00116  * that lookups due to copying needed to be recursive, and that
00117  * brute-force recursive lookups didn't square with the O(1)
00118  * performances a copy operation should have.
00119  *
00120  * So a special way to ask for a recursive lookup was introduced.  The
00121  * commit editor needs this capability to retain acceptable
00122  * performance.  Instead of revving the existing callback, causing
00123  * unnecessary revving of functions that don't actually need the
00124  * extended functionality, this second, more complete callback was
00125  * introduced, for use by the commit editor.
00126  *
00127  * Some day, it would be nice to reunite these two callbacks and do
00128  * the necessary revving anyway, but for the time being, this dual
00129  * callback mechanism will do.
00130  */
00131 typedef svn_error_t *(*svn_repos_authz_callback_t)
00132   (svn_repos_authz_access_t required,
00133    svn_boolean_t *allowed,
00134    svn_fs_root_t *root,
00135    const char *path,
00136    void *baton,
00137    apr_pool_t *pool);
00138 
00139 /**
00140  * A callback function type for use in svn_repos_get_file_revs().
00141  * @a baton is provided by the caller, @a path is the pathname of the file
00142  * in revision @a rev and @a rev_props are the revision properties.
00143  * If @a delta_handler and @a delta_baton are non-NULL, they may be set to a
00144  * handler/baton which will be called with the delta between the previous
00145  * revision and this one after the return of this callback.  They may be
00146  * left as NULL/NULL.
00147  * @a prop_diffs is an array of svn_prop_t elements indicating the property
00148  * delta for this and the previous revision.
00149  * @a pool may be used for temporary allocations, but you can't rely
00150  * on objects allocated to live outside of this particular call and the
00151  * immediately following calls to @a *delta_handler if any.
00152  *
00153  * @since New in 1.1.
00154  */
00155 typedef svn_error_t *(*svn_repos_file_rev_handler_t)
00156   (void *baton,
00157    const char *path,
00158    svn_revnum_t rev,
00159    apr_hash_t *rev_props,
00160    svn_txdelta_window_handler_t *delta_handler,
00161    void **delta_baton,
00162    apr_array_header_t *prop_diffs,
00163    apr_pool_t *pool);
00164 
00165 
00166 /** The repository object. */
00167 typedef struct svn_repos_t svn_repos_t;
00168 
00169 /* Opening and creating repositories. */
00170 
00171 
00172 /** Find the root path of the repository that contains @a path.
00173  *
00174  * If a repository was found, the path to the root of the repository
00175  * is returned, else @c NULL. The pointer to the returned path may be
00176  * equal to @a path.
00177  */
00178 const char *svn_repos_find_root_path(const char *path,
00179                                      apr_pool_t *pool);
00180 
00181 /** Set @a *repos_p to a repository object for the repository at @a path.
00182  *
00183  * Allocate @a *repos_p in @a pool.
00184  *
00185  * Acquires a shared lock on the repository, and attaches a cleanup
00186  * function to @a pool to remove the lock.  If no lock can be acquired,
00187  * returns error, with undefined effect on @a *repos_p.  If an exclusive
00188  * lock is present, this blocks until it's gone.
00189  */
00190 svn_error_t *svn_repos_open(svn_repos_t **repos_p,
00191                             const char *path,
00192                             apr_pool_t *pool);
00193 
00194 /** Create a new Subversion repository at @a path, building the necessary
00195  * directory structure, creating the filesystem, and so on.
00196  * Return the repository object in @a *repos_p, allocated in @a pool.
00197  *
00198  * @a config is a client configuration hash of @c svn_config_t * items
00199  * keyed on config category names, and may be NULL.
00200  *
00201  * @a fs_config is passed to the filesystem, and may be NULL.
00202  *
00203  * @a unused_1 and @a unused_2 are not used and should be NULL.
00204  */
00205 svn_error_t *svn_repos_create(svn_repos_t **repos_p, 
00206                               const char *path,
00207                               const char *unused_1,
00208                               const char *unused_2,
00209                               apr_hash_t *config,
00210                               apr_hash_t *fs_config,
00211                               apr_pool_t *pool);
00212 
00213 /** Destroy the Subversion repository found at @a path, using @a pool for any
00214  * necessary allocations.
00215  */
00216 svn_error_t *svn_repos_delete(const char *path, apr_pool_t *pool);
00217 
00218 /** Return the filesystem associated with repository object @a repos. */
00219 svn_fs_t *svn_repos_fs(svn_repos_t *repos);
00220 
00221 
00222 /** Make a hot copy of the Subversion repository found at @a src_path 
00223  * to @a dst_path. 
00224  *
00225  * Copy a possibly live Subversion repository from @a src_path to
00226  * @a dst_path.  If @a clean_logs is @c TRUE, perform cleanup on the
00227  * source filesystem as part of the copy operation; currently, this
00228  * means deleting copied, unused logfiles for a Berkeley DB source
00229  * repository.
00230  */
00231 svn_error_t * svn_repos_hotcopy(const char *src_path,
00232                                 const char *dst_path,
00233                                 svn_boolean_t clean_logs,
00234                                 apr_pool_t *pool);
00235 
00236 /**
00237  * Run database recovery procedures on the repository at @a path,
00238  * returning the database to a consistent state.  Use @a pool for all
00239  * allocation.
00240  *
00241  * Acquires an exclusive lock on the repository, recovers the
00242  * database, and releases the lock.  If an exclusive lock can't be
00243  * acquired, returns error.
00244  *
00245  * @deprecated Provided for backward compatibility with the 1.0 API.
00246  */
00247 svn_error_t *svn_repos_recover(const char *path, apr_pool_t *pool);
00248 
00249 /**
00250  * Run database recovery procedures on the repository at @a path,
00251  * returning the database to a consistent state.  Use @a pool for all
00252  * allocation.
00253  *
00254  * Acquires an exclusive lock on the repository, recovers the
00255  * database, and releases the lock.  If an exclusive lock can't be
00256  * acquired, returns error.
00257  *
00258  * If @a nonblocking is TRUE, an error of type EWOULDBLOCK is
00259  * returned if the lock is not immediately available.
00260  *
00261  * If @a start_callback is not NULL, it will be called with @a
00262  * start_callback_baton as argument before the recovery starts, but
00263  * after the exclusive lock has been acquired.
00264  *
00265  * @since New in 1.1.
00266  */
00267 svn_error_t *svn_repos_recover2(const char *path,
00268                                 svn_boolean_t nonblocking,
00269                                 svn_error_t *(*start_callback)(void *baton),
00270                                 void *start_callback_baton,
00271                                 apr_pool_t *pool);
00272 
00273 /** This function is a wrapper around svn_fs_berkeley_logfiles(),
00274  * returning log file paths relative to the root of the repository.
00275  *
00276  * @copydoc svn_fs_berkeley_logfiles()
00277  */
00278 svn_error_t *svn_repos_db_logfiles(apr_array_header_t **logfiles,
00279                                    const char *path,
00280                                    svn_boolean_t only_unused,
00281                                    apr_pool_t *pool);
00282 
00283 
00284 
00285 /* Repository Paths */
00286 
00287 /** Return the top-level repository path allocated in @a pool. */
00288 const char *svn_repos_path(svn_repos_t *repos, apr_pool_t *pool);
00289 
00290 /** Return the path to @a repos's filesystem directory, allocated in
00291  * @a pool.
00292  */
00293 const char *svn_repos_db_env(svn_repos_t *repos, apr_pool_t *pool);
00294 
00295 /** Return path to @a repos's config directory, allocated in @a pool. */
00296 const char *svn_repos_conf_dir(svn_repos_t *repos, apr_pool_t *pool);
00297 
00298 /** Return path to @a repos's svnserve.conf, allocated in @a pool. */
00299 const char *svn_repos_svnserve_conf(svn_repos_t *repos, apr_pool_t *pool);
00300 
00301 /** Return path to @a repos's lock directory, allocated in @a pool. */
00302 const char *svn_repos_lock_dir(svn_repos_t *repos, apr_pool_t *pool);
00303 
00304 /** Return path to @a repos's db lockfile, allocated in @a pool. */
00305 const char *svn_repos_db_lockfile(svn_repos_t *repos, apr_pool_t *pool);
00306 
00307 /** Return path to @a repos's db logs lockfile, allocated in @a pool. */
00308 const char *svn_repos_db_logs_lockfile(svn_repos_t *repos, apr_pool_t *pool);
00309 
00310 /** Return the path to @a repos's hook directory, allocated in @a pool. */
00311 const char *svn_repos_hook_dir(svn_repos_t *repos, apr_pool_t *pool);
00312 
00313 /** Return the path to @a repos's start-commit hook, allocated in @a pool. */
00314 const char *svn_repos_start_commit_hook(svn_repos_t *repos, apr_pool_t *pool);
00315 
00316 /** Return the path to @a repos's pre-commit hook, allocated in @a pool. */
00317 const char *svn_repos_pre_commit_hook(svn_repos_t *repos, apr_pool_t *pool);
00318 
00319 /** Return the path to @a repos's post-commit hook, allocated in @a pool. */
00320 const char *svn_repos_post_commit_hook(svn_repos_t *repos, apr_pool_t *pool);
00321 
00322 /** Return the path to @a repos's pre-revprop-change hook, allocated in 
00323  * @a pool.
00324  */
00325 const char *svn_repos_pre_revprop_change_hook(svn_repos_t *repos,
00326                                               apr_pool_t *pool);
00327 
00328 /** Return the path to @a repos's post-revprop-change hook, allocated in 
00329  * @a pool.
00330  */
00331 const char *svn_repos_post_revprop_change_hook(svn_repos_t *repos,
00332                                                apr_pool_t *pool);
00333 
00334 
00335 /** @defgroup svn_repos_lock_hooks paths to lock hooks
00336  * @{ 
00337  * @since New in 1.2. */
00338 
00339 /** Return the path to @a repos's pre-lock hook, allocated in @a pool. */
00340 const char *svn_repos_pre_lock_hook(svn_repos_t *repos, apr_pool_t *pool);
00341 
00342 /** Return the path to @a repos's post-lock hook, allocated in @a pool. */
00343 const char *svn_repos_post_lock_hook(svn_repos_t *repos, apr_pool_t *pool);
00344 
00345 /** Return the path to @a repos's pre-unlock hook, allocated in @a pool. */
00346 const char *svn_repos_pre_unlock_hook(svn_repos_t *repos, apr_pool_t *pool);
00347 
00348 /** Return the path to @a repos's post-unlock hook, allocated in @a pool. */
00349 const char *svn_repos_post_unlock_hook(svn_repos_t *repos, apr_pool_t *pool);
00350 
00351 /** @} */
00352 
00353 /* ---------------------------------------------------------------*/
00354 
00355 /* Reporting the state of a working copy, for updates. */
00356 
00357 
00358 /**
00359  * Construct and return a @a report_baton that will be passed to the
00360  * other functions in this section to describe the state of a pre-existing
00361  * tree (typically, a working copy).  When the report is finished,
00362  * @a editor/@a edit_baton will be driven in such a way as to transform the
00363  * existing tree to @a revnum and, if @a tgt_path is non-NULL, switch the
00364  * reported hierarchy to @a tgt_path.
00365  *
00366  * @a fs_base is the absolute path of the node in the filesystem at which
00367  * the comparison should be rooted.  @a target is a single path component,
00368  * used to limit the scope of the report to a single entry of @a fs_base,
00369  * or "" if all of @a fs_base itself is the main subject of the report.
00370  *
00371  * @a tgt_path and @a revnum is the fs path/revision pair that is the
00372  * "target" of the delta.  @a tgt_path should be provided only when
00373  * the source and target paths of the report differ.  That is, @a tgt_path
00374  * should *only* be specified when specifying that the resultant editor
00375  * drive be one that transforms the reported hierarchy into a pristine tree
00376  * of @a tgt_path at revision @a revnum.  A @c NULL value for @a tgt_path
00377  * will indicate that the editor should be driven in such a way as to
00378  * transform the reported hierarchy to revision @a revnum, preserving the
00379  * reported hierarchy.
00380  *
00381  * @a text_deltas instructs the driver of the @a editor to enable
00382  * the generation of text deltas.
00383  *
00384  * @a recurse instructs the driver of the @a editor to send a recursive
00385  * delta (or not.)
00386  *
00387  * @a ignore_ancestry instructs the driver to ignore node ancestry
00388  * when determining how to transmit differences.
00389  *
00390  * The @a authz_read_func and @a authz_read_baton are passed along to
00391  * svn_repos_dir_delta(); see that function for how they are used.
00392  *
00393  * All allocation for the context and collected state will occur in
00394  * @a pool.
00395  *
00396  * @note @a username isn't used and should be removed if this function is
00397  * revised.
00398  */
00399 svn_error_t *
00400 svn_repos_begin_report(void **report_baton,
00401                        svn_revnum_t revnum,
00402                        const char *username,
00403                        svn_repos_t *repos,
00404                        const char *fs_base,
00405                        const char *target,
00406                        const char *tgt_path,
00407                        svn_boolean_t text_deltas,
00408                        svn_boolean_t recurse,
00409                        svn_boolean_t ignore_ancestry,
00410                        const svn_delta_editor_t *editor,
00411                        void *edit_baton,
00412                        svn_repos_authz_func_t authz_read_func,
00413                        void *authz_read_baton,
00414                        apr_pool_t *pool);
00415 
00416 /**
00417  * Given a @a report_baton constructed by svn_repos_begin_report(),
00418  * record the presence of @a path at @a revision in the current tree.
00419  *
00420  * @a path is relative to the anchor/target used in the creation of the
00421  * @a report_baton.
00422  *
00423  * @a revision may be SVN_INVALID_REVNUM if (for example) @a path represents
00424  * a locally-added path with no revision number.
00425  *
00426  * The first call of this in a given report usually passes an empty
00427  * @a path; this is used to set up the correct root revision for the editor
00428  * drive.
00429  *
00430  * If @a start_empty is true and @a path is a directory, then require the
00431  * caller to explicitly provide all the children of @path - do not assume
00432  * that the tree also contains all the children of @a path at @a revision.
00433  * This is for 'low confidence' client reporting.
00434  * 
00435  * If the caller has a lock token for @a path, then @a lock_token should
00436  * be set to that token.  Else, @a lock_token should be NULL.
00437  *
00438  * All temporary allocations are done in @a pool.
00439  *
00440  * @since New in 1.2.
00441  */
00442 svn_error_t *svn_repos_set_path2(void *report_baton,
00443                                  const char *path,
00444                                  svn_revnum_t revision,
00445                                  svn_boolean_t start_empty,
00446                                  const char *lock_token,
00447                                  apr_pool_t *pool);
00448 
00449 /**
00450  * Similar to svn_repos_set_path2(), but with @a lock_token set to @c NULL.
00451  *
00452  * @deprecated Provided for backward compatibility with the 1.1 API.
00453  */
00454 svn_error_t *svn_repos_set_path(void *report_baton,
00455                                 const char *path,
00456                                 svn_revnum_t revision,
00457                                 svn_boolean_t start_empty,
00458                                 apr_pool_t *pool);
00459 
00460 /**
00461  * Given a @a report_baton constructed by svn_repos_begin_report(), 
00462  * record the presence of @path in the current tree, containing the contents
00463  * of @a link_path at @a revision.
00464  *
00465  * Note that while @a path is relative to the anchor/target used in the
00466  * creation of the @a report_baton, @a link_path is an absolute filesystem
00467  * path!
00468  *
00469  * If @a start_empty is true and @a path is a directory, then require the
00470  * caller to explicitly provide all the children of @path - do not assume
00471  * that the tree also contains all the children of @a link_path at
00472  * @a revision.  This is for 'low confidence' client reporting.
00473  *
00474  * If the caller has a lock token for @a link_path, then @a lock_token
00475  * should be set to that token.  Else, @a lock_token should be NULL.
00476  *
00477  * All temporary allocations are done in @a pool.
00478  *
00479  * @since New in 1.2.
00480  */
00481 svn_error_t *svn_repos_link_path2(void *report_baton,
00482                                   const char *path,
00483                                   const char *link_path,
00484                                   svn_revnum_t revision,
00485                                   svn_boolean_t start_empty,
00486                                   const char *lock_token,
00487                                   apr_pool_t *pool);
00488 
00489 /**
00490  * Similar to svn_repos_link_path2(), but with @a lock_token set to @c NULL.
00491  *
00492  * @deprecated Provided for backward compatibility with the 1.1 API.
00493  */
00494 svn_error_t *svn_repos_link_path(void *report_baton,
00495                                  const char *path,
00496                                  const char *link_path,
00497                                  svn_revnum_t revision,
00498                                  svn_boolean_t start_empty,
00499                                  apr_pool_t *pool);
00500 
00501 /** Given a @a report_baton constructed by svn_repos_begin_report(), 
00502  * record the non-existence of @a path in the current tree.
00503  *
00504  * (This allows the reporter's driver to describe missing pieces of a
00505  * working copy, so that 'svn up' can recreate them.)
00506  *
00507  * All temporary allocations are done in @a pool.
00508  */
00509 svn_error_t *svn_repos_delete_path(void *report_baton,
00510                                    const char *path,
00511                                    apr_pool_t *pool);
00512 
00513 /** Given a @a report_baton constructed by svn_repos_begin_report(),
00514  * finish the report and drive the editor as specified when the report
00515  * baton was constructed.
00516  *
00517  * If an error occurs during the driving of the editor, do NOT abort the
00518  * edit; that responsibility belongs to the caller of this function, if
00519  * it happens at all.
00520  *
00521  * After the call to this function, @a report_baton is no longer valid;
00522  * it should not be passed to any other reporting functions, including
00523  * svn_repos_abort_report().
00524  */
00525 svn_error_t *svn_repos_finish_report(void *report_baton,
00526                                      apr_pool_t *pool);
00527 
00528 
00529 /** Given a @a report_baton constructed by svn_repos_begin_report(),
00530  * abort the report.  This function can be called anytime before
00531  * svn_repos_finish_report() is called.
00532  *
00533  * After the call to this function, @a report_baton is no longer valid;
00534  * it should not be passed to any other reporting functions.
00535  */
00536 svn_error_t *svn_repos_abort_report(void *report_baton,
00537                                     apr_pool_t *pool);
00538 
00539 
00540 /* ---------------------------------------------------------------*/
00541 
00542 /* The magical dir_delta update routines. */
00543 
00544 /** Use the provided @a editor and @a edit_baton to describe the changes
00545  * necessary for making a given node (and its descendants, if it is a
00546  * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry is the node to update.  If @a src_entry
00548  * is empty, then compute the difference between the entire tree
00549  * anchored at @a src_parent_dir under @a src_root and @a tgt_path
00550  * under @a target_root.  Else, describe the changes needed to update
00551  * only that entry in @a src_parent_dir.  Typically, callers of this
00552  * function will use a @a tgt_path that is the concatenation of @a
00553  * src_parent_dir and @a src_entry.
00554  *
00555  * @a src_root and @a tgt_root can both be either revision or transaction
00556  * roots.  If @a tgt_root is a revision, @a editor's set_target_revision()
00557  * will be called with the @a tgt_root's revision number, else it will
00558  * not be called at all.
00559  *
00560  * If @a authz_read_func is non-null, invoke it before any call to
00561  *
00562  *    @a editor->open_root
00563  *    @a editor->add_directory
00564  *    @a editor->open_directory
00565  *    @a editor->add_file
00566  *    @a editor->open_file
00567  *
00568  * passing @a tgt_root, the same path that would be passed to the
00569  * editor function in question, and @a authz_read_baton.  If the
00570  * @a *allowed parameter comes back TRUE, then proceed with the planned
00571  * editor call; else if FALSE, then invoke @a editor->absent_file or
00572  * @a editor->absent_directory as appropriate, except if the planned
00573  * editor call was open_root, throw SVN_ERR_AUTHZ_ROOT_UNREADABLE.
00574  *
00575  * If @a text_deltas is @c FALSE, send a single @c NULL txdelta window to 
00576  * the window handler returned by @a editor->apply_textdelta().
00577  *
00578  * If @a entry_props is @c TRUE, accompany each opened/added entry with
00579  * propchange editor calls that relay special "entry props" (this
00580  * is typically used only for working copy updates).
00581  *
00582  * @a ignore_ancestry instructs the function to ignore node ancestry
00583  * when determining how to transmit differences.
00584  *
00585  * Before completing successfully, this function calls @a editor's
00586  * close_edit(), so the caller should expect its @a edit_baton to be
00587  * invalid after its use with this function.
00588  *
00589  * Do any allocation necessary for the delta computation in @a pool.
00590  * This function's maximum memory consumption is at most roughly
00591  * proportional to the greatest depth of the tree under @a tgt_root, not
00592  * the total size of the delta.
00593  */
00594 svn_error_t *
00595 svn_repos_dir_delta(svn_fs_root_t *src_root,
00596                     const char *src_parent_dir,
00597                     const char *src_entry,
00598                     svn_fs_root_t *tgt_root,
00599                     const char *tgt_path,
00600                     const svn_delta_editor_t *editor,
00601                     void *edit_baton,
00602                     svn_repos_authz_func_t authz_read_func,
00603                     void *authz_read_baton,
00604                     svn_boolean_t text_deltas,
00605                     svn_boolean_t recurse,
00606                     svn_boolean_t entry_props,
00607                     svn_boolean_t ignore_ancestry,
00608                     apr_pool_t *pool);
00609 
00610 /** Use the provided @a editor and @a edit_baton to describe the
00611  * skeletal changes made in a particular filesystem @a root
00612  * (revision or transaction).
00613  *
00614  * Changes will be limited to those within @a base_dir, and if 
00615  * @a low_water_mark is set to something other than @c SVN_INVALID_REVNUM
00616  * it is assumed that the client has no knowledge of revisions prior to
00617  * @a low_water_mark.  Together, these two arguments define the portion of
00618  * the tree that the client is assumed to have knowledge of, and thus any
00619  * copies of data fro * directory) under @a src_root look exactly like @a tgt_path under
00547  * @a tgt_root.  @a src_entry i