On Tue, 2005-07-05 at 21:07 +0100, Julian Foad wrote:
> kfogel@collab.net wrote:
> > VK Sameer <sameer@collab.net> writes:
> >>Index: subversion/libsvn_ra_svn/client.c
> >>===================================================================
> >>--- subversion/libsvn_ra_svn/client.c	(revision 15189)
> >>+++ subversion/libsvn_ra_svn/client.c	(working copy)
> [...]
> >>+  err = handle_auth_request(sess, pool);
> >>+
> >>+  /* Pre-1.3 servers don't support 'lock-many'. If that fails, fall back
> >>+   * to 'lock'. */
> >>+  if (err && err->apr_err == SVN_ERR_RA_SVN_UNKNOWN_CMD &&
> >>+      strcmp (err->message, "Unknown command 'lock-many'") == 0)
> >>+        return ra_svn_lock_compat(session, path_revs, comment, force, lock_func,
> >>+                                  lock_baton, pool);
> 
> (I'm chipping in with no knowledge again.)  Is it really necessary and 
> appropriate to do a string comparison of the error message text?  It appears to 
> me that just testing the error code would be sufficient.
I don't have a strong opinion on this. It is mainly (ultra-?) defensive
programming for a garbled marshalling/unmarshalling situation. If that
seems far-fetched, I'll take it out.
Thanks
Sameer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul  6 08:40:13 2005