fabric/fabric — pull request #716 by octplane (2012-08-24 12:35:08+00:00)
Title: Partial fix for #715

After some thought and source code, I think that it's simpler to modify the code as I've done (instead of adding another configuration value that is not obvious for beginners to set): changeset add a new ```interactive``` flag to the ```run``` command.

This fix implements the following:

* Make a class of the read loop
* Split the main loop to have function to handle password and try again
* Introduce a ```interactive``` flag for ```run``` commands that actually disables the need to any capture to occur during the run:
* This triggers a codepath where there is nothing bound to ```stdin``` and where outputs are directly sent to the output
* Because this codepath does not do any capture, ```OutputLooper``` will read by 1024 bytes chunks
* However the code in OutputLooper does miss the prefix adding to each line. This is a regression from master (this behaviour is due to https://github.com/octplane/fabric/blob/19002e95bc98525f760ddff6c5228edb13c03ce3/fabric/io.py#L83 which is pre-existing code so I didn't change anything here)...
* All tests pass
* My slow test case run quickly

* The only remaining issue would be to ensure prefix is added to each line correctly.

Let me know if I headed in the right direction, I can work on fixing the line prefixing issue in this particular case.