Emacs 22.2 and version control
Mar. 29th, 2008 12:03 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
GNU Emacs 22.2 has added support for bzr (and others) to its version control module. Being able to get diffs, logs and annotations for the current file in the editor rather than using a separate shell is quite a win, and is what I'm used to in contexts where I still use CVS, so I'm pleased with this up to a point.
But...
Committing using the usual VC key binding only commits the current file. That's just about acceptable for underlying tools like CVS where there's no concept of a changeset, but it's completely useless for any modern version control system.
I see from the help for C-x v v that:
If you call this from within a VC dired buffer, and one or more files are marked, it will accept a log message and then operate on each one. The log message will be used as a comment for any register or checkin operations, but ignored when doing checkouts. Attempted lock steals will raise an error.
So might this be the workaround? To get a VC dired buffer you type C-x v d. Unfortunately the actual effect of this is at least several minutes of apparently fruitless disk activity (even when only three or four files have changed). Obviously even if this does ever terminate (I got bored waiting) it's not something you're going to do every commit.
(Yes, I've read the manual and looked for any variables to configure, not that either of these would be particularly sensible default behaviour. No luck.)
RMS recently wrote that:
The GNU Project is not just a collection of software packages. Its intended result is a coherent operating system. It is particularly important therefore that GNU packages should work well with other GNU packages. For instance, we would like Emacs to work well with git or mercurial, but we especially want it to work well with Bzr.
Unfortunately it seems it's not really there yet l-(
(no subject)
Date: 2008-03-29 12:54 pm (UTC)It's a very tough problem too: trying to unify the concepts in Perforce, AccuRev, Subversion, Bazaar, Git, etc. while remaining compatible with CVS, RCS, and SCCS. I wouldn't like to have to do it. I think about it from time to time, but I have always ended up sticking with system-specific modes like p4-mode (http://p4el.sourceforge.net/p4.el.html). It's not general, but at least it works reliably, and just as importantly, it uses the correct concepts and calls them by their correct names.
One of the troubles with a grand unified VC mode is that the concepts have different names in different systems: "depot" or "repository"? "Workspace" or "client"? "Checkin" or "commit" or "submit" or "import"? "Checkout" or "sync" or "export"? "Integrate" or "merge"? It is very annoying to use a system where you need to use and understand one name for a concept in Emacs and another on the command line. But on the other hand "localization" is tricky because the concepts don't always match up neatly: for example, Perforce separates the idea of "sync" (copy file to workspace but read only) and "edit" (declare that you're going to be making changes to the file), while other systems just have "checkout", waiting until checkin to determine if you edited the file or not.
Eric Raymond is on the case (http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01511.html), which doesn't exactly inspire me with confidence.
(no subject)
Date: 2008-03-29 12:57 pm (UTC)