Книга: Learning GNU Emacs, 3rd Edition
12.10 Extending VC
12.10 Extending VC
VC was designed from the beginning to be usable as a front-end for multiple version control systems. The code that actually runs the version control tools is carefully isolated from the user-level package logic in such a way that plugging in new systems is not very hard. VC's author originally wrote it to handle SCCS and RCS; CVS support was added later, by a different person, without much difficulty, and Subversion support was an even simpler variant of the CVS code.
There are a couple of extensions to Emacs for users of ClearCase, a popular commercial project-management system. Whether this code is accepted into the GNU Emacs distribution, considering the FSF's hostile attitude towards non-freeware, is another question. So far they have not been, but you can obtain the packages over the internet. At the time of this writing, the best choice appears to be clearcase.el. The author of the first implementation, VC-ClearCase, has even stated that he's switched over to clearcase.el. The current download site is http://members.verizon.net/~vze24fr2/EmacsClearCase/. If it's moved by the time you read this, hopefully a Google search will steer you in the right direction.
By the time you read this book, then, your VC may well handle additional systems besides the ones we have described here (though CVS and Subversion are likely to remain the most popular ones for the foreseeable future). If you are a skilled Emacs Lisp programmer (or would like to become one) and have your own favorite version control system, by all means hack the source code—extend VC to use it, and share your results so that everyone benefits.
- 12.1 The Uses of Version Control
- 12.2 Version Control Concepts
- 12.3 How VC Helps with Basic Operations
- 12.4 Editing Comment Buffers
- 12.5 VC Command Summary
- 12.6 VC Mode Indicators
- 12.7 Which Version Control System?
- 12.8 Individual VC Commands
- 12.9 Customizing VC
- 12.10 Extending VC
- 12.11 What VC Is Not
- 12.12 Using VC Effectively
- 12.13 Comparing with Ediff