Search code examples
perforcep4api.netp4java

P4JAVA Equivalent to p4 changes -m1 @workspace


I need to find out what is the last revision Synced to my workspace but using the P4JAVA API, Any help??


Solution

  • According to the documentation for FileSpecBuilder you can include a rev specifier with the path, so if you change this:

    makeFileSpecList("//depotname/path/...")
    

    to this:

    makeFileSpecList("@workspace")
    

    it seems like that ought to do the trick.