From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: some vc-status updates Date: Wed, 09 Jan 2008 19:00:26 -0700 Message-ID: References: <200801090728.m097Son4004816@oogie-boogie.ics.uci.edu> Reply-To: Tom Tromey NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199932362 25109 80.91.229.12 (10 Jan 2008 02:32:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 02:32:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 10 03:33:04 2008 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 1JCnE5-0003ep-Ms for ged-emacs-devel@m.gmane.org; Thu, 10 Jan 2008 03:33:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCnDi-0000WS-5s for ged-emacs-devel@m.gmane.org; Wed, 09 Jan 2008 21:32:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCnDd-0000Ug-04 for emacs-devel@gnu.org; Wed, 09 Jan 2008 21:32:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCnDa-0000Rl-QU for emacs-devel@gnu.org; Wed, 09 Jan 2008 21:32:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCnDa-0000Re-Fo for emacs-devel@gnu.org; Wed, 09 Jan 2008 21:32:30 -0500 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCnDa-0002NQ-6s for emacs-devel@gnu.org; Wed, 09 Jan 2008 21:32:30 -0500 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m0A2WTvL032696; Wed, 9 Jan 2008 21:32:29 -0500 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0A2WSeP031265; Wed, 9 Jan 2008 21:32:28 -0500 Original-Received: from opsy.redhat.com (ton.yyz.redhat.com [10.15.16.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0A2WSw6006943; Wed, 9 Jan 2008 21:32:28 -0500 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 81BBF5089BD; Wed, 9 Jan 2008 19:00:26 -0700 (MST) X-Attribution: Tom In-Reply-To: <200801090728.m097Son4004816@oogie-boogie.ics.uci.edu> (Dan Nicolaescu's message of "Tue\, 08 Jan 2008 23\:28\:45 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:86674 Archived-At: >>>>> "Dan" == Dan Nicolaescu writes: Dan> Tom Tromey writes: >> This adds a bunch of functionality to vc-status. Dan> Thanks, I checked this in. Thanks. I've appended a couple more simple bindings. >> * Updates. Can you do a full-directory update in VC? Dan> Probably not. But update needs a bit of work anyway: it does not work Dan> for VCSes that only do whole repository updates at a time (hg, git). We can always error and tell the user that he has to do something else. Or, we could do a full tree update and just show a subset of what happens. I don't know which is best. For DVCs I think we can provide push/pull commands as well. >> * A new backend method for "ignore". >> * Saving buffers should probably update the vc-status buffer. Dan> PCL-CVS does that. Can that code be "stolen"? Probably. I'm taking all the bindings from pcl-cvs, though not any implementations yet. Tom ChangeLog: 2008-01-10 Tom Tromey * vc.el (vc-status-unmark-all-files): New function. (vc-status-unmark-all-files): Likewise. (vc-status-mode-map): Add bindings. Index: vc.el =================================================================== RCS file: /sources/emacs/emacs/lisp/vc.el,v retrieving revision 1.510 diff -u -r1.510 vc.el --- vc.el 9 Jan 2008 07:21:07 -0000 1.510 +++ vc.el 10 Jan 2008 02:14:21 -0000 @@ -2552,8 +2554,10 @@ (suppress-keymap map) ;; Marking. (define-key map "m" 'vc-status-mark-file) + (define-key map "M" 'vc-status-mark-all-files) (define-key map "u" 'vc-status-unmark-file) (define-key map "\C-?" 'vc-status-unmark-file-up) + (define-key map "\M-\C-?" 'vc-status-unmark-all-files) ;; Movement. (define-key map "n" 'vc-status-next-line) (define-key map " " 'vc-status-next-line) @@ -2627,6 +2631,16 @@ (ewoc-invalidate vc-status crt) (vc-status-next-line 1))) +(defun vc-status-mark-all-files () + "Mark all files." + (interactive) + (ewoc-map + (lambda (file) + (unless (vc-status-fileinfo->marked file) + (setf (vc-status-fileinfo->marked file) t) + t)) + vc-status)) + (defun vc-status-unmark-file () "Unmark the current file and move to the next line." (interactive) @@ -2648,6 +2662,16 @@ (ewoc-invalidate vc-status prev) (vc-status-move-to-goal-column))) +(defun vc-status-unmark-all-files () + "Unmark all files." + (interactive) + (ewoc-map + (lambda (file) + (when (vc-status-fileinfo->marked file) + (setf (vc-status-fileinfo->marked file) nil) + t)) + vc-status)) + (defun vc-status-register () "Register the marked files, or the current file if no marks." (interactive)