You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2006/09/18 14:45:38 UTC

[PATCH][merge-tracking]libsvn_fs_util

Hi All,
As discussed in the thread,
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=119803
I am posting the libsvn_fs_util patch in 2 parts after incorporating the 
review comments.

This is the <b>second</b> part.

Find the attached patch and log.

With regards
Kamesh Jayachandran



Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Kamesh Jayachandran <ka...@collab.net>.
Daniel Rall wrote:
> Kamesh, how's are the libsvn_fs_util patches going?
>   
Dan currently stuck up with removing 'neon' from the dependency libs 
list of 'svn' and other binaries.(Which was one of the review comment 
about removing sqlite). I am almost through with that, May be by today I 
will share what I have observed on that front and corresponding patch.

May be today or max tomorrow I will post the rest of the libsvn_fs_util 
patch.

Sorry for the delay.

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Daniel Rall <dl...@collab.net>.
Kamesh, how's are the libsvn_fs_util patches going?

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Daniel Rall <dl...@collab.net>.
On Mon, 18 Sep 2006, Malcolm Rowe wrote:

> On Mon, Sep 18, 2006 at 08:15:38PM +0530, Kamesh Jayachandran wrote:
...
> > Index: subversion/include/private/svn_fs_merge_info.h
> > ===================================================================
> > --- subversion/include/private/svn_fs_merge_info.h	(revision 0)
> > +++ subversion/include/private/svn_fs_merge_info.h	(revision 0)
> > @@ -0,0 +1,42 @@
> > +/*
> > + * svn_fs_merge_info.h:  Declarations for the 
> > + * public functions of libsvn_fs_util to be consumed by only fs_* libs.
...
> If these following functions are internal, shouldn't we name
> them according to the double-underscore convention we use to mark
> non-public-but-exported functions?

Good question.  We did not do so in include/private/svn_atomic.h.  I
don't have a strong preference here, but whichever we choose, it
should be consistent.  Here's the relevant section of HACKING:

  "All library-internal declarations made in a library-private header
  file (such as libsvn_wc/wc.h) must be signified by two underscores
  after the library prefix (such as svn_wc__ensure_directory). All
  declarations private to a single file (such as the static function
  get_entry_url inside libsvn_wc/update_editor.c) do not require any
  additional namespace decorations. Symbols that need to be used
  outside a library, but still are not public are put in a public
  header, but use the double underscore notation. Such symbols may be
  used by Subversion core code only, and we try to be restrictive
  regarding the introduction of such entities."

  - http://subversion.tigris.org/hacking.html#other-conventions

> More on function naming: what's the library prefix?  Is it
> svn_fs_mergeinfo_, svn_fs_merge_, or svn_fs_util_ ?  Why do you have
> 'mergeinfo' and 'merge_info'?

The library name is "libsvn_fs_util", and the prefix for this header
file is "svn_fs_merge_info_".  The prefix usage should be consistent.

> > +/* Create the sqlite mergeinfo.db with default schema
> > + * under 'db' directory of the repository identified by @a PATH
> > + * use @a POOL for any temporary allocations. */
> > +svn_error_t *
> > +svn_fs_mergeinfo_db_create(const char *path, apr_pool_t *pool);
> 
> The caller doesn't need to know what the filename or location of the
> mergeinfo database is.  I'm curious as to why you're passing a repository
> path rather than a filesystem path, though - the repository shouldn't
> need to be referenced by the FS implementation.
> 
> Do you really need a separate call for creating the database?  Why can't
> you just create it on the first call to update_index?

This one might've come up before?

Since the index creation API can be called from 'svnadmin create', is
simplifying this private API a good enough trade-off to incur the
(minor) runtime overhead?

...
> > + * Get the mergeinfo for the current transaction identified by @a NEW_REV
> > + * and @a TXN if any and record the same in sqlite.
> 
> Ditto the fact that it's a sqlite database.  If this is a utility
> function, it should be documented something along the lines of "Update
> the mergeinfo index according to the changes made in transaction TXN or
> revision NEW_REV".
> 
> Should we be using Doxygen-style or INTERNAL-style markup here?  Pick one,
> not both.

