P4 sync, how do you exclude files when using wildcards?

I'm trying to use p4 sync to synchronize a specific directory with a given change list number using wildcards, but I also want to exclude the list of files that are in that directory (in subdirectories), I tried to use - (both before and after using the wildcard path ), but the file is never excluded, this command I'm trying:

p4 sync //Repo/Foo/... -//Repo/Foo/Bar/Foobar.txt

File exclusion only works when the files / directories you are syncing do not match the files you are trying to exclude.

+5
source share
3 answers

In your client you will have several lines:

//Repo/Foo/... //my_client/Repo/Foo/...
-//Repo/Foo/subdirectory/... //my_client/Repo/Foo/subdirectory/...

Foo , "".

+6

, . . (, , , ).

, *

p4 sync //Repo/Foo/*

Foo.

+3

, . (p4v p4 :

//Repo/Foo/...
-//Repo/Foo/Bar/Foobar.txt

@head, . - , "sync_butnot_foobar"

:

p4 sync @sync_butnot_foobar

This has a huge advantage over changing your client specification and synchronization model. If you exclude the file in the specification of your client, then at the next synchronization, this file will be transferred to revision 0, which is probably not the way you wanted.

+1
source

All Articles