how to sync the perforce client to a particular change list using p4 sync command
Asked Answered
I

2

21

let us assume depot contains change lists :

change lists : 300 299 280 270 260

I would like to sync my client at change list 280.

if i do p4 sync : my client will be updated with cl : 300 (latest one) which i'm not looking for.

How can we achieve this ?

Intramolecular answered 2/10, 2013 at 7:43 Comment(0)
A
35

Perforce uses "@" to indicate change number, so

p4 sync @280
Amphitrite answered 2/10, 2013 at 8:21 Comment(4)
How do we confirm that we are on that change number once we execute the command?Homing
@Homing you can try using p4 changes -m 1 //...#have it will show the changelist number along with short description for local workspace you're on.Standby
Whats the difference between p4 sync @280 and p4 sync ... @280Homing
@Homing ... is the path. There's no difference between the two but you can use it to specify a subpath - dir/... for example, which will only sync that directory.Anchises
I
0

p4 sync ...@280

Accepted answer didn't work for me

To check latest synced CL: p4 changes -m1 //...#have

Idolum answered 7/7, 2023 at 10:3 Comment(1)
Shouldn't it be //...@280 ? If you're in the client root directory, then what you have should work, but if you're not, best provide the full spec.Uprear

© 2022 - 2025 — McMap. All rights reserved.