+1

...
> > +/* Get the merge info for the set of @a PATHS and have it as @a *MERGEINFO.
> > + */
> > +svn_error_t *
> > +svn_fs_util_get_merge_info(apr_hash_t **mergeinfo,
> > +                           svn_fs_root_t *root,
> > +                           const apr_array_header_t *paths,
> > +                           svn_boolean_t include_parents,
> > +                           apr_pool_t *pool);
> 
> Random thoughts: 'include_parents' isn't documented.

It's a flag to the FS to indicate whether or not to pull back merge
info from all parent paths.

...
> Does this function work if the index isn't up to date? (that is, if
> there isn't an index, or isn't an index entry for the root in question,
> does it derive the answer from the base data)  If not, please make that
> clear by describing it so ("Return the merge info from the index..." or
> similar) and saying roughly what happens in the two cases I mentioned
> (I assume it returns an error, so we should say so, and preferably say
> which one it returns).

It should start returning an error, yeah.


Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Peter Samuelson <pe...@p12n.org>.
[Kamesh Jayachandran]
> <snip>
> The returned sqlite3* can only be used in the same thread in which it 
> was created. It is an error to call sqlite3_open() in one thread then 
> pass the resulting database handle off to another thread to use.

Not that this has any effect on the present discussion, but I note that
this changed in sqlite 3.3.1; it now explicitly permits using a handle
in multiple threads.

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Tue, Sep 19, 2006 at 06:36:44PM +0530, Kamesh Jayachandran wrote:
> Malcolm Rowe wrote:
> >Out of interest, what happens if two threads try to create the mergeinfo
> >database at the same time?
> >
> >Regards,
> >Malcolm
> >
> >  
> Not sure what will happen, This is what I see in sqlite docs at 
> http://www.sqlite.org/capi3ref.html#sqlite3_open
> <snip>
> The returned sqlite3* can only be used in the same thread in which it 
> was created. It is an error to call sqlite3_open 
> <http://www.sqlite.org/capi3ref.html#sqlite3_open>() in one thread then 
> pass the resulting database handle off to another thread to use. This 
> restriction is due to goofy design decisions (bugs?) in the way some 
> threading implementations interact with file locks.
> </snip>
> 

That's about thread affinity, not opening a non-existent database from two
threads simultaneously.  I guess it'll work, as long as your CREATE TABLE
statement includes an IF NOT EXISTS clause...  Just checked, it doesn't,
but you don't have a problem anyway because you currently don't support
creation of the mergeinfo schema except at filesystem-creation time.
(You will, of course, need to fix that somehow :-))

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Kamesh Jayachandran <ka...@collab.net>.
Malcolm Rowe wrote:
> On Tue, Sep 19, 2006 at 06:18:14PM +0530, Kamesh Jayachandran wrote:
>   
>>> Hm.  That's not ideal - get_index should be a read-only operation, but
>>> you can't prevent it from creating the database.  
>>>       
>> may be possible to check for the existence of file 'mergeinfo.db' as a 
>> part of fs open hook like 'svn_fs_fs__open'.
>>     
>
> And then do what, create it?  If at all possible, we shouldn't create the
> mergeinfo database until we actually need to use it - for a parallel,
> see fs_fs.c:read_format(), where we deliberately don't create the FS
> format file if it doesn't exist.
>
> Out of interest, what happens if two threads try to create the mergeinfo
> database at the same time?
>
> Regards,
> Malcolm
>
>   
Not sure what will happen, This is what I see in sqlite docs at 
http://www.sqlite.org/capi3ref.html#sqlite3_open
<snip>
The returned sqlite3* can only be used in the same thread in which it 
was created. It is an error to call sqlite3_open 
<http://www.sqlite.org/capi3ref.html#sqlite3_open>() in one thread then 
pass the resulting database handle off to another thread to use. This 
restriction is due to goofy design decisions (bugs?) in the way some 
threading implementations interact with file locks.
</snip>


