Samuel
Samuel

Reputation: 6500

Stream definition: Ignore all files but one filetype

We have a server with a depot that does not allow committing files which are in a client mapping therefore I need a stream configuration.

Now I struggle with a task which I would assume should be simple:

We have a very large stream with lots of different file types and I would like to check out the entire stream but get only a certain file type. Can this be done with perforce without black-listing every file type in question?

Edit: Sorry that I (for some reason omitted) so many information in my question.

I am already setting up a virtual stream where the UI gives me three nice fields:

I was hoping that by creating a virtual stream I actually could define the file types I want, e.g. I could write an import statement like import RootDir/....txt //Depot/mainline/RootDir/....txt (note the 4 dots, 3 for perforce and the other as a "wildcard"

however the stream definition does not support this and only allows me to write

import RootDir/... //Depot/mainline/RootDir/...

Since I was not able to find a way to white list the files I wanted I only knew a way to blacklist all things I did not want but I would like to avoid that because my Ignored list would be dozens of entries long.

Now I will look into that sync hint because I could use the full stream spec without filter and only sync the files I need on disk, which might be very good.

Upvotes: 0

Views: 818

Answers (2)

Samwise
Samwise

Reputation: 71562

There are a few different things going on in your question but this seems the most like a statement of what you're trying to do so I'm going to zero in on it:

I would like to check out the entire stream but get only a certain file type.

If by "check out" you mean you only want to sync that file type to your local workspace:

p4 sync ....TXT

If by "check out" you mean you want to open only that file type for edit:

p4 edit ....TXT

ANY operation in Perforce that operates on files accepts an arbitrary file path, because Perforce tracks all of its state per-file. This is true whether you're using classic clients or streams.

Upvotes: 2

P4Jen
P4Jen

Reputation: 1033

There needs to be some mechanism for telling the Helix (Perforce) server that you only want to retrieve certain files from the stream.

Virtual Streams may be a good fit here, as they allow you to filter the view of an existing stream.

This means you can sync only the files you want and when you submit you will be submitting directly back to the stream your virtual stream is based on.

More information is available here: https://www.perforce.com/perforce/doc.current/manuals/p4v/p4v_virtual_streams.html

Upvotes: 0

Related Questions