PySvn icon indicating copy to clipboard operation
PySvn copied to clipboard

Return output from svn command

Open ghost opened this issue 8 years ago • 4 comments

Capture the output of the svn command (checkout in this specific case) and return it.

ghost avatar Aug 31 '17 09:08 ghost

Coverage Status

Coverage increased (+0.09%) to 70.845% when pulling 10e64c6359b93b4b9391f7f9ed8272bc0aa76650 on vandrade:master into 06de88419044f0241747f7259f440680992cfc22 on dsoprea:master.

coveralls avatar Aug 31 '17 09:08 coveralls

The problem with this is that now the software that's calling this is now dependent on the output of the SVN command. This project is meant to be an adapter/abstraction of Subversion. The whole point is to prevent the caller from getting involved in Subversion internals and/or version-specific semantics.

It would be better to state what problem you are trying to solve (what information you want), to parse this from inside the PySvn call, and to return that. For example, maybe you want it to return a list of files that were checked along with the revision?

dsoprea avatar Sep 02 '17 06:09 dsoprea

I see your point, but even if the function returns the output you can simply ignore it or not use it at all. (Actually it can be done better than I did and split standard and error output). The thing is your module can be heavily used for automation but if something goes wrong there is no way to know what failed.

ghost avatar Sep 04 '17 06:09 ghost

I'm going to agree with @vandrade, if I do a LocalClient.update() one cannot determine what changed. It's one thing to provide the output from client (or even process it into some data structure) and return that. But doing nothing at all makes the svn operation a complete black box in that you have to guess what it did by performing before and after differences. A lot of extra overhead when the output of something like svn update tells you exactly what changed.

jimklo avatar Nov 08 '18 19:11 jimklo

The output should be processed into a list of changed files. The caller can not be allowed to be dependent on the raw output, which it is the purpose of this project to avoid.

dsoprea avatar Apr 23 '23 09:04 dsoprea