What is the difference between P4V's Branch, Copy, Integrate/Merge

26,208

Solution 1

When you integrate or merge, you blend files together. That is, you end up having to resolve files that have overlapping changes. 'p4 merge' and 'p4 integrate' do this.

When you copy, you replace files -- no overlapping changes are resolved. 'p4 copy' does this.

When you branch, you copy files to a location where no files existed before. 'p4 populate' does this.

What P4V does depends on the version of P4V you have. You can look in the log pane to see the p4 commands it's running. (Use 'Preview' to get it to run those commands with -n.)

Solution 2

From the Perforce manual:

branch

(noun) A set of related files created by copying files, as opposed to adding files. A group of related files is often referred to as a codeline.

(verb) To create a branch.

integrate

To create new files from existing files, preserving their ancestry (branching), or to propagate changes from one set of files to another (merging).

merge

The process of combining the contents of two conflicting file revisions into a single file, typically using a merge tool like P4Merge.

resolve

The process you use to reconcile the differences between two revisions of a file. You can choose to resolve conflicts by selecting a file to be submitted or by merging the contents of conflicting files.

Solution 3

From Calmarius Jun 27 '13 at 9:03:

Does "p4 copy" do the copy on server side?

If you are asking if Perforce stores an extra copy of each file on the server, then the answer is no. The copy is still just a reference to the single instance of the file in the Perforce depot storage area.

Share:
26,208
lionel319
Author by

lionel319

Updated on August 04, 2022

Comments

  • lionel319
    lionel319 almost 2 years

    I am using P4v, and when i bring up the context-menu on a folder, i have these options:- - Integrate/Merge - Copy - Branch

    Seems to me like they are all doing the same thing. Is there any real difference in these commands?

    thanks.