final StringBuilder err = new StringBuilder();
try {
MetaDataUpdate md = metaDataUpdateFactory.create(nameKey);
try {
ProjectConfig config = ProjectConfig.read(md);
Project project = config.getProject();
project.setRequireChangeID(requireChangeID != null ? requireChangeID
: project.isRequireChangeID());
project.setRequireChangeID(noRequireChangeID != null
? !noRequireChangeID : project.isRequireChangeID());
project.setSubmitType(submitType != null ? submitType : project
.getSubmitType());
project.setUseContentMerge(contentMerge != null ? contentMerge
: project.isUseContentMerge());
project.setUseContentMerge(noContentMerge != null ? !noContentMerge
: project.isUseContentMerge());
project.setUseContributorAgreements(contributorAgreements != null
? contributorAgreements : project.isUseContributorAgreements());
project.setUseContributorAgreements(noContributorAgreements != null
? !noContributorAgreements : project.isUseContributorAgreements());
project.setUseSignedOffBy(signedOffBy != null ? signedOffBy : project
.isUseSignedOffBy());
project.setUseContentMerge(noSignedOffBy != null ? !noSignedOffBy
: project.isUseContentMerge());
project.setDescription(projectDescription != null ? projectDescription
: project.getDescription());
project.setState(state != null ? state : project.getState());
md.setMessage("Project settings updated");
config.commit(md);
} finally {
md.close();
}
} catch (RepositoryNotFoundException notFound) {
err.append("error: Project " + name + " not found\n");