Probably bug in msgeditor._run_editor()
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 25 15:45:25 GMT 2006
Alexander Belchenko wrote:
> 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
My best guess is that FTE somehow grabs the terminal, and doesn't let it
go when it is supposed to. Probably CreateProcess() works differently
than system(), which is why suprocess would act differently than
os.system().
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060125/db0ed01b/attachment.pgp
More information about the bazaar
mailing list