mascarenhas / versium-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SCM-like sync support for Versium (http://spu.tnik.org/en/Versium).

Install:

Get versium-sync-scm-1.rockspec from 
http://github.com/mascarenhas/versium-sync/tree/master (under rockspecs)
then do

$ luarocks install versium-sync-scm-1.rockspec

Using the server:

Copy versium-sync/scm-1/lua/src/server/server.ws from your rocks tree
to sync/server.ws under your htdocs, and edit it to point to your
repository's location (default is sync/versium under your htdocs).

Using the client:

Run client.lua <url of server.ws> <location of repository on filesystem>

Right now the client solves all conflicts on its own behalf (but lists
which nodes conflicted)

Programmatically creating a sample repository (in case you don't have
Sputnik):

-----------
require "versium.filedir"

repo = versium.filedir.new{ "htdocs/sync/versium" }
repo:save_version("Index", "This is the index page", "mascarenhas")
repo:save_version("Index", "A new version of the index page", "mascarenhas")
repo:save_version("Another", "This is another page", "carregal")
repo:save_version("Another", "Second version of another page", "carregal")
repo:save_version("Another", "Third version of another page", "carregal")
repo:save_version("Foo", "yet another page", "medeiros")
repo:save_version("Foo", "yet another page changed", "medeiros")
repo:save_version("Bar", "yet another page changed", "medeiros")
------------

About


Languages

Language:Lua 100.0%