Re: Commit to external, increase revision in external property

2018-10-17 Thread Julian Foad
Thomas Singer wrote:
>When committing to an external, the external property still points to 
>the old external revision - performing an update of the outer working 
>copy will reset the external to the previous revision.
>
>Is there already a commit option that would modify the external property 
>automatically if modifications would be committed inside an external?

No, there isn't.
- Julian


Commit to external, increase revision in external property

2018-10-17 Thread Thomas Singer

Hello,

Usually, externals are configured to use fixed revisions, so checking 
out an older revision also checks out the belonging revision of the 
external.


When committing to an external, the external property still points to 
the old external revision - performing an update of the outer working 
copy will reset the external to the previous revision.


Is there already a commit option that would modify the external property 
automatically if modifications would be committed inside an external?


--
Best regards,
Thomas Singer


Re: svn commit: r1843888 - in /subversion/trunk/subversion: libsvn_client/copy.c tests/cmdline/copy_tests.py

2018-10-17 Thread Bert Huijben
I'm guessing this is an easy fix/patch for backporting to the supported
releases.

Anybody willing to check+nominate?

   Bert

On Mon, Oct 15, 2018 at 10:55 AM  wrote:

> Author: brane
> Date: Mon Oct 15 08:55:55 2018
> New Revision: 1843888
>
> URL: http://svn.apache.org/viewvc?rev=1843888=rev
> Log:
> Correctly handle existing parent directories during repository-to-WC copy.
>
> * subversion/libsvn_client/copy.c
>   (repos_to_wc_copy): If add_parents flag is set and destination parent
>directory exists, but is unversioned, put it under version control.
>WC-to-WC copy behaves this way, and so should repos-to-WC copy.
>
> * subversion/tests/cmdline/copy_tests.py
>   (copy_make_parents_wc_wc_existing_unversioned_dst,
>copy_make_parents_repo_wc_existing_unversioned_dst): Check behaviour
>with existing. unversioned destination directory for both repos-to-WC
>and WC-to-WC cases.
>
> Patch by: Nikita Slyusarev
> Fixes #4768
>
> Modified:
> subversion/trunk/subversion/libsvn_client/copy.c
> subversion/trunk/subversion/tests/cmdline/copy_tests.py
>
> Modified: subversion/trunk/subversion/libsvn_client/copy.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1843888=1843887=1843888=diff
>
> ==
> --- subversion/trunk/subversion/libsvn_client/copy.c (original)
> +++ subversion/trunk/subversion/libsvn_client/copy.c Mon Oct 15 08:55:55
> 2018
> @@ -2742,6 +2742,16 @@ repos_to_wc_copy(svn_boolean_t *timestam
>SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE, ctx,
>   iterpool));
>  }
> +  else if (make_parents && dst_parent_kind == svn_node_dir)
> +{
> +  SVN_ERR(svn_wc_read_kind2(_parent_kind, ctx->wc_ctx,
> dst_parent,
> +FALSE, TRUE, iterpool));
> +  if (dst_parent_kind == svn_node_none)
> +{
> +  SVN_ERR(svn_client__make_local_parents(dst_parent, TRUE,
> ctx,
> + iterpool));
> +}
> +}
>else if (dst_parent_kind != svn_node_dir)
>  {
>return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
>
> Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1843888=1843887=1843888=diff
>
> ==
> --- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Mon Oct 15
> 08:55:55 2018
> @@ -3504,6 +3504,50 @@ def copy_make_parents_wc_wc(sbox):
>  expected_output,
>  expected_status)
>
> +
> +#--
> +# Test copying and creating parents in the wc with dst directory being
> +# precreated and unversioned
> +
> +def copy_make_parents_wc_wc_existing_unversioned_dst(sbox):
> +  "svn cp --parents WC_PATH WC_PATH (ex. unver. dst)"
> +
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +
> +  iota_path = sbox.ospath('iota')
> +  new_iota_path = sbox.ospath('X/Y/Z/iota')
> +  os.makedirs(os.path.dirname(new_iota_path))
> +
> +  # Copy iota
> +  svntest.actions.run_and_verify_svn(None, [],
> + 'cp', '--parents',
> + iota_path, new_iota_path)
> +
> +  # Create expected output
> +  expected_output = svntest.wc.State(wc_dir, {
> +'X'  : Item(verb='Adding'),
> +'X/Y': Item(verb='Adding'),
> +'X/Y/Z'  : Item(verb='Adding'),
> +'X/Y/Z/iota' : Item(verb='Adding'),
> +})
> +
> +  # Create expected status tree
> +  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> +
> +  # Add the moved files
> +  expected_status.add({
> +'X'   : Item(status='  ', wc_rev=2),
> +'X/Y' : Item(status='  ', wc_rev=2),
> +'X/Y/Z'   : Item(status='  ', wc_rev=2),
> +'X/Y/Z/iota'  : Item(status='  ', wc_rev=2),
> +})
> +
> +  svntest.actions.run_and_verify_commit(wc_dir,
> +expected_output,
> +expected_status)
> +
> +
>  #--
>  # Test copying and creating parents from the repo to the wc
>
> @@ -3546,6 +3590,49 @@ def copy_make_parents_repo_wc(sbox):
>
>
>  #--
> +# Test copying and creating parents from the repo to the wc with dst
> +# directory being precreated and unversioned
> +
> +def copy_make_parents_repo_wc_existing_unversioned_dst(sbox):
> +  "svn cp --parents URL WC_PATH with (ex. unver.