[p4] Querying the correct file case on a case-sensitive server
David Genest
david.genest at ubisoft.com
Fri May 26 09:20:58 PDT 2006
Unfortunately, our server is not run with the -C1 option, and it is not
possible to change it if not on an empty database.
Seems the only solution is to list the dirs recursively and go from
there. It would be so easy if perforce had a way to retrieve the path as
it is seen by the server, regardless of case. Oh well.
-----Original Message-----
From: Sweeney, Tony [mailto:sweeney at ea.com]
Sent: May 24, 2006 05:04
To: David Genest; perforce-user at perforce.com
Subject: RE: [p4] Querying the correct file case on a case-sensitive
server
Doesn't 'p4 files' do what you want? It certainly seems to for me (we
are running the undoc '-C1' case folding option on our Linux server, but
it happily reports the case a file was originally stored in.)
[perforce at cgcode ~]$ p4 sync !$
p4 sync //depot/.../b4behaviourrubberneck.cpp
//depot/Burnout/TestBeds/OpenWorldTest/CG4Game360/Code/GameSource/Camera
/Behaviours/B4BehaviourRubberNeck.cpp#1 - added as
/home/perforce/Burnout/TestBeds/OpenWorldTest/CG4Game360/Code/GameSource
/Camera/Behaviours/b4behaviourrubberneck.cpp
[perforce at cgcode ~]$ cd
Burnout/TestBeds/OpenWorldTest/CG4Game360/Code/GameSource/Camera/Behavio
urs/
[perforce at cgcode Behaviours]$ ls
b4behaviourrubberneck.cpp
[perforce at cgcode Behaviours]$ p4 files *
//depot/Burnout/TestBeds/OpenWorldTest/CG4Game360/Code/GameSource/Camera
/Behaviours/B4BehaviourRubberNeck.cpp#1 - add change 450 (text)
[perforce at cgcode Behaviours]$
Tony.
quis custodiet ipsos custodes -- Juvenal VI, 347-8
> -----Original Message-----
> From: perforce-user-bounces at perforce.com [mailto:perforce-user-
> bounces at perforce.com] On Behalf Of David Genest
> Sent: 23 May 2006 18:20
> To: perforce-user at perforce.com
> Subject: [p4] Querying the correct file case on a case-sensitive
server
>
> 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.
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
More information about the perforce-user
mailing list