You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/07/18 18:30:15 UTC

svn commit: r1611698 - in /subversion/trunk/subversion/svn: propget-cmd.c svn.c

Author: julianfoad
Date: Fri Jul 18 16:30:14 2014
New Revision: 1611698

URL: http://svn.apache.org/r1611698
Log:
In 'svn propget', forbid using 'show-inherited-properties' with 'strict'.

The reason is because 'strict' (that is, print no newline afterwards) is
only really useful when there is no more than one value to output. This is
consistent with how we already forbid it when there are multiple targets or
a depth other than 'empty'.

See email thread "--strict vs --no-newline", started on 2014-06-09 by Julian
Foad, archived at e.g. <http://svn.haxx.se/dev/archive-2014-06/0023.shtml>.

* subversion/svn/propget-cmd.c
  (svn_cl__propget): Forbid 'strict' with 'show-inherited-properties'.

* subversion/svn/svn.c
  (svn_cl__cmd_table): Update the help text accordingly.

Modified:
    subversion/trunk/subversion/svn/propget-cmd.c
    subversion/trunk/subversion/svn/svn.c

Modified: subversion/trunk/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propget-cmd.c?rev=1611698&r1=1611697&r2=1611698&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propget-cmd.c (original)
+++ subversion/trunk/subversion/svn/propget-cmd.c Fri Jul 18 16:30:14 2014
@@ -431,7 +431,8 @@ svn_cl__propget(apr_getopt_t *os,
          sure we have only a single target, and that we're not being
          asked to recurse on that target. */
       if (opt_state->strict
-          && ((targets->nelts > 1) || (opt_state->depth != svn_depth_empty)))
+          && ((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-"

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1611698&r1=1611697&r2=1611698&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Fri Jul 18 16:30:14 2014
@@ -1302,9 +1302,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  'empty', the target path is printed on the same line before each value.\n"
      "\n"
      "  By default, an extra newline is printed after the property value so that\n"
-     "  the output looks pretty.  With a single TARGET and depth 'empty', you can\n"
-     "  use the --strict option to disable this (useful when redirecting a binary\n"
-     "  property value to a file, for example).\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"
+     "  (useful when redirecting a binary property value to a file, for example).\n"),
     {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
      opt_changelist, opt_show_inherited_props },
     {{'v', N_("print path, name and value on separate lines")},