Completes the merge process with respect to the node at
absPath
and the specified
version
.
When the
#merge method is called on a node, every versionable
node in that subgraph is compared with its corresponding node in the
indicated other workspace and a "merge test result" is determined
indicating one of the following:
- This node will be updated to the state of its correspondee (if
the base version of the correspondee is more recent in terms of version
history)
- This node will be left alone (if this node's base
version is more recent in terms of version history).
- This node
will be marked as having failed the merge test (if this node's base
version is on a different branch of the version history from the base
version of its corresponding node in the other workspace, thus preventing
an automatic determination of which is more recent).
(See
#merge for more details)
In the last case the merge of the non-versionable subgraph (the
"content") of this node must be done by the application (for example, by
providing a merge tool for the user).
Additionally, once the content of the nodes has been merged, their
version graph branches must also be merged. The JCR versioning system
provides for this by keeping a record, for each versionable node that
fails the merge test, of the base version of the corresponding node that
caused the merge failure. This record is kept in the
jcr:mergeFailed
property of this node. After a
merge
, this property will contain one or more (if multiple
merges have been performed) REFERENCE
s that point to the
"offending versions".
To complete the merge process, the client calls doneMerge(Version
v)
passing the version object referred to be the
jcr:mergeFailed
property that the client wishes to connect
to this
node in the version graph. This has the effect of
moving the reference to the indicated version from the
jcr:mergeFailed
property of this
node to the
jcr:predecessors
.
If the client chooses not to connect this node to a particular version
referenced in the jcr:mergeFailed
property, he calls
#cancelMerge(String,Version). This has the effect of removing the
reference to the specified version
from
jcr:mergeFailed
without adding it to
jcr:predecessors
.
Once the last reference in jcr:mergeFailed
has been either
moved to jcr:predecessors
(with doneMerge
) or
just removed from jcr:mergeFailed
(with
cancelMerge
) the jcr:mergeFailed
property is
automatically removed, thus enabling this
node to be
checked-in, creating a new version (note that before the
jcr:mergeFailed
is removed, its OnParentVersion
setting of ABORT
prevents checkin). This new version will
have a predecessor connection to each version for which
doneMerge
was called, thus joining those branches of the
version graph.
If successful, these changes are dispatched immediately; there is no need
to call save
.