Hello,

I am struggling to create a branch with Jackrabbit v2.18.3. What I want to
achieve is to have a new subtree which is a branch of an existing subtree
(in the same workspace), so that it can later be merged (reproducing what
we usually do with code but with files and their metadata)

- Is there a direct way via API, reciprocal to VersionManager.merge() ?

- In the specs, the only location where I find creating a branch explicitly
mentioned is 15.7.7 in
https://docs.adobe.com/content/docs/en/spec/jcr/2.0/15_Versioning.html :
"[...] subsequent check-in of N the version V will acquire an additional
direct successor, forming a branch." I have tried to restore a version of
the source subtree to another path but I keep bumping into "Unable to
restore version. Versionable node already exists." exceptions

- Should I use the Version as a Node and add explicitly a reference to
another Version to the jcr:successors multiple property? But where would
this other Version come from?

- Or am I taking the wrong approach by expecting to have two separate
existing subtrees, and I should rather Workspace.copy() and rely on the
version lineage and the jcr:copiedFrom property?

Thanks in advance for some hints!

Mathieu

Reply via email to