emacs-devel
[Top][All Lists]
Advanced

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

Re: some vc-status updates


From: Tom Tromey
Subject: Re: some vc-status updates
Date: Wed, 09 Jan 2008 19:00:26 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux)

>>>>> "Dan" == Dan Nicolaescu <address@hidden> writes:

Dan> Tom Tromey <address@hidden> 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  <address@hidden>

        * 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)




reply via email to

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