The Revert Window
You use the Revert window to select and apply changes to a branch such that they revert changes made in a commit.
The window contains a table with the reverting item changes. The table columns are:
The type column — the type of the item to change represented by an icon.
The Change to Apply column — a description of the reverting item change.
The Conflicting Latest Changes column — one or more later changes on the branch that are incompatible, or in conflict, with a reverting change.
The Selection column — an icon representing whether to apply the reverting change (), ignore the change (), or if there is a conflict ().
Click the Apply Revert button () to open The Apply Revert Dialog Box after you have decided which changes to apply and resolved any revert conflicts.
The Revert Window Toolbar
The toolbar in the Revert window contains the following toolbar buttons:
Click the Refresh button () to refresh the table in case any new commits have been saved on the branch.
Click the Take Change to Apply button () to apply a reverting change to the branch.
Click the Keep Latest Change button () to skip a reverting change, keeping the latest change as is.
Click the Apply Revert button () to open the The Apply Revert Dialog Box.
Resolving Revert Conflicts
When you revert a commit on a branch, you may discover that the reverse changes are in conflict with the current item versions on the branch. Such revert conflicts can arise, for example, when:
Revert conflicts are indicated in the Selection icon column by (). Select the table row and click the Take Change to Apply button () to overwrite all conflicting latest changes on the branch with the corresponding reverting change. Click the Keep Latest Change button () to keep the target unchanged by skipping the reverting change.
Resolving Conflicting Model Versions
Unlike merging from a source branch to a target branch, you may see less need to manually merge the model trees of conflicting model versions when reverting a commit on a branch — see Merging Conflicting Model Updates. Nevertheless, you can proceed as follows:
1
2
The Comparison Result window is opened with a comparison between the model in the COMSOL Desktop — that is, the older model version to revert to — and the latest model version.
3
4
From the File menu, select Save as Version ().
5
Save a new version of the model to the branch from the Save window — this becomes the reverted model version. There will inevitably be Save Conflicts with the latest model version. Choose to ignore them.
6
Click the Refresh button () in the Revert window’s toolbar to recompute changes.
7
If there is more than one conflict between an older model version being reverted to and a latest model version, repeat these steps for each one. Once finished, finish the revert by clicking Apply Revert ().
The Apply Revert Dialog Box
The Apply Revert dialog box gives you a final chance to either go through with the revert or cancel it (except for any manually reverted model versions already saved on the target branch — see Resolving Conflicting Model Versions). The Location field shows the branch on which the revert is made. You can write an optional comment in the Comments field for the commit created by the revert.
The table shows all changes that will be applied to the branch by the revert commit. These changes may differ from the original changes shown in the Revert window depending on which changes were included, which were skipped, and potential revert conflict resolutions.
Click OK to apply the changes in the database.