Jump to content


Child Import Overrides

Stream Import Inheritance

  • Please log in to reply
4 replies to this topic

#1 SBinter

SBinter

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 04 October 2019 - 04:47 PM

Currently we are trying to configure the ability to release successive versions of a package locked to specific changelists based on the needs of a specific subproject. This is to enable us to create different projects that might take more modular component sets using perforce imports. We have a //depot/Core stream that contains all of our potential shared packages, and distribute it to our project(s) in the following fashion:

Project_1_Mainline:

share ...

import CorePackages/Package1/... //depot/Core/Package1/...@CL_Label1.0.0


Project_1_Dev (child stream to mainline):

share ...


Our dev stream inherits the package import as expected in its changeview. Later we needed to import a new and improved version of Package1 that contained a breaking change, so we wanted to put it in the dev branch only. Other forum threads and references allude to the fact that changeview imports step on previous versions and are read top to bottom, so modifying our imports to:

Project_1_Mainline:

share ...

import CorePackages/Package1/... //depot/Core/Package1/...@CL_Label1.0.0


Project_1_Dev:

share ...

import CorePackages/Package1/... //depot/Core/Package1/...@CL_Label2.0.0


This should, and does, yield a dev changeview of


//depot/Core/CorePackages/Package1/...@CL_Label1.0.0

//depot/Core/CorePackages/Package1/...@CL_Label2.0.0


Unfortunately, the result of this is that while it will correctly acquire all files as of Label 2.0.0, it will do so without any of the perforce history (maintaining that history of Label 1.0.0). Any attempts to clean, modify, or do much with additional files that were added in the 2.0 specification will result in a 'file not in revision table' error due to the narrower view of the 1.0.0 label.

My question is: Is this intended behavior? And if so - is there any way to acquire the functionality described above, so as to acquire more recent changes in dev child streams?

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 07 October 2019 - 02:14 PM

Check out an earlier thread on this topic: https://forums.perfo...rt-inheritance/

I think the solution that the other poster came up with of making everything a mainline is pretty good -- the current stream inheritance rules aren't set up well to handle this use case, unfortunately.

#3 SBinter

SBinter

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 October 2019 - 03:38 PM

I'm not sure that we're in a position to alter everything to be a mainline branch. Part of the company workflow involves a fairly heavy usage of stream merging, and not having a parent-child relationship between streams may prove complex in some cases. I've found some older forum posts (https://forums.perfo...-import-folder/) that seem to suggest that further modifications to the stream view should behave in the manner we desire, specifically that subsequent modifications to the changeview should override previous ones.

Ultimately, however, we're just trying to do component versioning through imports. With or without imports is there a better/recommended workflow? What does Perforce recommend, and how are other people handling that use case?

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 07 October 2019 - 03:45 PM

Have you checked out the component-based development tools that got linked from that thread?  I think that's the "official" solution.

#5 SBinter

SBinter

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 October 2019 - 03:57 PM

I looked at it, but given the recency of updates and lack of documentation it did not seem like a particularly supported solution, though perhaps I was incorrect. We will have to examine it in greater detail, but ultimately I think we would have concerns about integrating - and then being possibly forced into supporting - what appears to be a partial implementation or feature.

Did you have any experience working with it?





Also tagged with one or more of these keywords: Stream, Import, Inheritance

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users