bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4677: marked as done (allow VC operations from dired)


From: Emacs bug Tracking System
Subject: bug#4677: marked as done (allow VC operations from dired)
Date: Fri, 20 Nov 2009 16:45:08 +0000

Your message dated Fri, 20 Nov 2009 08:37:09 -0800 (PST)
with message-id <200911201637.nAKGb9go024620@godzilla.ics.uci.edu>
and subject line Re: bug#4677: allow VC operations from dired
has caused the Emacs bug report #4677,
regarding allow VC operations from dired
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4677: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4677
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
--- Begin Message --- Subject: allow VC operations from dired Date: Thu, 8 Oct 2009 13:19:59 -0700 (PDT)
This patch allows VC operations to be run from dired.
State changing VC operations are not supported. 
(only the various variations of log and diff)

OK to check in?

Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.732
diff -u -3 -p -r1.732 vc.el
--- vc.el       3 Oct 2009 18:29:26 -0000       1.732
+++ vc.el       8 Oct 2009 20:17:08 -0000
@@ -634,7 +634,8 @@
 (require 'vc-dispatcher)
 
 (eval-when-compile
-  (require 'cl))
+  (require 'cl)
+  (require 'dired))
 
 (unless (assoc 'vc-parent-buffer minor-mode-alist)
   (setq minor-mode-alist
@@ -889,6 +903,10 @@ current buffer."
     (cond
      ((derived-mode-p 'vc-dir-mode)
       (vc-dir-deduce-fileset state-model-only-files))
+     ((derived-mode-p 'dired-mode)
+      (if observer
+         (vc-dired-deduce-fileset)
+       (error "State changing VC operations not supported in `dired-mode'")))
      ((setq backend (vc-backend buffer-file-name))
       (if state-model-only-files
        (list backend (list buffer-file-name)
@@ -921,4 +939,9 @@
 
+
+(defun vc-dired-deduce-fileset ()
+  (list (vc-responsible-backend default-directory)
+       (dired-map-over-marks (dired-get-filename nil t) nil)))
+
 (defun vc-ensure-vc-buffer ()
   "Make sure that the current buffer visits a version-controlled file."
   (cond
@@ -1590,6 +1613,7 @@ saving the buffer."
     (when buffer-file-name (vc-buffer-sync not-urgent))
     (let ((backend
           (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
+                ((derived-mode-p 'dired-mode) (vc-responsible-backend 
default-directory))
                 (vc-mode (vc-backend buffer-file-name))))
          rootdir working-revision)
       (unless backend
@@ -1881,6 +1905,7 @@ If WORKING-REVISION is non-nil, leave th
   (interactive)
   (let ((backend
         (cond ((derived-mode-p 'vc-dir-mode)  vc-dir-backend)
+              ((derived-mode-p 'dired-mode) (vc-responsible-backend 
default-directory))
               (vc-mode (vc-backend buffer-file-name))))
        rootdir working-revision)
     (unless backend



--- End Message ---
--- Begin Message --- Subject: Re: bug#4677: allow VC operations from dired Date: Fri, 20 Nov 2009 08:37:09 -0800 (PST)
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

  > > Stefan, any reason not to install this patch (the up to date version of 
it)?
  > 
  > Not that I know,

Done. Thanks.

--- End Message ---

reply via email to

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