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 Näslund <da...@longitudo.com> on 2009/08/23 18:45:14 UTC

Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Hi!

Just checking if I'm on the right track!

I want to replace adm_access batons in the svn_wc_diff_callbacks4_t
(file_changed) function. The file_changed callback in
libsvn_client/merge.c is called from libsvn_client/repos_diff.c. 

My problem is with the locking. An adm_access baton is holding a
write-lock to the target. I need to free that lock and regain it in
libsvn_client/merge.c.

The best thing would be if I could just get the existing adm_access
baton for the path. If I were in libsvn_wc I could use
svn_wc__adm_retrieve_internal2(). Any suggestions?

Here is an exceprt of the code. First the caller, then the callee:

* subversion/libsvn_client/repos_diff.c
  (close_file)

          // if (b->added)
          // call eb->diff_callbacks->file_changed
 1324       else
 1325         {
 1326           SVN_ERR(svn_wc_adm_close2(eb->adm_access, eb->pool));
 1327 
 1328           SVN_ERR(eb->diff_callbacks->file_changed
 1329                   (eb->wc_ctx, &content_state, &prop_state, &b->tree_conflicted,
 1330                    b->wcpath,
 1331                    b->path_end_revision ? b->path_start_revision : NULL,
 1332                    b->path_end_revision,
 1333                    b->edit_baton->revision,
 1334                    b->edit_baton->target_revision,
 1335                    mimetype1, mimetype2,
 1336                    b->propchanges, b->pristine_props,
 1337                    b->edit_baton->diff_cmd_baton));
 1338 
 1339           /* TODO: Open the adm_access again? Get one already open? */
 1340           SVN_ERR(svn_wc_adm_probe_open3(&eb->adm_access, NULL, b->wcpath, 
 1341                                          eb->dry_run, -1, NULL, NULL, eb->pool));


* subversion/libsvn_client/merge.c 
  (merge_file_changed)

 1254  err = svn_wc__adm_open_in_context(&adm_access, wc_ctx, 
 1255                                       svn_dirent_dirname(mine, subpool),
 1256                                       ! merge_b->dry_run, 0, NULL, NULL,
 1257                                       subpool);
 1258   
 1259   /* TODO What to do for what errors? */
 1260   if (err && merge_b->dry_run)
 1261     { 
 1262       svn_error_clear(err);
 1263       adm_access = NULL;
 1264     }
 1265   else if (err && err->apr_err == SVN_ERR_WC_NOT_LOCKED)
 1266     { 
 1267       if (merge_b->ctx->notify_func)
 1268         { 
 1269           
 1270           /* TODO rev number not correct */
 1271           (*merge_b->ctx->notify_func)(merge_b->ctx->notify_baton, mine,
 1272                                        svn_wc_notify_skip, svn_node_file,
 1273                                        NULL, svn_wc_notify_state_missing,
 1274                                        svn_wc_notify_state_unknown,
 1275                                        older_rev);
 1276          }
 1277       svn_error_clear(err);
 1278     
 1279       return SVN_NO_ERROR;
 1280     } 
 1281   else if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
 1282     {   
 1283       svn_error_clear(err);
 1284       adm_access = NULL;
 1285     }     
 1286   else if (err)
 1287     {    
 1288       return svn_error_return(err);
 1289     }    

Mvh
Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386552

RE: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Daniel Näslund [mailto:daniel@longitudo.com]
> Sent: dinsdag 25 augustus 2009 15:13
> To: dev@subversion.tigris.org
> Subject: Re: Trouble replacing adm_access in libsvn_client/merge.c
> (merge_file_changed)
> 
> On Tue, Aug 25, 2009 at 02:52:53PM +0200, Hyrum K. Wright wrote:
> > On Aug 25, 2009, at 2:46 PM, Bert Huijben wrote:
> 
> > > Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context()
> > > helper.
> > >
> > > I think that would be a useful helper in more places of
> > > libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.
> >
> > Note that we already have a svn_wc__adm_retrieve_internal2() API
> which
> > accepts an wc_db and abspath, and just fetches the baton from the
> db's
> > set of cached batons.  Perhaps this might be of some use.  One catch
> > here is that the *type* of the baton needs to be correct.  In other
> > words, we should return a cached read baton, when the caller asks for
> > a read/write baton.  (I tried making *all* batons read/write at one
> > point, but that introduces problems of it's own, believe it or not.)
> 
> I was planning on just wrapping svn_wc__adm_retrieve_internal2() and
> feed it with the db of the wc_ctx. I thought that I could just get me
> the existing baton. For my purpose (those darn wc_diff_callbacks) I
> know
> what kind of lock was set by the caller. Hrm, I'm reading a course in
> design
> pattern and that doesn't sound like louse coupling to me.
> 
> Can one path have multiple batons, i.e. one read baton and another
> write
> baton? I thought that there would only be one?

In the old code there can be more, but there should be just one. (The wc_db
+- has a hashtable mapping absolute paths to access batons)

Most svn_client_*() function calls start by opening an access baton for
writing for the part of the working copy they are interested in (depth
infinity for most recursive calls) and retrieving this baton via the context
will usually work just fine.

	Bert
> 
> > What *I* want to see, and I don't know if we have it or not, is
> > something which I could call to "go get me an access baton for PATH,
> > whether you fetch the cached one, or whether you open a new one, I
> > don't care."  Maybe we have that already, or maybe it's just a pipe
> > dream.
> 
> I haven't found one.

svn_wc_adm_try_probe...() does about that, but it is not very friendly,
because other code has to switch to the same kind of calls then. (It
sometimes receives an access baton, sometimes not.. and access batons are
closed everywhere via pool cleanup).

I think moving to lock once before the major operation will make the
transfer to WC-NG easier. (I don't think we should introduce new access
batons just to make a few places easier).

	Bert

(Mostly working on things beside subversion and on the adm_crawler)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387074


What's up with SVNTreeUnequal: Expected and actual SVN_ROOT_NODE differs

Posted by Daniel Näslund <da...@longitudo.com>.
> > > Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context()  
> > > helper.
> > >
> > > I think that would be a useful helper in more places of  
> > > libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.

> > Note that we already have a svn_wc__adm_retrieve_internal2() API which  
> > accepts an wc_db and abspath, and just fetches the baton from the db's  
> > set of cached batons.  Perhaps this might be of some use.  One catch  
> > here is that the *type* of the baton needs to be correct.  In other  
> > words, we should return a cached read baton, when the caller asks for  
> > a read/write baton.  (I tried making *all* batons read/write at one  
> > point, but that introduces problems of it's own, believe it or not.)

I've written svn_wc__adm_retrieve_from_context() as a simple wrapper
around svn_wc__adm_retrieve_internal2(). It just returns the result in
adm_access.

When using it like this in libsvn_client/merge.c (merge_file_changed):

  SVN_ERR(svn_dirent_get_absolute(&mine_dir_abspath, 
                                  svn_dirent_dirname(mine, subpool),
                                  subpool));
  
  SVN_ERR(svn_wc__adm_retrieve_from_context(&adm_access, wc_ctx,
                                            mine_dir_abspath,
                                            subpool));

I get an SVNTreeUnequal exception and a message that says: 

Expected '__SVN_ROOT_NODE' and actual '__SVN_ROOT_NODE' in skip tree are
different!
...
Unequal Types: one Node is a file, the other is a directory

I get it for atleast five of the merge_tests.  My interpretation is that
my adm_access refers to a path that is a file when it should refer to
the directory above. But mine should refer to the file and using
svn_dirent_dirname() should give me a path to the parent directory of
the file.

I will continue to poke around but I'm grateful for any suggestions.

Mvh
Daniel

(Sorry for all theese questions. I'm a slow starter but hopefully I will
gain speed soon.)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387237

Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Daniel Näslund <da...@longitudo.com>.
On Tue, Aug 25, 2009 at 02:52:53PM +0200, Hyrum K. Wright wrote:
> On Aug 25, 2009, at 2:46 PM, Bert Huijben wrote:

> > Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context()  
> > helper.
> >
> > I think that would be a useful helper in more places of  
> > libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.
> 
> Note that we already have a svn_wc__adm_retrieve_internal2() API which  
> accepts an wc_db and abspath, and just fetches the baton from the db's  
> set of cached batons.  Perhaps this might be of some use.  One catch  
> here is that the *type* of the baton needs to be correct.  In other  
> words, we should return a cached read baton, when the caller asks for  
> a read/write baton.  (I tried making *all* batons read/write at one  
> point, but that introduces problems of it's own, believe it or not.)

I was planning on just wrapping svn_wc__adm_retrieve_internal2() and
feed it with the db of the wc_ctx. I thought that I could just get me
the existing baton. For my purpose (those darn wc_diff_callbacks) I know
what kind of lock was set by the caller. Hrm, I'm reading a course in design
pattern and that doesn't sound like louse coupling to me.

Can one path have multiple batons, i.e. one read baton and another write
baton? I thought that there would only be one?
 
> What *I* want to see, and I don't know if we have it or not, is  
> something which I could call to "go get me an access baton for PATH,  
> whether you fetch the cached one, or whether you open a new one, I  
> don't care."  Maybe we have that already, or maybe it's just a pipe  
> dream.

I haven't found one.

Mvh
Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387068

Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Aug 25, 2009, at 2:46 PM, Bert Huijben wrote:

>> -----Original Message-----
>> From: Daniel Näslund [mailto:daniel@longitudo.com]
>> Sent: dinsdag 25 augustus 2009 14:17
>> To: dev@subversion.tigris.org
>> Subject: Re: Trouble replacing adm_access in libsvn_client/merge.c
>> (merge_file_changed)
>>
>> Thanks Julian for your answers.
>>
>> As I see it, this is the situation:
>>
>> It's not an option to close an adm_access baton and reopen it.
>> To retrieve an already created adm_access baton I need another
>> associated with it or a wc_ctx. Ultimately it's the db I need.
>> BUT the db is not allowed to be known outside of libsvn_wc, not even
>> for
>> this temporary fix.
>>
>> Can I create a function svn_wc_adm_retrieve_with_wc_ctx() or  
>> something
>> similar? Right now I can only get a new adm_access from a wc_ctx when
>> outside of libsvn_wc. I can not retrieve an already created  
>> adm_access
>> from a wc_ctx.
>
> Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context()  
> helper.
>
> I think that would be a useful helper in more places of  
> libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.

Note that we already have a svn_wc__adm_retrieve_internal2() API which  
accepts an wc_db and abspath, and just fetches the baton from the db's  
set of cached batons.  Perhaps this might be of some use.  One catch  
here is that the *type* of the baton needs to be correct.  In other  
words, we should return a cached read baton, when the caller asks for  
a read/write baton.  (I tried making *all* batons read/write at one  
point, but that introduces problems of it's own, believe it or not.)

What *I* want to see, and I don't know if we have it or not, is  
something which I could call to "go get me an access baton for PATH,  
whether you fetch the cached one, or whether you open a new one, I  
don't care."  Maybe we have that already, or maybe it's just a pipe  
dream.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387056


RE: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: Daniel Näslund [mailto:daniel@longitudo.com]
> Sent: dinsdag 25 augustus 2009 14:17
> To: dev@subversion.tigris.org
> Subject: Re: Trouble replacing adm_access in libsvn_client/merge.c
> (merge_file_changed)
> 
> Thanks Julian for your answers.
> 
> As I see it, this is the situation:
> 
> It's not an option to close an adm_access baton and reopen it.
> To retrieve an already created adm_access baton I need another
> associated with it or a wc_ctx. Ultimately it's the db I need.
> BUT the db is not allowed to be known outside of libsvn_wc, not even
> for
> this temporary fix.
> 
> Can I create a function svn_wc_adm_retrieve_with_wc_ctx() or something
> similar? Right now I can only get a new adm_access from a wc_ctx when
> outside of libsvn_wc. I can not retrieve an already created adm_access
> from a wc_ctx.

Yes, please add a svn_wc__adm_retrieve_(with/via/...?)_context() helper.

I think that would be a useful helper in more places of libsvn_client, until libsvn_wc accepts wc_ctx, abspath everywhere.

Thanks for your help,

	Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387054


Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Näslund wrote:
> Thanks Julian for your answers.

I'm interested to see how this works out, as I learn about WC-NG. I hope
someone can guide you in the meantime.

- Julian

> As I see it, this is the situation:
> 
> It's not an option to close an adm_access baton and reopen it.
> To retrieve an already created adm_access baton I need another
> associated with it or a wc_ctx. Ultimately it's the db I need.
> BUT the db is not allowed to be known outside of libsvn_wc, not even for
> this temporary fix.
> 
> Can I create a function svn_wc_adm_retrieve_with_wc_ctx() or something
> similar? Right now I can only get a new adm_access from a wc_ctx when
> outside of libsvn_wc. I can not retrieve an already created adm_access
> from a wc_ctx.
> 
> I've tried the following in libsvn_client/merge.c (merge_file_changed):
> 
>   SVN_ERR(svn_wc__adm_open_in_context(&temp, wc_ctx, 
>                                       svn_dirent_dirname(mine, subpool),
>                                       ! merge_b->dry_run, -1, NULL, NULL,
>                                       subpool));
> 
> 
>   err = svn_wc_adm_retrieve(&adm_access, temp, 
>                             svn_dirent_dirname(mine, subpool),
>                             subpool);
> 
> When doing this I get an error saying that the directory is locked,
> probably because there is already an adm_access with a write_lock
> allocated in the calling function.
> 
> Mvh
> Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387053


Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Daniel Näslund <da...@longitudo.com>.
Thanks Julian for your answers.

As I see it, this is the situation:

It's not an option to close an adm_access baton and reopen it.
To retrieve an already created adm_access baton I need another
associated with it or a wc_ctx. Ultimately it's the db I need.
BUT the db is not allowed to be known outside of libsvn_wc, not even for
this temporary fix.

Can I create a function svn_wc_adm_retrieve_with_wc_ctx() or something
similar? Right now I can only get a new adm_access from a wc_ctx when
outside of libsvn_wc. I can not retrieve an already created adm_access
from a wc_ctx.

I've tried the following in libsvn_client/merge.c (merge_file_changed):

  SVN_ERR(svn_wc__adm_open_in_context(&temp, wc_ctx, 
                                      svn_dirent_dirname(mine, subpool),
                                      ! merge_b->dry_run, -1, NULL, NULL,
                                      subpool));


  err = svn_wc_adm_retrieve(&adm_access, temp, 
                            svn_dirent_dirname(mine, subpool),
                            subpool);

When doing this I get an error saying that the directory is locked,
probably because there is already an adm_access with a write_lock
allocated in the calling function.

Mvh
Daniel

On Mon, Aug 24, 2009 at 01:19:13PM +0100, Julian Foad wrote:
> On Mon, 2009-08-24 at 09:07 +0200, Daniel Näslund wrote:
> > To solve the problem I need to understand the wc better. I'm writing
> > down how I think it works and then perhaps someone can correct me!
> > 
> > 1). svn_wc_adm_access_t and svn_wc_context_t both has a pointer to a db.
> > I can create an adm_access from a wc_ctx by using this db.
> 
> I'm not very up-to-speed on WCNG so I'll let someone else check that.
> 
> > 2). The locking mechanism in adm_access determines if you can write to
> > the administrative area of the path or just read using the adm_access.
> 
> Yes. Note that the read access that you get from an access baton is
> often not called a "lock" at all, and a write lock is often called just
> "a lock".
> 
> > 3). You can't open a adm_access to a file. It refers to a directory with
> > an administrative area (.svn).
> 
> Correct. You still need an adm_access to get to the metadata of a file,
> but the one you need is its parent directory's adm_access.
> 
> > 4). The locking in adm_access is physically a file .svn/lock but in
> > wc_ctx it will be in the table LOCK in the db. Or is there two types of
> > locking? One in the wc and one in the repository? In libsvn_wc/README a
> > lock-token is described as an URL present if the entry is locked in the
> > repo.
> 
> There are (at least) two completely unrelated kinds of locking.
> Repository locks (in the table 'LOCK', with lock-tokens and URLs) are
> for users to lock nodes in the repository so that they don't get
> accidentally modified by another user. The locking of the WC metadata is
> for the Subversion libraries to guarantee that only one instance of a
> Subversion client program is modifying the WC metadata at one time
> (loosely speaking, without going in to the exact rules).
> 
> > 5). In wc_ctx there is supposed to be only one administrative area
> > accessed through wc_ctx. There will be no need for wc locking then.
> 
> Not sure.
> 
> > 6). Locking is set at one time and should not be altered through the
> > lifetime of the adm_access.
> 
> This is mainly true in practice, although I think there may be a
> (private?) function somewhere to upgrade a read lock to a write lock.
> 
> I don't think you can (or should) "free that lock and regain it".
> 
> > 7). There is no API available for libsvn_client for accessing an
> > existing adm_access baton by just knowing its path.
> 
> That sounds right. I think it logically has to be so.
> 
> > 8). A lock held for a directory applies to all it's subdirectories.
> 
> In WC-1, an adm_access lock applies to only its own directory and the
> files that are its immediate children, not subdirectories. Often the
> caller requesting a lock will request a "recursive" lock which will
> cause every directory in the sub-tree to be locked.
> 
> > 9). The adm_access for the parent path of the file is sent to
> > merge_file_changed(). That is because... Actually, I don't know at all.
> 
> That will be (I assume) because the function may need to examine or
> update some metadata of the file. The parent directory's adm_access is
> the one it needs.
> 
> I hope that's some help.
> 
> - Julian
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387046


Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Julian Foad <ju...@btopenworld.com>.
On Mon, 2009-08-24 at 09:07 +0200, Daniel Näslund wrote:
> To solve the problem I need to understand the wc better. I'm writing
> down how I think it works and then perhaps someone can correct me!
> 
> 1). svn_wc_adm_access_t and svn_wc_context_t both has a pointer to a db.
> I can create an adm_access from a wc_ctx by using this db.

