From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org, Ulrich Neumerkel <ulrich@complang.tuwien.ac.at>
Subject: Re: 23.0.50; vc: missing done in progress message
Date: Thu, 31 Jan 2008 09:34:52 +0100 [thread overview]
Message-ID: <8763xaieab.fsf@ambire.localdomain> (raw)
In-Reply-To: <umwspq7qy9.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 30 Jan 2008 19:56:46 -0500")
() Glenn Morris <rgm@gnu.org>
() Wed, 30 Jan 2008 19:56:46 -0500
[recipe] and message: "Running svn diff filename...OK = 0"
Anyway, the only point I'm trying to make is that "OK = 0" is useless
as a status message, because it could mean anything:
1) The diff command completed succesfully (exit status 0 in a shell
command sense). There may or may not be differences.
2) The diff command failed (0 is false in a C sense).
3) There were no differences (the GNU diff exit status convention).
Now I'm confused. Before, i was moderately sure that the
convention (case 3) was universal. Here is a quick survey of a
the documentation for the "diff" functionality for a subset of the
backends:
* RCS rcsdiff(1)
Exit status is 0 for no differences during any comparison, 1 for
some differences, 2 for trouble.
* CVS "(cvs) Exit status"
It will return a successful status if it found no differences,
or a failure status if there were differences or if there was an
error. Because this behavior provides no good way to detect
errors, in the future it is possible that `cvs diff' will be
changed to behave like the other CVS commands.
* Git git-diff(1)
--exit-code
Make the program exit with codes similar to diff(1). That is,
it exits with 1 if there were differences and 0 means no
differences.
[An option, but one that vc-git.el uses unconditionally. --ttn]
* SVN "svn diff help" output
[no mention of exit value]
* HG http://www.selenic.com/mercurial/hg.1.html
[no mention of exit value]
* Bzr http://doc.bazaar-vcs.org/bzr.dev/en/user-reference/bzr_man.html#diff
Exit values:
1 - changed 2 - unrepresentable changes 3 - error 0 - no change
I suppose SVN follows CVS, and HG and others follow the rest, and
would be very surprised to learn of a backend that deliberately
(by design) did not follow this convention.
Something like "...done" or "...failed" would be a lot clearer IMO.
Agreed. Up-thread, i mentioned all the branches in the vc-diff
code path. I think a good approach is to coalesce all paths to
end up in vc-diff-finish and add the human-friendly notification
there. If no one beats me to it, i'll look into it in a week.
thi
next prev parent reply other threads:[~2008-01-31 8:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-27 23:12 23.0.50; vc: missing done in progress message Ulrich Neumerkel
2008-01-28 4:08 ` Thien-Thi Nguyen
2008-01-28 7:57 ` Ulrich Neumerkel
2008-01-28 9:27 ` Thien-Thi Nguyen
2008-01-28 10:00 ` Ulrich Neumerkel
2008-01-28 10:39 ` Thien-Thi Nguyen
2008-01-29 8:35 ` Glenn Morris
2008-01-29 8:51 ` Thien-Thi Nguyen
2008-01-29 20:04 ` Glenn Morris
2008-01-30 8:06 ` Thien-Thi Nguyen
2008-01-31 0:56 ` Glenn Morris
2008-01-31 8:34 ` Thien-Thi Nguyen [this message]
2008-01-31 14:44 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763xaieab.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=ulrich@complang.tuwien.ac.at \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).