TIP: Perforce – Sync Files In A Label Without Deleting Previous Files
Blog | Tech Blog | Secure Coding | Twitter | RSS Feed | Get Email Updates
If you have used perforce, you'd have definitely come across a situation where you wanted to sync files belonging to two different labels, but as soon as you sync the second label, the files from the first label get deleted. P4 help suggests the following ways to achieve this:
CODE:
-
p4 sync @label1,label2
or something like
CODE:
-
p4 sync @label1,@label2
But I've found that depending on the perforce version you are using, the above commands might not work. So, here is a tip that will always work for you irrespective of which version you are using:
CODE:
-
p4 files @label | cut --delimiter=" " -f1 | p4 -x - sync -n
It is as simple as that. Let me know what are your perforce tips..
© Shantanu Goel | TIP: Perforce – Sync Files In A Label Without Deleting Previous Files
Custom Search
|
Liked this post? Get FREE Updates Subscribe to RSS feed |






This post has 2 comments
March 31st, 2009
p4 sync @=label
would work, wouldn't it?
April 2nd, 2009
Thanks Srihari..I didn't know about that.. "@=label" worked as well.