[p4] how to make labelsync label deleted files

P4Matt perforce-user-forum at forums.perforce.com
Wed Jul 24 09:30:01 PDT 2013


Posted on behalf of forum user 'P4Matt'.

Curses. My bad. One last try...

p4 changes -m 1 //<client name>/...#have  
This will get you the changelist you are synced to.

p4 labelsync //<client name>/...#<changelist number I just
generated>  
With this approach you won't have to retain the changelist number, you can
just generate it from your workspace. It's not flawless though; if the
latest changelist was only deleted files, Perforce will report the previous
changelist because you technically don't "have" the deleted files.
The way around that is you can instead run 

p4 cstat //<client name>/...  
For every change you have potentially mapped into your workspace it will let you
know if you have it or not. Just take the last change number with status
"have" and you can be guaranteed that you can label your deleted files
as you expect. 

So no matter what you'll need a changelist number, but potentially you can
generate it when you need it instead of tracking it.



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/2660-how-to-make-labelsync-label-deleted-files



More information about the perforce-user mailing list