* [PATCH] Testsuite: Unset CVS_SERVER
2008-07-17 10:01 Some cvs related fixes and enhancements Lars Noschinski
@ 2008-07-17 10:01 ` Lars Noschinski
2008-07-17 11:45 ` Johannes Schindelin
2008-07-17 17:53 ` Jeff King
0 siblings, 2 replies; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 10:01 UTC (permalink / raw)
To: git; +Cc: fabian.emmes, Lars Noschinski
From: Fabian Emmes <fabian.emmes@rwth-aachen.de>
The CVS_SERVER environment variable cane cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.
Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
t/t9600-cvsimport.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 1e01e5c..0d7786a 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -5,6 +5,7 @@ test_description='git-cvsimport basic tests'
CVSROOT=$(pwd)/cvsroot
export CVSROOT
+unset CVS_SERVER
# for clean cvsps cache
HOME=$(pwd)
export HOME
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Testsuite: Unset CVS_SERVER
2008-07-17 10:01 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
@ 2008-07-17 11:45 ` Johannes Schindelin
2008-07-17 17:53 ` Jeff King
1 sibling, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2008-07-17 11:45 UTC (permalink / raw)
To: Lars Noschinski; +Cc: git, fabian.emmes
Hi,
On Thu, 17 Jul 2008, Lars Noschinski wrote:
> From: Fabian Emmes <fabian.emmes@rwth-aachen.de>
>
> The CVS_SERVER environment variable cane cause some of the cvsimport tests
s/cane/can/
Otherwise uncontroversial, I'd say.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
* Some cvs related fixes and enhancements v2
@ 2008-07-17 17:00 Lars Noschinski
2008-07-17 17:00 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
0 siblings, 1 reply; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
This patch series
- fixes a small bug in the cvsimport testsuite
- adds support for packed-refs to cvsserver
- adds basic support cvs co -c to cvsserver
Changes to v1:
- do not change output format of req_up (noticed by Johannes Schindelxein)
- test output of the cvs client instead of raw server output
- remove superfluous line from the "cvs co -c" patch
---
git-cvsserver.perl | 34 ++++++++++++++++++++--------------
t/t9400-git-cvsserver-server.sh | 18 ++++++++++++++++++
t/t9600-cvsimport.sh | 1 +
3 files changed, 39 insertions(+), 14 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Testsuite: Unset CVS_SERVER
2008-07-17 17:00 Some cvs related fixes and enhancements v2 Lars Noschinski
@ 2008-07-17 17:00 ` Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add support for packed refs Lars Noschinski
0 siblings, 1 reply; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
From: Fabian Emmes <fabian.emmes@rwth-aachen.de>
The CVS_SERVER environment variable can cause some of the cvsimport tests
to fail. So unset this variable at the beginning of the test script.
Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
t/t9600-cvsimport.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 1e01e5c..0d7786a 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -5,6 +5,7 @@ test_description='git-cvsimport basic tests'
CVSROOT=$(pwd)/cvsroot
export CVSROOT
+unset CVS_SERVER
# for clean cvsps cache
HOME=$(pwd)
export HOME
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] cvsserver: Add support for packed refs
2008-07-17 17:00 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
@ 2008-07-17 17:00 ` Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add testsuite " Lars Noschinski
0 siblings, 1 reply; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
req_update still parses /refs/heads manually. Replace this by
a call to show-ref.
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
git-cvsserver.perl | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index b00d1c2..66aebf8 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -947,21 +947,15 @@ sub req_update
# projects (heads in this case) to checkout.
#
if ($state->{module} eq '') {
- my $heads_dir = $state->{CVSROOT} . '/refs/heads';
- if (!opendir HEADS, $heads_dir) {
- print "E [server aborted]: Failed to open directory, "
- . "$heads_dir: $!\nerror\n";
- return 0;
- }
+ my $showref = `git show-ref --heads`;
print "E cvs update: Updating .\n";
- while (my $head = readdir(HEADS)) {
- if (-f $state->{CVSROOT} . '/refs/heads/' . $head) {
- print "E cvs update: New directory `$head'\n";
- }
- }
- closedir HEADS;
- print "ok\n";
- return 1;
+ for my $line (split '\n', $showref) {
+ if ( $line =~ m% refs/heads/(.*)$% ) {
+ print "E cvs update: New directory `$1'\n";
+ }
+ }
+ print "ok\n";
+ return 1;
}
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] cvsserver: Add testsuite for packed refs
2008-07-17 17:00 ` [PATCH] cvsserver: Add support for packed refs Lars Noschinski
@ 2008-07-17 17:00 ` Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add cvs co -c support Lars Noschinski
0 siblings, 1 reply; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
Check that req_update shows refs, even if all refs are packed.
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
t/t9400-git-cvsserver-server.sh | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index e97aaa6..8120087 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -438,6 +438,13 @@ test_expect_success 'cvs update (-p)' '
test -z "$(cat failures)"
'
+cd "$WORKDIR"
+test_expect_success 'cvs update (module list supports packed refs)' '
+ GIT_DIR="$SERVERDIR" git pack-refs --all &&
+ GIT_CONFIG="$git_config" cvs -n up -d 2> out &&
+ grep "cvs update: New directory \`master'\''" < out
+'
+
#------------
# CVS STATUS
#------------
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] cvsserver: Add cvs co -c support
2008-07-17 17:00 ` [PATCH] cvsserver: Add testsuite " Lars Noschinski
@ 2008-07-17 17:00 ` Lars Noschinski
2008-07-17 17:00 ` [PATCH] testsuite for cvs co -c Lars Noschinski
0 siblings, 1 reply; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
Implement cvs checkout's -c option by returning a list of all "modules".
This is more useful than displaying a perl warning if -c is given.
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
git-cvsserver.perl | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 66aebf8..064952e 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -801,6 +801,18 @@ sub req_co
argsplit("co");
+ # Provide list of modules, if -c was used.
+ if (exists $state->{opt}{c}) {
+ my $showref = `git show-ref --heads`;
+ for my $line (split '\n', $showref) {
+ if ( $line =~ m% refs/heads/(.*)$% ) {
+ print "M $1\t$1\n";
+ }
+ }
+ print "ok\n";
+ return 1;
+ }
+
my $module = $state->{args}[0];
$state->{module} = $module;
my $checkout_path = $module;
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] testsuite for cvs co -c
2008-07-17 17:00 ` [PATCH] cvsserver: Add cvs co -c support Lars Noschinski
@ 2008-07-17 17:00 ` Lars Noschinski
0 siblings, 0 replies; 9+ messages in thread
From: Lars Noschinski @ 2008-07-17 17:00 UTC (permalink / raw)
To: git, gitster; +Cc: lars, fabian.emmes
From: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Check that all branches are displayed.
Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de>
Signed-off-by: Lars Noschinski <lars@public.noschinski.de>
---
t/t9400-git-cvsserver-server.sh | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 8120087..4b91f8d 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -477,4 +477,15 @@ test_expect_success 'cvs status (no subdirs in header)' '
! grep / <../out
'
+#------------
+# CVS CHECKOUT
+#------------
+
+cd "$WORKDIR"
+test_expect_success 'cvs co -c (shows module database)' '
+ GIT_CONFIG="$git_config" cvs co -c > out &&
+ grep "^master[ ]\+master$" < out &&
+ ! grep -v "^master[ ]\+master$" < out
+'
+
test_done
--
1.5.6.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Testsuite: Unset CVS_SERVER
2008-07-17 10:01 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
2008-07-17 11:45 ` Johannes Schindelin
@ 2008-07-17 17:53 ` Jeff King
1 sibling, 0 replies; 9+ messages in thread
From: Jeff King @ 2008-07-17 17:53 UTC (permalink / raw)
To: Lars Noschinski; +Cc: git, fabian.emmes
On Thu, Jul 17, 2008 at 12:01:13PM +0200, Lars Noschinski wrote:
> The CVS_SERVER environment variable cane cause some of the cvsimport tests
> to fail. So unset this variable at the beginning of the test script.
This is definitely an improvement. However, the cvs manual lists a
number of CVS* variables. Perhaps it would be better to simply scrub the
environment of any variable matching that pattern? I don't know how
commonly used some of the other ones are.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-07-17 17:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 17:00 Some cvs related fixes and enhancements v2 Lars Noschinski
2008-07-17 17:00 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add support for packed refs Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add testsuite " Lars Noschinski
2008-07-17 17:00 ` [PATCH] cvsserver: Add cvs co -c support Lars Noschinski
2008-07-17 17:00 ` [PATCH] testsuite for cvs co -c Lars Noschinski
-- strict thread matches above, loose matches on Subject: below --
2008-07-17 10:01 Some cvs related fixes and enhancements Lars Noschinski
2008-07-17 10:01 ` [PATCH] Testsuite: Unset CVS_SERVER Lars Noschinski
2008-07-17 11:45 ` Johannes Schindelin
2008-07-17 17:53 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).