unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Andre Spiegel <spiegel@gnu.org>, emacs-devel@gnu.org
Subject: Re: Limitations of Emacs' vc when using modern backends
Date: Thu, 15 Dec 2005 15:24:11 -0500	[thread overview]
Message-ID: <87hd9anmt1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <7ilkym1bzu.fsf@lanthane.pps.jussieu.fr> (Juliusz Chroboczek's message of "Thu, 15 Dec 2005 18:55:17 +0100")

>>> 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

  reply	other threads:[~2005-12-15 20:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-15  1:42 Limitations of Emacs' vc when using modern backends Juliusz Chroboczek
2005-12-15  3:37 ` Stefan Monnier
2005-12-15 14:59   ` Juliusz Chroboczek
2005-12-15 17:33     ` Stefan Monnier
2005-12-15 17:55       ` Juliusz Chroboczek
2005-12-15 20:24         ` Stefan Monnier [this message]
2005-12-15 14:37 ` Andre Spiegel

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=87hd9anmt1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=spiegel@gnu.org \
    /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).