krystan honour
krystan honour

Reputation: 6793

exclude folder paths from a recursive tfs suck

If I issue a tf get command on the cli my $/common/lib directory like so

tf get d:\work\common\lib /recursive I want to be able to say (without changing my workspaces) exclude these child directories, so.

Lets say I want to get everything except $/common/lib/foo.

The upshot would be I would get everything under the $/common/lib except that which resides under $/common/lib/foo.

Is this even possible. I appreciate it might be time to refactor where the foo directory resides to make this easier but that is not possible at the current time

Another approach would be to connect to the repository and call seperate operations on the directories I did want. All of this is being done by a script thus the reason for wanting a one liner to be a bit more efficient. If it can't be done it can't be done :)

Upvotes: 2

Views: 944

Answers (1)

Edward Thomson
Edward Thomson

Reputation: 78673

The easiest solution is to use cloaked folders on the server, and let it exclude these items for you. You mention that don't want to change your workspace, however it's pretty simple to modify your working folder mappings only temporarily to add the cloaks, for example:

tf workfold /cloak $/common/lib/foo
tf get $/common/lib /recursive
tf workfold /decloak $/common/lib/foo

Not quite a one-liner, but the alternative would probably be to get all the subfolders (except $/common/lib/foo) specifically.

Upvotes: 4

Related Questions