From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: patch for documentation about version control Date: 10 Nov 2004 04:00:36 -0500 Message-ID: References: <87vfce289d.fsf@floss.red-bean.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100077329 15682 80.91.229.6 (10 Nov 2004 09:02:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Nov 2004 09:02:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 10 10:01:57 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CRoMX-00033L-00 for ; Wed, 10 Nov 2004 10:01:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRoUx-0002mi-RC for ged-emacs-devel@m.gmane.org; Wed, 10 Nov 2004 04:10:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRoU5-0002lF-2l for emacs-devel@gnu.org; Wed, 10 Nov 2004 04:09:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRoU4-0002kY-1m for emacs-devel@gnu.org; Wed, 10 Nov 2004 04:09:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRoU3-0002kP-PR for emacs-devel@gnu.org; Wed, 10 Nov 2004 04:09:43 -0500 Original-Received: from [207.245.121.140] (helo=colo.agora-net.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CRoLE-0006Nh-Np for emacs-devel@gnu.org; Wed, 10 Nov 2004 04:00:36 -0500 Original-Received: from ttn by colo.agora-net.com with local (Exim 4.41) id 1CRoLE-0002JM-4V for emacs-devel@gnu.org; Wed, 10 Nov 2004 04:00:36 -0500 Original-To: emacs-devel@gnu.org In-Reply-To: Stefan Monnier's message of "Tue, 09 Nov 2004 16:34:14 -0500" Original-Lines: 78 X-Mailer: Gnus v5.7/Emacs 20.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29702 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29702 Stefan Monnier writes: I'd also suggest we don't recommend RCS any more. although RCS is old (and somewhat quirky), it is still useful. i'm about to check in the following (changing the names to have vc-rcs- prefix), which should extend the lifetime of RCS ,v files if not the RCS executable programs installed in ${bindir}, for a while yet. i suppose support for ,v file munging does not conflict directly w/ not recommending RCS any more, but it still seems to me a slightly inconsistent message. thi _____________________________________________ ;;; comma-v.el ;;; ;;; Rel:standalone-comma-v-el-2-0-0 ;;; ;;; Copyright (C) 2004 Thien-Thi Nguyen ;;; This file is part of ttn's personal elisp library, released under GNU ;;; GPL with ABSOLUTELY NO WARRANTY. See the file COPYING for details. ;;; ;;; Description: Read and write RCS-style masterfiles directly. ;;; Commentary: ;; Emacs is forever, but who knows whether or not ci(1) and co(1) will be ;; around in 20 years? In any case, the true test for a data format is ;; how many programs can (easily) munge it. Long live the ,v files! ;; ;; This library provides, at heart, two reciprocal functions: ;; (comma-v-parse &optional buffer) => TREE ;; (comma-v-unparse TREE &optional buffer) ;; ;; These have been tested only on simple ASCII files w/ "linear" revisions ;; (no branches, locks, access lists or other things). There is some ;; quirkiness w/ RCS whitespace that probably will result in subtle errors. ;; Ahh, code-enhancement opportunities... ;; ;; Anyway, for the morbidly curious, here is the simple testing command: ;; ;; (defun comma-v-roundtrip (comma-v-file) ;; (interactive "fRCS masterfile: ") ;; (let* ((buf (find-file comma-v-file)) ;; (tree (comma-v-parse buf))) ;; (switch-to-buffer "*comma-v-roundtrip*") ;; (erase-buffer) ;; (comma-v-unparse tree) ;; (goto-char (point-min)) ;; (split-window-vertically) ;; (switch-to-buffer-other-window buf) ;; (goto-char (point-min)))) ;; ;; You can then try `M-x compare-windows' and `C-u M-x compare-windows'. ;; Then for more fun, try it on a CVS-created ,v file. This is known to ;; reveal miscompares for old ,v files where the year was stored as a two- ;; digit number (for example, 98 instead of 1998). Obviously, overwriting ;; with a four-digit year is one way to prevent subsequent miscompares. ;; ;; Also provided are the functions: ;; (comma-v-annotate-command file buffer &optional revision) ;; (comma-v-annotate-current-time) ;; (comma-v-annotate-time) ;; (comma-v-annotate-extract-revision-at-line) ;; (setup-anticipatory-vc-rcs-annotation) ;; ;; The last is a command that makes `C-x v g' work for RCS files ;; by hooking the other functions into the Emacs VC framework. ;; After some refinement they should be added to Emacs directly ;; along w/ -parse and -unparse, and comma-v.el declared obsolete. ;;; Code: [snipped (to be added to vc-rcs.el in the next couple days) --ttn]