You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Brian W. Fitzpatrick" <fi...@collab.net> on 2005/03/14 05:16:11 UTC

Re: svn commit: r13392 - in branches/locking/subversion: clients/cmdline include libsvn_client libsvn_fs_base

Comments inline.

On Mar 12, 2005, at 5:10 PM, kfogel@tigris.org wrote:

> Author: kfogel
> Date: Sat Mar 12 17:10:38 2005
> New Revision: 13392
>
> Modified:
>    branches/locking/subversion/clients/cmdline/lock-cmd.c
>    branches/locking/subversion/clients/cmdline/unlock-cmd.c
>    branches/locking/subversion/include/svn_error_codes.h
>    branches/locking/subversion/libsvn_client/locking_commands.c
>    branches/locking/subversion/libsvn_fs_base/err.c
>    branches/locking/subversion/libsvn_fs_base/err.h
>    branches/locking/subversion/libsvn_fs_base/lock.c
> Log:
> Locking branch: Support lock/unlock on URLs.

...

>   -  if (do_lock)
> -    if (!ra_err)
> -      SVN_ERR (svn_wc_add_lock (abs_path, lock, adm_access, 
> lb->pool));
> -
> -  if (!do_lock)
> -    /* Remove our wc lock token either a) if we got no error, or b) if
> -       we got any error except for owner mismatch.  Note that the only
> -       errors that are handed to this callback will be locking-related
> -       errors. */
> -    if (!ra_err ||
> -        (ra_err && (ra_err->apr_err != 
> SVN_ERR_FS_LOCK_OWNER_MISMATCH)))
> -      SVN_ERR (svn_wc_remove_lock (abs_path, adm_access, lb->pool));
> +      SVN_ERR (svn_wc_adm_probe_retrieve (&adm_access, lb->adm_access,
> +                                          abs_path, lb->pool));
> +
> +      if (do_lock)
> +        {
> +          if (ra_err)
> +            SVN_ERR (svn_wc_add_lock (abs_path, lock, adm_access, 
> lb->pool));

It looks like you lost the ! before ra_err here.

> -  /* Unlock the wc. */
> -  svn_wc_adm_close (adm_access);
> +  /* Unlock the wc.
> +   * ### TODO: Why is this necessary here and yet apparently not in
> +   * ### svn_client_unlock?
> +   */
> +  if (adm_access)
> +    svn_wc_adm_close (adm_access);

I missed it... we should be unlocking the wc in svn_client_unlock too.

I fixed both in r13398.

-Fitz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org