Branching streams (introduction)

If you are branching from a stream that has no history, use the p4 add command to add files to it, then use p4 copy to create the branched streams. For example, to create the mainline structure shown in the previous section, perform the following steps:

  1. Create a local folder your workspace for the mainline files; for example:

    $ mkdir c:\p4clients\myworkspace\depot\main\
  2. Copy the files for Project1 and Project2 to the newly created folder.
  3. Add the files to the depot:

    $ p4 add //Acme/main/project1/...
    $ p4 add //Acme/main/project2/...
    $ p4 submit
  4. Create release streams:

    $ p4 copy //Acme/main/project1/... //Acme/release1.0/project1/...
    $ p4 copy //Acme/main/project2/... //Acme/release1.0/project2/...
    $ p4 submit

Now you can use the p4 copy and p4 merge commands to propagate changes between main and release streams.

If there is a historical relationship between the source and target that you need to preserve, "seed" a stream from another stream using the p4 integrate command, .

Also in this section: