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

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

From: Brian W. Fitzpatrick <fitz_at_collab.net>
Date: 2005-03-14 06:16:11 CET

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
Received on Mon Mar 14 06:17:34 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.