views:

27

answers:

2

I would like to get all the files checked-in a private branch and only the those files checked in.

What config spec would you recommend?

Let's say prvt is the private branch:

element * .../prvt/LATEST

Would that work?

+1  A: 

This will only work if every element has a prvt branch.

So if your files are in /myVob/myPath, the config spec

element * .../prvt/LATEST

will select the right versions (those in LATEST of prvt branch), only if /myVob has a prvt branch (i.e. has already been checked out / checked in in that branch), and if myPath has a prvt branch.
If the leading path has no prvt branch, no version will be selected, meaning the files withing that path won't have a chance to be selected by your selection rule.
That is the real issue here.

That is why I recommend adding some stopping rules:

element * .../prvt/LATEST
element /myVob/myPath /main/LATEST
element /myVob /main/LATEST

That way, within /myVob/myPath, only the right versions are shown, but for the path leading* to those files, you have at least backup config spec rules which allows you to at least select one version.

If you know the branch from which prvt branch has been done, using that branch name would be safer.
If you don't '/main/LATEST' is a sure bet, since the main branch always exists.

VonC
A: 

What if I want to load only those elements which are branched out only in prvt branch not any other element as I suppose

element /myVob/myPath /main/LATEST
element /myVob /main/LATEST

might get files which branch out from the main latest also in myPath directory. But this is very much useful only for directories as I wouldn't have branched out the directories of the checked in file element in the private branch

Rahul
No: those rules only concern `myVob` and `MyPath` **directories**, not their files within `/myVob/MyPath`. You need all *three* rules.
VonC
Please add a comment to my answer, and not a new answer.
VonC