Branch Tips

 

How do I move files / directories?

  1. Choose the files or directories you want to move, select them, and right click
  2. Choose Integrate / Using Filespec from the pop-up menu
  3. You'll get a dialog box with a Source filespec and a target filespec with something like:

    //depotname/path/to/files/...

    Change the file structure below, in the target filespec, to be where you want things to go, i.e.

    //depotname/new/path/...

    In all cases, the ... denotes all directories and files below this.

  4. If you want to move the files, and not just copy them to a new location, then click the "options" button and check "delete source file(s), for rename operation" check box. This will open the source file for delete, in addition to opening the files in the new location for add.

 

How do I create a personal development branch?

  1. Create the branch using either the p4 branch command or under the branch spec tab in P4Win
  2. Change your client spec or switch to another client spec that maps both the source and target directories of the branch specification.
  3. Sync the latest revisions for the source files
  4. Either right click on the branch spec in P4Win and select "Integrate using branch spec", or using the command line, issue the p4 integrate -b branch_name

 

How do I integrate my changes from my branch to the main development branch?

  1. Make sure your client spec maps both the source and target files mapped by the branch specification.
  2. Make sure you sync the latest changes in both the source and target directories. If you do not, the file revisions on your client will be used as the sources for the integration, rather than the latest sources in Perforce.
  3. Integrate using the branch spec, using reverse integration to make your development branch the source and the main development branch the target. If you've added files to your development branch, you will need to also enable baseless merges.

    • Using the P4Win client, right click on the branch specification and choose "Integrate using branch spec". On the window that pops up, choose "reverse integration". To enable baseless merges, click on the options button and select this option.
    • Using the command line, use the command p4 integrate -r -b branch_name. If you need to enable baseless merges, this can be done by adding the -i option: p4 integrate -r -i -b branch_name

 

Home