Author: brane
Date: Wed Feb 25 14:25:05 2015
New Revision: 1662224

URL: http://svn.apache.org/r1662224
Log:
Deprecate the --strict command-line option. It was only used in one
place to actually mean --no-newline, so use the latter instead and
make --strict an alias for backwards compatibility.

* subversion/svn/cl.h
  (svn_cl__opt_state_t): Removed member 'strict'.
* subversion/svn/svn.c
  (svn_cl__longopt_t): Note that opt_strict is deprecated.
  (svn_cl__options): Change help text for --strict to DEPRECATED.
  (svn_cl__cmd_table): Make propget accept --no-newline and change
   the docs for --strict to tell users that it's deprecated.
  (sub_main): Interpret --strict exactly as --no-newline.
* subversion/svn/propget-cmd.c
  (svn_cl__propget): Replace --strict with --no-newline.

* subversion/tests/cmdline/checkout_tests.py (checkout_peg_rev_date),
  subversion/tests/cmdline/prop_tests.py (peg_rev_base_working,
                                          xml_unsafe_author),
  subversion/tests/cmdline/special_tests.py (propvalue_normalized),
  subversion/tests/cmdline/svnmucc_tests.py (propset_root_internal),
  subversion/tests/cmdline/trans_tests.py (cat_keyword_expansion):
   Replace --strict with --no-newline.

Modified:
    subversion/trunk/subversion/svn/cl.h
    subversion/trunk/subversion/svn/propget-cmd.c
    subversion/trunk/subversion/svn/svn.c
    subversion/trunk/subversion/tests/cmdline/checkout_tests.py
    subversion/trunk/subversion/tests/cmdline/prop_tests.py
    subversion/trunk/subversion/tests/cmdline/special_tests.py
    subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py
    subversion/trunk/subversion/tests/cmdline/trans_tests.py

Modified: subversion/trunk/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl.h?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl.h (original)
+++ subversion/trunk/subversion/svn/cl.h Wed Feb 25 14:25:05 2015
@@ -167,7 +167,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t version;         /* print version information */
   svn_boolean_t verbose;         /* be verbose */
   svn_boolean_t update;          /* contact the server for the full story */
-  svn_boolean_t strict;          /* do strictly what was requested */
   svn_stringbuf_t *filedata;     /* contents of file used as option data
                                     (not converted to UTF-8) */
   const char *encoding;          /* the locale/encoding of 'message' and of

Modified: subversion/trunk/subversion/svn/propget-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propget-cmd.c?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propget-cmd.c (original)
+++ subversion/trunk/subversion/svn/propget-cmd.c Wed Feb 25 14:25:05 2015
@@ -322,11 +322,11 @@ svn_cl__propget(apr_getopt_t *os,
   svn_stream_t *out;
   svn_boolean_t warned = FALSE;
 
-  if (opt_state->verbose && (opt_state->revprop || opt_state->strict
+  if (opt_state->verbose && (opt_state->revprop || opt_state->no_newline
                              || opt_state->xml))
     return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
                             _("--verbose cannot be used with --revprop or "
-                              "--strict or --xml"));
+                              "--no-newline or --xml"));
 
   /* PNAME is first argument (and PNAME_UTF8 will be a UTF-8 version
      thereof) */
@@ -411,7 +411,7 @@ svn_cl__propget(apr_getopt_t *os,
 
               SVN_ERR(stream_write(out, printable_val->data,
                                    printable_val->len));
-              if (! opt_state->strict)
+              if (! opt_state->no_newline)
                 SVN_ERR(stream_write(out, APR_EOL_STR, strlen(APR_EOL_STR)));
             }
         }
