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

Re: svn commit: r14842 - trunk/subversion/clients/cmdline

From: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-05-27 16:29:15 CEST

On May 26, 2005, at 3:52 PM, Philip Martin wrote:

> lundblad@tigris.org writes:
>
>
>> Author: lundblad
>> Date: Wed May 25 16:25:57 2005
>> New Revision: 14842
>>
>> Modified:
>> trunk/subversion/clients/cmdline/notify.c
>>
>> Log:
>> Print non-fatal locking errors as warnings instead of errors.
>>
>> * subversion/clients/cmdline/notify.c (notify): Use
>> svn_handle_warning
>> instead of svn_handl_error.
>>
>>
>> Modified: trunk/subversion/clients/cmdline/notify.c
>> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/clients/
>> cmdline/notify.c?rev=14842&p1=trunk/subversion/clients/cmdline/
>> notify.c&p2=trunk/subversion/clients/cmdline/
>> notify.c&r1=14841&r2=14842
>> =====================================================================
>> =========
>> --- trunk/subversion/clients/cmdline/notify.c (original)
>> +++ trunk/subversion/clients/cmdline/notify.c Wed May 25
>> 16:25:57 2005
>> @@ -361,7 +361,7 @@
>>
>> case svn_wc_notify_failed_lock:
>> case svn_wc_notify_failed_unlock:
>> - svn_handle_error (n->err, stderr, FALSE);
>> + svn_handle_warning (stderr, n->err);
>> break;
>>
>
> The first thing that comes to mind is that svn_handle_warning only
> prints the first error in the error chain, and so it might be suitable
> here as we might be dropping information. I don't know why
> svn_handle_warning behaves like that, perhaps it's a bug.
>
> When I try it:
>
> $ svn lock wc/a
> svn: warning: Path '/a' is already locked by user 'pm' in
> filesystem '/home/pm/sw/subversion/obj/repo/db'
>
> It's not really clear why that's a warning rather than an error. Is
> it something to do with it being "non-fatal" perhaps?

Yes. By running 'svn lock foo', you're attempting to lock it, and if
it's already locked there's no need to error out--just warn and move
along.

> Also I'm not really clear what constitutes a "non-fatal locking
> error":
>
> $ svn lock wc/a wc/x
> svn: warning: Path '/a' is already locked by user 'pm' in
> filesystem '/home/pm/sw/subversion/obj/repo/db'
> ../svn/subversion/libsvn_fs_fs/err.c:286: (apr_err=160017)
> svn: '/x' is not a file in filesystem '/home/pm/sw/subversion/obj/
> repo/db'
>
> One of those comes out as a warning and the other as an error, but I
> see no reason why they should be different. I can't ensure that wc/x
> is a file before making the call any more than I can ensure that wc/a
> is unlocked.

Sure, but you're attempting to lock a file here, not to 'svn add' a
file and then lock it. Finding an existing lock ("This file is
already locked") is quite different than attempting to lock a non-
existent or non-versioned file ("Lock wc/x? I see no wc/x here.").

> Finally, svn_handle_warning doesn't print the debugging stuff, I guess
> that's another bug in svn_handle_warning.

Agreed. Care to file an issue?

-Fitz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 27 16:30:24 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.