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

Re: svn commit: r1657267 - in /subversion/branches/pin-externals/subversion: include/svn_client.h libsvn_client/copy.c libsvn_client/deprecated.c svn/copy-cmd.c tests/libsvn_client/client-test.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 4 Feb 2015 17:11:12 +0100

On Wed, Feb 04, 2015 at 04:30:11PM +0100, Bert Huijben wrote:
> > * If @a pin_externals is set, pin URLs in copied externals definitions
> > - * to their last-changed revision unless they were already pinned to a
> > - * particular revision.
> > + * to their current revision unless they were already pinned to a
> > + * particular revision. If non-NULL, @a externals_to_pin restricts pinning
> > + * to a subset of externals. It is a hash table keyed by either a local
> > + * absolute path or a URL at which an svn:externals property is set.
> > + * The hash table contains apr_array_header_t* elements as returned
> > + * by svn_wc_parse_externals_description3(). These arrays contain elements
> > + * of type svn_wc_external_item2_t*. Externals corresponding to these
> > + * items will be pinned, other externals will not be pinned.
> > + * If @a externals_to_pin is @c NULL then all externals are pinned.
> > + * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored.
> " absolute path or a URL at which an svn:externals property is set."
> When should I use URL and when an abspath?
> Does that depend on which copy operation I use? (repos->wc, wc->wc, repos->repos)

If the copy source is a URL, then use a URL.
If the copy source is a WC, then use an abspath.

This is just what is returned from the APIs you can use to recursively
list properties.

> Do I need to specify the source or the destination path/url?

Source/Destination of what? The copy? The external?
> This already huge chunk of documentation, still leaves out a lot of details I would need to use it.

Let's try to improve it then.
> Personally I liked the feature better, before adding this configuration knob,
> which still doesn't allow per external pinning (only per svn:externals
> property), and still requires api users to walk all the externals themselves.

It does allow for pinning indivual externals.
Each item in the array (the hash table's value for a given abspath_or_url)
corresponds to one line in an svn:externals property, i.e. the definition
of a single external. It is matched by external URL (in unresolved form,
i.e. relative external URLs stay relative) and the target path provided
in the external definition. Together, these uniquely identify an
individual external.

Of course, the API user needs to walk externals first and then select
a few of them for pinning. I don't see a way around that. How else can
we find out which externals the API user wants to pin?
Received on 2015-02-04 17:12:06 CET

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