@@ -427,16 +427,16 @@ svn_cl__propget(apr_getopt_t *os,
       if (opt_state->depth == svn_depth_unknown)
         opt_state->depth = svn_depth_empty;
 
-      /* Strict mode only makes sense for a single target.  So make
+      /* No-newline mode only makes sense for a single target.  So make
          sure we have only a single target, and that we're not being
          asked to recurse on that target. */
-      if (opt_state->strict
+      if (opt_state->no_newline
           && ((targets->nelts > 1) || (opt_state->depth != svn_depth_empty)
               || (opt_state->show_inherited_props)))
         return svn_error_create
           (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-           _("Strict output of property values only available for single-"
-             "target, non-recursive propget operations"));
+           _("--no-newline is only available for single-target,"
+             " non-recursive propget operations"));
 
       for (i = 0; i < targets->nelts; i++)
         {
@@ -472,15 +472,15 @@ svn_cl__propget(apr_getopt_t *os,
           /* Any time there is more than one thing to print, or where
              the path associated with a printed thing is not obvious,
              we'll print filenames.  That is, unless we've been told
-             not to do so with the --strict option. */
+             not to do so with the --no-newline option. */
           print_filenames = ((opt_state->depth > svn_depth_empty
                               || targets->nelts > 1
                               || apr_hash_count(props) > 1
                               || opt_state->verbose
                               || opt_state->show_inherited_props)
-                             && (! opt_state->strict));
-          omit_newline = opt_state->strict;
-          like_proplist = opt_state->verbose && !opt_state->strict;
+                             && (! opt_state->no_newline));
+          omit_newline = opt_state->no_newline;
+          like_proplist = opt_state->verbose && !opt_state->no_newline;
 
           /* If there are no properties, and exactly one node was queried,
              then warn. */

Modified: subversion/trunk/subversion/svn/svn.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Wed Feb 25 14:25:05 2015
@@ -110,7 +110,7 @@ typedef enum svn_cl__longopt_t {
   opt_remove,
   opt_revprop,
   opt_stop_on_copy,
-  opt_strict,
+  opt_strict,                   /* ### DEPRECATED */
   opt_targets,
   opt_depth,
   opt_set_depth,
@@ -232,7 +232,7 @@ const apr_getopt_option_t svn_cl__option
                        "                             "
                        "'empty', 'files', 'immediates', or 'infinity')")},
   {"xml",           opt_xml, 0, N_("output in XML")},
-  {"strict",        opt_strict, 0, N_("use strict semantics")},
+  {"strict",        opt_strict, 0, N_("DEPRECATED")},
   {"stop-on-copy",  opt_stop_on_copy, 0,
                     N_("do not cross copies while traversing history")},
   {"no-ignore",     opt_no_ignore, 0,
@@ -1355,14 +1355,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  By default, an extra newline is printed after the property value so 
that\n"
      "  the output looks pretty.  With a single TARGET, depth 'empty' and 
without\n"
-     "  --show-inherited-props, you can use the --strict option to disable 
this\n"
+     "  --show-inherited-props, you can use the --no-newline option to disable 
this\n"
      "  (useful when redirecting a binary property value to a file, for 
example).\n"
      "\n"
      "  See 'svn help propset' for descriptions of the svn:* special 
properties.\n"),
-    {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
+    {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_no_newline, 
opt_xml,
      opt_changelist, opt_show_inherited_props },
     {{'v', N_("print path, name and value on separate lines")},
-     {opt_strict, N_("don't print an extra newline")}} },
+     {opt_strict, N_("(deprecated; use --no-newline)")}} },
 
   { "proplist", svn_cl__proplist, {"plist", "pl"}, N_
     ("List all properties on files, dirs, or revisions.\n"
@@ -2154,9 +2154,6 @@ sub_main(int *exit_code, int argc, const
       case opt_stop_on_copy:
         opt_state.stop_on_copy = TRUE;
         break;
-      case opt_strict:
-        opt_state.strict = TRUE;
-        break;
       case opt_no_ignore:
         opt_state.no_ignore = TRUE;
         break;
@@ -2398,6 +2395,7 @@ sub_main(int *exit_code, int argc, const
         opt_state.remove_ignored = TRUE;
         break;
       case opt_no_newline:
+      case opt_strict:          /* ### DEPRECATED */
         opt_state.no_newline = TRUE;
         break;
       case opt_show_passwords:

Modified: subversion/trunk/subversion/tests/cmdline/checkout_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/checkout_tests.py?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/checkout_tests.py Wed Feb 25 
14:25:05 2015
@@ -662,7 +662,7 @@ def checkout_peg_rev_date(sbox):
   ## Get svn:date.
   exit_code, output, errput = svntest.main.run_svn(None, 'propget', 'svn:date',
                                                    '--revprop', '-r1',
-                                                   '--strict',
+                                                   '--no-newline',
                                                    sbox.repo_url)
   if exit_code or errput != [] or len(output) != 1:
     raise svntest.Failure("svn:date propget failed")

Modified: subversion/trunk/subversion/tests/cmdline/prop_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/prop_tests.py?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/prop_tests.py Wed Feb 25 14:25:05 
2015
@@ -2611,7 +2611,7 @@ def peg_rev_base_working(sbox):
   sbox.simple_commit(message='r2')
   svntest.actions.set_prop('cardinal', 'nine\n', sbox.ospath('iota'))
   svntest.actions.run_and_verify_svn(['ninth\n'], [],
-                                     'propget', '--strict', 'ordinal',
+                                     'propget', '--no-newline', 'ordinal',
                                      sbox.ospath('iota') + '@BASE')
 
 @Issue(4415)
@@ -2644,7 +2644,7 @@ def xml_unsafe_author(sbox):
   # a single property value which skips creating the creator-displayname 
property
   svntest.actions.run_and_verify_svn(['foo\bbar'], [],
                                      'propget', '--revprop', '-r', '1',
-                                     'svn:author', '--strict', wc_dir)
+                                     'svn:author', '--no-newline', wc_dir)
 
   # Ensure a stable date
   svntest.actions.run_and_verify_svn(None, [],

Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/special_tests.py Wed Feb 25 
14:25:05 2015
@@ -705,7 +705,7 @@ def propvalue_normalized(sbox):
   # Property value should be SVN_PROP_BOOLEAN_TRUE
   expected_propval = ['*']
   svntest.actions.run_and_verify_svn(expected_propval, [],
-                                     'propget', '--strict', 'svn:special',
+                                     'propget', '--no-newline', 'svn:special',
                                      iota2_path)
 
   # Commit and check again.
@@ -722,7 +722,7 @@ def propvalue_normalized(sbox):
 
   svntest.main.run_svn(None, 'update', wc_dir)
   svntest.actions.run_and_verify_svn(expected_propval, [],
-                                     'propget', '--strict', 'svn:special',
+                                     'propget', '--no-newline', 'svn:special',
                                      iota2_path)
 
 

Modified: subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnmucc_tests.py Wed Feb 25 
14:25:05 2015
@@ -345,7 +345,7 @@ def propset_root_internal(sbox, target):
                                          'propset', 'foo', 'bar',
                                          target)
   svntest.actions.run_and_verify_svn('bar', [],
-                                     'propget', '--strict', 'foo',
+                                     'propget', '--no-newline', 'foo',
                                      target)
 
   ## propdel on ^/
@@ -355,7 +355,7 @@ def propset_root_internal(sbox, target):
                                          target)
   svntest.actions.run_and_verify_svn([],
                                      '.*W200017: Property.*not found',
-                                     'propget', '--strict', 'foo',
+                                     'propget', '--no-newline', 'foo',
                                      target)
 
 @Issues(3663)

Modified: subversion/trunk/subversion/tests/cmdline/trans_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/trans_tests.py?rev=1662224&r1=1662223&r2=1662224&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/trans_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/trans_tests.py Wed Feb 25 
14:25:05 2015
@@ -680,7 +680,7 @@ def cat_keyword_expansion(sbox):
                                      sbox.wc_dir)
   svntest.actions.run_and_verify_svn([ full_author ], [],
                                      'propget', '--revprop', '-r2',
-                                     'svn:author', '--strict',
+                                     'svn:author', '--no-newline',
                                      sbox.wc_dir)
 
   # Make another commit so that the last changed revision for A/mu is


Reply via email to