Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce P4W error: file(s) not in client view

I have an existing workspace that I have been using and everything has been working as expected.

Now I am beginning a new project and would like to change my workspace root so that the files will be located in a different directory, for example, C:/NewProject.

I have made the /NewProject folder and added files to it, which I can see in my workspace view.

When I try to Mark for Add... I get a warning c:\NewProject\FileName - file(s) not in client view

How can I add these files to my depot? Or to the client view so that I may successfully add them?

like image 243
user2530364 Avatar asked Jun 28 '13 03:06

user2530364


People also ask

What is P4CLIENT?

The p4 client command puts the client spec into a temporary file and invokes the editor configured by the environment variable P4EDITOR . For new workspaces, the client name defaults to the P4CLIENT environment variable, if set, or to the current host name. Saving the file creates or modifies the client spec.

What is clobber in Perforce?

The "can't clobber writable file" error happens because Perforce is very cautious about accidentally overwriting ("clobbering") work that you've done in your workspace.

What is Perforce client spec?

Your Perforce client spec defines your workspace location, the depot files you plan to work with, and their location in your workspace when you invoke Perforce commands.


3 Answers

You can edit your client view through Connection -> Edit Current Workspace in the View tab (or something similar; I'm on a p4 client from 2011). If you're working in a relatively small depot, you might as well just include //depot/... in your view.

like image 140
Egg Avatar answered Oct 21 '22 16:10

Egg


Usually after installing Perforce to a new computer, when you try to sync Depot files the system gives sync error message "File(s) not in client view". Here is the solution:

  1. Go to Connection > Edit Current Workspace > Expand the Workspace Mappings field to display the Depot Tree.
  2. Right-click on the name of the Depot Tree that you want to "Include" in mappings.
  3. Click Apply, click Get Latest to sync the files.
like image 33
Dilraj Suri Avatar answered Oct 21 '22 16:10

Dilraj Suri


After struggling with it for hours, I finally sort it out. It's very simple, just Add your folder name to the mapping. My situation is the folder name is not the same as the workspace name "deport".

(Auto-generated for you in the Workspace Mappings)

//depot/... //alice_1545/depot/...

So all you need to do is add your folder name into the Workspace Mappings.

//depot/... //alice_1545/depot/...
//depot/... //alice_1545/{your folder name}/...
like image 2
Alice Lai Avatar answered Oct 21 '22 15:10

Alice Lai