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

[PATCH] Don't bother end users about HTTP requests

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: Fri, 01 Feb 2008 18:57:10 -0800

Neon logs the HTTP request that failed when it encounters an
error. ra-serf doesn't. ra-svn does nothing similar. ra-local
does nothing similar. Users don't care what the HTTP method
happens to be. Not even a little bit. And it's confusing. I'm
so tired of answering "MERGE request? But I wasn't even merging!"

Before:

0 cmdline% svn mkdir -m foo --username jrandom --password rayjandom http://localhost:27814/svn-test-work/repositories/basic_tests-14/newdir
subversion/libsvn_ra_neon/util.c:1279: (apr_err=165001)
svn: MERGE request failed on '/svn-test-work/repositories/basic_tests-14'
subversion/libsvn_ra_neon/util.c:711: (apr_err=165001)
svn: Commit blocked by pre-commit hook (exit code 1) with no output.

After:

1 cmdline% ../../svn/svn mkdir -m foo --username jrandom --password rayjandom http://localhost:27814/svn-test-work/repositories/basic_tests-14/newdir
subversion/libsvn_ra_neon/util.c:711: (apr_err=165001)
svn: Commit blocked by pre-commit hook (exit code 1) with no output.

Ah, much better. Objections?

[[[
* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__parsed_request): Don't wrap the error with info about
    the HTTP method.
]]]

Index: subversion/libsvn_ra_neon/util.c
===================================================================
--- subversion/libsvn_ra_neon/util.c (revision 29159)
+++ subversion/libsvn_ra_neon/util.c (working copy)
@@ -1271,14 +1271,11 @@
                             svn_boolean_t spool_response,
                             apr_pool_t *pool)
 {
- SVN_ERR_W(parsed_request(sess, method, url, body, body_file,
- set_parser,
- startelm_cb, cdata_cb, endelm_cb,
- baton, extra_headers, status_code,
- spool_response, pool),
- apr_psprintf(pool,_("%s request failed on '%s'"), method, url));
-
- return SVN_NO_ERROR;
+ return parsed_request(sess, method, url, body, body_file,
+ set_parser,
+ startelm_cb, cdata_cb, endelm_cb,
+ baton, extra_headers, status_code,
+ spool_response, pool);
 }
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-02 03:57:21 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.