[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-05-26 22:52:02 CEST

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?

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.

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

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 26 22:54:31 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.