Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

perforce

p4v

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.

like image 545
lionel319 Avatar asked Aug 13 '12 05:08

lionel319


People also ask

What does p4 copy do?

Description. Using the client workspace as a staging area, the p4 copy command propagates an exact copy of the source files to the specified target by branching, replacing, or deleting files. No manual resolve is required. Changes in the target that were not previously merged into the source are overwritten.

What is perforce integrate?

In its simplest form, p4 integrate -b branchname -s fromFile allows you to integrate files using the source/target mappings included in the branch view of branchname , but include only those source files that match the patterns specified by fromFile .

What is a p4 branch?

p4 branch enables you to create a mapping between two sets of files for use with p4 integrate . A branch view defines the relationship between the files you're integrating from (the fromFiles ) and the files you're integrating to (the toFiles ). Both sides of the view are specified in depot syntax.


2 Answers

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.)

like image 80
user1054341 Avatar answered Oct 18 '22 18:10

user1054341


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.

like image 26
pepsi Avatar answered Oct 18 '22 16:10

pepsi