[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109248: In C-x v L and C-x v D, prom
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109248: In C-x v L and C-x v D, prompt for directory if there is no default backend. |
Date: |
Sat, 28 Jul 2012 22:18:51 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109248
fixes bug: http://debbugs.gnu.org/7350
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2012-07-28 22:18:51 +0800
message:
In C-x v L and C-x v D, prompt for directory if there is no default backend.
* lisp/vc/vc.el (vc-root-diff, vc-print-root-log): Prompt for a
directory if vc-deduce-backend returns nil.
modified:
lisp/ChangeLog
lisp/vc/vc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-07-28 11:21:43 +0000
+++ b/lisp/ChangeLog 2012-07-28 14:18:51 +0000
@@ -12,6 +12,9 @@
2012-07-28 Chong Yidong <address@hidden>
+ * vc/vc.el (vc-root-diff, vc-print-root-log): Prompt for a
+ directory if vc-deduce-backend returns nil (Bug#7350).
+
* simple.el (delete-trailing-lines): New option.
(delete-trailing-whitespace): Obey it (Bug#11879).
=== modified file 'lisp/vc/vc.el'
--- a/lisp/vc/vc.el 2012-07-11 23:13:41 +0000
+++ b/lisp/vc/vc.el 2012-07-28 14:18:51 +0000
@@ -1757,10 +1757,15 @@
(call-interactively 'vc-version-diff)
(when buffer-file-name (vc-buffer-sync not-urgent))
(let ((backend (vc-deduce-backend))
+ (default-directory default-directory)
rootdir working-revision)
- (unless backend
- (error "Buffer is not version controlled"))
- (setq rootdir (vc-call-backend backend 'root default-directory))
+ (if backend
+ (setq rootdir (vc-call-backend backend 'root default-directory))
+ (setq rootdir (read-directory-name "Directory for VC root-diff: "))
+ (setq backend (vc-responsible-backend rootdir))
+ (if backend
+ (setq default-directory rootdir)
+ (error "Directory is not version controlled")))
(setq working-revision (vc-working-revision rootdir))
;; VC diff for the root directory produces output that is
;; relative to it. Bind default-directory to the root directory
@@ -2213,10 +2218,15 @@
(t
(list (when (> vc-log-show-limit 0) vc-log-show-limit)))))
(let ((backend (vc-deduce-backend))
+ (default-directory default-directory)
rootdir working-revision)
- (unless backend
- (error "Buffer is not version controlled"))
- (setq rootdir (vc-call-backend backend 'root default-directory))
+ (if backend
+ (setq rootdir (vc-call-backend backend 'root default-directory))
+ (setq rootdir (read-directory-name "Directory for VC root-log: "))
+ (setq backend (vc-responsible-backend rootdir))
+ (if backend
+ (setq default-directory rootdir)
+ (error "Directory is not version controlled")))
(setq working-revision (vc-working-revision rootdir))
(vc-print-log-internal backend (list rootdir) working-revision nil limit)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109248: In C-x v L and C-x v D, prompt for directory if there is no default backend.,
Chong Yidong <=