Oops, missed one. Please ignore the previous patch.
libsvn_client/repos_diff.c contains a couple of confusing/out-of-date
comments. The attached patch cleans those up.
[[[
* subversion/libsvn_client/repos_diff.c
Comment-only changes; follow-ups to earlier changes.
(struct edit_baton): Remove reference to RA_LIB (removed in r12801).
(temp_file_plain_cleanup_handler, temp_file_child_cleanup_handler):
Fix grammar and clarify comments.
(temp_file_cleanup_register): Remove comment about ensuring lifetime of
PATH (PATH has been copied within POOL since r2436).
(get_file_from_ra): Remove TODO comment (function has queried file props
since r1735).
(window_handler): Remove the comment that implies that this function is
part of the svn_delta_editor_t interface, as it's not.
]]]
Regards,
Malcolm
Index: subversion/libsvn_client/repos_diff.c
===================================================================
--- subversion/libsvn_client/repos_diff.c (revision 17122)
+++ subversion/libsvn_client/repos_diff.c (working copy)
@@ -54,10 +54,9 @@
/* DRY_RUN is TRUE if this is a dry-run diff, false otherwise. */
svn_boolean_t dry_run;
- /* RA_LIB is the vtable for making requests to the RA layer, RA_SESSION
- is the open session for these requests */
+ /* RA_SESSION is the open session for making requests to the RA layer */
svn_ra_session_t *ra_session;
/* The rev1 from the '-r Rev1:Rev2' command line option */
svn_revnum_t revision;
@@ -254,9 +253,9 @@
}
}
-/* An apr pool cleanup handler, this deletes one of the temporary files.
+/* An APR pool cleanup handler that deletes one of the temporary files.
*/
static apr_status_t
temp_file_plain_cleanup_handler (void *arg)
{
@@ -266,9 +265,10 @@
APR internal encoding. */
return apr_file_remove (s->path, s->pool);
}
-/* An apr pool cleanup handler, this removes a cleanup handler.
+/* An APR pool cleanup handler that does nothing (just removes the
+ * cleanup handler).
*/
static apr_status_t
temp_file_child_cleanup_handler (void *arg)
{
@@ -280,11 +280,8 @@
}
/* Register a pool cleanup to delete PATH when POOL is destroyed.
*
- * PATH is not copied; caller should probably ensure that it is
- * allocated in a pool at least as long-lived as POOL.
- *
* The main "gotcha" is that if the process forks a child by calling
* apr_proc_create, then the child's copy of the cleanup handler will run
* and delete the file while the parent still expects it to be around. To
* avoid this a child cleanup handler is also installed to kill the plain
@@ -307,12 +304,8 @@
/* Get the repository version of a file. This makes an RA request to
* retrieve the file contents. A pool cleanup handler is installed to
* delete this file.
- *
- * ### TODO: The editor calls this function to get REV1 of the file. Can we
- * get the file props as well? Then get_wc_prop() could return them later
- * on enabling the REV1:REV2 request to send diffs.
*/
static svn_error_t *
get_file_from_ra (struct file_baton *b)
{
@@ -671,9 +664,9 @@
return SVN_NO_ERROR;
}
-/* An editor function. Do the work of applying the text delta. */
+/* Do the work of applying the text delta. */
static svn_error_t *
window_handler (svn_txdelta_window_t *window,
void *window_baton)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 1 13:15:20 2005