jrwagz
jrwagz

Reputation: 586

Can a Perforce Workspace view contain a label?

We are using our Perforce Workspace view's to include other internal corporate "libraries" i.e.:

//depot/my/project/path/dev/... //workspace_name/...
//depot/some/other/library/path/dev/... //workspace_name/include/...

We would like to be able to specify that the included library should sync to a specific label. I won't be modifying it, and want to make sure new updates to that library don't break my code. In git terms this would be called a submodule.

//depot/my/project/path/dev/... //workspace_name/...
//depot/some/other/library/path/dev/...@label_name //workspace_name/include/...

But I get the following error:

Error at line 2 of field 'View' in client specification. Revision chars (@, #) not allowed in '//depot/some/other/library/path/dev/...@label_name'.

Is this possible?

Upvotes: 1

Views: 2141

Answers (1)

Matt
Matt

Reputation: 4850

That is not possible at this time. There are three ways I could see to handle this currently in Perforce:

1) Create a Perforce label which would set the version you would like in your workspace. This is a bit awkward in that you have to make sure you don't sync that set of files without referencing the label.

2) A general best practice for component based development is to have the submodules cut releases. If that was in place you could just consume the version of your choice.

3) Create an import branch that has a version of the code you want to use. You can then update it whenever you choose. That could theoretically give you the control you need with minimal maintenance overheard.

Upvotes: 3

Related Questions