Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348385 - Ripplor: Clean the title of the console after execution
Summary: Ripplor: Clean the title of the console after execution
Status: CLOSED WONTFIX
Alias: None
Product: Virgo
Classification: RT
Component: virgo-build (show other bugs)
Version: 3.0.0.M05   Edit
Hardware: PC All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Hristo Iliev CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 08:34 EDT by Hristo Iliev CLA
Modified: 2011-07-07 07:00 EDT (History)
2 users (show)

See Also:
hsiliev: review? (eclipse)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Iliev CLA 2011-06-06 08:34:13 EDT
The title of the console is not cleaned after execution finished.
Comment 1 Hristo Iliev CLA 2011-06-06 08:39:28 EDT
The scripts does not clean the console title. 

The strange thing is that Cygwin and Gentoo automatically clean the title, while Ubuntu does not. Perhaps this is a setting of the console.

Another problem is that the title may remain if the script is interrupted (ctrl-c, exception ....).

I'm not quite sure if we have to add exception handling (like try/finally), but at least the setting of the previous title may be added on success.
Comment 2 Hristo Iliev CLA 2011-06-06 12:09:04 EDT
Commit 19772b8da3a626d343416e518883ce7fc80f7932 adds:
* support for dash (more strict shell syntax)
* terminal title is now cleared on exit
* terminal title is set to "<script>: Error" on failure
Comment 3 Chris Frost CLA 2011-06-07 07:24:15 EDT
I've had a look through, thank you for pulling console out to a separate file, good to keep the main scripts as understandable as possible. I think understand what all your changes are doing. 

A ctrl+c on Mac will not leave the terminal title cleared. At the end of a ripple the title is cleared, not reset to the what it was at the beginning.
Comment 4 Hristo Iliev CLA 2011-06-07 10:45:28 EDT
Commit 2ad1fcf79153db2def198df17d000a22aa55d800 adds handling of Ctrl-C (reset of the console title).

I did not find a way to get the initial console title. This can probably be done with setting the $PS1 to its previous value, but unfortunately this environment variable is not always available to Ruby.
Comment 5 Glyn Normington CLA 2011-06-09 05:21:03 EDT
I tested this (with 2ad1fcf79153db2def198df17d000a22aa55d800 in place) by hitting Ctrl-C while the first repository is being checked out. The terminal title remains "ripplor: kernel Checkout ...", so it appears the recovery code does not work.
Comment 6 Hristo Iliev CLA 2011-07-07 07:00:38 EDT
I cannot reproduce the issue on Cygwin, Linux or Mac (with iTerm and PS1 set to show the git branches).

Closing for now since this script is used only by the commiters. If anyone wants to continue, please reopen the bug.