Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 326B0F72B for ; Tue, 9 Jul 2013 04:00:56 +0000 (UTC) Received: (qmail 86332 invoked by uid 500); 9 Jul 2013 04:00:56 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 86313 invoked by uid 500); 9 Jul 2013 04:00:56 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 86306 invoked by uid 99); 9 Jul 2013 04:00:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 04:00:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jul 2013 04:00:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EF62F2388C22; Tue, 9 Jul 2013 04:00:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1501066 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_ra/util.c Date: Tue, 09 Jul 2013 04:00:31 -0000 To: commits@subversion.apache.org From: svn-role@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130709040031.EF62F2388C22@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: svn-role Date: Tue Jul 9 04:00:31 2013 New Revision: 1501066 URL: http://svn.apache.org/r1501066 Log: Merge the r1498449 group from trunk: * r1498449, r1498455, r1498997 kidney blame: convert a client segfault into a correct failure mode. To reproduce run 'svn blame -r 2:1' against a 1.7 server with a 1.8.x binary. Notes: r1498449 breaks out a helper function r1498455 fixes the segfault. r1498997 is a minor optimisation Justification: Segfault. (1.8.0 didn't have the segfaulting code.) Votes: +1: danielsh, stsp, rhuijben, breser Modified: subversion/branches/1.8.x/ (props changed) subversion/branches/1.8.x/STATUS subversion/branches/1.8.x/subversion/libsvn_ra/util.c Propchange: subversion/branches/1.8.x/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1498449,1498455,1498997 Modified: subversion/branches/1.8.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1501066&r1=1501065&r2=1501066&view=diff ============================================================================== --- subversion/branches/1.8.x/STATUS (original) +++ subversion/branches/1.8.x/STATUS Tue Jul 9 04:00:31 2013 @@ -120,18 +120,6 @@ Veto-blocked changes: Approved changes: ================= - * r1498449, r1498455, r1498997 - kidney blame: convert a client segfault into a correct failure mode. To - reproduce run 'svn blame -r 2:1' against a 1.7 server with a 1.8.x binary. - Notes: - r1498449 breaks out a helper function - r1498455 fixes the segfault. - r1498997 is a minor optimisation - Justification: - Segfault. (1.8.0 didn't have the segfaulting code.) - Votes: - +1: danielsh, stsp, rhuijben, breser - * r1500801 Don't require GPG_TTY and TERM when getting passwords from gpg-agent. Justification: Modified: subversion/branches/1.8.x/subversion/libsvn_ra/util.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra/util.c?rev=1501066&r1=1501065&r2=1501066&view=diff ============================================================================== --- subversion/branches/1.8.x/subversion/libsvn_ra/util.c (original) +++ subversion/branches/1.8.x/subversion/libsvn_ra/util.c Tue Jul 9 04:00:31 2013 @@ -38,6 +38,26 @@ #include "svn_private_config.h" #include "private/svn_ra_private.h" +static const char * +get_path(const char *path_or_url, + svn_ra_session_t *ra_session, + apr_pool_t *pool) +{ + if (path_or_url == NULL) + { + svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, + pool); + if (err) + { + /* The SVN_ERR_UNSUPPORTED_FEATURE error in the caller is more + important, so dummy up the session's URL and chuck this error. */ + svn_error_clear(err); + return _(""); + } + } + return path_or_url; +} + svn_error_t * svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session, const char *path_or_url, @@ -48,18 +68,7 @@ svn_ra__assert_mergeinfo_capable_server( SVN_RA_CAPABILITY_MERGEINFO, pool)); if (! mergeinfo_capable) { - if (path_or_url == NULL) - { - svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url, - pool); - if (err) - { - /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important, - so dummy up the session's URL and chuck this error. */ - svn_error_clear(err); - path_or_url = ""; - } - } + path_or_url = get_path(path_or_url, ra_session, pool); return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Retrieval of mergeinfo unsupported by '%s'"), svn_path_is_url(path_or_url) @@ -84,12 +93,16 @@ svn_ra__assert_capable_server(svn_ra_ses svn_boolean_t has; SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool)); if (! has) - return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, - _("The '%s' feature is not supported by '%s'"), - capability, - svn_path_is_url(path_or_url) - ? path_or_url - : svn_dirent_local_style(path_or_url, pool)); + { + path_or_url = get_path(path_or_url, ra_session, pool); + return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL, + _("The '%s' feature is not supported by '%s'"), + capability, + svn_path_is_url(path_or_url) + ? path_or_url + : svn_dirent_local_style(path_or_url, + pool)); + } } return SVN_NO_ERROR; }