Actions:
|
2014-09-30 07:22 AEST by Glen Starrett - If you change the case on a filename (that is, rename but only change the case
of the letters in the filename), a Windows client will not update the file name
when switching between branches.
For example, if you have the following:
* A server capable of distinguishing case in filenames
* A file named "Foo.c" on HEAD
* Same file is renamed to "foo.c" on MyBranch
When you checkout the sandbox, you will see the following behavior:
* Check out branch HEAD
* Foo.c will be placed in the sandbox, with the contents from the HEAD version.
* Update the sandbox to MyBranch
>> Foo.c will be in the sandbox, but it will have the contents of the MyBranch
version.
The opposite is true as well:
* Check out branch MyBranch
* foo.c will be placed in the sandbox, with the contents from the MyBranch version.
* Update the sandbox to HEAD
>> foo.c will be in the sandbox, but it will have the contents of the HEAD version.
Note that there are some issues with renaming a file on a branch as well:
* They need to have committed at least once to the branch before renaming or it
will rename HEAD as well. I believe this is part of the effect of THIS bug and
not something separate, or it might have something to do with the "Advanced
directory revisioning" setting.
* If they rename to another name then back to the original name (e.g.
testcase3.txt > foo.txt > TESTcase3.txt) then they will lose that file from the
branch where this multiple rename was done (I'm fairly certain this is Bug6008,
but with the twist that the 3rd filename doesn't have the same case as the
original name). |
|
2014-09-30 07:23 AEST by Glen Starrett - Notes from testing:
Looking at rename issue workaround with the CLI rename command. Arthur believes
it will work for renaming the case, but I think it's still going to have the
"stickiness" problem with the case.
• SETUP Info:
o Using EUROPA /myrepo
o "Advanced directory revisioning" is ON at this point
o (CVSNT) 2.8.01 (Soolin) Build 5261
• Testcase1:
o Add & commit to HEAD as testcase1 (v1.1)
o Tag with branch MyBranch
o Switch to MyBranch
o Cvs ren testcase1.txt TESTcase1.txt
o Commit
o >> File is renamed, but it shows up as TESTcase1.txt even on a fresh checkout
of HEAD.
• Testcase2:
o Add & commit to HEAD as testcase2 (v1.1)
o Tag with branch MyBranch
o Commit v1.2 on HEAD
o Switch to MyBranch
o Commit v1.1.2.1 to MyBranch
o Rename to TESTcase2
o Commit
o >> File is renamed on branch.
• Switching to HEAD shows the WRONG version of the filename (TESTcase2.txt).
• Checking out with fresh sandbox shows CORRECT version of the filename.
• Testcase3:
o Add & commit to HEAD as testcase3 (v1.1)
• Additional tests at the current state:
o Cd .. && rd /q/s renCase && cvs up -dP, get:
TESTcase1.txt << WRONG
testcase2.txt << OK
testcase3.txt << OK
o cvs up -r MyBranch, get:
cvsntsrv server: TESTcase1.txt has been renamed to TESTcase1.txt << Not really
helpful, should be {all lowercase} to {mixed case}
U TESTcase1.txt << OK
P testcase2.txt << WRONG. Didn't get renamed!
cvsntsrv server: testcase3.txt is no longer in the repository << OK
o Cd .. && rd /q/s renCase && cvs up -dPr MyBranch, get:
TESTcase1.txt << OK
TESTcase2.txt << OK
o cvs up -r HEAD. Get:
TESTcase1.txt << BAD
TESTcase2.txt << BAD
testcase3.txt << OK
• So, it seems the case is "sticky" if you straight rename and try to switch
between branches. The customer will need to "check out fresh" to get a branch
with case renames properly, can't just switch within their workspace.
Furthermore, if you rename on a branch without first committing SOMETHING to
that branch, it's going to mess up naming on HEAD as well. I'm going to try
renaming through an intermediate filename next (testcase3 > foo > TESTcase3)
instead, only because that used to be a workaround for renaming to different
case, but might offer some help with the switching, maybe??
o OK, this is odd. When I rename filename > filename.TEMP > FILEname
(committing after each rename), the update, CVS reports the file is "no longer
in the repository". To reproduce:
cvs up -r HEAD
cvsntsrv server: Updating .
U TESTcase1.txt
P testcase2.txt
U testcase3.txt
echo Added on HEAD
>> testcase3.txt && cvs ci -m ""
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.2; previous revision: 1.1
done
echo Added on HEAD
>> testcase3.txt && cvs ci -m ""
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.3; previous revision: 1.2
done
echo Added on HEAD
>> testcase3.txt && cvs ci -m ""
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.4; previous revision: 1.3
done
echo Added on HEAD
>> testcase3.txt && cvs ci -m ""
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.5; previous revision: 1.4
done
echo Added on HEAD
>> testcase3.txt && cvs ci -m ""
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.6; previous revision: 1.5
done
cvs tag -r 1.1 -b MyBranch testcase3.txt
T testcase3.txt
cvs up -r MyBranch
cvsntsrv server: Updating .
cvsntsrv server: TESTcase1.txt has been renamed to TESTcase1.txt
U TESTcase1.txt
P testcase2.txt
P testcase3.txt
echo Added on MyBranch >> testcase3.txt && cvs ci -m "ci on branch"
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.1.2.1; previous revision: 1.1
done
echo Added on MyBranch >> testcase3.txt && cvs ci -m "ci on branch"
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.1.2.2; previous revision: 1.1.2.1
done
echo Added on MyBranch >> testcase3.txt && cvs ci -m "ci on branch"
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.1.2.3; previous revision: 1.1.2.2
done
echo Added on MyBranch >> testcase3.txt && cvs ci -m "ci on branch"
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.1.2.4; previous revision: 1.1.2.3
done
echo Added on MyBranch >> testcase3.txt && cvs ci -m "ci on branch"
cvs commit: Examining .
Checking in testcase3.txt;
/myrepo/testing/renCase/testcase3.txt,v <-- testcase3.txt
new revision: 1.1.2.5; previous revision: 1.1.2.4
done
cvs ren testcase3.txt testcase3.TEMP.txt
cvs rename: Warning: Use rename only as described in the eBook "All About CVS".
cvs ci -m "Rename testcase3 to testcase3.TEMP
cvs commit: Examining .
cvsntsrv server: Examining .
/myrepo/testing/renCase/.directory_history,v <-- directory update
new revision: 1.1.2.3; previous revision: 1.1.2.2
done
cvs ren testcase3.TEMP.txt TESTcase3.txt
cvs rename: Warning: Use rename only as described in the eBook "All About CVS".
cvs ci -m "Rename testcase3.TEMP to TESTcase3"
cvs commit: Examining .
cvsntsrv server: Examining .
/myrepo/testing/renCase/.directory_history,v <-- directory update
new revision: 1.1.2.4; previous revision: 1.1.2.3
done
dir
Volume in drive C is OS
Volume Serial Number is 662A-18BA
Directory of C:\Users\Glen Starrett\Documents\test\europa\testing\renCase
09/26/2014 04:35 PM <DIR> .
09/26/2014 04:35 PM <DIR> ..
09/26/2014 04:33 PM 140 TESTcase1.txt
09/26/2014 04:33 PM 169 testcase2.txt
09/26/2014 04:34 PM 249 TESTcase3.txt
3 File(s) 558 bytes
2 Dir(s) 118,556,545,024 bytes free
cvs up
cvsntsrv server: Updating .
cvsntsrv server: TESTcase3.txt is no longer in the repository
o I think this might be the rename twice bug (6008).
o Do cd .. && rd /q/s renCase && cvs up -dP, get:
U renCase/TESTcase1.txt
U renCase/testcase2.txt
U renCase/testcase3.txt
o Now do cvs up -r MyBranch, get:
C:\Users\Glen Starrett\Documents\test\europa\testing\renCase>cvs up -r MyBranch
cvsntsrv server: Updating .
cvsntsrv server: testcase3.txt has been renamed to
cvs update: unable to rename ./testcase3.txt: No such file or directory
cvsntsrv server: TESTcase1.txt has been renamed to TESTcase1.txt
U TESTcase1.txt
P testcase2.txt
C:\Users\Glen Starrett\Documents\test\europa\testing\renCase>cvs up
? testcase3.txt
cvsntsrv server: Updating .
cvsntsrv server: warning: is not (any longer) pertinent
C:\Users\Glen Starrett\Documents\test\europa\testing\renCase>cvs up
? testcase3.txt
cvsntsrv server: Updating .
<< BAD
o Now try cd .. && rd /q/s renCase && cvs up -dPr MyBranch, get:
TESTcase1.txt
TESTcase2.txt
>> TESTcase3.txt is just gone. Renaming multiple times is still a bad idea.
|