From owner-svn-src-user@FreeBSD.ORG Wed Sep 12 13:43:43 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C28C1065674; Wed, 12 Sep 2012 13:43:43 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBA58FC12; Wed, 12 Sep 2012 13:43:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8CDhhrs079059; Wed, 12 Sep 2012 13:43:43 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8CDhhxC079056; Wed, 12 Sep 2012 13:43:43 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201209121343.q8CDhhxC079056@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 12 Sep 2012 13:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240399 - user/des/svnsup/bin/distill X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 13:43:43 -0000 Author: des Date: Wed Sep 12 13:43:42 2012 New Revision: 240399 URL: http://svn.freebsd.org/changeset/base/240399 Log: Add support for Subversion 1.7 while retaining backward compatibility with 1.6. Modified: user/des/svnsup/bin/distill/distill.c user/des/svnsup/bin/distill/distill.h Modified: user/des/svnsup/bin/distill/distill.c ============================================================================== --- user/des/svnsup/bin/distill/distill.c Wed Sep 12 13:39:58 2012 (r240398) +++ user/des/svnsup/bin/distill/distill.c Wed Sep 12 13:43:42 2012 (r240399) @@ -61,7 +61,11 @@ distill(const char *url, unsigned long r SVNSUP_APR_ERROR(status, "apr_pool_create()"); /* canonicalize URL */ +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 7 url = svn_path_canonicalize(url, pool); +#else + url = svn_uri_canonicalize(url, pool); +#endif /* set up our authentication system */ /* XXX check for errors */ @@ -74,9 +78,22 @@ distill(const char *url, unsigned long r /* open a connection to the repo */ config = apr_hash_make(pool); +#if SVN_VER_MAJOR == 1 && SVN_VER_MINOR < 7 error = svn_ra_open3(&ra_session, url, NULL, &ra_callbacks, NULL, config, pool); SVNSUP_SVN_ERROR(error, "svn_ra_open3()"); +#else + for (;;) { + const char *curl = NULL; + error = svn_ra_open4(&ra_session, &curl, url, NULL, + &ra_callbacks, NULL, config, pool); + if (curl == NULL) + break; + SVNSUP_DEBUG("redirected to %s\n", curl); + url = curl; + } + SVNSUP_SVN_ERROR(error, "svn_ra_open3()"); +#endif /* get repo uuid */ error = svn_ra_get_uuid2(ra_session, &uuid, pool); Modified: user/des/svnsup/bin/distill/distill.h ============================================================================== --- user/des/svnsup/bin/distill/distill.h Wed Sep 12 13:39:58 2012 (r240398) +++ user/des/svnsup/bin/distill/distill.h Wed Sep 12 13:43:42 2012 (r240399) @@ -42,6 +42,7 @@ #include #include #include +#include #include "svnsup/svnsup.h"