interactive questions broken

Bug #1699908 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Fix Released
High
Martin Packman

Bug Description

It looks like recently, asking questions on the command-line has been broken.

E.g. if I try to use "bzr shelve" and answer a question, it just hangs:

morgaine:~/src/breezy/trunk% BRZ_PDB=1 bzr shelve
--- breezy/bzr/remote.py 2017-06-22 00:23:56 +0000
+++ breezy/bzr/remote.py 2017-06-22 03:20:45 +0000
@@ -685,7 +685,9 @@

     def create_workingtree(self, revision_id=None, from_branch=None,
         accelerator_tree=None, hardlink=False):
- raise errors.NotLocalUrl(self.transport.base)
+ return self._format.workingtree_format.initialize(
+ self, revision_id, from_branch=from_branch,
+ accelerator_tree=accelerator_tree, hardlink=hardlink)

     def find_branch_format(self, name=None):
         """Find the branch 'format' for this bzrdir.
Shelve? ([y]es, [N]o, [f]inish, [q]uit): y
^\** SIGQUIT received, entering debugger
** Type 'c' to continue or 'q' to stop the process
** Or SIGQUIT again to quit (and possibly dump core)
> /usr/lib/python2.7/dist-packages/breezy/breakin.py(43)_debug()
-> signal.signal(_breakin_signal_number, _debug)
(Pdb) bt
  /usr/bin/bzr(114)<module>()
-> exit_val = breezy.commands.main()
  /usr/lib/python2.7/dist-packages/breezy/commands.py(1203)main()
-> ret = run_bzr_catch_errors(argv)
  /usr/lib/python2.7/dist-packages/breezy/commands.py(1216)run_bzr_catch_errors()
-> return exception_to_return_code(run_bzr, argv)
  /usr/lib/python2.7/dist-packages/breezy/commands.py(927)exception_to_return_code()
-> return the_callable(*args, **kwargs)
  /usr/lib/python2.7/dist-packages/breezy/commands.py(1118)run_bzr()
-> ret = run(*run_argv)
  /usr/lib/python2.7/dist-packages/breezy/commands.py(674)run_argv_aliases()
-> return self.run(**all_cmd_args)
  /usr/lib/python2.7/dist-packages/breezy/commands.py(698)run()
-> return self._operation.run_simple(*args, **kwargs)
  /usr/lib/python2.7/dist-packages/breezy/cleanup.py(136)run_simple()
-> self.cleanups, self.func, *args, **kwargs)
  /usr/lib/python2.7/dist-packages/breezy/cleanup.py(165)_do_with_cleanups()
-> result = func(*args, **kwargs)
  /usr/lib/python2.7/dist-packages/breezy/builtins.py(6537)run()
-> shelver.run()
  /usr/lib/python2.7/dist-packages/breezy/shelf_ui.py(203)run()
-> change[1])
  /usr/lib/python2.7/dist-packages/breezy/shelf_ui.py(306)handle_modify_text()
-> work_tree_lines)
  /usr/lib/python2.7/dist-packages/breezy/shelf_ui.py(339)_select_hunks()
-> is not None))
  /usr/lib/python2.7/dist-packages/breezy/shelf_ui.py(278)prompt_bool()
-> choice = self.prompt(question, alternatives, 1)
  /usr/lib/python2.7/dist-packages/breezy/shelf_ui.py(259)prompt()
-> return ui.ui_factory.choose(message, choices, default=default)
  /usr/lib/python2.7/dist-packages/breezy/ui/text.py(198)choose()
-> return choose_ui.interact()
  /usr/lib/python2.7/dist-packages/breezy/ui/text.py(144)interact()
-> choice = getchoice()
  /usr/lib/python2.7/dist-packages/breezy/ui/text.py(118)_getline()
-> line = self.ui.stdin.readline()
  /usr/lib/python2.7/codecs.py(545)readline()
-> data = self.read(readsize, firstline=True)
  /usr/lib/python2.7/codecs.py(488)read()
-> newdata = self.stream.read(size)
> /usr/lib/python2.7/dist-packages/breezy/breakin.py(43)_debug()
-> signal.signal(_breakin_signal_number, _debug)

Tags: regression

Related branches

Revision history for this message
Martin Packman (gz) wrote :

Hm, the codecs readline implementation is pants unfortunately. Will need to unwrap the stream before passing in to _ChooseUI and handle decoding in there.

Changed in brz:
assignee: nobody → Martin Packman (gz)
Martin Packman (gz)
Changed in brz:
status: Triaged → In Progress
Martin Packman (gz)
Changed in brz:
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.