[p4] Querying the correct file case on a case-sensitive server

David Genest david.genest at ubisoft.com
Tue May 23 10:20:17 PDT 2006


Hello, 

	Our p4 server is running on a case sensitive machine (Linux).
Our clients are in vast majority case preserving, but case-insensitive
machines (win32).

	We have automated procedures that open assets for edit, and
fetches information with the fstat command. There are some edge cases
where the file we want to query is not in the correct case.

	I was wondering if there was a function that could take as input
a wrongly cased path and get as output the correct path as stored on the
server. I would see this functionality in the p4 where command.

	For example (assume the current working directory is in
//depot):

	//depot/myGoodCaseFile.txt

	Issuing a "p4 where -serverCase mygoodcasefile.txt" would
output: 

	//depot/myGoodCaseFile.txt //myClient/myGoodCaseFile.txt
d:\workingDir\mygoodcasefile.txt

	The actual behavior of the where command just appends the
queried path to the mappings as it would be on the server, so I get:

	//depot/mygoodcasefile.txt //myClient/mygoodcasefile.txt
d:\workingDir\mygoodcasefile.txt

	I have looked around and read the docs, but I don't think there
is such a behavior. What would be the best way to get the correct case
(as stored on the server) from a wrongly cased file path?

Thanks,

David.



More information about the perforce-user mailing list