aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2020-07-02 01:08:18 +0300
committerJuri Linkov2020-07-02 01:08:18 +0300
commitc70a3a41630a39283f10f183cefb4643a6d424cc (patch)
tree3dfd7c8d864d035a14e9b104067be66e89c3afe7
parentaa6c35e95f8f5014894c3c8db33524b70d4ee055 (diff)
downloademacs-c70a3a41630a39283f10f183cefb4643a6d424cc.tar.gz
emacs-c70a3a41630a39283f10f183cefb4643a6d424cc.zip
Revert feature added in bfd96e995d using project directories in vc (bug#41821)
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/vc/vc-dir.el2
-rw-r--r--lisp/vc/vc-hooks.el5
-rw-r--r--lisp/vc/vc.el6
4 files changed, 3 insertions, 14 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 930c00cccdf..fc5c215d2a7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -197,10 +197,6 @@ The relevant commands are those that don't change the VC state.
197The non-file buffers which can use VC commands are those that have 197The non-file buffers which can use VC commands are those that have
198their 'default-directory' under VC. 198their 'default-directory' under VC.
199 199
200*** 'M-n' now works in minibuffer prompts of VC commands.
201Typing 'M-n' in the minibuffer that prompts for a VC directory in VC
202commands now retrieves directories of previously used VC projects.
203
204*** New command 'vc-dir-root' uses the root directory without asking. 200*** New command 'vc-dir-root' uses the root directory without asking.
205 201
206*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and 202*** New commands 'vc-dir-mark-registered-files' (bound to '* r') and
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 46be9b73801..cdf8ab984e8 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1366,7 +1366,7 @@ These are the commands available for use in the file status buffer:
1366 ;; Otherwise if you do C-x v d -> C-x C-f -> C-x v d 1366 ;; Otherwise if you do C-x v d -> C-x C-f -> C-x v d
1367 ;; you may get a new *vc-dir* buffer, different from the original 1367 ;; you may get a new *vc-dir* buffer, different from the original
1368 (file-truename (read-directory-name "VC status for directory: " 1368 (file-truename (read-directory-name "VC status for directory: "
1369 (vc-root-dir) (vc-known-roots) t 1369 (vc-root-dir) nil t
1370 nil)) 1370 nil))
1371 (if current-prefix-arg 1371 (if current-prefix-arg
1372 (intern 1372 (intern
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 46f55358de8..ce72a49b955 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -299,11 +299,6 @@ non-nil if FILE exists and its contents were successfully inserted."
299 (set-buffer-modified-p nil) 299 (set-buffer-modified-p nil)
300 t)) 300 t))
301 301
302(declare-function project-try-vc "project")
303(defun vc-known-roots ()
304 "Return a list of known vc roots."
305 (seq-filter #'project-try-vc (project-known-project-roots)))
306
307(defun vc-find-root (file witness) 302(defun vc-find-root (file witness)
308 "Find the root of a checked out project. 303 "Find the root of a checked out project.
309The function walks up the directory tree from FILE looking for WITNESS. 304The function walks up the directory tree from FILE looking for WITNESS.
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 49323ef47d2..65775f8e46e 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2001,8 +2001,7 @@ saving the buffer."
2001 rootdir working-revision) 2001 rootdir working-revision)
2002 (if backend 2002 (if backend
2003 (setq rootdir (vc-call-backend backend 'root default-directory)) 2003 (setq rootdir (vc-call-backend backend 'root default-directory))
2004 (setq rootdir (read-directory-name "Directory for VC root-diff: " 2004 (setq rootdir (read-directory-name "Directory for VC root-diff: "))
2005 nil (vc-known-roots)))
2006 (setq backend (vc-responsible-backend rootdir)) 2005 (setq backend (vc-responsible-backend rootdir))
2007 (if backend 2006 (if backend
2008 (setq default-directory rootdir) 2007 (setq default-directory rootdir)
@@ -2546,8 +2545,7 @@ with its diffs (if the underlying VCS supports that)."
2546 rootdir) 2545 rootdir)
2547 (if backend 2546 (if backend
2548 (setq rootdir (vc-call-backend backend 'root default-directory)) 2547 (setq rootdir (vc-call-backend backend 'root default-directory))
2549 (setq rootdir (read-directory-name "Directory for VC revision log: " 2548 (setq rootdir (read-directory-name "Directory for VC revision log: "))
2550 nil (vc-known-roots)))
2551 (setq backend (vc-responsible-backend rootdir)) 2549 (setq backend (vc-responsible-backend rootdir))
2552 (unless backend 2550 (unless backend
2553 (error "Directory is not version controlled"))) 2551 (error "Directory is not version controlled")))