// TODO: default hooks?
CommitHook hook = new CompositeHook(
new EditorHook(new GroupEditorProvider(groupsPath)),
new EditorHook(new CompositeEditorProvider(
new TypeEditorProvider(),
new IndexUpdateProvider(new CompositeIndexEditorProvider(
new ReferenceEditorProvider(),
new PropertyIndexEditorProvider())))));
target.merge(builder, hook, CommitInfo.EMPTY);
} catch (Exception e) {
throw new RepositoryException("Failed to copy content", e);