Jump to: navigation, search

Orion/OrionLocalShell

Direct OS Shell in Orion

Bug 427399 - 'Shell' Provide an Orion Node shell based on tty.js/term.js

Abstract: Strip Orion's Node.js old shell functionality and replace it with a fuller browser shell. Currently, only a few commands (cd, clear, edit, help, ls, node, npm, plugins, pwd, and service) have been manually extended for the shell. Use WebSocket and tty.js/term.js to provide fuller and more easily maintainable functionality, rather than having to add each command individually.

Communication Channels

Please make sure you're available on the following communication channels:

Repository Information

The github fork for this work can be found at http://github.com/jrbalsano/orion.client. Work for the project is being kept on the branch direct_os_shell. Upcoming goals and who is working on what is viewable from http://github.com/jrbalsano/orion.client/issues.

Working on a pull request for direct_os_shell

Here are the steps for working on a small fix or enhancement using GitHub:

  1. Create a topic branch off of direct_os_shell. Use the format userid/<topicBranchName>
    • The quick way to do that is: git checkout -b pwebster/firstFix
    • If you've already started on direct_os_shell don't worry, you can create your topic branch and check it out at any time
    • If you made a commit while you were still in direct_os_shell then create the topic branch and then:
      1. git checkout direct_os_shell
      2. git reset --hard origin/direct_os_shell
  2. Make your changes, add them, commit
  3. Push your topic branch up to your repo
  4. Open a pull request against https://github.com/jrbalsano/orion.client and the direct_os_shell branch. Be careful to select jrbalsano/orion.client/direct_os_shell. By default, eclipse/orion.client/master will be selected.
  5. After the pull request is merged, checkout direct_os_shell and pull
  6. when working on your next fix or enhancement, go to 1.

Merging a direct_os_shell pull request

For merging into direct_os_shell:

  1. pull down the request locally into a temp branch
    • git fetch
  2. switch to the topic branch
    • git checkout userid/topic_branch
  3. rebase on origin/direct_os_shell [git rebase origin/direct_os_shell]
    • git rebase origin/direct_os_shell
  4. force push the branch back to github
    • git push --force origin topic_branch_name
  5. switch to direct_os_shell and merge the temp branch (it'll do a Fast-Forward merge)
    • git checkout direct_os_shell && git merge topic_branch_name
  6. push the result back up to direct_os_shell
    • git push origin direct_os_shell
  7. Github should recognize and close the pull request as merged

Rebasing a topic branch

If you decide to get the latest direct_os_shell commits and you've already pushed your topic branch to the main repo, you can amend your commit and do a force push. That will reset the branch pointer instead of trying to do a merge. ex:

  1. make sure you are on your topic branch
  2. git rebase origin/direct_os_shell
  3. fix any merge conflicts and continue the rebase
  4. git push origin +HEAD

Picking up a rebased topic branch

If you are looking at someone else's topic branch and they need to make a change that involves a rebase, you don't want to do a pull (although if you do, the fix is the same), you want to do a reset:

  1. make sure you are on the topic branch
  2. make sure you've stashed any of your changes, git reset will wipe them out with extreme prejudice
  3. git fetch
  4. git reset --hard origin/<topicBranch> #i.e. origin/pwebster/firstFix