TIP: Perforce - Sync Files In A Label Without Deleting Previous Files

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: p4 sync @label1,label2 or something like `p4 sync @label1,@label2`` But I’ve found that depending on the perforce version you are using, the above commands might not work. [Read More]

[TIP] Add Directories Recursively To Perforce (P4) Depot

Perforce is an excellent revision control system for the code but the GUIs (P4WIN and P4V) are too slow to be productive. Hence, I like to do most of my work through command lines. Now, the other day I needed to add a directory and all its subdirectories and files to the repository (or perforce depot). This is a trivial task through the GUI. Just drag the top level directory onto the changelist area and the GUI takes care of everything but there is no straightforward way to do this through command line, until, I discovered the “-x” option of P4. [Read More]