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

Re: Some redundant tests in locking code?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-04-07 19:11:03 CEST

On Apr 7, 2005, at 11:44 AM, Julian Foad wrote:
>
> It is trying to delete a path, having assumed to begin with that the
> path is just a file. If that fails, maybe the path was a directory
> and so more lock tokens are needed. That "if" is trying to say, "if
> (an error occured that might be resolved by sending all the lock
> tokens held under this directory)". However, it doesn't appear to be
> checking the most appropriate set of error codes. As far as I can
> tell, neither SVN_ERR_FS_BAD_LOCK_TOKEN nor
> SVN_ERR_FS_LOCK_OWNER_MISMATCH could be resolved just by sending more
> tokens, so there's no point in them being in the list. And
> SVN_ERR_FS_PATH_ALREADY_LOCKED only applies to creating new locks, not
> using them.
>
> Please could somebody tell me whether I'm understanding this correctly?
>

Ah, you're correct, thanks for noticing. This can definitely be
tightened up. Can you change it to look only for the errors that will
actually happen?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 7 19:13:38 2005

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