Monday, August 12, 2013

Perforce Merging Advanced Options

When you are a Perforce power user, you carry out a lot of complex merges between different branches. Many times you will need to make use of the advanced options, and I find myself having to consult the documentation every time. So I am pasting the definitions down here:


Limit revision rangePerforce keeps track of which revisions of a source file have already been integrated to a target file. Normally integrate opens the target if any source revisions have not yet been integrated. You can restrict which source files revisions will be considered by entering a revision range here.

  • You can use symbolic revision numbers (for example, "@12345") or absolute revision numbers(for example, "#45").
  • If you enter a "starting with" revision, no source revisions prior to it will be considered. If you don't supply the "@" or "#" prefix, "@" will be assumed.
  • If you enter an "ending with" revision, no higher source revisions higher are considered. If you omit the "@" or "#" prefix, it is assumed to be the same type of revision number as the starting revision you supplied, or "@" if you didn't specify a starting revision.
Put open files in changelistIf your client workspace has more than one pending changelist, you can select one in which to open the files selected for integration..
Enable baseless mergesNormally Perforce only opens a target file for integrate if it can find a common base between it and the source file to use as a base for doing a merge. A target file and source file not directly related to each other by branching have no common base. By default, the target are not opened in this case. You can use the "enable baseless merges" option to force target files to be opened even if they are not related to source files by branching. If you do this, Perforce arbitrarily chooses the #1 revision of the source files to use as a merge base.

Permit deletes/re-adds
If the ending revision of the source file is a deleted file, Perforce normally opens the target file for delete unless the target file has any revisions that have not themselves been integrated to the source file. If the source file exists and the target file does not, Perforce normally opens the target file for branch/add unless the target file is a deleted file. Checking the "permit deletes/re-adds" option makes the integrate command open the target file for delete or branch/add even if these conditions exist.


Re-branch source on top of deleted targets
If the source file exists and the target file does not, Perforce normally opens the target file for branch/add unless the target file is a deleted file. Checking this option opens the target file for branch/add even if it is deleted.


Delete modified targets if source is deleted
If the ending revision of the source file is a deleted file, Perforce normally opens the target file for delete unless the target file has any revisions that have not themselves been integrated to the source file. Checking this option opens the target file for delete even if it has been edited.


Force re-integration if previously integrated
Normally Perforce doesn't open a target file for integrate if all of the source file revisions under consideration have already been integrated to it. Checking the "force re-integration" option makes theintegrate command open the target file for integrate regardless of previous integration history. When you submit the file, integration history between the two files will be effectively rewritten to reflect the most recent of the duplicate integrations.


Don't copy newly branched files to workspace
Normally target files opened for branch/add are created in your workspace. However, because the content of the new target files is the same as that of the source files, your workspace files are not required to create the new files in the depot. If you don't need copies of the newly branched files in your workspace—for example, you are branching a large codeline but you don't plan to do work in the new codeline yourself—use this option.


Change target filetype to match source
Normally, Perforce doesn't change the filetype of target files when you integrate to them. Each newly branched file is given a filetype that matches that of the file it was branched from. Subsequent changes to the source filetype will not affect the target file during integration unless you use this option. When you use this option, the filetype of each target file will be changed to match that of the corresponding source file at the revision you are integrating from. The filetype change takes effect when you submit the target files to the depot. (Note that you can also explicitly change the filetype of opened files before submitting them.)


Don't sync target files to head revision
Normally, Perforce automatically syncs to the head revision before integrating. If you select this option, Perforce uses the revision that you have in your workspace, instead of the head revision. Note that this is only true if your server is 2002.1 or newer.

http://www.perforce.com/perforce/r11.1/manuals/p4web/help/integrate.html

No comments: