IScmManager.RevertUnits Method
Namespace: NextDesign.Desktop
Description
Discards changes to the specified unit in the specified project.
Nothing is done if there are no changes to the specified unit.
Nothing is done if the specified project is not integrated with the configuration management system.
Arguments
Name | Type | Description |
---|---|---|
project | IProject | Project |
units | IEnumerable<IModelUnit> | Units to discard changes for |
autoReload | bool | Whether to automatically reload the project after discarding changes - If true, the project will be reloaded (default behavior). - If false, the project in the working folder will only be updated and the project will not be reloaded. Note that if the specified project is not the current project, the autoReload setting will be ignored. |
silent | bool | If true is specified, the progress will not be displayed in a progress bar. The default value is false. |
Return value
- void
Exceptions
Name | Exception class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | When a unit not managed by the project is specified as the unit to be discarded |
Invalid operation | ExtensionInvalidOperationException | When a unit that has been added to or deleted from the project is specified as the unit to be discarded |
Configuration management repository operation failed | ExtensionScmException | When a configuration management repository operation failed |
Annotation
If the units to be discarded include units that have been added to or deleted from the project, calling this method will fail.
Discard the changes to the entire project using RevertProject().