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

Re: svn commit: r32998 - trunk/subversion/libsvn_wc

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Tue, 09 Sep 2008 11:15:05 -0400

gstein_at_tigris.org writes:
> --- trunk/subversion/libsvn_wc/wc_db.h
> +++ trunk/subversion/libsvn_wc/wc_db.h
> @@ -64,6 +69,15 @@ typedef enum svn_wc__db_kind_t {
> } svn_wc__db_kind_t;
>
>
> +typedef enum svn_wc__db_status_t {
> + svn_wc__db_status_normal,
> + svn_wc__db_status_added, /* ### no history. text_mod set to TRUE */
> + svn_wc__db_status_moved, /* ### has history */
> + svn_wc__db_status_copied, /* ### has history */
> + svn_wc__db_status_deleted /* ### text_mod, prop_mod will be FALSE */
> +} svn_wc__db_status_t;

How to represent:

   - replaced (without history)
   - replaced (with history)

?

Also, for the 'moved' and 'copied' enums, would they refer to the source
or dest of the operation?

> @@ -76,6 +90,9 @@ typedef enum svn_wc__db_kind_t {
> ### like it is "Right".
> */
>
> +/* ### where/how to handle: text_time, prop_time, locks, working_size
> + */

Heh. Yeah, good question :-).

> @@ -235,7 +248,8 @@ svn_wc__db_base_delete(svn_wc__db_t *db,
> apr_pool_t *scratch_pool);
>
>
> -/* ### revision is for dst_path.
> +/* ### revision is for dst_path ("after moving src_path to dst_path,
> + * ### mark the new nodes (node?) as being at that revision")
> *
> * ### KFF: Hrm? Do you mean src_path?
> */

Okay, I understand the semantics now (this is svn_wc__db_base_move()),
but I don't understand the motivation...

> @@ -342,7 +356,7 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
> ### and caller definitely has to populate ACTUAL. */
> /* ### mark node as absent? adding children or props: auto-convert away
> ### from absent? */
> -svn-error_t *
> +svn_error_t *

Heh. Guess GCC would have caught that one :-).

> @@ -350,7 +364,7 @@ svn_wc__db_op_copy_url(svn_wc__db_t *db,
> apr_pool_t *scratch_pool);
>
>
> -/* ### props, children may be NULL
> +/* ### props may be NULL. children must be known before calling.
> *
> * ### KFF: Okay, if children can be NULL here, then it should be
> * ### able to be NULL up in svn_wc__db_base_add_directory().

I didn't understand "children must be known before calling". Does it
mean that children cannot be changed after calling or something?

> @@ -464,8 +478,21 @@ svn_wc__db_op_revert(svn_wc__db_t *db,
> * @{
> */
>
> -/* ### NULL may be given for OUT params. if the node has not been committed:
> - ### url, repos_* will be NULL and revision will be SVN_INVALID_REVNUM
> +/* ### NULL may be given for OUT params.
> +
> + ### if the node has not been committed (after adding):
> + ### url, repos_* will be NULL
> + ### revision will be SVN_INVALID_REVNUM
> + ### status will be svn_wc__db_status_added
> + ### text_mod will be TRUE
> + ### prop_mod will be TRUE if any props have been set
> + ### base_shadowed will be FALSE
> +
> + ### put all these OUT params into a structure? but this interface allows
> + ### us to query for one or all pieces of information (harder with a struct)
> +
> + ### original_url will be NULL if this node is not copied/moved
> + ### original_rev will be SVN_INVALID_REVNUM if this node is not copied/moved

s/will/must/ ?

I think it's fine to have lots of individual params. This is an
internal interface, after all -- updating it when we add something new
is easy, and the compiler won't let us forgot.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-09 17:15:19 CEST

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