[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] operational logging for 'svn cat'

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2006-12-20 19:35:48 CET

Sorry, I don't approve of this patch, I think it's misleading.

The only thing it's doing is noticing when a GET request comes in that
has no X-SVN-Base: header. That could be any number of things. It
could be someone running 'svn cat'. It could be an ordinary web
browser surfing the repository.. It could be someone running 'curl'.
It could even be libsvn_ra_serf doing a checkout!

I do not think all four of those scenarios should be listed as "svn
cat" in a high-level log. Furthermore, I don't think a lone GET
request is "high level" in the first place. It's low-level, and thus
the apache access.log is already logging it.

On 12/20/06, Kamesh Jayachandran <kamesh@collab.net> wrote:
> Hi All,
> Find the attached patch and log.
>
> With regards
> Kamesh Jayachandran
>
>
> [[[
>
> 'svn cat' command should log "cat '/path/to/file' rRev"
>
> * subversion/mod_dav_svn/repos.c
> (deliver):
> Operational Logging for 'svn cat' command.
>
> Patch by: kameshj
> Suggested by: Honey George <george@collab.net>
>
> ]]]
>
>
> Index: subversion/mod_dav_svn/repos.c
> ===================================================================
> --- subversion/mod_dav_svn/repos.c (revision 22766)
> +++ subversion/mod_dav_svn/repos.c (working copy)
> @@ -2877,6 +2877,7 @@
> {
> svn_stream_t *stream;
> char *block;
> + char *action;
>
> serr = svn_fs_file_contents(&stream,
> resource->info->root.root,
> @@ -2929,6 +2930,13 @@
> "Could not write EOS to filter.");
> }
>
> + action = apr_psprintf(resource->pool,
> + "cat '%s' r%" SVN_REVNUM_T_FMT,
> + svn_path_uri_encode(resource->info->repos_path,
> + resource->pool),
> + resource->info->root.rev);
> +
> + apr_table_set(output->r->subprocess_env, "SVN-ACTION", action);
> return NULL;
> }
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 20 19:36:10 2006

This is an archived mail posted to the Subversion Dev mailing list.