reverting to a previous version in 0.7

32 views
Skip to first unread message

Samy Alzahrani

unread,
Mar 4, 2014, 1:51:35 PM3/4/14
to sha...@googlegroups.com
Hi,

There are a few posts in the group suggesting inverting operations since the targeted version. But the code examples may be referring to previous versions of sharejs and I couldn't get them to work. So my question is in 0.7 what is the correct way to invert operations on the server since version x.

Joseph Gentle

unread,
Mar 4, 2014, 5:46:54 PM3/4/14
to sha...@googlegroups.com
What are you trying to do, exactly? Do you want to undo a change, or
reject a change (rejecting is easier)?

On Tue, Mar 4, 2014 at 10:51 AM, Samy Alzahrani <samyal...@gmail.com> wrote:
> Hi,
>
> There are a few posts in the group suggesting inverting operations since the targeted version. But the code examples may be referring to previous versions of sharejs and I couldn't get them to work. So my question is in 0.7 what is the correct way to invert operations on the server since version x.
>
> --
> You received this message because you are subscribed to the Google Groups "ShareJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sharejs+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Samy Alzahrani

unread,
Mar 5, 2014, 12:06:09 AM3/5/14
to sha...@googlegroups.com
Here is my situation... I am using sharejs the core of the backend for a CMS and the use case is as follows
  1. the user creates a new document and edits it as a private/draft document
  2. Once satisfied the user can publish the document which triggers the server to do some processing and makes a public copy (probably a static html file) 
  3. If the user edits the same document again he has now two options
    1. publish the changes ( kicks of the same process as step 2 above)
    2. revert the changes done in step 3 and return the document to the state it had when published.
From what I read in the group, inverting operations since publication is the preferred way but I am open to any other solutions.

I really appreciate you taking the time you take to answer users question and I genuinely wish you all the best with your endeavors.

Samy
Reply all
Reply to author
Forward
0 new messages