ENIGMA Forums

Contributing to ENIGMA => Proposals => Topic started by: Josh @ Dreamland on March 26, 2010, 09:50:48 pm

Title: Collaboration by Timestamps
Post by: Josh @ Dreamland on March 26, 2010, 09:50:48 pm
Serp remarks that GM is unsuitable for collaboration due to resources all being in one file.

I think a nice fix for this would be to store a time of creation (milliseconds-since-Jan-1970 style) as well as a time of last modification and time of last splice in with every resource.

LGM could then offer a splice function that would check each of the three things, like so:
If the resource exists in A (true, we're iterating)
{
  If it doesn't in B (!B)
  {
    Keep A
  }
  else, it does exist in B (B)
  {
    If the time stamps of creation are the same (A.created == B.created)
    {
      If the time stamp of modification of A matches the time stamp of last splice of A (A.modified == A.spliced)
      {
        If the time stamp of modification of B does NOT match the timestamp of splice of B (B.modified != B.spliced)
          Assume B is newer, and copy B to A
        Else
          Continue to the next resource; they should be the same.
      }
      else
      {
        If the time stamp of modification of B matches the timestamp of splice of B (B.modified == B.spliced)
          Assume A is newer; keep it
        Else (B.modified != B.spliced and A.modified != A.spliced)
          I have no idea what to do here. Ask the user, show a Diff somehow. This is what requires work.
      }
    }
    else, they are different resources entirely (A.created != B.created)
    {
      If the names are the same, both users may have been thinking the same thing (A.name == B.name)
        If on prompt for action the user says to skip it
          Continue to next resource
      Increment the id of B to the next available resource ID.
    }
  }
}
Title: Re: Collaboration by Timestamps
Post by: IsmAvatar on March 27, 2010, 09:33:32 am
There is a little-known project/plugin going on that I'm working on called LgmScm. For those of you unfamiliar, SCM stands for a few different things:
S: Software/Source
C: Configuration/Control/Code
M: Management
The usual term is Software Configuration Management. It refers to revision control and such, for example, SVN, CVS, GIT, BZR, and a few others.

The idea behind LgmScm is three-fold.
1) Team management
2) Thus, Separate files
3) Thus, version control/SCM

The first step of LgmScm is to separate your GM file into a bunch of XML files, or data files for non-textual data (like images) - such as png, wav, etc.
The next step is to pass those files off to some SCM program, such as SVN.

Of course, you can take the process backwards as well:

First, obtain the separated XML/etc files by some means such as SVN checkout/update.
Then, import the xml files into LGM as 1 GM file.



Passing the files off to a/an SCM saves me the trouble of having to deal with the timestamps, splicing, and most of the merging/diff stuff, and gives the added benefits that those systems already have. Basically, I wouldn't be recoding what's already out there.


Now I get asked where it can be downloaded. At this time, it's not public. I was basically waiting for LGM1.6 to be released or to at least stabilize in the backend before I made it publicly available, because at this time, I doubt it even works, although i did get it mostly working at one point. If anybody wants to help with it (which I highly doubt, judging by the influx of help with LGM and other related plugins...), I'll certainly share it with them. If anybody's really really desperate to get their grubby hands on it, I can also share. But like I said, I doubt it works, and it certainly doesn't interface with any SCM system yet.
Title: Re: Collaboration by Timestamps
Post by: luiscubal on March 27, 2010, 05:05:02 pm
I think Ism's idea is better than Josh's, not to mention that systems like SVN/HG/etc will interface better with it.
Title: Re: Collaboration by Timestamps
Post by: notachair on March 27, 2010, 05:13:13 pm
Something that allows for SCM integration definitely would be nice
Title: Re: Collaboration by Timestamps
Post by: Josh @ Dreamland on March 27, 2010, 05:58:50 pm
Quite.