How to integrate each list of changes at merge / permission in Perforce?

I'm new to Perforce, but I already have experience with DVCS like Git and Mercurial, and I am familiar with the basic principles of Perforce.

I played a little with p4v today and made a branch of some playback code using the Integrate... function. Later, I changed the source branch and wanted to integrate these changes into a new branch. However, all individual change lists have been merged into one large change list. This does not seem to me the best practice. If you develop a function or bug fix, you will naturally have several submissions, because each submit must be atomic.

How can I save the entire list of changes when merging or resolving?

+4
source share
2 answers

"Best practice" depends on your workflow and setting up your branches. There is really a good time for one change list to contain all integrated change lists - we do this quite a bit in our studio when creating "functional" branches, and the branch needs the latest and updated trunk code. On the other hand, integration in the change list can be very useful at the end of the product cycle, when you need to fork certain fixes or functions into release branches.

Integrating with the change list is simple:

  • Locate the list of changes you want to send in the "submitted change lists" panel (ctrl-2)
  • Right-click the change list and select "integrate using the submitted NNN change list"
  • Set any parameters you need in the next dialog box.

From there, you can preview and / or run the integration. As a hint, I always look at the integration first. This will indicate potential errors or warning conditions that you might encounter before performing the actual integration.

This method of integrating the change list is currently called "cherry picker." Perforce has an excellent cherry change list knowledge article here .

+8
source

Depending on how you develop, this is good or bad. Sometimes you want cherry blossoms to be selected, at another time you want everything.

If you want 1 change list to be merged, on the integration screen, expand the arrow that says "Limit the integration range." Then you can choose which files will be integrated. If you want only 1 change list, select "Integrate only changes between" and select only your change list for both. As you can see, you can also do this with the revision, date, label, and workspace. It is very flexible.

+1
source

All Articles