Skip to content

Allow working copy to sync with actual published copy in revisions #1395

@efc

Description

@efc

Right now it is hard to get the revisions system to sync up with the current published state of an entry. In other words, what can you do when an entry with a working copy is changed by something outside Statamic (say by someone editing the .md file in the filesystem or pulling from git).

Revisions tries to keep track of a "current" copy, but this can be superseded by changes to the underlying filesystem (editing the files directly or pulling new copies from git). If the published file is changed outside of Statamic, the revisions system has no idea and continues to call a now-dated version "current". There seems to be no way to say "please make my working copy a clone of the currently published state" or even to just delete the working copy (which would amount to the same thing).

If I go to the filesystem and simply delete the working copy file, I get the desired result, the system creates a new working copy from the currently published state. But there is no way for a user without access to the filesystem to accomplish this.

There should be a way for the user to choose "published version" from the revision history, or to delete the current working copy to force a reset.

The word "current" is also a bit misleading in the history, since it very well may not be the actual currently published version. It might be more correctly termed "last published". Or Statamic could check for a match of timestamp on the actually published entry and the timestamp of the revision being marked "current" before giving it that designation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions