Closed Bug 1045073 Opened 5 years ago Closed 3 years ago

Git support in WebIDE


(DevTools :: WebIDE, defect, P2)



(Not tracked)



(Reporter: janx, Unassigned)



(Whiteboard: [spark])


(2 files, 1 obsolete file)

I'm developing a Firefox OS app, and recently I found myself using Cloud 9 instead of WebIDE.

The main reason was that I'm working on this app on different computers, and it's more convenient to return to the same workspace in the cloud, rather than have to finalize work as Git commits on one machine before importing the changes on the other machine to go back to WebIDE.

Maybe a clever support of Git could make WebIDE more convenient for developing apps on different computers?
This feels like a terrifying scope increase to me. :)
Blocks: 1045078
It is a terrible scope increase, but Paul asked me to file a bug every time I use something else than WebIDE. :)
Tim Caswell's js-git (which Mozilla supported financially) should be useful here:
Don't we actually want something like GitHub support rather than a local Git support ?

Or are we planning on hosting our own git server for WebIDE users ?

OR if the bug request is for a local git support, then the "switching to different machine and manually importing patch, blah blah" problem will still exist, right ?
Jan, were you imagining a "sync to cloud" type workflow as in Cloud 9 here, or instead to make WebIDE Git-aware, as in it could perform Git operation on a local repo?

As Optimizer says, it does seem like support for a local Git repo is not really enough to solve the sync problem entirely.
I am not a designer, so apologies for this. We were throwing together some ideas as part of another project and this came up. The idea is that the application source folder could link to the original github source. Assuming you have some github credentials on the computer, we could detect if the original source belongs to you or not. We could also surface some options for forking/publishing.

Just posting this here for feedback and to get some ideas flowing.
Blocks: spark
I feel a bit sad to integrate github more than git, but the idea itself looks great.
It is great to have the full path from checking out the sources up to submitting patches,
but I think we would start by just checking out sources from the upstream repo.
Then developers could use their command line to to whatever they want with git.
I think it is already very useful to "just" display the github url + revision.
I imagine that integrating with git within WebIDE UI will be valuable only if we have an extensive support of it.
This patch doesn't really implement the original purpose of this bug,
but it is a good start. It allows reading apps metadata to look for git repo+changeset
and offer a way to checkout the app sources and import as a local app.

This patch is based on top of bug 1114681.
This patch also ensure that you can push "install metadata" via WebIDE.
You just have to create a install-metadata.json file and its content will be pushed to the device as installMetaData field.

In order to test this patch, just create an app locally, with install-metadata.json like this:
  "url": "",
  "revision": "1015925232d4c205132c8778581dd903f66ec102"
Then register this app in WebIDE, push to the device.
Now remove the project from WebIDE.
Reopen the app list, now select the app you just pushed.
You are now on the app installed on the device and don't have the project locally.
Click on the tool icon to hide the toolbox, you should see a "Clone app sources" button.
Click on this button, select a new empty folder and the project is going to be cloned.
It will require git to be installed and correctly registered in your path!
Comment on attachment 8545999 [details] [diff] [review]
Detect git metadata on apps to clone and import apps locally

Landed on cypress:
Blocks: spark-webide
No longer blocks: spark
Priority: -- → P2
Whiteboard: [ignite]
Whiteboard: [ignite] → [spark]
Here is a patch that still applies on current master, but I don't intend to pursue this as the concept of metadata per app hasn't landed on master and noone seems to be pushing this project.
WebIDE is slated for removal (bug 1314811), so there are no plans to add to the current set of features.
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.