I'd like to start a vote about merging the pin-externals branch to trunk.
This command shows the changes to be merged:
svn diff https://svn.apache.org/repos/asf/subversion/trunk@1655241 \
Below is a full log message for the entire changeset.
Add a '--pin-externals' option to 'svn copy'.
This option enables automated pinning of URLs in svn:externals properties
during copy operations (issue #1258).
--pin-externals : pin externals with no explicit revision to their
last-changed revision (recommended when tagging)
This feature makes the svncopy.pl contrib script unnecessary.
Externals are "pinned" by adding a peg revision to the external's source URL.
For example, the external definition:
An external that is already pinned is left as-is.
There is a known problem where relative URLs in the externals definition
may become absolute when pinned. This happens if the URL of an external
resolves to a different path at its last-changed revision. For instance,
an external definition at r600 might look like this:
If the last-changed revision of /moo/bar resolves to r500, and 'moo'
was renamed from 'foo' between r500 and r600, then the pinned external
will use an absolute URL in the current implementation:
This problem could probably be solved by adding additional APIs which
resolve the URL http://svn.example.com/svn/repos/foo/bar to a particular
type of relative URL (such as ^/foo/bar, /svn/repos/foo/bar, ../foo/bar,
//svn.example.com/svn/repos/foo/bar, or ^/../repos/foo/bar). Additionally,
APIs which provide information about the type of a given relative external
URL would be neded. Currently, our APIs don't offer such functionality.
(copy_pin_externals, test_list): New test. Checks REPOS->REPOS, REPOS->WC,
WC->REPOS, and WC->WC copies. Verifies that moved items are handled
correctly when pinned to pre-move revisions, and tests copies from old
(svn_cl__longopt_t): Add opt_pin_externals.
(svn_cl__options, svn_cl__cmd_table): Add --pin-externals option.
(sub_main): Handle --pin-externals option.
(svn_cl__opt_state_t): Add pin_externals option.
(svn_cl__copy): Use svn_client_copy7().
(remote_propget): Rename to svn_client__remote_propget().
(svn_client_revprop_set2, svn_client_propget5): Update callers.
queue_prop_change_commit_items): New helpers.
(do_wc_to_wc_copies_with_write_lock, do_wc_to_wc_copies): Implement externals
pinning for WC->WC copies.
(path_driver_info_t, path_driver_cb_func): Add functionality for pinning
externals during copies involving the repository.
(repos_to_repos_copy): Implement externals pinning for repos->repos copies.
(wc_to_repos_copy): Implement externals pinning for wc->repos copies.
(repos_to_wc_copy_single): Implement externals pinning for repos->wc copies.
(repos_to_wc_copy_locked, repos_to_wc_copy, try_copy): Pass new parameters
on to other functions.
(svn_client_copy7): New variant of svn_client_copy() which supports a new
'pin_externals' boolean argument.
(svn_client_move7): Pass FALSE for pin_externals while copying.
(do_item_commit): Don't assume that local_abspath is always non-NULL
for property modifications. Makes it possible to commit property mods on
copied-along children. Attemping this lead to a NULL-deref before.
(svn_client_copy6): Moved here.
Received on 2015-01-28 10:56:45 CET