Last Comment Bug 768578 - GCLI needs a restart command
: GCLI needs a restart command
Status: RESOLVED FIXED
[gclicommands]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: Girish Sharma [:Optimizer]
:
Mentors:
https://gist.github.com/2995968
Depends on:
Blocks: GCLICMD
  Show dependency treegraph
 
Reported: 2012-06-26 11:37 PDT by Girish Sharma [:Optimizer]
Modified: 2012-08-24 11:17 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1.0 (7.02 KB, patch)
2012-06-26 13:40 PDT, Girish Sharma [:Optimizer]
no flags Details | Diff | Splinter Review
Patch v2.0 with tests (5.07 KB, patch)
2012-06-29 13:18 PDT, Girish Sharma [:Optimizer]
jwalker: review+
Details | Diff | Splinter Review

Description Girish Sharma [:Optimizer] 2012-06-26 11:37:26 PDT
a simple restart command
>> restart
- restarts the browser
>> restart 23
- restarts after 23 seconds
>> restart --abort
- aborts the scheduled restart by the above command

I am attaching the url to gist, and will shortly add the patch.
Comment 1 Girish Sharma [:Optimizer] 2012-06-26 13:40:47 PDT
Created attachment 636859 [details] [diff] [review]
Patch v1.0
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-27 11:28:41 PDT
Comment on attachment 636859 [details] [diff] [review]
Patch v1.0

I'm wondering what the use-case it for delayed restart. I get that on unix, there's value in allowing other users to log out, but is there a similar requirement for a web browser?

Thanks.
Comment 3 Girish Sharma [:Optimizer] 2012-06-27 12:25:40 PDT
I cannot think of a good use case for delayed restart, but a normal restart and an option for a restart with disabling fast load cache is a good option for developers.
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-06-29 00:57:17 PDT
So I've just done reviewing all the commands we created in the hack day and I'd like to add this to the firefox command line, but I think we need to do a few things first:
- Remove the delayed restart and abort options which should make the code much
  simpler
- Add unit tests - for which I've written a bunch of docs:
  https://developer.mozilla.org/en/Tools/GCLI/Writing_GCLI_Commands

We've got just over a week to get this in for Firefox 16 - what do you think?
Comment 5 Michael Ratcliffe [:miker] [:mratcliffe] 2012-06-29 03:10:19 PDT
Filter on teabags
Comment 6 Girish Sharma [:Optimizer] 2012-06-29 13:18:43 PDT
Created attachment 637986 [details] [diff] [review]
Patch v2.0 with tests

Updated with tests for input status.
Removed delayed restart and thus abort restart support.
Changed FastLoadCache name to nocache.
changed output type to string.

Passes all tests on local build.
Comment 7 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-03 14:25:17 PDT
Comment on attachment 637986 [details] [diff] [review]
Patch v2.0 with tests

Review of attachment 637986 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me
Thanks.
Comment 8 Michael Ratcliffe [:miker] [:mratcliffe] 2012-07-10 04:00:42 PDT
Added to master patch in bug 768998
Comment 9 Michael Ratcliffe [:miker] [:mratcliffe] 2012-07-10 04:03:22 PDT
Copy / paste error ... added to master patch in but 771555.
Comment 10 Girish Sharma [:Optimizer] 2012-07-24 13:04:49 PDT
this should be fixed now ?
Comment 11 Mihaela Velimiroviciu (:mihaelav) 2012-08-24 01:02:32 PDT
Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20120823 Firefox/16.0

I tried to use restart command with the "--nocache" argument, but the argument does not autocomplete when pressing TAB key: for example, I type "restart --n" and TAB, but doesn't autocomplete. Moreover, the "--n" is underlined with red and nocache argument is suggested as "[nocache]" (still, this doesn't work either).
Comment 12 Girish Sharma [:Optimizer] 2012-08-24 01:08:47 PDT
(In reply to Mihaela Velimiroviciu [QA] from comment #11)
> Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20120823 Firefox/16.0
> 
> I tried to use restart command with the "--nocache" argument, but the
> argument does not autocomplete when pressing TAB key: for example, I type
> "restart --n" and TAB, but doesn't autocomplete. Moreover, the "--n" is
> underlined with red and nocache argument is suggested as "[nocache]" (still,
> this doesn't work either).

Autocompletion of variable/options name is still not supported. Even if initially the --n is marked as error, as soon as you type full --nocache, it should no longer be an error. either way, you can simply type "restart true"
Comment 13 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-08-24 11:17:54 PDT
Also, the patch to fix options has just landed.

Note You need to log in before you can comment on or make changes to this bug.