From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juliusz Chroboczek Newsgroups: gmane.emacs.devel Subject: Re: Limitations of Emacs' vc when using modern backends Date: Thu, 15 Dec 2005 18:55:17 +0100 Message-ID: <7ilkym1bzu.fsf@lanthane.pps.jussieu.fr> References: <7i8xunt9ub.fsf@lanthane.pps.jussieu.fr> <87wti73ue7.fsf-monnier+emacs@gnu.org> <7ihd9a76f3.fsf@lanthane.pps.jussieu.fr> <87r78e1e4v.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134676921 30371 80.91.229.2 (15 Dec 2005 20:02:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 20:02:01 +0000 (UTC) Cc: Andre Spiegel , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 15 21:01:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmzFl-0003jn-RX for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 20:59:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmzGQ-0008UA-H1 for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 14:59:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmxKv-00049a-70 for emacs-devel@gnu.org; Thu, 15 Dec 2005 12:56:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmxKt-000491-9P for emacs-devel@gnu.org; Thu, 15 Dec 2005 12:56:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmxKs-00048h-98 for emacs-devel@gnu.org; Thu, 15 Dec 2005 12:56:10 -0500 Original-Received: from [134.157.0.129] (helo=shiva.jussieu.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmxN5-00006O-Fd; Thu, 15 Dec 2005 12:58:27 -0500 Original-Received: from hydrogene.pps.jussieu.fr (hydrogene.pps.jussieu.fr [134.157.168.1]) by shiva.jussieu.fr (8.13.5/jtpda-5.4) with ESMTP id jBFHtLIB049237 ; Thu, 15 Dec 2005 18:55:21 +0100 (CET) X-Ids: 166 Original-Received: from lanthane.pps.jussieu.fr (lanthane.pps.jussieu.fr [134.157.168.57]) by hydrogene.pps.jussieu.fr (8.13.4/jtpda-5.4) with ESMTP id jBFHtHgq014034 ; Thu, 15 Dec 2005 18:55:17 +0100 Original-Received: from jch by lanthane.pps.jussieu.fr with local (Exim 4.60) (envelope-from ) id 1EmxK1-0001ck-7y; Thu, 15 Dec 2005 18:55:17 +0100 Original-To: Stefan Monnier In-Reply-To: <87r78e1e4v.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 15 Dec 2005 12:33:42 -0500") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.2 (shiva.jussieu.fr [134.157.0.166]); Thu, 15 Dec 2005 18:55:22 +0100 (CET) X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Miltered: at shiva.jussieu.fr with ID 43A1AE09.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! 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:47809 Archived-At: >> If multiple revisions match, the latest one is chosen. > And this is a feature of vc-darcs rather than of darcs itself, right? No, it's actually a feature of Darcs itself. > The same thing proably happens for you: "Update" may stand for > "Update version number to 1.3" at some point and to "Update version > number to 1.6" at the other, so the "vc-darcs.el~Update" can become > out of date as well. Yes, exactly. > The only problem I see with `canonical-revision' is that for some backends > it may be very costly (for CVS it requires a round trip to the repository), > and it may suffer from race conditions. Good point about the cost (see below). On the other hand, there's no race condition if you do things in the right order: first normalise the version, then fetch the file from the backend using the canonical identifier. > Now `canonical-revision' is more general, but I'm wondering: where would it > be used other than in `vc-version-other-window'? In the current vc-darcs, it's also used by vc-diff. I haven't checked exhaustively if there are other instances where it might be useful. I suggest that for backends that need it vc-BACKEND-canonical-revision should be compulsory, and we should optionally allow checkout and diff to return the canonical identifier(s). (What a pity elisp doesn't have multiple return values). I believe that the former should be considered for 22, while the latter is something we might need more time to experiment with. And adding generic support for completion is definitely a good idea. Bug again it might be premature to aim for having it in 22. Juliusz