Reputation: 31
I'm trying to sync only the files modified in a particular change list to p4v.
Suppose in a perforce directory //demo/test I have 10 files out of which only 3 are modified as part of change list number 1234
. I want only 3 files to be synced up. I have tried below options but it did not work.
p4 sync //demo/test...@1234;
This command says the files are updated but i don't see the files synced up.
p4 sync -f //demo/test...@1234;
This command is syncing all 10 files in the directory.
Upvotes: 3
Views: 3610
Reputation: 16389
Use
p4 sync //demo/test...@1234,1234
or
p4 sync //demo/test...@=1234
When running tests like these, remember that 'p4 sync' won't sync a file that you already have, which is why you found the need to run 'p4 sync -f' to force the files to be sent even though the server knows you already have them. If you want to clear the server's memory of the files that you have, you can run
p4 sync //demo/test...#none
which will remove all the (p4-managed) files matching '//demo/test...' from your workspace, and then 'p4 sync' will bring them back the next time.
Oh, and since 'test' is a directory, the pattern
//demo/test/...
is preferred to
//demo/test...
since '//demo/test/...' matches only the files in the test directory, while '//demo/test...' will also match the files in the '//demo/test1', '//demo/test-and-set', and '//demo/testarossa' directories (if those should happen to exist).
Upvotes: 3