This was originally going to be a mailing list post, but seemed to be a bit long to bother everyone on the list with 🙂
Most importantly, I owe you all a great deal of thanks for the discussion and
suggestions you’ve offered over the last few months – my dissertation would not be
what it is without you! Unfortunately I haven’t finished in time, and now need to
stop development to concentrate on the report – although I *really* don’t want to 🙂
In terms of functionality, the Granite PHP library I developed as part of the project
largely matches Glip , but with an architecture I can understand
and extend as necessary. I would very much like to continue work on this library
beyond University, primarily for ownCloud’s benefit. It does not, however, support
push and pull operations at the moment, which was one of my ‘nice-to-haves’.
For the ownCloud implementation, everything is self-contained in an “app” under
apps/files_versioning. The two most important pieces are the
versionwrapper.php file implements a PHP streamwrapper, providing access to
versioned:// URLs in the PHP
fopen() (and related) functions.
versionstorage.php file extends the
OC_Filestorage class to provide
access to the streamwrappper from ownCloud’s filesystem.
As a result, if you enable the
files_versioning app in the control panel, a Git
repository is initialised and an initial commit with a
README file is added to the
repository. File operations are mirrored to the repository – for example, saving a
file (either through the web text editor or via WebDAV) results in a new commit with
the appropriate changes. Deletion is also implemented, while renames and other
functions still need to be written.
On to what doesn’t work: subdirectories. The last implementation pushed to GitHub 
supports the above functionality in a top-level directory called ‘Backup’. New files
can be created and modified, however directories cannot. I am currently working on a
branch which fixes these issues (there is no problem with the underlying
functionality, it’s simply been a bit rushed these past few weeks…) which I will
upload as soon as reasonably possible.
Also, there is currently no way to roll-back to a previous version without
cloning the Git repository and performing the relevant operation. There is an
implementation of history browsing in the Settings > Personal section, although this
isn’t currently wired up to anything. Somewhere on my hard drive is a branched copy
of a prototype repository with Glip that implemented this: I shall attempt to dig it
up at some point.
Basically, I want to do lots and lots of things to my implementation, I’m ecstatic
that it works (especially the fact that the Git binary can’t tell the difference
between my PHP-generated repositories and ‘real’ repositories) – but I’ve run out of
time. I have a job to start in July following graduation, so the next couple of
months are going to be hectic. I’d love to keep working on this once I settle down,
but I wanted to make sure I left an up to date copy of the development status, since
I can no longer afford to work on new features.
One last thank-you to simonbuehler who filed the new folder and
$_SERVER['DOCUMENT_ROOT'] bugs on GitHub – that simple act alone will give me bonus points for my Final Report 🙂
Please feel free to clone, take over or otherwise modify my work – it’s all yours. Given the issues outlined above (which I could probably fix in around two weeks – but I don’t have two weeks…) I’m sorry to say it’s not going to be finished for the ownCloud 4 release this month. Perhaps ownCloud 5 🙂
P.S. This is a digression concerning the licensing: The git client itself is licensed under the GPL, as is Glip. However, the Ruby library which powers GitHub is MIT-licensed. I would particularly like to license Granite under MIT as well, simply because I don’t like the idea of the GPL – I don’t want to get sued however 🙂 and there are a few small parts of Granite which use code from Glip. Any advice?