My Requirement is regarding clearcase delivery: I want to automate delivery(no manual intervention/no deliver failure) process: While delivering - if there is any merge issue 1.if CC is able to merge files, its good- let it merge, 2.if CC is not able to merge - i don't want it to fail, instead lets not merge that particular file(revert merge for that file), proceed with next files. 3.List the files that are skipped, so that i can manually merge later.
i doubt we can do this in a single step, but let me know if this is possible, and process to do it.
you can click "skip all" during a merge, but you will have to resolve them in one way or another.
The easiest way is to make sure those files aren't considered for merge in the first place (see below).
But there is no native way to automate the process you describe:
While delivering, if there is any merge issue
- if CC is able to merge files let it merge,
- if CC is not able to merge - I don't want it to fail, instead lets not merge that particular file (revert merge for that file), proceed with next files.
- List the files that are skipped, so that i can manually merge later.
You would need to write a script to manage those case, and even in this case it wouldn't work for an UCM merge (deliver/rebase), which won't complete until all files have been merged (hence my "red arrow" suggestion below)
That script would basically take the output of a cleartool findmerge -print (to get all directories/ files to merge), and then merge first the directories, and then the files one by one, applying the policies your are afer.
for making sure a certain file is always ignored
for the current merge:
You can simulate the merge by displaying the version tree and right click on the source version: "merge to" and select "do not merge, draw the merge arrow" (red arrow, which represents a merge arrow, as seen in this illustration).
The idea is to trick the current deliver into believing that this file has been merged even though you haven't do any modification during that merge (you just have drawn the red or merge arrow between the source and destination version).for the future merges:
You can change the merge manager associated to a type of file in order to never merge it.
See "Handling Binary Files in IBM Rational ClearCase", which explains how to create a new special type manager:
You can then apply that merge manager to a specific file with cleartool chtype
.
initially i tried below commands to get the list of file to merge(file names, activities are renamed to avoid confusion):
cleartool findmerge activity:a@\a_pvob activity:b@\a_pvob -fcsets -ftag Accept_deliver_stream -type d -merge -log c:\temp\am.log
cleartool findmerge activity:a@\a_pvob activity:b@\a_pvob -fcsets -ftag Accept_deliver_stream -type f -print -log c:\temp\af.log
so it returned list of commands to af.log file, when i am trying to execute those commands, it just hangs even after one hour, one command is:
cleartool findmerge M:\WM2011_DEV_INTG_WMOSBUILD_01\WM08\CPP\base\foundation\general\invupdates\InvUpdate.cpp -fver \main\Mainline_Int\WM08_Integration\WM09_Integration\WM2010_DEV_INTG\MAIN_WM_Int\WM2012_IND\9 -log NUL -merge -cqe
来源:https://stackoverflow.com/questions/12834809/deliver-merge-automatic