Search code examples
perforcecvs

Getting File from Perforce


I have locally remove file from location using rm -rf . when I am trying p4 sync filename But I am not getting file name and getting message that file is update. I used to run similar command in cvs for getting file cvs update filename.


Solution

  • See the following: http://www.perforce.com/perforce/r12.1/manuals/cmdref/sync.html.

    The relevant parts are as follows.

    Syntax
        p4 [g-opts] sync [-f] [-L] [-k] [-n] [-q] [-m max] [file[revRange]...]
        p4 [g-opts] sync [-L] [-n] [-q] [-s] [-m max] [file[revRange]...]
        p4 [g-opts] sync [-L] [-n] [-p] [-q] [-m max] [file[revRange]...]
    

    The flag you want is as follows.

    -f
        Force the sync. Perforce performs the sync even if the client
        workspace already has the file at the specified revision. If
        the file is writable, it is overwritten.
    
        This flag does not affect open files, but it does override the
        noclobber client option.