
Ever run into this error with Perforce’s ‘p4 changes’ or any other similar command?
//projectfoo/bar/… – must refer to client ‘some_p4_client’.?
I ran into this exact problem today. I was trying to do a ‘p4 changes //projectfoo/bar/…@xxxxxx,yyyyyy’ to get a history of the changelist and got that error. The symptoms were that doing the same command on other projects within the depot worked perfectly fine as well as trying it on another platform and system.
After googling and running into a brick wall, I started to scrutinize the depot and the naming convention then bam! I Found the solution!
Turns out that inside the depot, “projectfoo” is actually “ProjectFoo.” Do you see the difference yet? Now I tried ‘p4 changes //ProjectFoo/bar/…@xxxxxx,yyyyyy’ and it magically worked.
In short, Perforce is extremely case sensitive when it comes to the command operations. Generally, its a good practice to keep everything within the depot as lower case to avoid unique problems like these.
3 comments in this article
April 15, 2009 am30 3:18
Just a small clarification on this one:
I’m assuming your client spec definition is
//ProjectFoo/… //[some_p4_client]/…
If so, ‘p4 changes //ProjectFoo/BAR/…@xxxxxx,yyyyyy’(BAR in wrong case) will work without errors, and you will get 0 results
The reason you get the error with your original query is that //projectfoo is actually outside your clientspec definition
I may be wrong on this point, but I think that the case sensitivity has to do with the OS your Perforce server is based on rather that Perforce itself. If it’s a Windows OS, then I think it allows wrong casing for queries
April 15, 2009 pm30 20:54
I actually received the same errors in both Windows and Solaris. Although while in Windows, I was under Cygwin.
April 15, 2009 pm30 21:58
I meant the OS of the system your Perforce server is on, not the client system. But as I said… I may be wrong.