[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cvs update w/merge+conflict does not exit non-zero
From: |
Eric Siegerman |
Subject: |
Re: cvs update w/merge+conflict does not exit non-zero |
Date: |
Tue, 22 Apr 2003 13:31:17 -0400 |
User-agent: |
Mutt/1.2.5i |
On Tue, Apr 22, 2003 at 09:50:22AM +0100, Max Bowsher wrote:
> Mike Burgun wrote:
> > When merging takes place _and_ conflict(s) are produced during a
> > "cvs update", cvs currently exits with a zero status versus what I
> > would expect to be a non-zero status due to the conflict(s).
I'm not sure about that. It's not really success, but not really
an error either (as, say, a permissions problem or a corrupt ,v
file would be).
It'd make perfect sense to exit with "warning" status, if UNIX
had such a convention. Since it doesn't, some thought should go
into whether to classify merge conflicts as "errors" or not.
That said, rcsmerge's exit status is "0 for no overlaps, 1 for
some overlaps [i.e. conflicts], 2 for trouble". CVS should probably
do the same.
*That* said, there have been discussions here before about how
CVS's exit status is unreliable.
> This sounds like issue 73:
> http://ccvs.cvshome.org/issues/show_bug.cgi?id=73
Case in point. That's actually a complaint that the exit status
is inconsistent -- 0 on the update in which the merge is done,
but 1 on subsequent updates while the conflict is still
unresolved.
> Whilst investigating this, it might be a good idea to work out what is going
> on with this code:
> else if (retcode == -1)
> {
> error (1, errno, "fork failed while examining update of %s",
> finfo->fullname);
> }
> The conditional is always false, since retcode is initialized to 0 and never
> used after that.
That's been stale code since 1995 (rev. 1.9 to be specific) :-)
Good catch.
--
| | /\
|-_|/ > Eric Siegerman, Toronto, Ont. address@hidden
| | /
My Wine works. However it crashes about half the time on startup.
Apparently their simulation of windoze API is getting too accurate. :)
- Kyle Sallee