You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by HuiHuang <ye...@yahoo.com.cn> on 2009/07/26 08:27:29 UTC

some questions about wc-ng

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?

>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? :)

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.

Best
Huihuang
 				
--------------
yellow.flying
2009-07-26

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

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

Re: some questions about wc-ng

Posted by Neels Janosch Hofmeyr <ne...@elego.de>.
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

Re: some questions about wc-ng

Posted by HuiHuang <ye...@yahoo.com.cn>.
Hey,

>- detect different working copies sensibly
hmm...This is a good suggestion. And I think it is the key point too:)

>- handle them separately instead of showing an error
Here we want to do one commit for multiple working copies. So handle them
separately is not the finnal result we want. And that is why I ask the first
question.

Thank you, Neels~

Huihuang
------------------				 
yellow.flying
2009-07-27

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

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

RE: some questions about wc-ng

Posted by Bert Huijben <rh...@sharpsvn.net>.
> -----Original Message-----
> From: HuiHuang [mailto:yellow.flying@yahoo.com.cn]
> Sent: zondag 26 juli 2009 10:27
> To: dev@subversion.tigris.org
> Cc: Stefan Sperling; Hyrum K. Wright
> Subject: some questions about wc-ng
> 
> 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&dsMessageI
> d=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?

By definition you will only need one svn_wc_context_t. It will always handle all working copies for you, whether they have one database or not. You should never need more than one svn_wc_context_t database instance, unless you are going to use them concurrently (e.g. multithreading or from callbacks).

> >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?

Yes, it is the same thing.

	Bert

> 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? :)
> 
> 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.
> 
> Best
> Huihuang
> 
> --------------
> yellow.flying
> 2009-07-26
> 
> __________________________________________________
> 赶快注册雅虎超大容量免费邮箱?
> http://cn.mail.yahoo.com
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageI
> d=2375622

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