From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: 23.0.50; vc: missing done in progress message Date: Thu, 31 Jan 2008 09:34:52 +0100 Message-ID: <8763xaieab.fsf@ambire.localdomain> References: <87r6g2zj68.fsf@ambire.localdomain> <87tzkx10bz.fsf@ambire.localdomain> <9l7ihs4cut.fsf@fencepost.gnu.org> <87prvj3fg4.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201770509 25841 80.91.229.12 (31 Jan 2008 09:08:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Jan 2008 09:08:29 +0000 (UTC) Cc: emacs-devel@gnu.org, Ulrich Neumerkel To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 31 10:08:49 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JKVPb-0003b7-TA for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2008 10:08:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKVPA-0007En-IK for ged-emacs-devel@m.gmane.org; Thu, 31 Jan 2008 04:08:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JKVP6-0007ES-Cq for emacs-devel@gnu.org; Thu, 31 Jan 2008 04:08:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JKVP4-0007E7-Fw for emacs-devel@gnu.org; Thu, 31 Jan 2008 04:08:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JKVP4-0007E4-DW for emacs-devel@gnu.org; Thu, 31 Jan 2008 04:08:14 -0500 Original-Received: from ppp-48-32.21-151.libero.it ([151.21.32.48] helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JKVP0-0001kk-Hh; Thu, 31 Jan 2008 04:08:10 -0500 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1JKUsm-00020Z-FB; Thu, 31 Jan 2008 09:34:52 +0100 In-Reply-To: (Glenn Morris's message of "Wed, 30 Jan 2008 19:56:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Greylist: delayed 1883 seconds by postgrey-1.27 at monty-python; Thu, 31 Jan 2008 04:08:10 EST X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87844 Archived-At: () Glenn Morris () 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