X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C743DD.1AA2063F@onstor-exch02.onstor.net>; Mon, 29 Jan 2007 11:38:51 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: Updating feature branches from their parents - Was: RE: private branch
Date: Mon, 29 Jan 2007 11:38:51 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E023928DF@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E0156D885@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Updating feature branches from their parents - Was: RE: private branch
Thread-Index: AcdBmRsBhRCk9ob3S82s9jk3lG4o9QCMu64FAAHPXIAAAeAh4A==
From: "Ken Renshaw" <ken.renshaw@onstor.com>
To: "Mike Lee" <mike.lee@onstor.com>
Cc: "Narain Ramadass" <narain.ramadass@onstor.com>,
	"dl-Software" <dl-software@onstor.com>

Here you go Mike. I'm adding dl-software as well since there are lots of
feature branches floating about these days and the information is widely
applicable. There are of course nuances to all of this, and usually more
than one way to do a particular task, but below I have outlined the
standard workflow for updating a feature branch from it's parent branch
using FB-NDMP-DELOREAN as an example.

All you have to do is:

p4 integrate -d -b FB-NDMP-DELOREAN ( updates your feature branch with
current top-of-tree code from FB-DELOREAN branch, the 2.3.0.0 project
working branch. Change as needed for other branches, you can find out
your branches' parent with p4 branch -o BRANCHNAME )

p4 resolve -as ( sorts through trivial cases where the file has only
changed in one branch )

p4 resolve -n ( this just lists out the files you need to merge/edit but
doesn't do anything; it just shows you how much work you'll have to do )

p4 resolve ( to actually step through the files and merge/edit them ).=20

Type 'p4 resolve' and it will then step through the remaining cases. For
each case you have the options:

d - diff files ( UNIX format diff )

e - edit the merged file, look for '=3D=3D=3D' in the body of the text =
for the
conflicts

am - accept non-conflicting merge of two files ( where both files have
changed but the text is non-overlapping )

ay - accept your version

at - accept their version

s - will skip over it so you can come back to it later

Once you're done, you should do a test compile of the whole tree to
verify it's not broken, and then you can run:

p4 submit

to actually commit your changes to the branch. Nothing is permanent
until you submit, so you could revert changes/merges if need be
beforehand. You can set $P4DIFF or $P4EDITOR if you wish and the
operations listed above will honor them.=20

You can also use the GUI version of Perforce called P4V which works
quite well for this stuff, and has 3 way visual diffing tools, etc. to
make large merges easier.

Assuming you have downloaded and installed it from www.perforce.com
under Downloads, just:

-In the depot view of the left-side window pane, navigate to your
feature branch name in the left-hand treeview pane and expand it.

-right-click on nfx-tree and select Integrate

-in the popup, set the source to //depot/FB-DELOREAN/nfx-tree/... and
the destination to //depot/YOURBRANCHNAME/nfx-tree/... ( change the
above branch names if needed in your case )

-select the checkboxes for "Enable deletions around deleted revisions"
and "Enable baseless merges"

-click on the Integrate button. This will create a Pending changelist
with all the files in it that need merging.

-In the right-hand window pane under the Pending tab, right-click on
'default' and select "Resolve files"

The Resolve window will lauch, and from here you can select Auto merge
for various cases, but it's usually only safe to accept the one that
says ( only one file differs from base ).

The top of the window will keep track of the files you have left to
merge, and you can select a file and click the Interactive button to
launch the 3-way visual diffing tool P4Merge. It's pretty intuitive, but
if you've gotten this far and need a little walkthrough on performing
the 2 or 3-way merge then either feel free to get a hold of me or read
through the Help topics. When you're finished with the merges, you can
go to the command line and do a test compile to make sure things work (
be sure to test at least one debug build and one opt build, a lot of
times I'll do a bc-dbg build and a ch-opt build to test the variations
).

When you're confident it's working correctly, right click on "default'
changelist under the Pending tab, select submit, enter your changelist
description and code review info and you're all set.=20

I know the GUI info I just wrote up sounds a little cumbersome, but it's
not, so don't hesitate to grab me for a walkthrough if and when you need
it.

Any questions or problems, please let me know.

-Ken

-----Original Message-----
From: Mike Lee=20
Sent: Monday, January 29, 2007 10:30 AM
To: Ken Renshaw
Cc: Narain Ramadass
Subject: RE: private branch

Ken:
Pardon my poor memory, but can you please send me the procedure for
updating a P4 branch?  I'd be glad to do it.
Thanks.
-Mike

-----Original Message-----
From: Ken Renshaw=20
Sent: Monday, January 29, 2007 9:37 AM
To: Mike Lee
Cc: Narain Ramadass
Subject: RE: private branch

You shoudl probably do fairly frequent updates to your branch to keep it
up to date and to make the merge at the end back to the project branch
easy. You can choose whenever you would like to do this, but every week
or every other week ( or when you need changes like Jobi's ) would be
good.

If you want you can ask me to do it, or just do it yourself. Let me know
which way you want to go Mike.

Thanks,

-Ken=20


-----Original Message-----
From: Mike Lee
Sent: Fri 1/26/2007 2:27 PM
To: Ken Renshaw
Cc: Narain Ramadass
Subject: private branch
=20
Hi Ken:

As you recall, you created a delorean branch for me and Narain for NDMP
related work.
However, due to some changes Jobi checked in, we'll need to update the
main delorean dump/restore code.
I'm a bit concerned about how to merge these two set of work.
Do you have any suggestion/rules that we should be aware of?

Thanks!
-Mike

