subversion-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Hett (JIRA)" <>
Subject [jira] [Created] (SVN-4660) svn info --show-item=revision produces trailing whitespace
Date Tue, 08 Nov 2016 20:43:58 GMT
Stefan Hett created SVN-4660:

             Summary: svn info --show-item=revision produces trailing whitespace
                 Key: SVN-4660
             Project: Subversion
          Issue Type: Bug
          Components: cmdline client
    Affects Versions: 1.9.4
            Reporter: Stefan Hett

Steps to reproduce:
1. Run svn info --show-item=revision >out.txt

Expected result:
The file out.txt contains just the revision number and a newline.

Actual result:
The file out.txt contains the revision number, followed by some whitespaces and a newline.

The issue was passed on to the dev list here:

Rational for this being a bug/unintended behavior:
1. One (if not the) main use-case for the newly introduced --show-item option is to make it
easier to be used in scripts. For revisions, I used that to generate a revision range as in:
-rXXX:YYY. XXX was retrieved using --show-item=revision. Since that produced unexpected trailing
whitespaces the script command resulted in [...] -rXXX   :YYY [...] which obviously caused
an error message which was hard to debug since I didn't immediately get the idea that the
trailing whitespaces might cause the script error I saw.
2. It's not what the documentation in the release notes state:
where it's explicitly shown that the reported revision number does not have any trailing whitespace:
## Display the youngest revision of a repository:
% svn info --show-item=revision

## Find the root directory of a working copy:
% svn info --show-item=wc-root

This message was sent by Atlassian JIRA

View raw message