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

Re: 'svn unlock URL' auto-force behavior

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-03-13 11:42:10 CET

On Sun, 12 Mar 2005 kfogel@collab.net wrote:

> kfogel@tigris.org writes:
> Please note the following about 'svn unlock URL' below...
>
> > --- branches/locking/subversion/libsvn_client/locking_commands.c
> > +++ branches/locking/subversion/libsvn_client/locking_commands.c
> > @@ -324,19 +409,34 @@
> > apr_pool_t *pool)
> > {
> > svn_wc_adm_access_t *adm_access;
> > + const char *common_parent;
> > const svn_wc_entry_t *entry;
> > + const char *url;
> > svn_ra_session_t *ra_session;
> > apr_hash_t *path_tokens;
> > struct lock_baton cb;
> >
> > - SVN_ERR (open_lock_targets (&entry, &adm_access, &path_tokens,
> > - targets, FALSE, force, ctx, pool));
> > + SVN_ERR (organize_lock_targets (&common_parent, &entry, &adm_access,
> > + &path_tokens, targets, FALSE, force, ctx,
> > + pool));
> > +
> > + if (svn_path_is_url (common_parent))
> > + {
> > + url = common_parent;
> > + /* Unlocking a URL is pointless with the 'force' flag anyway, so
> > + just set it if we're operating on URLs. */
> > + force = TRUE;
> > + }
> > + else
> > + {
> > + url = entry->url;
> > + }
>
> Because 'svn unlock URL' would never work without the 'force' flag
> anyway, I just made that code run with 'force = TRUE' automatically.
>
> My reasoning was that if someone types 'svn unlock URL', then they
> know what they meant to do, and there's no point making them type
> '--force' every time (which of course they'd eventually habituate to).
>
OTOH, it will break other peoples' locks. Therefore, this usage should be
uncommon enough that it isn't worht this inconsistency IMO. If I don't get
objections, I may do that obvious tweak (probably before Karl gets
back:-).

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 13 11:39:57 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.