1

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.

vasu
  • 97
  • 10

2 Answers2

0

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

  1. if CC is able to merge files 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.

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:

type manager

You can then apply that merge manager to a specific file with cleartool chtype.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i guess i am not clear, let me describe my problem clearly: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 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. – vasu Oct 11 '12 at 10:54
  • @vasu I have edited the answer to address your specific issue, but the last parts of my original answer remain relevant (in the absence of a true way to automate the process) – VonC Oct 11 '12 at 11:11
  • Thankyou verymuch VonC, i can try this option.I have one more doubt:with "findmerge" is it possible to print/log all the merge files for a stream(view level) rather than activity by activity – vasu Oct 12 '12 at 07:21
  • @vasu yes, `findmerge` will print files and directories to be merged (you can even ask `findmerge` to merge UCM activities, it will still print dir and files). However, for directories, it will stop there (meaning it won't list any files within a directory which needs merging first). When `findmerge` lists files to be merges, those are part of a directory which doesn't need merging. – VonC Oct 12 '12 at 07:26
  • Thanks again Von, i run "findmerge -print" command, it returned .log file, when i try to run the commands that are there in the log file, it just hangs, i am not sure the reason, command: cleartool findmerge *\InvUpdate.cpp -fver *\9 -log NUL -merge -cqe output:Needs Merge "*\InvMgmtImpl.cpp" [to *\27 from *\15 base *\26] Checkout comments for "*\InvMgmtImpl.cpp": thats it, it hangs... – vasu Oct 12 '12 at 12:17
  • `findmerge -print` isnt' enough: you need to add the parameters indicating to `findmerge` *what* to merge: see `man findmerge`: http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/topic/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_findmerge.htm . For instance, if you want to use wildcards (*), you need the `-name` option. See the example in the man page. – VonC Oct 12 '12 at 12:58
0

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

vasu
  • 97
  • 10