[p4] Branch rename question

Robert Cowham robert at vaccaperna.co.uk
Wed Jan 31 03:24:40 PST 2007


Note the discussion in "Practical Perforce" of how you can "reparent" a
branch p279.

All that section (and indeed the whole book) well worth a read!

Robert

> -----Original Message-----
> From: perforce-user-bounces at perforce.com 
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of Qazwart
> Sent: 31 January 2007 03:37
> To: Smith, Jeff
> Cc: perforce-user at perforce.com
> Subject: Re: [p4] Branch rename question
> 
> Quick question: Was Branch #2 suppose to be named what it is, 
> or was this an accident that you're attempting to fix? If it 
> was an accident, and you never ever want to refer to the old 
> branch #2, I would say checkpoint surgery may be the best. Of 
> course, I would only do that with Perforce holding my hand.
> 
> The best way would be Solution #2 which is the standard way 
> it should be done. The old branch #2 will show up in older 
> releases, but this is probably what you want. Solution #3 
> isn't good because you are destroying integration history. 
> Solution #1 is questionable because you're claiming you're 
> merging when you're really replacing.
> 
> Of course, the best solution would be for Perforce to track 
> renames and directories.
> 
> On Jan 30, 2007, at 1:58 PM, Smith, Jeff wrote:
> 
> > We have a situation that requires us to rename a branch and 
> then use 
> > the old name for a new branch.  No comments on ways to 
> avoid this are 
> > necessary :-)  We are aware of what has led to this and are taking 
> > steps to avoid it in the future.
> >
> > What I would like is any experiences solving this problem.  
> The best 
> > solution is one which makes looking through history and performing 
> > future integrations as clean as possible.
> >
> > Problem: Given 2 branches (BR1 and BR2), we need BR2 renamed to BR3 
> > and
> > BR1 branched to create a new BR2.  Note that the existing BR2 was 
> > created from BR1 at some point in the past.
> >
> > Solution 1:
> > integrate BR2->B3
> > integrate BR1->BR2 (accepting source)
> >
> > Solution 2:
> > integrate BR2->B3
> > delete BR2
> > integrate BR1->BR2
> >
> > Solution 3:
> > integrate BR2->B3
> > obliterate BR2
> > integrate BR1->BR2
> >
> > Solution 4:
> > use checkpoint surgery to rename BR2->BR3 integrate BR1->BR2
> >
> > It looks like solution 4 is the cleanest but also the most risky.   
> > I am
> > interested in comments from anyone who has been through a similar 
> > exercise and their experiences with any solutions they've used.


More information about the perforce-user mailing list