subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@vmoo.com>
Subject RE: svn_wc_prop_set4 not working as expected.
Date Sat, 07 Jul 2012 05:47:24 GMT
Every svn_wc API that changes the working copy requires its caller to
obtain a write lock. In the past that was done via the access batons
and now it requires another call.

But the most common ones are still private.

Bert Huijben (Cell phone)
From: Daniel Shahaf
Sent: 7-7-2012 1:02
To: lfdonald@rockwellcollins.com; users@subversion.apache.org
Cc: dev@subversion.apache.org
Subject: 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.
> >

Mime
View raw message