Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't p4 sync -f folder revive a deleted folder?

Tags:

perforce

(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
like image 584
ripper234 Avatar asked Apr 07 '11 07:04

ripper234


People also ask

How do you undo p4 delete?

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.

Does p4 sync delete files?

If p4 sync is used to bring the head revision of this file into another workspace, the file is deleted from that workspace.

What does p4 flush do?

The p4 flush command performs half the work of a p4 sync .

What is reconcile offline work in Perforce?

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.


1 Answers

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

like image 144
jhwist Avatar answered Sep 29 '22 10:09

jhwist