Patent ID: 7899883

Claim:
At least one computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a computer, cause the computer to perform a method comprising: receiving a representation of at least one revision to a document that is provided to a plurality of peer systems for collaborative editing; storing a first version history of the document that captures at least the revision locally at a first one of the peer systems; syncing the first one of the peer systems with at least a second one of the peer systems; sending the first version history of the document to the second peer system; receiving a second version history of the document from the second peer system, wherein the second version history stores at least one revision occurring locally at the second peer system; combining graph representations of the first and second version histories into a combined version history graph; and reducing the combined version history graph into a tree representation by determining whether a leaf node represents a state that is calculated by the first peer system or the second peer system in connection with a merge operation, removing the leaf node in response to determining that the leaf node represents a state that is calculated by the first peer system or the second peer system in connection with a merge operation, determining whether the node is associated with at least two immediate parents in the tree representation, and in response to determining whether the node is associated with at least two immediate parents in the tree representation, removing all but one of the immediate parents of the node.