Skip to content

Added option to control the uuid-behavior #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

wachterjohannes
Copy link
Contributor

This PR adds an option to control the uuid-behavior on import. To avoid a BC-break the default is set to IMPORT_UUID_CREATE_NEW.

@wachterjohannes
Copy link
Contributor Author

@dbu what do you think?

@wachterjohannes wachterjohannes force-pushed the enhancement/workspace-import-uuid-behavior branch 2 times, most recently from e437994 to e481347 Compare February 5, 2018 15:22
@wachterjohannes wachterjohannes force-pushed the enhancement/workspace-import-uuid-behavior branch from e481347 to 75110d2 Compare February 5, 2018 15:23
Copy link
Member

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks. the functionality is perfect as is.

can you please add something to the help section with a very short summary how the modes are called and what each mode does?

);
$uuidBehavior = $input->getOption('uuid-behavior');
if (!array_key_exists($uuidBehavior, self::UUID_BEHAVIOR)) {
$output->writeln(sprintf('<error>UUID-Behavior "%s" is not supported</error>', $uuidBehavior));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please add another line saying 'Supported behaviors are %s', implode(', ', self::UUID_BEHAVIOR)

@wachterjohannes
Copy link
Contributor Author

@dbu what do you think? and are all of the description correct?

@dbu
Copy link
Member

dbu commented Feb 6, 2018

i tweaked the wording a little bit and merged on the command line. tagged as 1.4.0, thanks a lot for the contribution!

@dbu dbu closed this Feb 6, 2018
handled. Following options are available:

* <info>new</info> recreate the uuid foreach node
* <info>remove</info> remove the node from imported dataset on uuid collision
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just fyi: remove does remove the existing node on collision, not the one being imported, according to the jcr specification. i changed the doc accordingly.

@wachterjohannes wachterjohannes deleted the enhancement/workspace-import-uuid-behavior branch February 7, 2018 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants