From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Limitations of Emacs' vc when using modern backends Date: Thu, 15 Dec 2005 15:24:11 -0500 Message-ID: <87hd9anmt1.fsf-monnier+emacs@gnu.org> 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> <7ilkym1bzu.fsf@lanthane.pps.jussieu.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134683535 20939 80.91.229.2 (15 Dec 2005 21:52:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 21:52:15 +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 22:52:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1En10F-0002Mr-LA for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 22:51:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En10u-0003eh-Gc for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 16:51:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Emzfc-0000cL-GM for emacs-devel@gnu.org; Thu, 15 Dec 2005 15:25:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmzfU-0000Z5-Sb for emacs-devel@gnu.org; Thu, 15 Dec 2005 15:25:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmzfT-0000Yo-Pw for emacs-devel@gnu.org; Thu, 15 Dec 2005 15:25:35 -0500 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmzhC-0008Sh-I8; Thu, 15 Dec 2005 15:27:22 -0500 Original-Received: from alfajor ([65.92.242.250]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051215202412.OUPE23065.tomts43-srv.bellnexxia.net@alfajor>; Thu, 15 Dec 2005 15:24:12 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id CDE01D7611; Thu, 15 Dec 2005 15:24:11 -0500 (EST) Original-To: Juliusz Chroboczek In-Reply-To: <7ilkym1bzu.fsf@lanthane.pps.jussieu.fr> (Juliusz Chroboczek's message of "Thu, 15 Dec 2005 18:55:17 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] 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:47820 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. OK, good. So it's very much like CVS's tag names (from the point of view of the problems it introduces). >> 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. True. And this order is the natural one anyway, so the issue of the race condition was a red herring. Lucky someone's actually thinking here ;-) >> 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. Could you explain why you explicitly call vc-darcs-rev-to-hash in vc-darcs-checkout and vc-darcs-diff ? If it's a feature of darcs itself, it seems like vc-darcs shouldn't need to do the mapping (except for things like the file~rev~ names, but that's done outside vc-darcs.el so you're stuck with it right now). > I haven't checked exhaustively if there are other instances where it might > be useful. It seems like it's only really needed (from vc.el's point of view) at those very few points where we store and/or compare revision names, and AFAICT it's currently only done for the naming of "backup" files file~rev~. > 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). [ In Emacs-22, rather it's not `checkout' but `find-version'. ] Why should `diff' return the canonical identifiers? > (What a pity elisp doesn't have multiple return values). But it does. Not as efficient (syntax-wise or memory&cpu-wise), but that's not an issue here since it's lost in the noise of the backend's execution. > And adding generic support for completion is definitely a good idea. > Bug again it might be premature to aim for having it in 22. I haven't proposed it until now, indeed, although to tell you the truth, I don't see what kind of controversy there might be about its shape. Stefan