You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2012/07/07 01:01:34 UTC

Re: svn_wc_prop_set4 not working as expected.

Stefan Sperling wrote on Mon, Jun 25, 2012 at 10:21:22 +0200:
> On Fri, Jun 22, 2012 at 11:15:57AM -0500, lfdonald@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.
> >