To remove contributions of some versions
About this task
Complete
each of the tasks:
Procedure
- To prepare a destination view:
- Start a dynamic view or change directories to a snapshot view.
The view must select the target version (the latest version on the branch
that will contain the results of the merge). In this scenario, the view must
select opt.c@@/main/18. (See the figure.)If
such a view does not exist, create one.
- If the target version is checked out to your view for other
revisions, create a premerge checkpoint by checking it in. In the figure,
the target version is as follows:
- On the UNIX®
system or Linux®,
opt.c@@/main/18.
- On the Windows® system, opt.c@@\main\18.
- To determine which versions contain changes you want to remove,
you can use any (or all) of the following methods:
- History Browser: view element history to see checkin comments. Depending
on the quality of the comments, you may be able to narrow your search to a
smaller set of versions.
- Version Tree Browser: display the element version tree to see the
versions arranged graphically by branch.
Windows tip: Position the mouse pointer
over a version to see its checkin comment.
- Compare versions.
- Open a version in an editor to see its contents.
From
a snapshot view use the cleartool get command
to see the contents of versions not loaded into your view.
On the Windows® system,
you can also use the Send To command in the Version Tree Browser or
History Browser to see the contents of versions not loaded into your view.
- To remove changes (perform the merge):
- Check out the target version.
- At a command prompt, enter cleartool merge with
the -delete option. Optionally, you can also use the -graphical option
to complete merges in the Diff Merge or XML Diff Merge tool.. (You cannot
start a subtractive merge from Diff Merge.)
cleartool merge [ -graphical ] -to target-path -delete contributor-version-selector [contributor-version-selector]
(Specifying two contributors defines an inclusive range
of versions; just the changes made in that range of versions are removed.)
Examples
You can remove all changes from a range
of versions at once. For example, the following command removes revisions
to versions 14 through 16 on the main branch:
You can also remove the changes from one version at a time. For
example, the following commands remove only the changes in version 14 from
the version of
opt.c checked out the current view:
Alternatively, in any of the examples above, you
can leave out the -version argument if you use the version
extended path for the contributor-version-selector.
- Resolve conflicting differences in the merge window. Depending
on the type of contributors you chose, either the Diff Merge or XML Diff Merge
window is displayed.
- Save the merge results.
- To test and check in merge results:
- In the view that contains your merge results, build and test
the results, resolving any build errors.
- When you are satisfied with the build and test results, check
in the target version.
Note: In a subtractive merge, a merge arrow
is not created.
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.