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

Re: svn commit: r11951 - in branches/locking/subversion: libsvn_fs libsvn_fs_base

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-11-19 19:30:33 CET

On Thu, 18 Nov 2004 sussman@tigris.org wrote:

> Author: sussman
> Date: Thu Nov 18 15:56:08 2004
> New Revision: 11951
>
> Modified: branches/locking/subversion/libsvn_fs/lock.c
> Url: http://svn.collab.net/viewcvs/svn/branches/locking/subversion/libsvn_fs/lock.c?view=diff&rev=11951&p1=branches/locking/subversion/libsvn_fs/lock.c&r1=11950&p2=branches/locking/subversion/libsvn_fs/lock.c&r2=11951
> ==============================================================================
> --- branches/locking/subversion/libsvn_fs/lock.c (original)
> +++ branches/locking/subversion/libsvn_fs/lock.c Thu Nov 18 15:56:08 2004
> @@ -27,20 +27,29 @@
>
>
> svn_error_t *
> -svn_fs__verify_lock (svn_boolean_t *may_use_lock,
> - svn_fs_t *fs,
> +svn_fs__verify_lock (svn_fs_t *fs,
> svn_lock_t *lock,
> apr_pool_t *pool)
> {
> - *may_use_lock = FALSE;
> -
> - if (!fs->access_ctx
> - || fs->access_ctx->username != lock->owner)
> - return SVN_NO_ERROR;
> -
> - *may_use_lock = apr_hash_get (fs->access_ctx->lock_tokens,
> - lock->token,
> - APR_HASH_KEY_STRING) != NULL;
> + if ((! fs->access_ctx) || (! fs->access_ctx->username))
> + return svn_error_createf
> + (SVN_ERR_FS_NO_USER, NULL,
> + "Cannot verify lock on path '%s'; no username available.",
> + lock->path);
Trailing dot, and why don't you internationalize these?
> +
> + else if (strcmp (fs->access_ctx->username, lock->owner) != 0)
> + return svn_error_createf
> + (SVN_ERR_FS_LOCK_OWNER_MISMATCH, NULL,
> + "User %s does not own lock on path '%s' (currently locked by %s).",
> + fs->access_ctx->username, lock->path, lock->owner);
> +
Same here. OK, often these are generated on the server, but with file://
and when we decide how to translate server messages, this is relevant.

Ofcourse, temporary errors that will go away don't need i18n, but that's
obvious.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 19 19:20:00 2004

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