[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Re: [jcvs] Repost: File Name Case
> Windows doesn't distinguish two similarly named files that differ only by
> case. This is causing me a problem:
>
> D:\home\temp>copy packages.tar Packages.tar
> The file cannot be copied onto itself.
> 0 file(s) copied.
>
> So if I want to change a file from abcd.txt to ABCD.txt,
> 1. move abcd.txt to ABCD.txt in my working directory.
> 2. use jCVS to remove abcd.txt; then commit.
> 3. use jCVS to add ABCD.txt; then commit.
>
> Now if somebody else wants to pick up the change, if they forget to remove
> abcd.txt, and do a checkout on the parent directory, (j)CVS doesn't
> complain. After the checkout, abcd.txt remains, and there's no sign of
> ABCD.txt.
It is not quite that simple. What is actually happening, I believe, is
that the Entries line is causing the update to occur, as it should, and
that jCVS is updating the file. If you were to make changes to the file
during this process, I bet you would see those changes in the 'abcd.txt'
file of "user two".
What is happening is that when jCVS goes to update 'ABCD.txt', it is
actually opening the existing file 'abcd.txt', since this is perfectly
acceptable to Windows, updates that file, and closes. Thus, the file is
updated but not renamed.
I believe that the correct thing for jCVS to do in this case, at least
the only way I can think of fixing it, is to recognize the update of
an existing file with different case. When the case does not match, jCVS
should first remove the old file before updating it. This should cause
windows to get the correct case.
> Should they always do an Update; then a Checkout? Would the update have
> noted that the lower case abcd.txt had been removed?
>
> What's the correct way to handle this?
In the rare instances where you rename a file by only changing the case of
the file's name, it is recommended that you notify others to remove the
file in question and update, or release the entire project and check it
out fresh.
tim.
Tim Endres - time@ice.com
ICE Engineering, Inc. - http://www.ice.com/
"USENET - a slow moving self parody." - Peter Honeyman