[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc.el,v
From: |
Eric S. Raymond |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc.el,v |
Date: |
Sat, 20 Oct 2007 20:59:36 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Eric S. Raymond <esr> 07/10/20 20:59:36
Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.474
retrieving revision 1.475
diff -u -b -r1.474 -r1.475
--- vc.el 20 Oct 2007 16:32:50 -0000 1.474
+++ vc.el 20 Oct 2007 20:59:36 -0000 1.475
@@ -1244,7 +1244,7 @@
node (lambda (f) (if (vc-backend f) (push f flattened)))))
(nreverse flattened)))
-(defun vc-deduce-fileset (&optional allow-directory-wildcard)
+(defun vc-deduce-fileset (&optional allow-directory-wildcard
allow-unregistered)
"Deduce a set of files and a backend to which to apply an operation.
If we're in VC-dired mode, the fileset is the list of marked files.
@@ -1252,6 +1252,8 @@
the fileset is a singleton containing this file.
If neither of these things is true, but ALLOW-DIRECTORY-WILDCARD is on
and we're in a dired buffer, select the current directory.
+If none of these conditions is met, but ALLOW_UNREGISTERED is in and the
+visited file is not registered, return a singletin fileset containing it.
Otherwise, throw an error."
(cond (vc-dired-mode
(let ((marked (dired-map-over-marks (dired-get-filename) nil)))
@@ -1284,6 +1286,8 @@
(message "All version-controlled files below %s selected."
default-directory)
(list default-directory)))
+ ((and allow-unregistered (not (vc-registered buffer-file-name)))
+ (list buffer-file-name))
(t (error "No fileset is available here."))))
(defun vc-ensure-vc-buffer ()
@@ -1369,7 +1373,7 @@
If the repository file is changed, you are asked if you want to
merge in the changes into your working copy."
(interactive "P")
- (let* ((files (vc-deduce-fileset))
+ (let* ((files (vc-deduce-fileset nil t))
(state (vc-state (car files)))
(model (vc-checkout-model (car files)))
revision)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, (continued)
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/10
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Dan Nicolaescu, 2007/10/11
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2007/10/17
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2007/10/19
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Eric S. Raymond, 2007/10/20
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v,
Eric S. Raymond <=
- [Emacs-diffs] Changes to emacs/lisp/vc.el,v, Stefan Monnier, 2007/10/23