Posts: 282
Registered: Sep 04, 2008 05:41:32 PM What's evil about rebase with checkouts?
Posted: Dec 16, 2010 01:58:45 PM Hi
My client wants me to automatically rebase all the rest of streams after a final deliver to the production. I can only do this with "Allow rebase to proceed with checkouts in the view" in the project. I've never done this before, so can anyone tell me what's the consequence?
Thanks
Jirong
http://www.ibm.com/developerworks/rational/library/3792.html
Can I rebase with files checked out?
Checkouts are not allowed during rebase (so we could easily support the cancel operation for rebase). If checkouts were allowed, UCM would need to store a copy of all checked out files (as merging may be required if some files are affected by the rebase). This functionality could be provided in a future release, but for this release of UCM you cannot have any checkouts in your development stream during rebase.
Posts: 571
Registered: Nov 19, 2007 06:06:36 AM Re: What's evil about rebase with checkouts?
Posted: Dec 16, 2010 03:34:52 PM in response to: Jirong_Hu's post Prior to CC v7 (or 7.1), you couldn't rebase if any checked-out file was found on the target stream (even if this file wasn't part of the change-set).
Starting from V7, when you enable "Allow rebase to proceed with checkouts in the view", you can rebase anytime unless the checked-out file is part of the change-set that the target stream is going to be (re)based on.
Tamir Gefen, GoMidjets
Posts: 699
Registered: Jun 25, 2007 04:53:38 PM Re: What's evil about rebase with checkouts?
Posted: Dec 16, 2010 04:09:58 PM in response to: Jirong_Hu's post CC 7.0.1 added the ability to rebase a stream with checkouts, but the rebase will fail if a merge is needed with a checked out element (whether or not there is a merge conflict). This is because the checked out version is already linked to an existing activity and can't also be linked to the rebase activity. A version can only be associated to exactly 1 activity at a time.
I think your client's request for you to rebase all child streams is NOT VALID. Aside from potential view permission issues, what does your client expect you to do with merge conflicts that are likely to occur?
-Jeff Ng
Posts: 444
Registered: Mar 15, 2005 04:40:07 AM Re: What's evil about rebase with checkouts?
Posted: Dec 16, 2010 04:11:56 PM in response to: Tgefen's post And the text Jirong quoted applies: don't hope for a rollback since ClearCase cannot identify the state of the checkedout files before the rebase (which should then be restored).
Unless of course the functionality of taking a snapshot was implemented.
I would object that this is a bad idea, as it would mean introducing a new identification mechanism.
A flag to force checkin_or_uncheckout would sound better: we have rules and we break them (in other words, do whatever you want but you are warned).
Marc
Posts: 282
Registered: Sep 04, 2008 05:41:32 PM Re: What's evil about rebase with checkouts?
Posted: Dec 16, 2010 04:23:05 PM in response to: jeff98air's post Hi Jeff
That was my original understanding, and I just saw that happened in my test as shown below. For now, I added this rebase step in a post deliver trigger but let the deliver complete even if the rebase fails.
What I used before is let someone in the team rebase the child streams next morning after the deliver to the production is done last night. So they got a chance to review everything before continue. What do you think?
Thanks
Jirong
Rebase the rest of streams ...
cmd=rebase -complete -stream AOL_PAT@\Mainframe_PVOB -baseline AOL_101216_161341@\Mainframe_PVOB
cmd=rebase -complete -stream AOL_TST@\Mainframe_PVOB -baseline AOL_101216_161341@\Mainframe_PVOB
cmd=rebase -complete -stream AOL_DEV@\Mainframe_PVOB -baseline AOL_101216_161341@\Mainframe_PVOB
cleartool: Warning: Activity being unset "activity:USR0200000673@\Mainframe_PVOB" has checkouts.
cleartool: Error: Element "M:\c999752_AOL_QEM\Mainframe_CVOB2\AOL_src\LE\NOPROC@@" has a checkout co
nflict.
It is checked out in the target view but it is in the change set of an
activity that is not the integration activity. You must checkin or
uncheckout the version in the target view in order for the element to be
checked out in the change set of the integration activity.
cleartool: Error: An error occurred while checking out or merging the directories in the target view
.
cleartool: Error: Unable to perform merge.
cleartool: Error: Unable to perform integration.
cleartool: Error: Unable to rebase stream "AOL_DEV".
+Can't execute command rebase -complete -stream AOL_DEV@\Mainframe_PVOB -baseline AOL_101216_161341@+
Mainframe_PVOB
cleartool: Warning: Trigger script for "tr_deliver_complete_postop" returned failed exit status
Deliver has completed
FROM: stream "AOL_QEM"
TO: stream "AOL_PRD"
Using target view: "c999752_AOL_PRD".
Posts: 699
Registered: Jun 25, 2007 04:53:38 PM Re: What's evil about rebase with checkouts?
Posted: Dec 16, 2010 05:00:12 PM in response to: Jirong_Hu's post Here's what I do: When new baselines are recommended (after successful build and automated unit tests), a notification email is sent to the team regarding the new baseline. Team members can then rebase to the new baseline when they are ready to, rather than it being done automatically.
-Jeff Ng
Posts: 47
Registered: Aug 16, 2010 10:26:56 AM Re: What's evil about rebase with checkouts?
Posted: Dec 17, 2010 11:22:39 AM in response to: jeff98air's post Or, just enable the policy that they cannot deliver until they have rebased the new recommended baseline...that works too.
-Chris Moir
Inventa Technologies (at Aetna Insurance)
Posts: 699
Registered: Jun 25, 2007 04:53:38 PM Re: What's evil about rebase with checkouts?
Posted: Dec 17, 2010 12:12:20 PM in response to: ChrisMoir's post Chris Moir wrote:Or, just enable the policy that they cannot deliver until they have rebased the new recommended baseline...that works too.
Well, sort of... Enabling POLICY_DELIVER_REQUIRE_REBASE just prevents a user from delivering unless they have rebased to the recommended baseline. It does not notify users that a new baseline has been recommended.
-Jeff Ng
Use the search field to find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that you're viewing.
Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess
Way cool! Some very valid points! I appreciate you writing this article and also the rest of the website is extremely good.
ReplyDeleteBusiness analysis online online training
Cognos online online training
Core Java online online training
Django online online training