From: Junio C Hamano <gitster@pobox.com>
To: Jean-Luc Herren <jlh@gmx.ch>
Cc: Robin Rosenberg <robin.rosenberg.lists@dewire.com>, git@vger.kernel.org
Subject: Re: [PATCH] git-cvsimport: Detect cvs without support for server mode
Date: Tue, 05 Feb 2008 01:08:26 -0800 [thread overview]
Message-ID: <7vsl07epo5.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <47A72EE5.2080904@gmx.ch> (Jean-Luc Herren's message of "Mon, 04 Feb 2008 16:27:33 +0100")
Jean-Luc Herren <jlh@gmx.ch> writes:
> Note that if cvs misses the server subcommand, it will spit out
> the list of available commands to stderr, which is not useful in
> this situation. It seemed to me that redirecting stderr to
> /dev/null is a bad idea, as cvs (when it works properly) might
> potentially print out useful informations to stderr. Maybe
> someone has an idea about how to eliminate the help message
> properly.
> ...
> @@ -340,7 +343,11 @@ sub conn {
> $self->{'socketo'}->write("valid-requests\n");
> $self->{'socketo'}->flush();
>
> - chomp(my $rep=$self->readline());
> + my $rep=$self->readline();
> + if (!defined $rep) {
> + die $ownserver ? "'cvs server' failed; make sure you have a cvs with server support" : "Remote end hung up unexpectedly";
> + }
> + chomp $rep;
I guess this is probably the best we can do without bending
backwards too much.
If we do not have cvs with server support, is there a fallback
method we can still use to run cvsps?
> diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
> index 7706430..d8cbfd0 100755
> --- a/t/t9600-cvsimport.sh
> +++ b/t/t9600-cvsimport.sh
> @@ -10,6 +10,13 @@ then
> exit
> fi
>
> +if echo -n | cvs server 2>&1 | grep 'Unknown command' > /dev/null
> +then
> + say 'skipping cvsimport tests, cvs has support for server mode'
> + test_done
> + exit
> +fi
Do you mean "has to support server" or "does not have support for"?
next prev parent reply other threads:[~2008-02-05 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 15:28 git cvsimport fails noisily if cvs has no server support Jean-Luc Herren
2008-02-03 18:08 ` Robin Rosenberg
2008-02-04 15:27 ` [PATCH] git-cvsimport: Detect cvs without support for server mode Jean-Luc Herren
2008-02-05 9:08 ` Junio C Hamano [this message]
2008-02-05 13:03 ` Jean-Luc Herren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vsl07epo5.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jlh@gmx.ch \
--cc=robin.rosenberg.lists@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).