With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Tue, Sep 19, 2006 at 06:18:14PM +0530, Kamesh Jayachandran wrote:
> >Hm.  That's not ideal - get_index should be a read-only operation, but
> >you can't prevent it from creating the database.  
> may be possible to check for the existence of file 'mergeinfo.db' as a 
> part of fs open hook like 'svn_fs_fs__open'.

And then do what, create it?  If at all possible, we shouldn't create the
mergeinfo database until we actually need to use it - for a parallel,
see fs_fs.c:read_format(), where we deliberately don't create the FS
format file if it doesn't exist.

Out of interest, what happens if two threads try to create the mergeinfo
database at the same time?

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Kamesh Jayachandran <ka...@collab.net>.
Malcolm Rowe wrote:
> On Tue, Sep 19, 2006 at 02:24:49PM +0530, Kamesh Jayachandran wrote:
>   
>>> I assume that SQLite returns an identifiable error if the database
>>> doesn't exist when you try to open it, so you could just trap that error
>>> and create it then:
>>>  
>>>       
>> Unfortunately sqlite3_open never fails for non-existent db rather 
>> creates the empty db.
>>
>>     
>
> Hm.  That's not ideal - get_index should be a read-only operation, but
> you can't prevent it from creating the database.  
may be possible to check for the existence of file 'mergeinfo.db' as a 
part of fs open hook like 'svn_fs_fs__open'.
What do you think?

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Tue, Sep 19, 2006 at 02:24:49PM +0530, Kamesh Jayachandran wrote:
> 
> >I assume that SQLite returns an identifiable error if the database
> >doesn't exist when you try to open it, so you could just trap that error
> >and create it then:
> >  
> Unfortunately sqlite3_open never fails for non-existent db rather 
> creates the empty db.
> 

Hm.  That's not ideal - get_index should be a read-only operation, but
you can't prevent it from creating the database.  And SQLite doesn't
give you a distinctive error for 'table does not exist', so you can't
decide to create the table if the query fails.

I suppose it's probably best to leave it as-is then: have an explicit
call to initialise the mergeinfo index, and allow the 'get' and 'set'
functions to fail until that's been done.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Kamesh Jayachandran <ka...@collab.net>.
> I assume that SQLite returns an identifiable error if the database
> doesn't exist when you try to open it, so you could just trap that error
> and create it then:
>
> 	err = open_database(&handle, ...)
> 	if (err && err != database_not_found)
> 	  return err;
> 	if (err)
> 	  create_database(&handle, ...)
>   
Unfortunately sqlite3_open never fails for non-existent db rather 
creates the empty db.


With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Malcolm Rowe <ma...@farside.org.uk>.
Hi Kamesh,

On Tue, Sep 19, 2006 at 11:45:36AM +0530, Kamesh Jayachandran wrote:
> >Do you really need a separate call for creating the database?  Why can't
> >you just create it on the first call to update_index?
> >
> >  
> Yes it is possible. I see a point in your suggestion.
> Creating 'mergeinfo.db' from first call to 'update_index' has the 
> advantage of seamlessly upgrading the old repos.
> Downside I see for every update_index call I need to do the check.
> Not sure what would be the better way to take.
> 

I assume that SQLite returns an identifiable error if the database
doesn't exist when you try to open it, so you could just trap that error
and create it then:

	err = open_database(&handle, ...)
	if (err && err != database_not_found)
	  return err;
	if (err)
	  create_database(&handle, ...)

