[2.1.0b4] plugin selftest problem: NotImplementedError: SilentUIFactory doesn't support make_output_stream

Bug #499757 reported by Alexander Belchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Martin Pool

Bug Description

It seems -q command-line flag in bzr 2.1.0b4 is broken:

ERROR: test__create_skeleton (bzrlib.plugins.scmproj.tests.test_project.TestProject)

vvvv[log from bzrlib.plugins.scmproj.tests.test_project.TestProject.test__create_skeleton]
4.281 bzr arguments: ['--no-aliases', '--builtin', 'init', '-q', './.scmproj']
4.297 encoding stdout as osutils.get_user_encoding() 'cp1251'
4.312 opening working tree 'C:/tmp/testbzr-w3vs6v.tmp'

^^^^[log from bzrlib.plugins.scmproj.tests.test_project.TestProject.test__create_skeleton]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\work\Bazaar\plugins\scmproj\tests\test_project.py", line 479, in test__create_skeleton
  File "C:\work\Bazaar\plugins\scmproj\project.py", line 137, in _create_skeleton
  File "C:\work\Bazaar\plugins\scmproj\vcs.py", line 105, in create_branch
  File "bzrlib\commands.pyo", line 1027, in run_bzr
  File "bzrlib\commands.pyo", line 636, in run_argv_aliases
  File "bzrlib\commands.pyo", line 600, in _setup_outf
  File "bzrlib\ui\__init__.pyo", line 149, in make_output_stream
  File "bzrlib\ui\__init__.pyo", line 154, in _make_output_stream_explicit
NotImplementedError: SilentUIFactory doesn't support make_output_stream

Tags: uifactory

Related branches

Revision history for this message
Alexander Belchenko (bialix) wrote :

It does work when running from command-line but does not work when running in the tests. What I'm missing?

Revision history for this message
Alexander Belchenko (bialix) wrote :

John Meinle wrote:

There is currently an open debate for what SilentUIFactory should do
when it is requested to 'make_output_stream'. It will either:
1) Open a connection to stdout
2) Silently discard the data put into the stream

Mostly likely it will be (1), and we just need to update the code to do so.

I think the issue you are running into is that you are calling 'run_bzr'
without going through the test suite helpers that set up the output
files, etc. As such, you have the default UIFactory set up (Silent).
This doesn't happen in the real-world or via TestCase.run_bzr, so we
didn't catch it before now.

I believe mwhudson also commented on this being an issue with some of
his tests failing.

Summary:
 We need to make SilentUIFactory.make_output_stream do the same thing as
 TextUIFactory.make_output_stream.

Changed in bzr:
status: New → Confirmed
summary: - [2.1.0b4] NotImplementedError: SilentUIFactory doesn't support
- make_output_stream
+ [2.1.0b4] plugin selftest problem: NotImplementedError: SilentUIFactory
+ doesn't support make_output_stream
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → High
tags: added: uifactory
Martin Pool (mbp)
Changed in bzr:
assignee: nobody → Martin Pool (mbp)
status: Confirmed → In Progress
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 2.1.0rc1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.