Skip to contentSkip to conversation

Fix t9200 on case insensitive file systems

PATCH In review Torsten Bögershausen 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix t9200 on case insensitive file systems

t9200 defines $CVSROOT where cvs should init its repository $CVSROOT is set to $PWD/cvsroot.
cvs init is supposed to create the repository inside $PWD/cvsroot/CVSROOT

"cvs init" (e.g. version 1.11.23) checks if the last element of the path is "CVSROOT", and if a directory with e.g. $PWD/cvsroot/CVSROOT already exists.

For such a $CVSROOT cvs refuses to init a repository here:
"Cannot initialize repository under existing CVSROOT:

On a case insenstive file system cvsroot and CVSROOT are the same directories and t9200 fails.

Solution: use $PWD/tmp/cvsroot instead of cvsroot $PWD/cvsroot

---
 t/t9200-git-cvsexportcommit.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t9200-git-cvsexportcommit.sh +1 -1
index b59be9a..69934b2 100755
@@ -19,7 +19,7 @@ then
     test_done
 fi
 
-CVSROOT=$PWD/cvsroot
+CVSROOT=$PWD/tmpcvsroot
 CVSWORK=$PWD/cvswork
 GIT_DIR=$PWD/.git
 export CVSROOT CVSWORK GIT_DIR
Signature · 1 line
1.7.12
#1 lore raw

t/t9200-git-cvsexportcommit.sh then · line 22

Quoted 13 lines · Torsten Bögershausen
 t/t9200-git-cvsexportcommit.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t9200-git-cvsexportcommit.sh +1 -1
index b59be9a..69934b2 100755
@@ -19,7 +19,7 @@ then
     test_done
 fi
 
-CVSROOT=$PWD/cvsroot
+CVSROOT=$PWD/tmpcvsroot

FWIW, this looks obviously correct given the code snippet from the cvs version you shared the other day.

Thanks
-Ben

Signature · 6 lines
---------------------------------------------------------------------------------------------------------------------------
Take the risk of thinking for yourself.  Much more happiness,
truth, beauty and wisdom will come to you that way.

-Christopher Hitchens
---------------------------------------------------------------------------------------------------------------------------
#2 lore raw
In reply to Torsten Bögershausen
Quoted 7 lines · Torsten Bögershausen

t9200 defines $CVSROOT where cvs should init its repository $CVSROOT is set to $PWD/cvsroot.
cvs init is supposed to create the repository inside $PWD/cvsroot/CVSROOT

"cvs init" (e.g. version 1.11.23) checks if the last element of the path is "CVSROOT", and if a directory with e.g. $PWD/cvsroot/CVSROOT already exists.

Quoted 7 lines

For such a $CVSROOT cvs refuses to init a repository here:
"Cannot initialize repository under existing CVSROOT:

On a case insenstive file system cvsroot and CVSROOT are the same directories and t9200 fails.

Solution: use $PWD/tmp/cvsroot instead of cvsroot $PWD/cvsroot

Wouldn't tmp/cvsroot have the same problem, since the basename is still cvsroot?

t/t9200-git-cvsexportcommit.sh then · line 22

Quoted 10 lines
t/t9200-git-cvsexportcommit.sh +1 -1
index b59be9a..69934b2 100755
@@ -19,7 +19,7 @@ then
     test_done
 fi
 
-CVSROOT=$PWD/cvsroot
+CVSROOT=$PWD/tmpcvsroot

Ah, but here you do something different, which makes sense. Should I tweak the commit message?

-Peff

#3 lore raw
Quoted 28 lines · Jeff King
Quoted 7 lines · Torsten Bögershausen

t9200 defines $CVSROOT where cvs should init its repository $CVSROOT is set to $PWD/cvsroot.
cvs init is supposed to create the repository inside $PWD/cvsroot/CVSROOT

"cvs init" (e.g. version 1.11.23) checks if the last element of the path is "CVSROOT", and if a directory with e.g. $PWD/cvsroot/CVSROOT already exists.

Quoted 7 lines

For such a $CVSROOT cvs refuses to init a repository here:
"Cannot initialize repository under existing CVSROOT:

On a case insenstive file system cvsroot and CVSROOT are the same directories and t9200 fails.

Solution: use $PWD/tmp/cvsroot instead of cvsroot $PWD/cvsroot

Wouldn't tmp/cvsroot have the same problem, since the basename is still cvsroot?

Quoted 8 lines
t/t9200-git-cvsexportcommit.sh +0 -0
index b59be9a..69934b2 100755
@@ -19,7 +19,7 @@ then
     test_done
 fi
 
Quoted 6 lines

t/t9200-git-cvsexportcommit.sh then · line 22

Quoted 2 lines
t/t9200-git-cvsexportcommit.sh +1 -1
-CVSROOT=$PWD/cvsroot
+CVSROOT=$PWD/tmpcvsroot

Ah, but here you do something different, which makes sense. Should I tweak the commit message?

Yes, please do so.

Thanks for spotting,
/torsten