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

Re: svn_wc_prop_set4 not working as expected.

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 7 Jul 2012 00:01:34 +0100

Stefan Sperling wrote on Mon, Jun 25, 2012 at 10:21:22 +0200:
> On Fri, Jun 22, 2012 at 11:15:57AM -0500, lfdonald_at_rockwellcollins.com wrote:
> > Hello,
> > I'm trying to use svn_wc_prop_set4 to set a property on my local working
> > copy (1.7) and I keep getting the error:
> >
> > No write-lock in 'T:\VIP00192\test_1.7\LFD_Dev_14'
> >
> > OS: Windows
> > Compiler: visual c++
> > SVN package: svn-win32-1.7.5
> >
> > Leslie Donaldson
> >
> > Boiled down code:
> >
> > apr_pool_t* pool = NULL;
> > pool = svn_pool_create(NULL);
> > svn_fs_initialize (pool);
> > svn_config_ensure (NULL, pool);
> > apr_hash_t* cfg_hash = NULL;
> > svn_config_get_config(&cfg_hash, NULL, pool);
> > svn_config_t* cfg_config = (svn_config_t *)apr_hash_get(cfg_hash,
> > SVN_CONFIG_CATEGORY_CONFIG, APR_HASH_KEY_STRING);
> > svn_wc_context_t* wc_ctx = NULL;
> > svn_wc_context_create(&wc_ctx,cfg_config,result_pool,scratch_pool);
> >
> > char * name = "svn:externals";
> >
> > svn_wc_prop_set4(wc_ctx,FullPath,name,&value,svn_depth_empty,FALSE,NULL,NULL,NULL,NULL,NULL,scratch_pool);
>
> It looks like svn_wc_prop_set4() was made a public API in 1.7 by mistake.
> Please try using svn_client_propset_local() instead.
>
> You'd need to acquire a write lock on the working copy before calling
> svn_wc_prop_set4(). However the APIs to obtain this lock are not public
> APIs so you cannot use them in your application.
>

Let's deprecate svn_wc_prop_set4() then, and replace it by an
svn_wc_private.h version?

> To ease maintainability of Subversion we're currently phasing out all
> public libsvn_wc APIs, with the goal of providing related functionality
> at the libsvn_client layer instead.
>
> >
> > char* FullPath = "T:/VIP00192/test_1.7/LFD_Dev_14"
> > svn_string_t value; is a list of externals.
> >
Received on 2012-07-07 01:02:23 CEST

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

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