You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/03/17 10:20:25 UTC
svn commit: r1578273 - /subversion/trunk/subversion/libsvn_ra_serf/getlocks.c
Author: rhuijben
Date: Mon Mar 17 09:20:25 2014
New Revision: 1578273
URL: http://svn.apache.org/r1578273
Log:
* subversion/libsvn_ra_serf/getlocks.c
(getlocks_closed): Don't put non-locks without a token in the result hash,
to match the behavior of the other ra layers (and ra neon).
Modified:
subversion/trunk/subversion/libsvn_ra_serf/getlocks.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/getlocks.c?rev=1578273&r1=1578272&r2=1578273&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/getlocks.c Mon Mar 17 09:20:25 2014
@@ -116,6 +116,7 @@ getlocks_closed(svn_ra_serf__xml_estate_
if (leaving_state == LOCK)
{
const char *path = svn_hash_gets(attrs, "path");
+ const char *token = svn_hash_gets(attrs, "token");
svn_boolean_t save_lock = FALSE;
/* Filter out unwanted paths. Since Subversion only allows
@@ -128,6 +129,12 @@ getlocks_closed(svn_ra_serf__xml_estate_
c) we've asked for depth=files or depth=immediates, and this
lock is on an immediate child of our query path.
*/
+ if (! token)
+ {
+ /* A lock without a token is not a lock; just an answer that there
+ is no lock on the node. */
+ save_lock = FALSE;
+ }
if (strcmp(lock_ctx->path, path) == 0
|| lock_ctx->requested_depth == svn_depth_infinity)
{
@@ -154,7 +161,7 @@ getlocks_closed(svn_ra_serf__xml_estate_
them may have not been sent, so the value will be NULL. */
lock.path = path;
- lock.token = svn_hash_gets(attrs, "token");
+ lock.token = token;
lock.owner = svn_hash_gets(attrs, "owner");
lock.comment = svn_hash_gets(attrs, "comment");