Perforce edit/open only working via depot name, not local name

perforce

I have my perforce client set up and had a problem trying to simply do a "p4 edit file.txt" from a subdirectory of the client root where file.txt is a checked-in file local to that directory. In other words, if I did "p4 have" I would see "//depot/folder/file.txt#2 – /proj/folder/file.txt" in the list. p4 sync seems fine. However, "p4 edit file.txt" would give the error "File(s) not on client."

I did finally get a p4 edit to work by using the depot name. "p4 edit //depot/folder/file.txt" DID work and strangely enough it modified the local file to have write permissions.

Any idea what the problem is? I have other clients on the same system for different projects that work the way you would expect, by referencing the local file name.

Best Answer

I've encountered problems like this using overlay mappings (entries in the client view with leading plus signs.

I've also encountered problems like this by changing the client view, but not performing a full 'p4 sync' afterwards to re-arrange all the files on my workstation to match the updated view.

Did you, by any chance, fit into either of those scenarios?

Have you tried running 'p4 where file.txt' and 'p4 where //depot/folder/file.txt'? Often that command is very useful for figuring out why the filename syntax on your command line isn't successfully resolving to a repository file name.

Related Topic