svn propchange: r1898741 - svn:log

2022-03-08 Thread danielsh
Author: danielsh
Revision: 1898741
Modified property: svn:log

Modified: svn:log at Tue Mar  8 19:11:18 2022
--
--- svn:log (original)
+++ svn:log Tue Mar  8 19:11:18 2022
@@ -5,5 +5,5 @@ there is no single working copy (target)
 
 * subversion/svn/upgrade-cmd.c
   (svn_cl__upgrade): Have the output identify the program that generated
-   it.  Use plural since this is an overall message relevant to 
one or
-   more targets.
+it.  Use plural since this is an overall message relevant to one or
+more targets.



svn commit: r1898741 - /subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 18:36:38 2022
New Revision: 1898741

URL: http://svn.apache.org/viewvc?rev=1898741=rev
Log:
On the pristines-on-demand-on-mwf branch, copyedit an informational message.

Part of SVN-4885, but the discussion there did not account for the fact that
there is no single working copy (target) name available in this context.

* subversion/svn/upgrade-cmd.c
  (svn_cl__upgrade): Have the output identify the program that generated
it.  Use plural since this is an overall message relevant to 
one or
more targets.

Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c?rev=1898741=1898740=1898741=diff
==
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c 
(original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c 
Tue Mar  8 18:36:38 2022
@@ -91,8 +91,8 @@ svn_cl__upgrade(apr_getopt_t *os,
   && ! opt_state->quiet)
 {
   const char *msg
-= _("Working copy is already at version %d.%d. "
-"The highest version supported by this client can be "
+= _("svn: The target working copies are already at version %d.%d; "
+"the highest version supported by this client can be "
 "specified with '--compatible-version=%d.%d'.\n");
   SVN_ERR(svn_cmdline_printf(scratch_pool, msg,
  default_version->major, 
default_version->minor,




svn commit: r1898740 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: svn/upgrade-cmd.c tests/cmdline/upgrade_tests.py

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 18:33:54 2022
New Revision: 1898740

URL: http://svn.apache.org/viewvc?rev=1898740=rev
Log:
On the pristines-on-demand-on-mwf branch, show an informational message in more 
cases.

Part of SVN-4885.

* subversion/svn/upgrade-cmd.c
  (svn_cl__upgrade): Show the "You can upgrade further" message even when the
command was a no-op.

* subversion/tests/cmdline/upgrade_tests.py
  (dirs_only_upgrade, upgrade_with_missing_subdir): Ensure the message is not
generated by passing --compatible-version's default value explicitly.
  (target_ver): New helper function.

Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c

subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/upgrade_tests.py

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c?rev=1898740=1898739=1898740=diff
==
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c 
(original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/upgrade-cmd.c 
Tue Mar  8 18:33:54 2022
@@ -83,11 +83,9 @@ svn_cl__upgrade(apr_getopt_t *os,
   svn_pool_destroy(iterpool);
 
   /* Remind the user they can upgrade further if:
-   *   - no upgrade was performed
*   - the user did not specify compatible-version explicitly
*   - a higher version is available. */
-  if (! svn_cl__notifier_get_wc_was_upgraded(ctx->notify_baton2)
-  && ! opt_state->compatible_version
+  if (! opt_state->compatible_version
   && ! svn_version__at_least(default_version,
  latest_version->major, latest_version->minor, 
0)
   && ! opt_state->quiet)

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/upgrade_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/upgrade_tests.py?rev=1898740=1898739=1898740=diff
==
--- 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/upgrade_tests.py
 (original)
+++ 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/upgrade_tests.py
 Tue Mar  8 18:33:54 2022
@@ -58,6 +58,11 @@ def get_current_format():
   """Get the expected WC format."""
   return svntest.main.wc_format()
 
+def target_ver():
+  """Get the default value of --compatible-version to use.
+  
+  Compare svntest.main.wc_format()."""
+  return (svntest.main.options.wc_format_version or 
svntest.main.DEFAULT_COMPATIBLE_VERSION)
 
 def replace_sbox_with_tarfile(sbox, tar_filename,
   dir=None):
@@ -772,8 +777,12 @@ def dirs_only_upgrade(sbox):
   expected_output = ["Upgraded '%s'\n" % (sbox.ospath('').rstrip(os.path.sep)),
  "Upgraded '%s'\n" % (sbox.ospath('A'))]
 
+  # Pass --compatible-version explicitly to silence the "You upgraded to
+  # a version other than the latest" message.
   svntest.actions.run_and_verify_svn(expected_output, [],
- 'upgrade', sbox.wc_dir)
+ 'upgrade', sbox.wc_dir,
+ '--compatible-version',
+ target_ver())
 
   expected_status = svntest.wc.State(sbox.wc_dir, {
   ''  : Item(status='  ', wc_rev='1'),
@@ -1039,8 +1048,12 @@ def upgrade_with_missing_subdir(sbox):
 "Upgraded '%s'\n" % sbox.ospath('A/D/G'),
 "Upgraded '%s'\n" % sbox.ospath('A/D/H'),
   ])
+  # Pass --compatible-version explicitly to silence the "You upgraded to
+  # a version other than the latest" message.
   svntest.actions.run_and_verify_svn(expected_output, [],
- 'upgrade', sbox.wc_dir)
+ 'upgrade', sbox.wc_dir,
+ '--compatible-version',
+ target_ver())
 
   # And now perform an update. (This used to fail with an assertion)
   expected_output = svntest.wc.State(wc_dir, {




svn commit: r1898739 - in /subversion/branches/pristines-on-demand-on-mwf/subversion/svn: info-cmd.c schema/info.rnc

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 17:41:51 2022
New Revision: 1898739

URL: http://svn.apache.org/viewvc?rev=1898739=rev
Log:
On the pristines-on-demand-on-mwf branch: Add the WC format and version to `svn
info`'s other output modes.

This finishes SVN-4884.

* subversion/svn/info-cmd.c
  (print_info_xml,
   print_info): Emit the equivalents of --show-item=wc-version and
 --show-item=wc-compatible-version.

* subversion/svn/schema/info.rnc
  (wc-info): New children wc-compatible-version and wc-format.
  (wc-compatible-version, wc-format): New elements.

Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/info-cmd.c

subversion/branches/pristines-on-demand-on-mwf/subversion/svn/schema/info.rnc

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/info-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/info-cmd.c?rev=1898739=1898738=1898739=diff
==
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/info-cmd.c 
(original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/info-cmd.c 
Tue Mar  8 17:41:51 2022
@@ -592,6 +592,21 @@ print_info_xml(void *baton,
 svn_cl__xml_tagged_cdata(, pool, "wcroot-abspath",
  info->wc_info->wcroot_abspath);
 
+  /* " xx " */
+  /* " xx " */
+  if (info->wc_info->wc_format > 0)
+{
+  const svn_version_t *wc_ver
+= svn_client_wc_version_from_format(info->wc_info->wc_format, 
pool);
+
+  svn_cl__xml_tagged_cdata(, pool, "wc-compatible-version",
+   apr_psprintf(pool, "%d.%d", wc_ver->major,
+wc_ver->minor));
+  svn_cl__xml_tagged_cdata(, pool, "wc-format",
+   apr_psprintf(pool, "%d",
+info->wc_info->wc_format));
+}
+
   /* " xx " */
   svn_cl__xml_tagged_cdata(, pool, "schedule",
schedule_str(info->wc_info->schedule));
@@ -737,6 +752,18 @@ print_info(void *baton,
 info->wc_info->wcroot_abspath,
 pool)));
 
+  if (info->wc_info && info->wc_info->wc_format > 0)
+{
+  const svn_version_t *wc_ver
+= svn_client_wc_version_from_format(info->wc_info->wc_format, pool);
+
+  SVN_ERR(svn_cmdline_printf(pool, _("Working Copy Compatible With 
Version: %d.%d\n"),
+ wc_ver->major, wc_ver->minor));
+  SVN_ERR(svn_cmdline_printf(pool, _("Working Copy Format: %d\n"),
+ info->wc_info->wc_format));
+}
+
+
   if (info->URL)
 SVN_ERR(svn_cmdline_printf(pool, _("URL: %s\n"), info->URL));
 

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/schema/info.rnc
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/schema/info.rnc?rev=1898739=1898738=1898739=diff
==
--- 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/schema/info.rnc 
(original)
+++ 
subversion/branches/pristines-on-demand-on-mwf/subversion/svn/schema/info.rnc 
Tue Mar  8 17:41:51 2022
@@ -57,6 +57,8 @@ uuid = element uuid { uuid.type }
 wc-info =
   element wc-info {
 wcroot-abspath?,
+wc-compatible-version?,
+wc-format?,
 schedule?,
 changelist?,
 copy-from-url?,
@@ -70,6 +72,8 @@ wc-info =
   }
 
 wcroot-abspath = element wcroot-abspath { string }
+wc-compatible-version = element wc-compatible-version { string }
+wc-format = element wc-format { xsd:nonNegativeInteger }
 
 schedule =
   element schedule { "normal" | "add" | "delete" | "replace" | "none" }




svn commit: r1898733 - in /subversion/branches/pristines-on-demand-on-mwf: ./ subversion/tests/cmdline/basic_tests.py

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 14:08:08 2022
New Revision: 1898733

URL: http://svn.apache.org/viewvc?rev=1898733=rev
Log:
On the pristines-on-demand-on-mwf branch, cherry-pick r1898732 from trunk.

Modified:
subversion/branches/pristines-on-demand-on-mwf/   (props changed)

subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/basic_tests.py

Propchange: subversion/branches/pristines-on-demand-on-mwf/
--
  Merged /subversion/trunk:r1898732

Modified: 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/basic_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/basic_tests.py?rev=1898733=1898732=1898733=diff
==
--- 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/basic_tests.py
 (original)
+++ 
subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/basic_tests.py
 Tue Mar  8 14:08:08 2022
@@ -430,11 +430,10 @@ def basic_update_corruption(sbox):
   ##
   ##1. Make a working copy at rev 1, duplicate it.  Now we have
   ##two working copies at rev 1.  Call them first and second.
-  ##2. Make a local mod to `first/A/mu'.
-  ##3. Repair the text-base, commit again, expect success.
-  ##4. Intentionally corrupt `second/A/.svn/text-base/mu.svn-base'.
-  ##5. Try to update `second', expect failure.
-  ##6. Repair the text-base, update again, expect success.
+  ##2. Make a local mod to `first/A/mu' and commit it.
+  ##3. Intentionally corrupt `second/A/.svn/text-base/mu.svn-base'.
+  ##4. Try to update `second', expect failure.
+  ##5. Repair the text-base, update again, expect success.
   ##
   ## Here we go...
 




svn commit: r1898732 - /subversion/trunk/subversion/tests/cmdline/basic_tests.py

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 14:06:18 2022
New Revision: 1898732

URL: http://svn.apache.org/viewvc?rev=1898732=rev
Log:
tests: Correct a comment.

Follow-up to r1335623.

* subversion/tests/cmdline/basic_tests.py
  (basic_update_corruption): Delete the "Repair the text-base" part of step #3
and renumber the remaining steps accordingly.  The numbers now match
basic_commit_corruption(), where this comment is originally from.

Modified:
subversion/trunk/subversion/tests/cmdline/basic_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1898732=1898731=1898732=diff
==
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Tue Mar  8 
14:06:18 2022
@@ -428,11 +428,10 @@ def basic_update_corruption(sbox):
   ##
   ##1. Make a working copy at rev 1, duplicate it.  Now we have
   ##two working copies at rev 1.  Call them first and second.
-  ##2. Make a local mod to `first/A/mu'.
-  ##3. Repair the text-base, commit again, expect success.
-  ##4. Intentionally corrupt `second/A/.svn/text-base/mu.svn-base'.
-  ##5. Try to update `second', expect failure.
-  ##6. Repair the text-base, update again, expect success.
+  ##2. Make a local mod to `first/A/mu' and commit it.
+  ##3. Intentionally corrupt `second/A/.svn/text-base/mu.svn-base'.
+  ##4. Try to update `second', expect failure.
+  ##5. Repair the text-base, update again, expect success.
   ##
   ## Here we go...
 




svn commit: r1898729 - /subversion/trunk/subversion/tests/cmdline/upgrade_tests.py

2022-03-08 Thread danielsh
Author: danielsh
Date: Tue Mar  8 11:29:44 2022
New Revision: 1898729

URL: http://svn.apache.org/viewvc?rev=1898729=rev
Log:
multi-wc-format: Add a test for the change in r1898523.

The test passes on ≥r1898523 and fails before that.

* subversion/tests/cmdline/upgrade_tests.py
  (basic_upgrade): Extend the test.

Modified:
subversion/trunk/subversion/tests/cmdline/upgrade_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1898729=1898728=1898729=diff
==
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Tue Mar  8 
11:29:44 2022
@@ -270,6 +270,14 @@ def basic_upgrade(sbox):
   svntest.actions.run_and_verify_svn(None, not_wc % 'A',
  'upgrade', sbox.ospath('A'))
 
+  # Upgrading to a future version gives an error
+  expected_stderr = 'svn: E27: Cannot guarantee working copy 
compatibility' \
+' with the requested version.*3[.]0'
+  svntest.actions.run_and_verify_svn(None, expected_stderr,
+ sbox.wc_dir, 'upgrade',
+ '--compatible-version',
+ '3.0')
+
   # Now upgrade the working copy
   svntest.actions.run_and_verify_svn(None, [],
  'upgrade', sbox.wc_dir)




Re: svn commit: r1898525 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/upgrade.c libsvn_wc/wc.h svn/help-cmd.c svn/info-cmd.c svn/svn.c

2022-03-08 Thread Daniel Shahaf
julianf...@apache.org wrote on Wed, Mar 02, 2022 at 12:24:40 -:
> +++ subversion/trunk/subversion/include/svn_client.h Wed Mar  2 12:24:40 2022
> @@ -4471,23 +4463,8 @@ typedef struct svn_client_wc_format_t {
>   * @since New in 1.15.
>   */
>  const svn_version_t *
> -svn_client__wc_version_from_format(int wc_format,
> -   apr_pool_t *result_pool,
> -   apr_pool_t *scratch_pool);
> +svn_client_wc_version_from_format(int wc_format,
> +  apr_pool_t *result_pool);

Thanks for renaming this.

Recommend to remove RESULT_POOL too, since it is unused and the return
type is a pointer-to-const.

Cheers,

Daniel