views:

41

answers:

2

I've got a (sparse) development branch in Perforce which I keep up to date regularly with the main code line. I'd like a simple way to list all the non-integration changes which have been made to the branch, ideally checked out into a new changelist (to allow me to do final code-tidyups before merging back to the main code line).

The only way I've been able do this is to simply integrate the branch back to the main code line - the integrations fall out in the wash. I'm not happy with this though as any changes I make will be made into the main code line and I'd actually prefer to make these in the branch. I could obviously create a third branch, but that just seems wrong.

Anyone got any better ideas?

+3  A: 

What's wrong with simply doing a diff of your branch against the main code line?

raven
Good call - p4 diff branch_directory/... main_dir/... gives me the relevant diffs which is pretty close to what I want. I can then validate \ edit the diffs and create the changelist manually.Thanks.
cristobalito
+2  A: 

If you want to find out changes in your branch that are not the results of integration and have not been integrated back into the main line, you can do

p4 interchanges branch_directory/... main_dir/....

Is this what you are looking for?

Type

p4 help interchanges

for more info on this.

This is an undocumented feature of Perforce. See 'p4 help undoc' for more.

Chance
Not quite what I wanted, but does get me close. It still lists the integrate changelists between main and the branch, but it'd be easy to filter them out with the format it returns. Thanks for the pointer to the function though - hadn't come across it before.I've given the answer to Raven, as his solution gets me closer to what I require.
cristobalito