Discussion:
svn st without the X lines for externals?
Nathan Hartman
2018-06-29 14:20:07 UTC
Permalink
We make extensive use of externals, so "svn st" outputs many lines
beginning with X. Running "svn st --ignore-externals" gets rid of the
"Performing status on external item at" output, but not the "X" lines.
Is it possible to avoid those as well?

Client version 1.10.0.

Thanks,
Julian Foad
2018-06-29 15:04:55 UTC
Permalink
Post by Nathan Hartman
We make extensive use of externals, so "svn st" outputs many lines
beginning with X. Running "svn st --ignore-externals" gets rid of the
"Performing status on external item at" output, but not the "X" lines.
Is it possible to avoid those as well?
I would consider supporting a proposal for "svn status" to be improved/changed, if you'd like to make such a proposal.

Meanwhile, I have been using this output-colouring wrapper script for a while, which also hides the X lines:

https://github.com/thejoshwolfe/svn-color

Overall I really like it. It is not perfect: it inserts color formatting even when output is not to a tty, which means e.g. "svn diff > patchfile" produces a file that 'patch' can't read, and I also find it runs svn --non-interactive so if a repo access would need a password it just fails instead. In those cases, I re-try using (in Bash) "command svn ..." instead of "svn ...".

- Julian
Nathan Hartman
2018-07-01 14:31:08 UTC
Permalink
Post by Julian Foad
Post by Nathan Hartman
We make extensive use of externals, so "svn st" outputs many lines
beginning with X. Running "svn st --ignore-externals" gets rid of the
"Performing status on external item at" output, but not the "X" lines.
Is it possible to avoid those as well?
I would consider supporting a proposal for "svn status" to be
improved/changed, if you'd like to make such a proposal.
I am thinking about what the proposal should be. Perhaps to sort by type of
change? On *nix I have become accustomed to typing "svn st | sort -r" to
print modified "M", then deleted "D", then added "A" but this is far from
perfect for a variety of reasons. And it doesn't work on Windows unless one
installs a *nix version of sort that has the -r switch.

Meanwhile, I have been using this output-colouring wrapper script for a
Post by Julian Foad
https://github.com/thejoshwolfe/svn-color
Overall I really like it. It is not perfect: it inserts color formatting
even when output is not to a tty, which means e.g. "svn diff > patchfile"
produces a file that 'patch' can't read, and I also find it runs svn
--non-interactive so if a repo access would need a password it just fails
instead. In those cases, I re-try using (in Bash) "command svn ..." instead
of "svn ...".
Thank you for mentioning this. I will look into it and perhaps it can be
fixed.
Daniel Shahaf
2018-07-01 14:59:07 UTC
Permalink
Post by Nathan Hartman
Thank you for mentioning this. I will look into it and perhaps it can be
fixed.
Probably just need to make apply_color return its first argument
unmodified when "not sys.stdout.isatty()".
Branko Čibej
2018-07-06 09:09:34 UTC
Permalink
Post by Julian Foad
Post by Nathan Hartman
We make extensive use of externals, so "svn st" outputs many lines
beginning with X. Running "svn st --ignore-externals" gets rid of the
"Performing status on external item at" output, but not the "X" lines.
Is it possible to avoid those as well?
I would consider supporting a proposal for "svn status" to be improved/changed, if you'd like to make such a proposal.
Interestingly enough, 'svn status --quiet' already does this, it's just
not very explicitly mentioned in the help text.

-- Brane
Nathan Hartman
2018-07-06 16:16:04 UTC
Permalink
Post by Julian Foad
Post by Julian Foad
Post by Nathan Hartman
We make extensive use of externals, so "svn st" outputs many lines
beginning with X. Running "svn st --ignore-externals" gets rid of the
"Performing status on external item at" output, but not the "X" lines.
Is it possible to avoid those as well?
I would consider supporting a proposal for "svn status" to be
improved/changed, if you'd like to make such a proposal.
Interestingly enough, 'svn status --quiet' already does this, it's just
not very explicitly mentioned in the help text.
Thank you for mentioning this. Unfortunately that also hides any mention of
unversioned items, so I will probably forget to add files that should be
added.
Loading...