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

Re: [Patch] Issue #2291 - 'svn ls -v' return locking information

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-06-30 17:22:25 CEST

On Jun 30, 2005, at 5:41 AM, Alexander Thomas wrote:

>
> +typedef struct svn_dirent2_t
> +{
> + /** node kind */
> + svn_node_kind_t kind;
>
> + /** length of file text, or 0 for directories */
> + svn_filesize_t size;
> +
> + /** does the node have props? */
> + svn_boolean_t has_props;
> +
> + /** last rev in which this node changed */
> + svn_revnum_t created_rev;
> +
> + /** time of created_rev (mod-time) */
> + apr_time_t time;
> +
> + /** author of created_rev */
> + const char *last_author;
> +
> + /** lock token or NULL if path not locked in this REPOS */
> + const char *lock_token;
> +
> + /** lock owner, or NULL if not locked in this REPOS */
> + const char *lock_owner;
> +
> + /** lock comment or NULL if not locked in this REPOS or no
> comment */
> + const char *lock_comment;
> +
> + /** Lock creation date or 0 if not locked in this REPOS */
> + apr_time_t lock_creation_date;
> +
> + /** Lock expiration date or 0 if not locked in this REPOS */
> + apr_time_t lock_expiration_date;
> +
> +} svn_dirent2_t;
> +

OK, so here's my one big piece of feedback: you added 5 new fields
to the svn_dirent_t structure above. You could have simply added
one: an svn_lock_t. Wouldn't that be much simpler? If the
svn_lock_t field is NULL, there's no repository lock on the object.
If it's non-NULL, then all the fields of the lock_t are filled in.

Second, you seem to be calling svn_ra_get_lock() on EACH object,
which is a huge number of extra network requests! Instead, why not
just call svn_ra_get_locks() exactly once, and then pull relevant
locks out of the hash and plunk them into the dirent objects.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 30 18:56:16 2005

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.