Probably bug in msgeditor._run_editor()
Alexander Belchenko
bialix at ukr.net
Wed Jan 25 13:41:05 GMT 2006
When I write plugin edit_message (see another my post titled "ANN:
edit_message plugin") I use _run_editor() function from bzrlib.msgeditor
module to invoke editor for editing revision message. And after closing
editor I ask to user does it should rewrite revision with new message.
If I use GUI windows external editor (e.g. notepad) all works fine. But
when I use FTE console editor (my usual working editor) after closing
editor and when python executing this code:
yesno = raw_input('Message was changed. Commit (y/N)? ')
Python was hang. Prompt message was printed on the screen but I'm unable
to enter any symbol. And python don't respond on Enter hit. I have to
kill process.
I don't know is the problem in FTE itself or there is some bug in python
subprocess.call() function. Or it is specific to my win32. I really
don't know how to check this. I'll try to find another console editor
for windows and test this behaviour with another program. But for now I
found this workaround: I invoke editor via os.system() call and it works
OK. Any comments?
This behaviour is not so critical for bzr itself because bzr don't ask
user after closing external editor. Furthermore, function _run_editor()
intended to private use due leading underscore in name. But it use in
public edit_commit_message() function that probably could be used in
plugins.
--
Alexander
More information about the bazaar
mailing list