You probably could do something similar in get_mergeinfo, allowing you
to treat a non-existent database the same as an empty one.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Kamesh Jayachandran <ka...@collab.net>.
Malcolm Rowe wrote:
> Did you confirm that removing the direct sqlite dependency doesn't
> cause the problem I mentioned previously? (the 'neon' problem mentioned
> in build.conf).
>
>   
I will take this to other thread.
>> Index: subversion/libsvn_fs_fs/fs.h
>> ===================================================================
>> --- subversion/libsvn_fs_fs/fs.h	(revision 21525)
>> +++ subversion/libsvn_fs_fs/fs.h	(working copy)
>> @@ -71,14 +67,6 @@
>>  #endif
>>  } fs_fs_data_t;
>>  
>> -/* Transactions need their own private opened copy of the mergeinfo
>> -   database so that their sql commands are not shared between each other. */
>> -typedef struct
>> -{
>> -  /* Merge tracking database. */
>> -  sqlite3 *mtd;
>> -} fs_txn_data_t;
>> -
>>     
>
> I'm just curious - I'm not really reviewing the implementation - but
> where did this logic or concept move to?
>
>   
The 'mergeinfo backend' could be different for different for 'fs' 
backend in the near future.
This exercise just makes both 'fs_fs' and 'fs_base' to consume 'sqlite' 
for a while till 'fs_base' has its own 'mergeinfo store in bdb itself'.
This sqlite connections are opened once, All associated function calls 
responsible to do one logical 'sql' operation are passed the same 
'sqlite connection pointer'.
>> Index: subversion/include/private/svn_fs_merge_info.h
>> ===================================================================
>> --- subversion/include/private/svn_fs_merge_info.h	(revision 0)
>> +++ subversion/include/private/svn_fs_merge_info.h	(revision 0)
>> @@ -0,0 +1,42 @@
>> +/*
>> + * svn_fs_merge_info.h:  Declarations for the 
>> + * public functions of libsvn_fs_util to be consumed by only fs_* libs.
>> + *
>> + * ====================================================================
>> + * Copyright (c) 2006 CollabNet.  All rights reserved.
>> + *
>> + * This software is licensed as described in the file COPYING, which
>> + * you should have received as part of this distribution.  The terms
>> + * are also available at http://subversion.tigris.org/license-1.html.
>> + * If newer versions of this license are posted there, you may use a
>> + * newer version instead, at your option.
>> + *
>> + * This software consists of voluntary contributions made by many
>> + * individuals.  For exact contribution history, see the revision
>> + * history and logs, available at http://subversion.tigris.org/.
>> + * ====================================================================
>> + */
>> +
>>     
>
> If these following functions are internal, shouldn't we name
> them according to the double-underscore convention we use to mark
> non-public-but-exported functions?
>
> More on function naming: what's the library prefix?  Is it
> svn_fs_mergeinfo_, svn_fs_merge_, or svn_fs_util_ ?  Why do you have
> 'mergeinfo' and 'merge_info'?
>   
Ok. Library prefix is 'svn_fs_util'.
Will use 'mergeinfo'.
>   
>> +/* Create the sqlite mergeinfo.db with default schema
>> + * under 'db' directory of the repository identified by @a PATH
>> + * use @a POOL for any temporary allocations. */
>> +svn_error_t *
>> +svn_fs_mergeinfo_db_create(const char *path, apr_pool_t *pool);
>>     
>
> The caller doesn't need to know what the filename or location of the
> mergeinfo database is.  I'm curious as to why you're passing a repository
> path rather than a filesystem path, though - the repository shouldn't
> need to be referenced by the FS implementation.
>
>   
Sorry I meant the 'file system path' like 
/absolute/path/to/repo/root/db, the same value received by filesystem 
vtable_t's create hook.
> Do you really need a separate call for creating the database?  Why can't
> you just create it on the first call to update_index?
>
>   
Yes it is possible. I see a point in your suggestion.
Creating 'mergeinfo.db' from first call to 'update_index' has the 
advantage of seamlessly upgrading the old repos.
Downside I see for every update_index call I need to do the check.
Not sure what would be the better way to take.

