Merge lp:~fullermd/brz/silence-git-apply-test into lp:brz
Status: | Rejected |
---|---|
Rejected by: | Jelmer Vernooij |
Proposed branch: | lp:~fullermd/brz/silence-git-apply-test |
Merge into: | lp:brz |
Diff against target: |
25 lines (+14/-0) 1 file modified
breezy/git/tests/test_blackbox.py (+14/-0) |
To merge this branch: | bzr merge lp:~fullermd/brz/silence-git-apply-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Needs Fixing | ||
Review via email: mp+365006@code.launchpad.net |
Commit message
Silence output from patch(1) in git-apply test.
Unmerged revisions
- 7296. By Matthew Fuller
-
Silence output from patch(1) in git-apply test.
The test suite stubs in stdout/err wrappers for the python code, but
doesn't mess with the underlying file descriptors, so spawned off
processes still get the terminal. cmd_git_apply._ apply_patch( ) uses
subprocess to spawn off the system patch(1) to do the application, and
patch talks a lot about what it's doing. While patch has a -s arg to
quiet it down, we probably want it speaking a lot in normal use so the
user can see what's going on, so just switch stdout to /dev/null
around the run_bzr call in the test instead.An argument could be made that the test suite as a whole should be
better about moving the fd's so subprocesses can't hit the terminal
directly, but for the moment, this seems to be the only test where it
matters.
I think we'd actually want to fix this further upstream and just pass stdout=self.outf in cmd_git_ apply_patch. run().
That way, we don't have to muck about with dup2, which will inevitably break on Windows.