version-controlperforce

Perforce: Can I put a 'watch' on a file, so that I am notified when the file changes?


I want to get notifications when new changes are made to a file in Perforce.


Solution

  • If you are running the p4 review daemon, one can run p4 user from the command-line and just add the file to your "reviews".

    # A Perforce User Specification.
    #
    #  User:        The user's user name.
    #  Email:       The user's email address; for email review.
    #  Update:      The date this specification was last modified.
    #  Access:      The date this user was last active.  Read only.
    #  FullName:    The user's real name.
    #  JobView:     Selects jobs for inclusion during changelist creation.
    #  Password:    If set, user must have matching $P4PASSWD on client.
    #  Reviews:     Listing of depot files to be reviewed by user.
    
    User:   you
    
    Email:  you@yourcompany.com
    
    Update: 2012/05/01 11:08:18
    
    Access: 2012/05/17 11:02:27
    
    FullName:   Your Name
    
    Password:   ******
    
    Reviews:
        //depot/directory/...
        //depot2/dir2/file_to_review.cpp