[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New VC mode -- review request

From: Eric S. Raymond
Subject: New VC mode -- review request
Date: Wed, 3 Oct 2007 06:35:02 -0400
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

I am the original author of the VC mode shipped with Emacs, back in 1992-1993.
Its design was well matched to the file-oriented version-control systems 
(VCSes) of its day, and it has proven a useful tool.  But it has long been in
need of a rewrite, for two reasons:

(1) The code has accreted cruft over the years, and

(2) the design is poorly matched to modern changeset-oriented VCSes,
beginning with Subversion and including third-generation systems such
as Mercurial and Bazaar.

Some months ago I set out to fix these problems.  The principal goal of the 
project was to change VC so that its primitive operations (notably
checkin/commit) take sets of files as arguments rather than single files.

The new VC implementation has two layers: a set of back-ends specific
to each VCS, and a front end that contains VC-independent control an UI logic 

Over the summer I worked with Stefan Monnier and a test group (copied)
on qualifying this code.  The most significant event in this process
was a felicitous mistake.

Due to a CVS command error on my part, the new back-end code and a
version of the front end with old control behavior but using the new
back ends got checked into CVS HEAD rather than a branch.  Fortunately,
the new back-end code functioned without a hitch and Stefan decided
reverting it was not necessary,

Now I think it has come time for the front end to be merged.  I have
been using it in my everyday development work with Subversion for months.
Stefan asked me to submit it to this list for final review, and I am
doing so.  Please find it attached.

Here are the user-visible changes you should expect relative to what's
in the manual:

* The following commands now operate on filesets rather than files.  

          vc-next-action = C-x v v
          vc-diff = C-x v =
          vc-print-log = C-x v l 
          vc-revert = C-x v u
          vc-rollback = C-x v c
          vc-update = C-x v +

  The current fileset is either (a) one file, when you are visiting a
  buffer for a file under version control, or (b) marked files
  selected in a VC Dired buffer. If you are in a derived buffer such
  as a log or diff buffer, the current fileset will be that associated
  with the parent buffer.

* In particular, C-x v v on a fileset of edited files should produce a
  single commit rather than a separate commit for each file.  This is the
  big feature the mode rewrite was aimed at.

* In VC Dired mode, you must explicitly mark files to put them in a fileset.
  The old behavior of operating on the file named on the current line has
  been switched off.

* vc-diff works slightly differently.  In the new interface you never 
  explicitly give it a file or directory; instead it operates on the current
  fileset.  As a special exception, if you run diff while visiting a buffer
  that VC knows nothing about (such as a Dired listing) and it thus cannot 
  deduce a fileset, it will act on all version-controlled files at and below
  the current directory.

* The prefix argument of vc-cancel-version is no longer processed.
  There is an equivalent command (vc-rollback) also bound to C-x v c,
  but it always reverts associated buffers.  The old C-u
  vc-cancel-version behavior was all three of dangerous, hard to
  document, and prone to variation across back ends; we're better off
  without it.

Changes other than these are probably bugs and you should report them.  

You need not restrict criticism to outright bugs; the user interface hasn't
been reviewed or refreshed in a very long time before this, and it is
possible we could be doing things more gracefully.
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: vc.el
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]