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

Re: some questions about wc-ng

From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Sun, 26 Jul 2009 19:26:20 +0200

HuiHuang wrote:
> Hey Stefan, Hyrum,
>
> I have read the following files recently and I have some questions:
> 1) notes/wc-ng-design
> 2) libsvn_wc/wc-metadata.sql
> 3) libsvn_wc/wc_db.h
> 4) Read the "State of the WC-NG World" thread on dev@
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2373285
>
>> In the thread "State of the WC-NG World" gstein said
>> "It is being replaced with svn_wc_context_t which is constructed once and
>> used for all operations across all directories and even across
>> distinct working copies. Essentially, a process can create one at
>> startup and use it for all calls."
>
> But how can we use svn_wc_context_t across distinct working copies?
> svn_wc_context_t is an opaque structure which contains a pointer to an
> svn_wc__db_t. As I understand we have one-db-per-working copy right
> now. So if we want to use svn_wc_context_t across distinct wc, should
> it contain multiple svn_wc__db_t?

I'm not sure what gstein and hwright have in mind, but as I understand,
there will be *one* database for all those working copies. This is still
work in progress. APIs will rev, stuff will change...

However, most of it will stay hidden from the API level at first. So,
probably, the guts of SVN will one day use a single database for all working
copies, but the API still looks and works exactly the same.

>
>> Another big change is removing the old "loggy" mechanism in favor of a
>> sqlite-based queue of operations to perform (essentially where we need
>> to "transact" changes across sqlite and the filesystem).
>
> I saw work_queue table in libsvn_wc/wc-metadata.sql and I do not know
> what "work" really is. Is it the same thing as "sqlite-based queue of
> operations" mentioned above?
>
> I am tring to follow the dev@ and svn@ maillist. But some topics in them are
> a little hard for me to understand and it takes me lot of time to read them.
> Any good suggestions to deal with the mails? :)

Heh, I felt the same. You don't have to read *all* of it. Just read all of
it that's addressed to you (or contains your name), and the rest you can
browse for interest, or not.

I use mail filters in my mail client to sort out mails that contain my name.

>
> I am not very clear on where to begin my new work right now. My plan is in
> the next few days:
> 1) Read more docs and make myself more clear about wn-ng.
> 2) Try to remove svn_wc_entry_t and svn_wc_adm_access_t reference in
> libsvn_wc and libsvn_client, especially in functions about commit, and use
> svn_wc_context>t instead.
> 3) Try to understand how can we do commit based on wc-ng.

Your task is "commit multiple working copies" -- as I understand it, you
can't really use wc-ng yet in the way you sound here. The new
one-db-for-all-working-copies is not implemented yet.

Rather, you should do something like open *another* ra_ layer thing and/or
client context when another working copy is encountered.

This feature should help a guy who says:
"Why does SVN not commit the other working copy along? If I do separate svn
calls for each WC, it works, but as soon as I mix the paths, it breaks. That
doesn't make sense to me."
So it's more like "act as if svn was invoked multiple times". Not like
"write wc-ng". ;)

In short:
- detect different working copies sensibly
- handle them separately instead of showing an error

I hope I'm not giving bad advice -- stsp, hwright, shout if I'm wrong.

~Neels

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

Received on 2009-07-26 19:28:16 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.