[p4] How to sync a particular subtree to a label?

Ivey, William william_ivey at bmc.com
Wed Mar 26 14:22:55 PDT 2008

You need to give it a path to narrow it down. Without a path
it's the same as saying //... at label. The path was supplied for
you in P4Win by virtue of clicking on a path.

If you're in the directory you want to sync, then change your
command to p4 sync ./... at label (or just ... at label) and it should
do what you want.


-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Karr, David
Sent: Wednesday, March 26, 2008 3:39 PM
To: perforce-user at perforce.com
Subject: [p4] How to sync a particular subtree to a label?

In p4win, I believe I can right-click on a directory and select a label
to sync to, but this will only affect that directory tree.  Is that

I'm trying to do the same thing on the command line.  I have a depot
with a bunch of top-level dirs.  I created a label.  I dropped one of
the top-level dirs onto the label.  When I "describe" it, it only shows
the elements in that top-level dir.

However, if I go to that directory in the shell and do "p4 sync -n
@label" it shows output lines that show it would have affected more than
the one top-level dir.  It also referenced other top-level peer

perforce-user mailing list  -  perforce-user at perforce.com

More information about the perforce-user mailing list