(foo is source controled)
$ rm -rf foo
$ p4 sync -f foo
$ ls foo
ls: cannot access foo: No such file or directory
$ p4 sync -f foo/...
$ ls foo
bar.txt
Instead, users must revert the files to remove the mark for deletion. To do this, simply right-click on the folder or files in P4V and select Revert. The files will be returned to normal and work can continue.
If p4 sync is used to bring the head revision of this file into another workspace, the file is deleted from that workspace.
The p4 flush command performs half the work of a p4 sync .
If for any reason you need to work offline, that is without having connectivity to Helix Server or without checking out files, you can manually enable write permission for the files and continue editing, adding, and deleting files as required.
Perforce doesn't know about directories, that's why it cannot 'revive' them. The second sync succeeds, because you are not syncing the directory, but the files in this directory.
The directory foo
wasn't added with p4 initially. It was probably added by p4 add foo/bar.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With