Integrate revisited - Part 1
When I first started working at Perforce, I took an instructor-led class, 4 hours of which were focused on the integrate command and integrate dialog. There was a lot to cover. While the command itself is very powerful, it can be a bit daunting to new users to comprehend the intention behind its purpose. In the 2011.1 release, we re-factored the dialog and the 3 main user-specified tasks each became distinct dialogs. As with any change, we realize that there are trade-offs: while new users may find the application easier to use, existing users may find it a challenge to adapt. I'm writing this blog to help our existing customer base understand the motivation behind the change and highlight when to use each.
The refactored options specify what user task will be performed.
Merge/Integrate - Users should choose this option when they are merging into an existing file/branch/stream - the target content already exists in the server and needs to be combined with the source content in order to keep it up to date. We found that in a lot of other SCM systems, the term Merge suffices for this task, but we left the breadcrumb "Integrate" to help existing Perforce users who are accustomed to our terminology.
Branch - Users should choose this option when they need to create a new version of a file/branch that doesn't exist in the server. The Branch dialog will verify that the target does not exist and when it does, it will direct you to use Merge instead. When branching with streams, P4V guides you to branch files during the stream creation.
Copy - Users should choose this option when they want to promote their code to a target and ensure that the target matches the source. Copy can also be used to re-base your target to a particular changelist/time. Copy is a dialog available when connected to a Perforce 2011.1+ server and uses the new p4 copy command. This new command is a wrapper for integrate and ensures that the target is identical to the source by branching, replacing and/or deleting files as necessary.
With all of these dialogs, the user workflow has been enhanced to allow tasks to be performed in 1 step, as I wrote about in the One-Click Merging post.
Old vs New Functionality in the Integrate Dialog
Branching a stream When using streams, there is a different option on the streams context menu: Create New Stream From ... (not to be confused with Branch above) if users accept the defaults with this operation, then P4V will guide them in the creation of the new stream as well as branching all of the necessary files from the parent stream to the newly created child stream.
Create New Stream will Create a New Stream and Branch the Files to the Stream.
In my next post, I'll highlight some other cool new features in these dialogs. Thanks for reading and please let us know what you think by either commenting here or visiting the Streams Beta Forum.