Re: filename ends with a space, cannot use the --targets option.

Branko Čibej <[email protected]> Fri, 27 Jun 2025 15:08:25 +0200
Newsgroups gmane.comp.version-control.subversion.user
Organization The Apache Software Foundation
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------6SmM2x0uHXX0lkMDi8Pihx0Y
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 27. 6. 25 11:54, Daniel Sahlberg wrote:
> Den tis 17 juni 2025 kl 15:58 skrev Branko Čibej <[email protected]>:
>
>     TL;DR: Leave well enough alone. One can already do any amount of
>     mischief with a Unix shell, or by creating files programmatically.
>     There's really no need to add one more avenue for confusion by
>     "fixing" --targets.
>
>
> Makes sense to me. Should we document this some way in svn help? 
> Currently:
> [[[
> $ svn help add
> [...]
> Valid options:
>   --targets ARG            : pass contents of file ARG as additional args
>  [...]
> ]]]
>
> We could update the svnbook as well, it currently says:
> [[[
> |--targets|/|FILENAME|/
>
>     Tells Subversion to read additional target paths for the operation
>     from /|FILENAME|/. /|FILENAME|/ should contain one path per line,
>     with each path expected to use the same encoding and formatting
>     that it would if you had specified it directly as an argument on
>     the command line.
>
> ]]]
>
>


I'm sorry, what's there to fix? This is perfectly true. Do not confuse 
"the command line" with "something some shell somewhere allows you to 
do". --targets is supposed to help scripting, not support nonsense. I've 
not yet heard one argument for supporting filenames with trailing spaces 
in those files other than "bash can do it".

Well, it's not bash.

-- Brane

--------------6SmM2x0uHXX0lkMDi8Pihx0Y
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 27. 6. 25 11:54, Daniel Sahlberg
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMHy98PFiou0VuPXZZOgb_riWrtoYuVc5ty0_Qo_t=h-oW1E3A@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div dir="ltr">Den tis 17 juni 2025 kl 15:58 skrev Branko
              Čibej &lt;<a href="mailto:[email protected]"
                moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>&gt;:</div>
            <div class="gmail_quote gmail_quote_container">
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div>
                  <div>TL;DR: Leave well enough alone. One can already
                    do any amount of mischief with a Unix shell, or by
                    creating files programmatically. There's really no
                    need to add one more avenue for confusion by
                    "fixing" <font face="monospace">--targets</font>.</div>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>Makes sense to me. Should we document this some way
                in svn help? Currently:</div>
              <div>[[[</div>
              <div>$ svn help add</div>
              <div>[...]</div>
              <div>
                <div>Valid options:</div>
                <div>  --targets ARG            : pass contents of file
                  ARG as additional args</div>
                <div> [...]</div>
              </div>
              <div>]]]</div>
              <div><br>
              </div>
              <div>We could update the svnbook as well, it currently
                says:</div>
              <div>[[[</div>
              <div><code class="gmail-option" style="color:rgb(0,0,0)">--targets</code><span
style="color:rgb(0,0,0);font-family:serif;font-size:medium"> </span><em
                  class="gmail-replaceable"
style="color:rgb(0,0,0);font-family:serif;font-size:medium"><code>FILENAME</code></em></div>
              <div>
                <dl class="gmail-variablelist" style="">
                  <dd
style="color:rgb(0,0,0);font-family:serif;font-size:medium;line-height:1.33em">
                    <p style="line-height:1.33em">Tells Subversion to
                      read additional target paths for the operation
                      from <em class="gmail-replaceable"><code>FILENAME</code></em>. <em
                        class="gmail-replaceable"><code>FILENAME</code></em> should
                      contain one path per line, with each path expected
                      to use the same encoding and formatting that it
                      would if you had specified it directly as an
                      argument on the command line.</p>
                  </dd>
                  ]]]
                </dl>
              </div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    I'm sorry, what's there to fix? This is perfectly true. Do not
    confuse "the command line" with "something some shell somewhere
    allows you to do". --targets is supposed to help scripting, not
    support nonsense. I've not yet heard one argument for supporting
    filenames with trailing spaces in those files other than "bash can
    do it".<br>
    <br>
    Well, it's not bash.<br>
    <br>
    -- Brane<br>
    <br>
  </body>
</html>

--------------6SmM2x0uHXX0lkMDi8Pihx0Y--