Topic
  • 17 replies
  • Latest Post - ‏2012-09-21T19:30:43Z by JirongHu
JirongHu
JirongHu
687 Posts

Pinned topic How to identify the stream rebase to in a rebase trigger?

‏2012-09-18T18:30:07Z |
Inside a rebase trigger, CLEARCASE_STREAM identifies the stream where the rebase starts, but how to find the stream it rebase to? e.g. stream UAT rebase to PRD, CLEARCASE_STREAM=UAT, how to get the PRD stream? CLEARCASE_SRC_STREAM is empty in this case.
CLEARCASE_SRC_STREAM
(All deliver operations) The UCM stream from which the deliver operation was initiated.

CLEARCASE_STREAM
(All deliver, rebase and mkbl operations; mkactivity, chactivity, rmactivity, setactivity, mkstream, chstream, rmstream, chbl, rmbl) The UCM stream containing the object involved in the action that caused the trigger to fire, if applicable. For the mkstream operation, a postoperation trigger only. Not set for the mkbl, chbl, or rmbl operation if this is an initial (or imported) baseline.
  • brcowan
    brcowan
    763 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T18:43:13Z  
    In UCM, a rebase doesn't "really" have a source stream. You are rebasing to a set of baselines. Those baselines are usually from the parent stream, but that's not always the case.

    If you need the stream or streams the baselines used in your rebase operation are from, you would need to take the CLEARCASE_BASELINES environment variable, split it apart and describe those baselines with -fmt "%bl_streamp" to get the stream they were created in.

    Ref: fmt_ccase man page
    mktrtype man page

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T19:02:25Z  
    • brcowan
    • ‏2012-09-18T18:43:13Z
    In UCM, a rebase doesn't "really" have a source stream. You are rebasing to a set of baselines. Those baselines are usually from the parent stream, but that's not always the case.

    If you need the stream or streams the baselines used in your rebase operation are from, you would need to take the CLEARCASE_BASELINES environment variable, split it apart and describe those baselines with -fmt "%bl_streamp" to get the stream they were created in.

    Ref: fmt_ccase man page
    mktrtype man page

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    I was trying to get the list of changes during the rebase, as discussed in this thread: https://www.ibm.com/developerworks/forums/thread.jspa?threadID=455694&tstart=0

    The diffbl takes in either two baselines or two streams, so I try to find out the two streams involved in rebase.

    Thanks
    Jirong
  • brcowan
    brcowan
    763 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T19:46:36Z  
    • JirongHu
    • ‏2012-09-18T19:02:25Z
    I was trying to get the list of changes during the rebase, as discussed in this thread: https://www.ibm.com/developerworks/forums/thread.jspa?threadID=455694&tstart=0

    The diffbl takes in either two baselines or two streams, so I try to find out the two streams involved in rebase.

    Thanks
    Jirong
    Actually, the diffbl will take a stream and a baseline. You can't compare the source and destination streams because there may be changes in the source stream that are not in the particular baseline you are using.

    You should be able to compare the stream to the baseline. But some experimentation will be needed to tweak the results...

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T20:13:32Z  
    • brcowan
    • ‏2012-09-18T19:46:36Z
    Actually, the diffbl will take a stream and a baseline. You can't compare the source and destination streams because there may be changes in the source stream that are not in the particular baseline you are using.

    You should be able to compare the stream to the baseline. But some experimentation will be needed to tweak the results...

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    Yes, the results are different as shown below.

    However, we should not have the situation you've described regarding "there may be changes in the source stream that are not in the particular baseline you are using". Here is what we will do:
    1. We have cascading streams, e.g. PRD, UAT, DEV created in CC, corresponding to the Informatica environment PRD, UAT, DEV.
    2. At the end of final deliver to PRD in CC, a baseline is created in PRD.
    3. Then immediately we are rebasing the rest of all streams to the above new baseline to make sure all the rest of Informatica environment is based on current PRD. There shouldn't be anything new changes in the source stream since the baseline is just created, and nobody should update the PRD stream directly.

    Am I right?
    changeSet=Comparing the following:
    ABC_120917_162721@\Informatica_PVOB
    ABC_BUILD@\Informatica_PVOB
    Differences:
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\4
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1\testQEM.txt\main\ABC_QEM\1

    Comparing the following:
    ABC_UAT@\Informatica_PVOB
    ABC_DEV@\Informatica_PVOB
    Differences:
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_UAT\4
    >> M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_DEV\5
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_PRD\1
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_QEM\2
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T20:19:06Z  
    • JirongHu
    • ‏2012-09-18T20:13:32Z
    Yes, the results are different as shown below.

    However, we should not have the situation you've described regarding "there may be changes in the source stream that are not in the particular baseline you are using". Here is what we will do:
    1. We have cascading streams, e.g. PRD, UAT, DEV created in CC, corresponding to the Informatica environment PRD, UAT, DEV.
    2. At the end of final deliver to PRD in CC, a baseline is created in PRD.
    3. Then immediately we are rebasing the rest of all streams to the above new baseline to make sure all the rest of Informatica environment is based on current PRD. There shouldn't be anything new changes in the source stream since the baseline is just created, and nobody should update the PRD stream directly.

    Am I right?
    changeSet=Comparing the following:
    ABC_120917_162721@\Informatica_PVOB
    ABC_BUILD@\Informatica_PVOB
    Differences:
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\4
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1\testQEM.txt\main\ABC_QEM\1

    Comparing the following:
    ABC_UAT@\Informatica_PVOB
    ABC_DEV@\Informatica_PVOB
    Differences:
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_UAT\4
    >> M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_DEV\5
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_PRD\1
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_QEM\2
    Is there an easy way to identify the directory change or file change in the result of comparing baseline to stream as shown above?

    Thanks
    Jirong
  • jeff98air
    jeff98air
    817 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T20:29:13Z  
    • JirongHu
    • ‏2012-09-18T20:19:06Z
    Is there an easy way to identify the directory change or file change in the result of comparing baseline to stream as shown above?

    Thanks
    Jirong
    Jirong,

    What are you trying to accomplish by gathering the change set of a rebase activity during execution of a rebase trigger? Are you going to prevent the rebase based on the data? So far, all of the information you have asked about is contained in the rebase activity once the rebase is completed.

    -Jeff Ng
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T21:09:09Z  
    • jeff98air
    • ‏2012-09-18T20:29:13Z
    Jirong,

    What are you trying to accomplish by gathering the change set of a rebase activity during execution of a rebase trigger? Are you going to prevent the rebase based on the data? So far, all of the information you have asked about is contained in the rebase activity once the rebase is completed.

    -Jeff Ng
    As I described in my previous post, we are implementing CC for Informatica. During a deliver/rebase, for any files changes, we need to do the same in Informatica server in the corresponding environment. Actually re-import/export the workflow files, etc. The objective is to make sure CC and Informatica server environments are synchronizes.

    So during a deliver and rebase:
    1. I need to update Info environment by export/import the files in CC change set. We only need to update the files in the change set, that's why I need to find out the change set.
    2. If some of export/import fails, we backout the import/export, backout deliver (it's done by CC itself since we are using triggers.)
    Thanks again.
    Jirong
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T21:11:04Z  
    • jeff98air
    • ‏2012-09-18T20:29:13Z
    Jirong,

    What are you trying to accomplish by gathering the change set of a rebase activity during execution of a rebase trigger? Are you going to prevent the rebase based on the data? So far, all of the information you have asked about is contained in the rebase activity once the rebase is completed.

    -Jeff Ng
    I don't know why the rebase activity is empty as shown below. The code is running inside a rebase complete preop trigger.

    $RebaseACT = "$ENV{'CLEARCASE_ACTIVITY'}";
    $RebaseChangeSet =`cleartool lsactivity -l $RebaseACT`;

    RebaseACT=rebase.ABC_BUILD.20120918.155831@\Informatica_PVOB RebaseBLS=ABC_120917_162721@\Informatica_PVOB RebaseChangeSet=activit
    y "rebase.ABC_BUILD.20120918.155831"
    2012-09-18T15:58:32-04:00 by Admin ID (ccadm01.CCUsers@CCREQPWEBD01)
    "Integration activity created by rebase on 9/18/2012 3:58:31 PM.
    "
    owner: HBC\ccadm01
    group: HBC\CCUsers
    stream: ABC_BUILD@\Informatica_PVOB
    current view: ccadm01_ABC_BUILD
    title: rebase ABC_BUILD on 9/18/2012 3:58:31 PM.
    change set versions:
  • Tgefen
    Tgefen
    727 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T23:10:01Z  
    • JirongHu
    • ‏2012-09-18T21:11:04Z
    I don't know why the rebase activity is empty as shown below. The code is running inside a rebase complete preop trigger.

    $RebaseACT = "$ENV{'CLEARCASE_ACTIVITY'}";
    $RebaseChangeSet =`cleartool lsactivity -l $RebaseACT`;

    RebaseACT=rebase.ABC_BUILD.20120918.155831@\Informatica_PVOB RebaseBLS=ABC_120917_162721@\Informatica_PVOB RebaseChangeSet=activit
    y "rebase.ABC_BUILD.20120918.155831"
    2012-09-18T15:58:32-04:00 by Admin ID (ccadm01.CCUsers@CCREQPWEBD01)
    "Integration activity created by rebase on 9/18/2012 3:58:31 PM.
    "
    owner: HBC\ccadm01
    group: HBC\CCUsers
    stream: ABC_BUILD@\Informatica_PVOB
    current view: ccadm01_ABC_BUILD
    title: rebase ABC_BUILD on 9/18/2012 3:58:31 PM.
    change set versions:
    The rebase activity could be empty if no merge conflicts are involved
  • Tgefen
    Tgefen
    727 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T23:30:50Z  
    • JirongHu
    • ‏2012-09-18T20:19:06Z
    Is there an easy way to identify the directory change or file change in the result of comparing baseline to stream as shown above?

    Thanks
    Jirong
    > JirongHu wrote:
    > Is there an easy way to identify the directory change or file change in the result of comparing baseline to stream as shown above?
    >
    > Thanks
    > Jirong

    Yes there is. You can compare a stream with a baseline by using R&D Reporter for ClearCase. It has some strong features that makes it easy:
    • You can filter out directories or any filenames (by using wildcards)
    • Table-based and graphic interface!
    • You can filter out changes that come from one of the objects (baseline/stream)
    • You can group the changes by filenames or activity names
    • You can compare the stream with more than one component at a time, and then store the results in one report
    • You can continuously progress the baseline by taking the latest, the recommended one or by providing a naming convention
    • You can run it automatically, scheduled or fired by ClearCase triggers or any other triggers
    • You can automatically export the report to many common formats (CSV, XML, TXT, PDF etc)
    • You can export it to a special "rich" format that enables you run ClearCase commands from within the report (e.g. open version tree, history, annotate etc. - see a screenshot)

    The last features are available in a new Beta version only, so contact me if you want to try it.

    Regards,
    Tamir Gefen, GoMidjets
  • jeff98air
    jeff98air
    817 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-18T23:46:59Z  
    • JirongHu
    • ‏2012-09-18T21:11:04Z
    I don't know why the rebase activity is empty as shown below. The code is running inside a rebase complete preop trigger.

    $RebaseACT = "$ENV{'CLEARCASE_ACTIVITY'}";
    $RebaseChangeSet =`cleartool lsactivity -l $RebaseACT`;

    RebaseACT=rebase.ABC_BUILD.20120918.155831@\Informatica_PVOB RebaseBLS=ABC_120917_162721@\Informatica_PVOB RebaseChangeSet=activit
    y "rebase.ABC_BUILD.20120918.155831"
    2012-09-18T15:58:32-04:00 by Admin ID (ccadm01.CCUsers@CCREQPWEBD01)
    "Integration activity created by rebase on 9/18/2012 3:58:31 PM.
    "
    owner: HBC\ccadm01
    group: HBC\CCUsers
    stream: ABC_BUILD@\Informatica_PVOB
    current view: ccadm01_ABC_BUILD
    title: rebase ABC_BUILD on 9/18/2012 3:58:31 PM.
    change set versions:
    Unfortunately, the rebase activity change set does not get populated until the rebase is complete. Same for contributing activities of the rebase activity. I don't know why Rational chose to make this behavior different than deliver activities, but they did. :-(

    So, if you have no other choice but to construct the (close) equivilent of the rebase activities change set BEFORE the rebase is complete, you will need to use diffbl as Brian described.

    You know, now that I think about the task you are trying to accomplish, I don't think using the change set of a rebase activity is correct for determining what you need to update in Informatica. A rebase operation has 2 steps: 1) Changes the Foundation Baseline to the new baseline(s), and 2) Merges elements that were modified on BOTH streams. So, let's say 10 files changed on the "rebase from" stream, but only 1 file actually needed merging to the "rebase to" stream. The end result is that all 10 files will be different in the "rebase to" view, but only the 1 file is listed in the rebase activities change set. I think diffbl is the ONLY way you're going to get the complete list of differences during a rebase.

    -Jeff Ng
  • jeff98air
    jeff98air
    817 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-19T00:52:24Z  
    • jeff98air
    • ‏2012-09-18T23:46:59Z
    Unfortunately, the rebase activity change set does not get populated until the rebase is complete. Same for contributing activities of the rebase activity. I don't know why Rational chose to make this behavior different than deliver activities, but they did. :-(

    So, if you have no other choice but to construct the (close) equivilent of the rebase activities change set BEFORE the rebase is complete, you will need to use diffbl as Brian described.

    You know, now that I think about the task you are trying to accomplish, I don't think using the change set of a rebase activity is correct for determining what you need to update in Informatica. A rebase operation has 2 steps: 1) Changes the Foundation Baseline to the new baseline(s), and 2) Merges elements that were modified on BOTH streams. So, let's say 10 files changed on the "rebase from" stream, but only 1 file actually needed merging to the "rebase to" stream. The end result is that all 10 files will be different in the "rebase to" view, but only the 1 file is listed in the rebase activities change set. I think diffbl is the ONLY way you're going to get the complete list of differences during a rebase.

    -Jeff Ng
    I originally wrote:
    Unfortunately, the rebase activity change set does not get populated until the rebase is complete. Same for contributing activities of the rebase activity. I don't know why Rational chose to make this behavior different than deliver activities, but they did.
    


    Whoops, my mistake! The change set DOES get populated after rebase_start completes and shows up before rebase_complete starts. I just didn't "refresh all" before checking. I verified on Solaris and Windows.

    -Jeff Ng
  • brcowan
    brcowan
    763 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-19T13:42:55Z  
    • JirongHu
    • ‏2012-09-18T20:13:32Z
    Yes, the results are different as shown below.

    However, we should not have the situation you've described regarding "there may be changes in the source stream that are not in the particular baseline you are using". Here is what we will do:
    1. We have cascading streams, e.g. PRD, UAT, DEV created in CC, corresponding to the Informatica environment PRD, UAT, DEV.
    2. At the end of final deliver to PRD in CC, a baseline is created in PRD.
    3. Then immediately we are rebasing the rest of all streams to the above new baseline to make sure all the rest of Informatica environment is based on current PRD. There shouldn't be anything new changes in the source stream since the baseline is just created, and nobody should update the PRD stream directly.

    Am I right?
    changeSet=Comparing the following:
    ABC_120917_162721@\Informatica_PVOB
    ABC_BUILD@\Informatica_PVOB
    Differences:
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\4
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1\testQEM.txt\main\ABC_QEM\1

    Comparing the following:
    ABC_UAT@\Informatica_PVOB
    ABC_DEV@\Informatica_PVOB
    Differences:
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_UAT\4
    >> M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_DEV\5
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_PRD\1
    << M:\ccadm01_ABC_UAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_QEM\2
    I'm afraid you would need to show the describe of the stream and the configspec of the view you're using so we could be sure that it is pulling the right baseline.

    Also, where is the "ABC_QEM" stream in this picture? By some wild chance are those versions from an alternate-target deliver of some sort? I ask because in this case, I think you're looking at versions in the build stream that aren't in that baseline. and assuming that "ABC_120917_162721@\Informatica_PVOB" and these changes refer to the same component...

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-19T14:06:25Z  
    • brcowan
    • ‏2012-09-19T13:42:55Z
    I'm afraid you would need to show the describe of the stream and the configspec of the view you're using so we could be sure that it is pulling the right baseline.

    Also, where is the "ABC_QEM" stream in this picture? By some wild chance are those versions from an alternate-target deliver of some sort? I ask because in this case, I think you're looking at versions in the build stream that aren't in that baseline. and assuming that "ABC_120917_162721@\Informatica_PVOB" and these changes refer to the same component...

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    Hi Guys

    I should provide more information. This is the our stream structure (I've implemented CC for z/OS with this structure so I want to re-use it):
    ABC_BUILD was created to test other solutions only. Here I just use it to test the rebase. Sorry for all the confusion.

    ABC_PRD
    | |_ABC_UAT
    | |_ABC_DEV
    | |_ABC_BUILD
    |_ABC_QEM

    As you can see, QEM is the emergency fix stream and it directly goes into PRD. That's the only place difference can be introduced into PRD from an alternative route and therefore rebase of UAT and DEV to PRD is required.

    So now can I say "cleartool diffbl -versions $ENV{"CLEARCASE_BASELINES") $ENV{"CLEARCASE_STREAM"}" is the right way to get the difference introduced by rebase? CLEARCASE_BASELINES is the baseline created on PRD. We only create a new baseline on PRD when there is a deliver to PRD.

    The sample result shown below is a rebase from ABC_BUILD to ABC_DEV, ABC_120917_162721@\Informatica_PVOB is the latest baseline on PRD, created by a deliver from QEM to PRD, as shown in the change set.

    changeSet=Comparing the following:
    ABC_120917_162721@\Informatica_PVOB
    ABC_BUILD@\Informatica_PVOB
    Differences:
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\4
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1\testQEM.txt\main\ABC_QEM\1

    Now the only thing I need is to construct this file: M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy\testQEM.txt.

    Am I right?

    Thanks
    Jirong
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-19T18:58:50Z  
    • JirongHu
    • ‏2012-09-19T14:06:25Z
    Hi Guys

    I should provide more information. This is the our stream structure (I've implemented CC for z/OS with this structure so I want to re-use it):
    ABC_BUILD was created to test other solutions only. Here I just use it to test the rebase. Sorry for all the confusion.

    ABC_PRD
    | |_ABC_UAT
    | |_ABC_DEV
    | |_ABC_BUILD
    |_ABC_QEM

    As you can see, QEM is the emergency fix stream and it directly goes into PRD. That's the only place difference can be introduced into PRD from an alternative route and therefore rebase of UAT and DEV to PRD is required.

    So now can I say "cleartool diffbl -versions $ENV{"CLEARCASE_BASELINES") $ENV{"CLEARCASE_STREAM"}" is the right way to get the difference introduced by rebase? CLEARCASE_BASELINES is the baseline created on PRD. We only create a new baseline on PRD when there is a deliver to PRD.

    The sample result shown below is a rebase from ABC_BUILD to ABC_DEV, ABC_120917_162721@\Informatica_PVOB is the latest baseline on PRD, created by a deliver from QEM to PRD, as shown in the change set.

    changeSet=Comparing the following:
    ABC_120917_162721@\Informatica_PVOB
    ABC_BUILD@\Informatica_PVOB
    Differences:
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\4
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1
    >> M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\ABC_QEM\1\testQEM.txt\main\ABC_QEM\1

    Now the only thing I need is to construct this file: M:\ccadm01_ABC_BUILD\Informatica_AVOB\ABC_infa\dummy\testQEM.txt.

    Am I right?

    Thanks
    Jirong
    The display changed my diagram, should be this:

    ABC_PRD
    | |_ABC_UAT
    | |___ABC_DEV
    | |______ABC_BUILD
    |_ABC_QEM
  • cm2006
    cm2006
    264 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-20T22:38:08Z  
    • brcowan
    • ‏2012-09-18T19:46:36Z
    Actually, the diffbl will take a stream and a baseline. You can't compare the source and destination streams because there may be changes in the source stream that are not in the particular baseline you are using.

    You should be able to compare the stream to the baseline. But some experimentation will be needed to tweak the results...

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    > brcowan wrote:
    > Actually, the diffbl will take a stream and a baseline. You can't compare the source and destination streams because there may be changes in the source stream that are not in the particular baseline you are using.
    >

    Brian, can you explain how diffbl really works?
    I tried to compare two child streams and it gives me activities from another streams (the common integration stream as well as another child streams) and I can't understand why (may be they are contributed activities that are related to delivery and rebase activities?)

    Furthermore, I used diffbl with a view context, in order to see the change-sets. If I use a view that belongs to one of the streams, I see the files which comes from the other stream, in an inconvenient-very-long path. Is there a way to avoid that if I use diffbl?

    Thank you
  • JirongHu
    JirongHu
    687 Posts

    Re: How to identify the stream rebase to in a rebase trigger?

    ‏2012-09-21T19:30:43Z  
    • cm2006
    • ‏2012-09-20T22:38:08Z
    > brcowan wrote:
    > Actually, the diffbl will take a stream and a baseline. You can't compare the source and destination streams because there may be changes in the source stream that are not in the particular baseline you are using.
    >

    Brian, can you explain how diffbl really works?
    I tried to compare two child streams and it gives me activities from another streams (the common integration stream as well as another child streams) and I can't understand why (may be they are contributed activities that are related to delivery and rebase activities?)

    Furthermore, I used diffbl with a view context, in order to see the change-sets. If I use a view that belongs to one of the streams, I see the files which comes from the other stream, in an inconvenient-very-long path. Is there a way to avoid that if I use diffbl?

    Thank you
    Comparing the following:
    ABC_120921_095256@\Informatica_PVOB
    ABC_QEM@\Informatica_PVOB
    Differences:
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\testQEM.txt@@\main\ABC_PRD\1
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PRD\5
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\test.txt@@\main\ABC_PRD\4
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PAT\4
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\test.txt@@\main\ABC_PAT\6
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_PAT\5
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_DEV\5
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\test.txt@@\main\ABC_DEV\23
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy@@\main\ABC_DEV\6
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\TestDeliver.txt@@\main\ABC_DEV\2
    << M:\c999752_ABC_PAT\Informatica_AVOB\ABC_infa\dummy\TestDeliver.txt@@\main\ABC_DEV\1

    $changeSet = `cleartool diffbl -versions baseline:$bl stream:$TGT_STREAM_L`;
    $bl is the rebase baseline = "$ENV{'CLEARCASE_BASELINES'}";