I'm not very up-to-speed on WCNG so I'll let someone else check that.

> 2). The locking mechanism in adm_access determines if you can write to
> the administrative area of the path or just read using the adm_access.

Yes. Note that the read access that you get from an access baton is
often not called a "lock" at all, and a write lock is often called just
"a lock".

> 3). You can't open a adm_access to a file. It refers to a directory with
> an administrative area (.svn).

Correct. You still need an adm_access to get to the metadata of a file,
but the one you need is its parent directory's adm_access.

> 4). The locking in adm_access is physically a file .svn/lock but in
> wc_ctx it will be in the table LOCK in the db. Or is there two types of
> locking? One in the wc and one in the repository? In libsvn_wc/README a
> lock-token is described as an URL present if the entry is locked in the
> repo.

There are (at least) two completely unrelated kinds of locking.
Repository locks (in the table 'LOCK', with lock-tokens and URLs) are
for users to lock nodes in the repository so that they don't get
accidentally modified by another user. The locking of the WC metadata is
for the Subversion libraries to guarantee that only one instance of a
Subversion client program is modifying the WC metadata at one time
(loosely speaking, without going in to the exact rules).

> 5). In wc_ctx there is supposed to be only one administrative area
> accessed through wc_ctx. There will be no need for wc locking then.

