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

Re: Error message nitpick

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2005-05-03 13:13:07 CEST

Lübbe Onken wrote:

> Ben Collins-Sussman wrote:
>
>
>> Those errors are as old as svn itself. The problem is that we now
>> have four definitions of 'lock':
>
>
> I remember :-)
>
>> * working-copy 'locks', used to get exclusive access to a working
>> copy dir (used by libsvn_wc),
>>
>> * repository BDB 'locks', a resource that BDB can run out of,
>>
>> * repository FSFS 'write lock', used by libsvn_fs_fs to get
>> exclusive access when doing a write operation,
>>
>> * repository locks -- the new svn 1.2 feature for reserving access
>> to imaginary files.
>>
>>
>> I'm not sure what we can do to disambiguate these error messages or
>> terminologies.
>
>
> I just did a quick grep for "lock" on the subversion.pot file which
> results in 95 matches. Most of them have to do with the locking
> functionality.
>
> I have no idea how to resolve this completely, here are some randomly
> picked messages and a partial solution:
>
> "Error opening db lockfile"
> => db = server != working copy => Locking UI not involved => OK
>
> "Can't get exclusive lock on file '%s'"
> => I wasn't locking this file was I? => Confused
>
> "Can't unlock charset translation mutex"
> => sounds so far away, can't have anything to do with locking :-)
>
> "Cannot write lock/entries hashfile '%s'"
> => Did I get my lock now or didn't I?
>
> "Working copy not locked; this is probably a bug, please report"
> => It's probably a bug, but is my file locked now or not?
>
> "Attempt to unlock with non-empty unwind stack"
> => Huh?
>
> For a partial solution I'd suggest to prefix error messages with the
> module that's throwing them.
>
> Examples, used the filename as a hint for the prefix:
> "BDB: Error opening db lockfile"
> "FileIO: Can't get exclusive lock on file"
> "UTF: Can't unlock charset translation mutex"
> "FSFS: Cannot write lock/entries hashfile '%s'"
> "SVN Error: Working copy not locked; this is probably a bug, please
> report"
> "SVN Error: Attempt to unlock with non-empty unwind stack"
>
> this would get rid of at least some of the ambiguities.
>
> Eventually the last two examples could be resolved by using the
> "intended function" as prefix:
> "SVN WC: Working copy not locked; this is probably a bug, please report"
> "Locking: Attempt to unlock with non-empty unwind stack"
>
> Cheers
> -Lübbe

A very good practice, where you don't mind exposing the inner workings
and this being open source has nothing to hide.
Such prefixing really helps developers.

Peter,
a lurker-developer.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 3 13:14:12 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.