[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs etc/NEWS lisp/ChangeLog lisp/vc.el
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] emacs etc/NEWS lisp/ChangeLog lisp/vc.el |
Date: |
Fri, 20 Nov 2009 06:56:23 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 09/11/20 06:56:22
Modified files:
etc : NEWS
lisp : ChangeLog vc.el
Log message:
(vc-deduce-fileset): Allow non-state changing operations
from a dired buffer.
(vc-dired-deduce-fileset): New function.
(vc-root-diff, vc-print-root-log): Use it.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/etc/NEWS?cvsroot=emacs&r1=1.2118&r2=1.2119
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16683&r2=1.16684
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc.el?cvsroot=emacs&r1=1.740&r2=1.741
Patches:
Index: etc/NEWS
===================================================================
RCS file: /cvsroot/emacs/emacs/etc/NEWS,v
retrieving revision 1.2118
retrieving revision 1.2119
diff -u -b -r1.2118 -r1.2119
--- etc/NEWS 19 Nov 2009 20:22:03 -0000 1.2118
+++ etc/NEWS 20 Nov 2009 06:56:16 -0000 1.2119
@@ -230,6 +230,8 @@
*** When a file is not found, VC will not try to check it out of RCS anymore.
+*** Diff and log operations can be used from dired buffers.
+
*** vc-git changes
**** The new variable vc-git-add-signoff can be used to add a
Index: lisp/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16683
retrieving revision 1.16684
diff -u -b -r1.16683 -r1.16684
--- lisp/ChangeLog 20 Nov 2009 05:44:49 -0000 1.16683
+++ lisp/ChangeLog 20 Nov 2009 06:56:18 -0000 1.16684
@@ -1,5 +1,10 @@
2009-11-20 Dan Nicolaescu <address@hidden>
+ * vc.el (vc-deduce-fileset): Allow non-state changing operations
+ from a dired buffer.
+ (vc-dired-deduce-fileset): New function.
+ (vc-root-diff, vc-print-root-log): Use it.
+
* vc-annotate.el (vc-annotate-show-log-revision-at-line): Pass a
nil LIMIT argument to vc-print-log-internal.
Index: lisp/vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.740
retrieving revision 1.741
diff -u -b -r1.740 -r1.741
--- lisp/vc.el 16 Nov 2009 20:36:11 -0000 1.740
+++ lisp/vc.el 20 Nov 2009 06:56:21 -0000 1.741
@@ -617,7 +617,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
@@ -902,6 +903,10 @@
(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)
@@ -930,6 +935,12 @@
(list buffer-file-name))))
(t (error "No fileset is available here")))))
+(defun vc-dired-deduce-fileset ()
+ (let ((backend (vc-responsible-backend default-directory)))
+ (unless backend (error "Directory not under VC"))
+ (list backend
+ (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
@@ -1601,6 +1612,7 @@
(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
@@ -1937,6 +1949,7 @@
(list nil))))
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs etc/NEWS lisp/ChangeLog lisp/vc.el,
Dan Nicolaescu <=