Is it theoretically possible to merge Mercurial or Git into a browser extension?

I am creating a browser-based web development software http://gnymb.us . Ultimately, we will have limited offline support, so you can edit your files offline using localStorage, HTML5, or Google Gears databases.

I am currently creating version control support for Subversion, Mercurial, and Git. This works great when the user is connected to the network. As you know, Mercurial and Git allow us to work offline. One of the challenges of offline editor support is that since this software is browser-based, the user will not be able to use the standalone SCM features.

Would it be theoretically possible to bundle Mercurial or Git in a browser extension and then change it to use hash based localStorage or HTML5 databases, rather than a file system hierarchy - without overwriting everything? I know that Mercurial uses Python, so I would like to use Python in a browser extension. I am also open to other solutions.

+3
source share
2 answers

You can create a plugin (or extension based on your own code for each browser) and associate the VCS code with it. But you get 3 problems right away:

  • You need to create a new plugin that will limit your potential users (not everyone is happy to install plugins).
  • , plattform
  • , mercurial git GPL, SVN - APL.
+1

git . git , , Ruby (grit).

+1

Source: https://habr.com/ru/post/1796344/


All Articles