Perforce troubles “file not under client's root” error message

吃可爱长大的小学妹 提交于 2019-12-05 00:50:22

If you get this error while the "Pending" Tab is open, the following could be your problem! You may not be seeing your entire filter (ie. some of the filter may be out of view). Mouse over your Window Pane Border underneath the filter until your cursor changes so that you can expand the Filter Window Pane. There is a filter that could be there that says, "Files that match any of the following file paths:" Make sure that you don't have a file path selected that is incorrect. Either remove the filter or choose "Current depor or workspace tree selection".

What I believe is that you have a different path for your client and your code is in different path. From you P4V error I see that the path is:

c:\Users\user.Name\Documents\Code\My_Project

But your client root path is:

C:\Users\User.Name\Documents\Visual Studio 2010\Projects\Omega

In above scenario, the path only upto "C:\Users\User.Name\Documents" is common, after that your client root and your project root differs. If you want to check in code from your My_Project folder, change the client root to point to that. You can do so on command line by

p4 client <client name>

Or change it in Workspace view of P4V.

Also, make sure to use "" around your path since it has folder name with space.

Hope this helps.

One 'oops' mistake you can make is to have the wrong workspace selected in Visual Studio 2012. Just did that and spent a few minutes scratching my head.

I'd guess that Perforce is having problems with the spaces in your path. Try putting quotes around it.

From http://www.perforce.com/perforce/doc.current/manuals/p4guide/03_using.html:

Spaces in filenames, pathnames, and identifiers Use quotation marks to enclose files or directories that contain spaces. For example: "//depot/dev/main/docs/manuals/recommended configuration.doc" If you specify spaces in names for other Perforce objects, such as branch names, client names, label names, and so on, the spaces are automatically converted to underscores by the Perforce server.

Ola M

I had similar error message showing during project build. What helped was deleting .suo file and reloading the project as described in How does Visual Studio's source control integration work with Perforce?

Check the path specified in the client Root. If this is not a valid path then you encounter this error

Root:   /a/b/c/d

If this is not a valid root you end up getting the following error

Path '/a/b/c/d/...' is not under client's root '/a/b/c/d'

Just correct the path pointed to by Root and you should be fine

This exact problem was related to my "PENDING VIEW". It had a search filter set for the default workspace at the time, and any time I switched to a different workspace it would show the error dialog.

The deal was I had changed the workspace name, and the filter was no longer valid.

I cleared the filter (in the pending view) and the error disappeared.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!