Home > Mobile >  p4 fstat returning only files missing from the workspace
p4 fstat returning only files missing from the workspace

Time:02-23

Is it possible to get an fstat (or any other command) to return a list of all "existing" files (nothing thats been deleted/archived/etc) that dont exist on the users current workspace?

ideally, examples would be in python but standard p4 commands are fine too.

CodePudding user response:

Assuming you mean files that were previously synced but have since been removed from the workspace, the standard command for this is p4 diff -sd:

    diff -- Display diff of client file with depot file

    p4 diff [-d<flags> -f -m max -Od -s<flag> -t] [file[rev] ...]

        ...

        The -s options lists the files that satisfy the following criteria:

                ...

                -sd     Unopened files that are missing on the client.

You can also use p4 reconcile -n -d, p4 status -d, etc.

If you're simply looking for files that haven't been synced, that's just p4 sync -n. Files listed as added are those that are completely missing from the workspace and would hence be added to it by a sync.

  • Related