Question

I have some software that is version controlled with Perforce. There are a lot of checkins, and hence a lot of changelists.

There is one feature, implemented with many checkins across a long period of time, that I would like to port elsewhere. I can search the history by hand, but it would be really nice if there were a simple way to diff the current state of the baseline against the combined effect of selected changelists.

In other words, diff the latest-greatest in that branch against the result of: changelist A+ changelist B + changelist C...

How do I do this in Perforce?

Was it helpful?

Solution

The way I would do this is to build up the set of changes I wanted in my workspace using a combination of p4 edit, sync, and resolve. The basic process would be:

  1. Sync to change A (assuming it starts the sequence)
  2. Open everything for edit
  3. Sync to change B-1 (this will schedule a resolve )
  4. Run p4 resolve and ignore the changes (-ay)
  5. Sync change B ( this will schedule a resolve )
  6. Resolve change B handling any conflicts
  7. Sync to change C-1
  8. Resolve and ignore the changes
  9. Sync change C
  10. Resolve and merge in the changes
  11. Diff against head
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top