cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Exclude Folder (Subproject) from si viewsandbox

PaulLi
2-Guest

Exclude Folder (Subproject) from si viewsandbox

I'm trying to compare a local sandbox with the server to find out if anything has changed or new files were checked in that differ from my local data.

 

I do this by using the cli command: si viewsandbox –S <sandbox_path> --recurse –filter=changed:sync –filterSubs

and now want to exclude a folder from this request.

So to say if anything was checked in on the server in the Folder "IgnoredFolder" or any subfolder of it, I don't want the command to return this files as changed.

 

I already tried by adding the option --filter=!file:IgnoredFolder, --filter=!file:*IgnoredFolder and a lot of other combinations but didn't get a result without the IgnoredFolder.

 

The same happens to me if I try to create a scoped Sandbox with the option --scope=!path:IgnoredFolder

 

Could you give me a hint what I got wrong here or how I can achieve what I want?

2 REPLIES 2
awalsh
17-Peridot
(To:PaulLi)

Have you tried adding the wildcard at the end of the folder name, that is *IgnoredFolder/* I've tested the commands below on my own client and they are correctly filtering the sandbox. 

 

For members in a subdirectory, but not a subproject, you can use the file filter for viewsandbox. 

si viewsandbox -S <sandbox_path> --recurse --filter=changed:sync --filter=file:*IgnoredFolder/* --filtersubs

 

Members in a subproject are not filtered because the name of the member does not contain the folder name. In this case you need a scoped sandbox.

si configuresandbox -S <sandbox_path> --scope=!path:*IgnoredFolder/*

 

When viewing the scoped sandbox, use the --filtersubs option to filter out the subproject(s) that are out of scope.

si viewsandbox -S <sandbox_path> --recurse --filter=changed:sync --filtersubs

kthierer
11-Garnet
(To:PaulLi)

My approach would be multiple steps like

 

si print -R --revision=:member --fields=membername --noheaderformat --notrailerformat > members.txt

REM filter members.txt eg. with findstr or grep

si viewsandbox --selectionfile=members_filtered.txt

 

However one sideffect of using ----selectionfile is that the subproject/subsandbox information

is not displayed anmore.

 

HTH Juergen

Top Tags