Not sure.

> 6). Locking is set at one time and should not be altered through the
> lifetime of the adm_access.

This is mainly true in practice, although I think there may be a
(private?) function somewhere to upgrade a read lock to a write lock.

I don't think you can (or should) "free that lock and regain it".

> 7). There is no API available for libsvn_client for accessing an
> existing adm_access baton by just knowing its path.

That sounds right. I think it logically has to be so.

> 8). A lock held for a directory applies to all it's subdirectories.

In WC-1, an adm_access lock applies to only its own directory and the
files that are its immediate children, not subdirectories. Often the
caller requesting a lock will request a "recursive" lock which will
cause every directory in the sub-tree to be locked.

> 9). The adm_access for the parent path of the file is sent to
> merge_file_changed(). That is because... Actually, I don't know at all.

That will be (I assume) because the function may need to examine or
update some metadata of the file. The parent directory's adm_access is
the one it needs.

I hope that's some help.

- Julian


> It feels like if I'm missing a big piece of the puzzle!
> 
> Mvh
> Daniel
> 
> On Sun, Aug 23, 2009 at 08:45:14PM +0200, Daniel Näslund wrote:
> > Hi!
> >
> > Just checking if I'm on the right track!
> >
> > I want to replace adm_access batons in the svn_wc_diff_callbacks4_t
> > (file_changed) function. The file_changed callback in
> > libsvn_client/merge.c is called from libsvn_client/repos_diff.c.
> >
> > My problem is with the locking. An adm_access baton is holding a
> > write-lock to the target. I need to free that lock and regain it in
> > libsvn_client/merge.c.
> >
> > The best thing would be if I could just get the existing adm_access
> > baton for the path. If I were in libsvn_wc I could use
> > svn_wc__adm_retrieve_internal2(). Any suggestions?
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386648

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386718


