Problem: Emacs hg-mode can override VC keys
pavv at operamail.com
Thu Sep 1 13:11:43 CDT 2005
----- Original Message -----
From: "Bryan O'Sullivan" <bos at serpentine.com>
To: "P V" <pavv at operamail.com>
Subject: Re: Problem: Emacs hg-mode can override VC keys
Date: Wed, 31 Aug 2005 16:39:35 -0700
> It would be more helpful to know what problems you are trying to
> address, and to have the patch broken into multiple patches, each of
> which does one thing and clearly explains why.
> vc's working model (all operations are on single files) is fundamentally
> unsuited to any modern SCM, so I am suspicious of any attempt to get
> mercurial.el to work closely with it.
Well, I guess I didn't explain my motivation as clearly as I thought.
I can just hear you thinking "Why the heck would he mess up my
well-coded mode like that?!!" Thank you for your restraint. :)
But please hear me out. After all, mercurial.el broke VC before I
Short version: the advantage completing this will unbreak VC when
Mercurial is present. It will even be consistent as far as the
location of modeline indicator (I'm trained to look there). The
disadvantage, as far as I can tell, is that the VC indicators aren't
as clear as mercurial.el's, but that's something to be fixed upstream.
The problem isn't your nice code, it's the design. I know Mercurial
won't fit into VC. I certainly would not suggest trying to shoehorn
all Mercurial commands into VC, so I apologize if that's the
impression I gave. Some commands, however, obviously do have VC
equivalents because you re-used VC keybindings for them! There's no
reason these commands shouldn't work through VC, and some very good
reasons why they should.
For example, as I mentioned, when mercurial.el's "C-x v i" overload
makes they key not work in non-Mercurial working copies. When I tried
it in a SVN checkout, `hg-add' was called. If someone is using more
than one SCM (for example a personal one on their computer because
their work isn't using a distributed system yet) this is a big
So by "tighter integration" I meant using VC for the things it can be
used for, while still having other commands for the "extra" Mercurial
functionality. (PRCS's mode overloads keys the same way, and it
really annoyed me then, too. I think using VC as intended is the
best, simplest way to make sure it works as intended.)
It's not too hard to actually do this, as I've shown. I'm aware of a
few problems in my first pass, but with a change of this nature I
wanted to get discussion going. (I anticipated not being able to work
on it today, but I did.)
(Yes, I am aware that, ironically, I forgot to make
`vc-register'/`hg-add' work even though that started this whole thing.
It was missing many quite major things, including `vc-diff'.)
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18518 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050901/f1c93f0e/vc-hg.p2-0001.obj
More information about the Mercurial