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
Name | Type | Description |
---|---|---|
project | IProject | Project |
units | IEnumerable<IModelUnit> | Units to discard changes |
autoReload | bool | Automatically 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. |
silent | bool | If true is specified, the progress will not be displayed in the progress bar. Default value is false. |
Return value
- void
Exception
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If a unit outside of project management is specified as the unit to be discarded. |
Unauthorized operation | ExtensionInvalidOperationException | If a unit added or deleted from the project is specified as the unit whose changes are to be discarded |
Configuration management repository operation fails | ExtensionScmException | If 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().