[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.50; vc: missing done in progress message
From: |
Thien-Thi Nguyen |
Subject: |
Re: 23.0.50; vc: missing done in progress message |
Date: |
Thu, 31 Jan 2008 09:34:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
() Glenn Morris <address@hidden>
() 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
- Re: 23.0.50; vc: missing done in progress message, (continued)
- Re: 23.0.50; vc: missing done in progress message, Glenn Morris, 2008/01/29
- Re: 23.0.50; vc: missing done in progress message, Thien-Thi Nguyen, 2008/01/29
- Re: 23.0.50; vc: missing done in progress message, Glenn Morris, 2008/01/29
- Re: 23.0.50; vc: missing done in progress message, Thien-Thi Nguyen, 2008/01/30
- Re: 23.0.50; vc: missing done in progress message, Glenn Morris, 2008/01/30
- Re: 23.0.50; vc: missing done in progress message,
Thien-Thi Nguyen <=
- Re: 23.0.50; vc: missing done in progress message, Stefan Monnier, 2008/01/31