>> +
>> +/* Cleanup the earlier left over sqlite records. 
>>     
>
> That sounds like an implementation detail that a caller shouldn't need
> to know about.
>   
Ok.
>   
>> + * Get the mergeinfo for the current transaction identified by @a NEW_REV
>> + * and @a TXN if any and record the same in sqlite.
>>     
>
> Ditto the fact that it's a sqlite database.  If this is a utility
> function, it should be documented something along the lines of "Update
> the mergeinfo index according to the changes made in transaction TXN or
> revision NEW_REV".
>
> Should we be using Doxygen-style or INTERNAL-style markup here?  Pick one,
> not both.
>
>   
Ok.
>> + */
>> +svn_error_t *
>> +svn_fs_merge_info_update_index(svn_fs_txn_t *txn, svn_revnum_t new_rev,
>>     
>
> It sounds like from the description about that only one of these is
> required - could you clarify the doc-comments?
>   
Ok.
>   
>> +                               svn_boolean_t txn_contains_merge_info,
>>     
>
> This isn't documented - what does it do?
>   
Will do.
>   
>> +                               apr_pool_t *pool);
>> +
>>     
>
>
>   
>> +/* Get the merge info for the set of @a PATHS and have it as @a *MERGEINFO.
>> + */
>> +svn_error_t *
>> +svn_fs_util_get_merge_info(apr_hash_t **mergeinfo,
>> +                           svn_fs_root_t *root,
>> +                           const apr_array_header_t *paths,
>> +                           svn_boolean_t include_parents,
>> +                           apr_pool_t *pool);
>>     
>
> Random thoughts: 'include_parents' isn't documented.  Why are you
> passing a transaction/revision root here, but a transaction object or
> revision number in the previous function?  What is in PATHS? (an array
> of absolute-in-the-fs paths?)  What output goes in *mergeinfo? (a hash
> of paths? to something?).
>
> Does this function work if the index isn't up to date? (that is, if
> there isn't an index, or isn't an index entry for the root in question,
> does it derive the answer from the base data)  If not, please make that
> clear by describing it so ("Return the merge info from the index..." or
> similar) and saying roughly what happens in the two cases I mentioned
> (I assume it returns an error, so we should say so, and preferably say
> which one it returns).
>
>   
It is just part of mass move of existing function to a new file.
Would go through the current implementation and make the above changes 
and get it committed and then post this patch.

Thanks for the nice review.
Hope Now I can include your name in 'Reviewed by:' list.

