Skip to main content

IScmManager.RevertUnits method

Namespace: NextDesign.Desktop

Description​

Discards changes for the specified unit in the specified project.
If there are no changes to the specified unit, nothing is done.
Also, nothing will be done if the specified project is not linked with the configuration management system.

argument​

NameTypeDescription
projectIProjectProject
unitsIEnumerable<IModelUnit>Units to discard changes
autoReloadboolAutomatically reload the project after discarding changes?
- If true, reloads the project (default behavior).
- If you specify false, only the project in the working folder will be updated and the project will not be reloaded.

If the specified project is not the current project, the autoReload specification will be ignored.
silentboolIf true is specified, the progress will not be displayed in the progress bar.
Default value is false.

Return value​

  • void

Exception​

NameException classDescription
Invalid argumentExtensionArgumentExceptionIf a unit outside of project management is specified as the unit to be discarded.
Unauthorized operationExtensionInvalidOperationExceptionIf a unit added or deleted from the project is specified as the unit whose changes are to be discarded
Configuration management repository operation failsExtensionScmExceptionIf configuration management repository operation fails

Annotation​

Calling this method will fail if the units whose changes are to be discarded include units that have been added to or removed from the project.
Discard changes for the entire project with RevertProject().