Perforce has got a rather strange case sensitivity issue when working with case insensitive file systems like the NTFS.
I look like an idiot if i do not mention what Perforce aka P4 is....
It is a revision (or version) control system. It is used to manage file versions. The clients or the users work in their local workspaces and submit changes in a changelist.
A single file can be checked out by multiple users and when it is being submitted, perforce will try to merge your changes with the changes done by others, if there are any.
You get the latest by clicking on get latest revision.
Everything is cool up to now but there is a problem!!
Problem: Suppose, we have a file named xyz in perforce and we renamed it to Xyz for some reason. (Don't assume that this happens very rarely.... no that is not the case in real.... think about linux os where xyz is a different file from Xyz and lot of development has been happening on linux machines.)
Consider that we got the latest version (before changing the case of the xyz file)and we have xyz file in our local development environment.
Now someone changed the xyz to Xyz which is perfectly legal and you tried to get the latest version (assuming you are working on a case insensitive file system like Windows.)
You will find that the latest version of the file remains to be xyz inspite of the case change.
Because Windows uses a case-insensitive file system, references to files that
differ only by case are ignored. In order to get the Perforce Server to
change the case of a file on a Windows Server, the file must first be
deleted and then re-added to Perforce using the correct case.
Additionally, the internal Perforce "have list" references to the old
case name must be eliminated by removing the file from case-insensitive
workspaces and then re-syncing the file using the correct case.
Windows:
Changing xyz to Xyz
- Delete the existing file
p4 delete xyz p4 submit
-
Recreate the file in your local file system with the correct case. Then, use the p4 sync command to re-create the file in your workspace using the correct case.
p4 sync Xyz#3
-
Remove the internal "have list" reference. The p4 flush command (sync -k, in recent versions) removes the have list reference without removing the file from your workspace.
p4 flush Xyz#none
-
Re-add the file in the correct case. As with the sync command, the p4 add command uses the case of the file argument provided at the command line, so it is important to provide the correct case.
p4 add Xyz p4 submit
all users who use workspaces on
case-insenstive file systems (such as Windows NTFS or MacOS X HFS) must
remove the old file from their workspace and then re-sync the renamed
file with the correct case to replace it in their workspace.
- p4 sync xyz#none
- p4 sync Xyz#head
Unix:
On Unix, simply integrate the file and delete the original file.
- Use p4 integrate to change the old name to the new name.
$ p4 integrate xyz Xyz
- Delete the original name.
$ p4 delete xyz
- Submit the changes.
$ p4 submit
and you are ready to go!
No comments:
New comments are not allowed.