Re: Trouble replacing adm_access in libsvn_client/merge.c (merge_file_changed)

Posted by Daniel Näslund <da...@longitudo.com>.
To solve the problem I need to understand the wc better. I'm writing
down how I think it works and then perhaps someone can correct me!

1). svn_wc_adm_access_t and svn_wc_context_t both has a pointer to a db.
I can create an adm_access from a wc_ctx by using this db.

2). The locking mechanism in adm_access determines if you can write to
the administrative area of the path or just read using the adm_access.

3). You can't open a adm_access to a file. It refers to a directory with
an administrative area (.svn).

4). The locking in adm_access is physically a file .svn/lock but in
wc_ctx it will be in the table LOCK in the db. Or is there two types of
locking? One in the wc and one in the repository? In libsvn_wc/README a
lock-token is described as an URL present if the entry is locked in the
repo.

5). In wc_ctx there is supposed to be only one administrative area
accessed through wc_ctx. There will be no need for wc locking then.

6). Locking is set at one time and should not be altered through the
lifetime of the adm_access.

7). There is no API available for libsvn_client for accessing an
existing adm_access baton by just knowing its path.

8). A lock held for a directory applies to all it's subdirectories.

9). The adm_access for the parent path of the file is sent to
merge_file_changed(). That is because... Actually, I don't know at all.

It feels like if I'm missing a big piece of the puzzle!

Mvh
Daniel

On Sun, Aug 23, 2009 at 08:45:14PM +0200, Daniel Näslund wrote:
> Hi!
>
> Just checking if I'm on the right track!
>
> I want to replace adm_access batons in the svn_wc_diff_callbacks4_t
> (file_changed) function. The file_changed callback in
> libsvn_client/merge.c is called from libsvn_client/repos_diff.c.
>
> My problem is with the locking. An adm_access baton is holding a
> write-lock to the target. I need to free that lock and regain it in
> libsvn_client/merge.c.
>
> The best thing would be if I could just get the existing adm_access
> baton for the path. If I were in libsvn_wc I could use
> svn_wc__adm_retrieve_internal2(). Any suggestions?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386648