0

I have a mainline stream //depot/stream_mainline_1/...

I need to create another mainline stream //depot/stream_mainline_2/... where I need to import(read only) some of the folders and share the some other folders in newly created mainline stream.

Let’s say //depot/stream_mainline_1/... contains two folders;

  1. test_folder1 -> Need to import this folder
  2. test_folder2 -> Need to share this folder

I know we can import the data like below while creating the new mainline stream(//depot/stream_mainline_2/..)

view:

import test_folder1/... //depot/stream_mainline_1/test_folder1/...

Can someone please help me to know the steps to share the test_folder2?

Thanks in advance.

Bhargav
  • 23
  • 3

1 Answers1

0

By definition there should only be one mainline stream in a stream hierarchy; each mainline is essentially the root of the tree, and everything else in the tree ultimately either branches or imports content from the mainline. If you have multiple mainlines, you have multiple stream hierarchies that are not related to one another, but that's not what you're trying to do here.

Whether you make your new stream a development or release stream depends on whether it's more or less "firm" than the mainline, i.e. whether its checkin policy is more or less strict.

Either way, you want to make the new stream a child of the mainline, and then you can simply list the path you want to import and the path you want to share, like this:

Parent: //depot/stream_mainline_1

Paths:
    import test_folder1/...
    share test_folder2/...
Samwise
  • 68,105
  • 3
  • 30
  • 44
  • Thanks for the response. I totally agree with your explanation. we are planning to divide our monolithic code in to component builds . So we are thinking to create mainline streams. For mainline stream there is no way we can specify the share path as there is no parent for the stream – Bhargav Oct 31 '22 at 21:06
  • You might look at [component streams](https://www.perforce.com/manuals/p4guide/Content/P4Guide/stream-components.html), but those don't support `share` -type composition yet (i.e. writable components) so they might not be suitable for what you're trying to do. Based on your example, I still think using a development stream is better than a mainline stream; it only gets more complicated if you need to `share` from *multiple* other mainline streams. – Samwise Oct 31 '22 at 22:45