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

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

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Mon, 24 Aug 2009 09:07:23 +0200

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
Received on 2009-08-24 09:07:54 CEST

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

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