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

RE: svn commit: r964487 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 15 Jul 2010 22:04:47 +0200

> -----Original Message-----
> From: philip_at_apache.org [mailto:philip_at_apache.org]
> Sent: donderdag 15 juli 2010 18:43
> To: commits_at_subversion.apache.org
> Subject: svn commit: r964487 -
> /subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Author: philip
> Date: Thu Jul 15 16:42:54 2010
> New Revision: 964487
>
> URL: http://svn.apache.org/viewvc?rev=964487&view=rev
> Log:
> GCC was warning "suggest parentheses around && within ||".
>
> * subversion/libsvn_wc/wc_db.c
> (svn_wc__db_wclock_obtain): Don't check for empty path as it will
> be an ancestor.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_d
> b.c?rev=964487&r1=964486&r2=964487&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jul 15 16:42:54
> 2010
> @@ -7814,10 +7814,9 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
> svn_wc__db_wclock_t lock = APR_ARRAY_IDX(wcroot-
> >owned_locks,
> i,
> svn_wc__db_wclock_t);
>
> - if ((*lock.relpath == '\0'
> - || svn_relpath_is_ancestor(lock.relpath,
> baton.local_relpath)
> + if (svn_relpath_is_ancestor(lock.relpath,
> baton.local_relpath)
> && (lock.levels == -1
> - || (lock.levels + relpath_op_depth(lock.relpath)) >=
> depth)))
> + || (lock.levels + relpath_op_depth(lock.relpath)) >=
> depth))

I'm not sure if this doesn’t change the behavior. (Or: is "" the ancestor of "A" when using svn_relpath_is_ancestor()?)

If it isn't this breaks the locks on the working copy root.

        Bert
Received on 2010-07-15 22:06:10 CEST

This is an archived mail posted to the Subversion Dev mailing list.