From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ttn@gnuvola.org Newsgroups: gmane.emacs.devel Subject: Re: Connection to emacs CVS broken ? Date: Fri, 16 Mar 2007 07:58:14 -0400 Message-ID: References: <86wt1kw5rp.fsf@lola.quinscape.zz> <4k8xdziuwz.fsf@fencepost.gnu.org> Reply-To: ttn@agora-net.com NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1174046344 22402 80.91.229.12 (16 Mar 2007 11:59:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2007 11:59:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 16 12:58:57 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HSB5E-00032L-ES for ged-emacs-devel@m.gmane.org; Fri, 16 Mar 2007 12:58:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HSB6K-0000w6-OJ for ged-emacs-devel@m.gmane.org; Fri, 16 Mar 2007 07:00:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HSB6G-0000vP-W9 for emacs-devel@gnu.org; Fri, 16 Mar 2007 08:00:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HSB6G-0000v0-7Z for emacs-devel@gnu.org; Fri, 16 Mar 2007 08:00:00 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HSB6F-0000uw-UZ for emacs-devel@gnu.org; Fri, 16 Mar 2007 07:00:00 -0500 Original-Received: from mail.agora-net.com ([67.59.132.6]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HSB58-0003v3-IB for emacs-devel@gnu.org; Fri, 16 Mar 2007 07:58:50 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.50) id 1HSB4Y-0008Lv-10 for emacs-devel@gnu.org; Fri, 16 Mar 2007 07:58:14 -0400 In-reply-to: (message from Richard Stallman on Fri, 16 Mar 2007 01:21:39 -0400) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@agora-net.com X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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: news.gmane.org gmane.emacs.devel:68001 Archived-At: From: Richard Stallman Date: Fri, 16 Mar 2007 01:21:39 -0400 It is important to commit each change with its specific change log entry. Don't do a mass commit! below is some elisp that does ,v file "unparsing". it was omitted from vc-rcs.el changes related to vc-annotate support for RCS since i didn't think it would be useful. however, in this case, we can use it to write new ,v files directly, after a "tree append" operation. something like: (let* ((old (vc-rcs-parse (find-file "OLD,v"))) (new (vc-rcs-parse (find-file "NEW,v"))) (merged (APPEND-NEW-ENTRIES old new))) (set-buffer (generate-new-buffer "GEN,v")) (erase-buffer) (comma-v-unparse merged) (write-file "GEN,v")) someone would have to write APPEND-NEW-ENTRIES, of course, but at least that can be done more at the semantic level... note that verification by a human will still be needed, in any case. thi ____________________________________________________________ (defun comma-v-unparse (tree &optional buffer) "Insert TREE into current buffer in RCS-style masterfile format. Optional second arg BUFFER specifies another buffer to insert into. You can use `comma-v-parse' to get TREE." (setq buffer (get-buffer (or buffer (current-buffer)))) (let ((standard-output buffer) (headers (cdr (assq 'headers tree))) (revisions (cdr (assq 'revisions tree)))) (flet ((spew! (look name finish &optional proc) (princ name) (let ((v (funcall (or proc 'identity) (funcall look name)))) (unless (string= "" v) (unless proc (princ "\t")) (princ v))) (princ ";") (princ finish))) (flet ((hspew (name finish &optional proc) (spew! (lambda (name) (cdr (assq name headers))) name finish proc))) (hspew 'head "\n") (when (assq 'branch headers) (hspew 'branch "\n")) (hspew 'access "\n") (hspew 'symbols "\n" (lambda (ls) (apply 'concat (mapcar (lambda (x) (format "\n\t%s:%s" (car x) (cdr x))) ls)))) (hspew 'locks " ") (hspew 'strict "\n") (hspew 'comment "\n\n\n" (lambda (s) (format "\t@%s@" s)))) (dolist (rev revisions) (princ (car rev)) (princ "\n") (flet ((rlook (name) (cdr (assq name (cdr rev)))) (rspew (name finish &optional proc) (spew! 'rlook name finish proc))) (rspew 'date "\t" (lambda (v) (format-time-string "\t%Y.%m.%d.%H.%M.%S" v))) (rspew 'author "\t" (lambda (v) (concat " " v))) (rspew 'state "\n" (lambda (v) (concat " " v))) (rspew 'branches "\n") (rspew 'next "\n\n")))) (princ "\n") (flet ((spew! (look name finish &optional proc) (princ name) (princ "\n@") (princ (with-temp-buffer (insert (funcall (or proc 'identity) (funcall look name))) (while (search-backward "@" (point-min) t) (insert "@") (forward-char -1)) (buffer-string))) (princ "@\n") (princ finish))) (spew! (lambda (name) (cdr (assq name headers))) 'desc "") (dolist (rev revisions) (princ "\n\n") (princ (car rev)) (princ "\n") (flet ((rlook (name) (cdr (assq name (cdr rev))))) (spew! 'rlook 'log "") (spew! (if (assq :insn (cdr rev)) (let ((s (with-temp-buffer (dolist (cmd (nreverse (rlook :insn))) (case (cadr cmd) (k (insert (format "d%d %d\n" (car cmd) (caddr cmd)))) (i (insert (format "a%d " (1- (car cmd)))) (save-excursion (insert (caddr cmd))) (insert (format "%d\n" (count-lines (point) (point-max)))) (goto-char (point-max))))) (buffer-string)))) `(lambda (x) ,s)) 'rlook) 'text ""))))))