Documentation

CORevision class documentation

CORevision : NSObject <COTrackNode>

CORevision represents a revision in the history graph.

AuthorsGenerated by qmathe
Declared inCORevision.h

Overview

A revision contains:

  • a snapshot of the inner objects
  • various metadata including parent revisions (one, or two for a merge commit)
  • a UUID
  • the UUID of the branch that the revision was originally made on
  • an arbitrary JSON dictionary for application use

For each COBranch that contains uncommitted object graph context changes (i.e. changes to the inner objects), a new revision will be created on commit.

As explained in COUndoTrack and the Commits section of COEditingContext, a commit can create multiple revisions or even none.

Revisions are immutable.

History Properties and Metadata

- (ETUUID *) UUID

Returns the revision identifier.

This revision UUID is unique accross all CoreObject stores.

- (CORevision *) parentRevision

The revision upon which this one is based i.e. the main previous revision. For the first revision in a persistent root, returns nil (unless the persistent root is a cheap copy).

- (CORevision *) mergeParentRevision

If this revision is the result of merging another branch into the this branch, returns the revision that was merged in, otherwise nil.

- (ETUUID *) persistentRootUUID

Returns the persistent root UUID involved in the revision.

It is possible that this persistent root no longer exists.

- (ETUUID *) branchUUID

Returns the branch UUID involved in the revision.

It is possible that this branch no longer exists.

- (NSDate *) date

Returns the date at which the revision was committed.

- (NSDictionary *) metadata

Returns the metadata attached to the revision at commit time.

- (COCommitDescriptor *) commitDescriptor

Returns the commit descriptor matching the commit identifier in -metadata .

- (NSString *) localizedTypeDescription
- (NSString *) localizedShortDescription

Returns the commit descriptor short description evaluated with the arguments provided under the key kCOCommitMetadataShortDescriptionArguments in -metadata.

See -[COCommitDescriptor localizedShortDescriptionWithArguments:]

- (id <COTrackNode>) parentNode

Returns -parentRevision .

- (id <COTrackNode>) mergeParentNode

History Graph Inspection

- (BOOL) isEqualToOrAncestorOfRevision: (CORevision *)aRevision

Returns whether the receiver is equal to an ancestor of the given revision.

Framework Private

- (id) initWithCache: (CORevisionCache *)aCache revisionInfo: (CORevisionInfo *)aRevInfo

Initializes and returns a new revision object to represent a precise revision number in the given revision cache.

Deprecated

- (NSString *) type

Returns the revision type.

e.g. merge, persistent root creation, minor edit, etc.

Note: This type notion is a bit vague currently.

- (NSString *) shortDescription

Returns the revision short description.

This description is optional.

AltStyle によって変換されたページ (->オリジナル) /