With regards
Kamesh Jayachandran

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH][merge-tracking]libsvn_fs_util

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Mon, Sep 18, 2006 at 08:15:38PM +0530, Kamesh Jayachandran wrote:
> [[[
> Patch by: Kamesh Jayachandran <ka...@collab.net>
> Reviewed by: Daniel L Rall <dl...@collab.net>
>              Greg Hudson <gh...@MIT.EDU>
>              Malcolm Rowe <ma...@farside.org.uk>

I wouldn't say that I've reviewed this patch.  To me, reviewed means
something akin to a +1 vote in STATUS, and from what I remember, most
of my 'review' involved questions, not approval.

> Index: build.conf
> ===================================================================
> --- build.conf	(revision 21525)
> +++ build.conf	(working copy)
> @@ -235,14 +235,14 @@
>  path = subversion/libsvn_fs_base
>  sources = *.c bdb/*.c util/*.c
>  install = bdb-lib
> -libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb sqlite
> +libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb libsvn_fs_util
>  msvc-static = yes
>  

Did you confirm that removing the direct sqlite dependency doesn't
cause the problem I mentioned previously? (the 'neon' problem mentioned
in build.conf).

> Index: subversion/libsvn_fs_fs/fs.h
> ===================================================================
> --- subversion/libsvn_fs_fs/fs.h	(revision 21525)
> +++ subversion/libsvn_fs_fs/fs.h	(working copy)
> @@ -71,14 +67,6 @@
>  #endif
>  } fs_fs_data_t;
>  
> -/* Transactions need their own private opened copy of the mergeinfo
> -   database so that their sql commands are not shared between each other. */
> -typedef struct
> -{
> -  /* Merge tracking database. */
> -  sqlite3 *mtd;
> -} fs_txn_data_t;
> -

I'm just curious - I'm not really reviewing the implementation - but
where did this logic or concept move to?

> Index: subversion/include/private/svn_fs_merge_info.h
> ===================================================================
> --- subversion/include/private/svn_fs_merge_info.h	(revision 0)
> +++ subversion/include/private/svn_fs_merge_info.h	(revision 0)
> @@ -0,0 +1,42 @@
> +/*
> + * svn_fs_merge_info.h:  Declarations for the 
> + * public functions of libsvn_fs_util to be consumed by only fs_* libs.
> + *
> + * ====================================================================
> + * Copyright (c) 2006 CollabNet.  All rights reserved.
> + *
> + * This software is licensed as described in the file COPYING, which
> + * you should have received as part of this distribution.  The terms
> + * are also available at http://subversion.tigris.org/license-1.html.
> + * If newer versions of this license are posted there, you may use a
> + * newer version instead, at your option.
> + *
> + * This software consists of voluntary contributions made by many
> + * individuals.  For exact contribution history, see the revision
> + * history and logs, available at http://subversion.tigris.org/.
> + * ====================================================================
> + */
> +

If these following functions are internal, shouldn't we name
them according to the double-underscore convention we use to mark
non-public-but-exported functions?

More on function naming: what's the library prefix?  Is it
svn_fs_mergeinfo_, svn_fs_merge_, or svn_fs_util_ ?  Why do you have
'mergeinfo' and 'merge_info'?

> +/* Create the sqlite mergeinfo.db with default schema
> + * under 'db' directory of the repository identified by @a PATH
> + * use @a POOL for any temporary allocations. */
> +svn_error_t *
> +svn_fs_mergeinfo_db_create(const char *path, apr_pool_t *pool);

The caller doesn't need to know what the filename or location of the
mergeinfo database is.  I'm curious as to why you're passing a repository
path rather than a filesystem path, though - the repository shouldn't
need to be referenced by the FS implementation.

Do you really need a separate call for creating the database?  Why can't
you just create it on the first call to update_index?


> +
> +/* Cleanup the earlier left over sqlite records. 

That sounds like an implementation detail that a caller shouldn't need
to know about.

> + * Get the mergeinfo for the current transaction identified by @a NEW_REV
> + * and @a TXN if any and record the same in sqlite.

Ditto the fact that it's a sqlite database.  If this is a utility
function, it should be documented something along the lines of "Update
the mergeinfo index according to the changes made in transaction TXN or
revision NEW_REV".

Should we be using Doxygen-style or INTERNAL-style markup here?  Pick one,
not both.

> + */
> +svn_error_t *
> +svn_fs_merge_info_update_index(svn_fs_txn_t *txn, svn_revnum_t new_rev,

It sounds like from the description about that only one of these is
required - could you clarify the doc-comments?

> +                               svn_boolean_t txn_contains_merge_info,

This isn't documented - what does it do?

> +                               apr_pool_t *pool);
> +


> +/* Get the merge info for the set of @a PATHS and have it as @a *MERGEINFO.
> + */
> +svn_error_t *
> +svn_fs_util_get_merge_info(apr_hash_t **mergeinfo,
> +                           svn_fs_root_t *root,
> +                           const apr_array_header_t *paths,
> +                           svn_boolean_t include_parents,
> +                           apr_pool_t *pool);

Random thoughts: 'include_parents' isn't documented.  Why are you
passing a transaction/revision root here, but a transaction object or
revision number in the previous function?  What is in PATHS? (an array
of absolute-in-the-fs paths?)  What output goes in *mergeinfo? (a hash
of paths? to something?).

Does this function work if the index isn't up to date? (that is, if
there isn't an index, or isn't an index entry for the root in question,
does it derive the answer from the base data)  If not, please make that
clear by describing it so ("Return the merge info from the index..." or
similar) and saying roughly what happens in the two cases I mentioned
(I assume it returns an error, so we should say so, and preferably say
which one it returns).

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org