diff options
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r-- | lisp/vc/vc.el | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 00976a07d42..b75862e8a52 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -486,11 +486,19 @@ ;; from ignored files. ;; When called from Lisp code, if DIRECTORY is non-nil, the ;; repository to use will be deduced by DIRECTORY. +;; The default behavior is to add or remove a line from the file +;; returned by the `find-ignore-file' function. ;; ;; - ignore-completion-table (directory) ;; ;; Return the completion table for files ignored by the current ;; version control system, e.g., the entries in `.gitignore' and +;; `.bzrignore'. The default behavior is to read the contents of +;; the file returned by the `find-ignore-file' function. +;; +;; - find-ignore-file +;; +;; Return the ignore file that controls FILE, e.g. `.gitignore' or ;; `.bzrignore'. ;; ;; - previous-revision (file rev) @@ -979,6 +987,9 @@ be reported. If NO-ERROR is nil, signal an error that no VC backend is responsible for the given file." (or (and (not (file-directory-p file)) (vc-backend file)) + ;; FIXME it would be more efficient to walk up the directory tree, + ;; stopping the first time a backend is responsible. + ;; ;; First try: find a responsible backend. If this is for registration, ;; it must be a backend under which FILE is not yet registered. (let ((dirs (delq nil @@ -1425,6 +1436,7 @@ first backend that could register the file is used." (let ((vc-handled-backends (list backend))) (call-interactively 'vc-register))) +;;;###autoload (defun vc-ignore (file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY. @@ -1831,7 +1843,7 @@ Return t if the buffer had changes, nil otherwise." (backend (car vc-fileset)) (first (car files)) (rev1-default nil) - (rev2-default nil)) + ) ;; (rev2-default nil) (cond ;; someday we may be able to do revision completion on non-singleton ;; filesets, but not yet. @@ -1855,9 +1867,10 @@ Return t if the buffer had changes, nil otherwise." rev1-default "): ") "Older revision: ")) (rev2-prompt (concat "Newer revision (default " - (or rev2-default "current source") "): ")) + ;; (or rev2-default + "current source): ")) (rev1 (vc-read-revision rev1-prompt files backend rev1-default)) - (rev2 (vc-read-revision rev2-prompt files backend rev2-default))) + (rev2 (vc-read-revision rev2-prompt files backend nil))) ;; rev2-default (when (string= rev1 "") (setq rev1 nil)) (when (string= rev2 "") (setq rev2 nil)) (list files rev1 rev2)))) @@ -2043,7 +2056,7 @@ saving the buffer." ;; relative file names work. (let ((default-directory rootdir)) (vc-diff-internal - t (list backend (list rootdir) working-revision) nil nil + t (list backend (list (expand-file-name rootdir)) working-revision) nil nil (called-interactively-p 'interactive)))))) ;;;###autoload @@ -2590,8 +2603,8 @@ with its diffs (if the underlying VCS supports that)." (setq backend (vc-responsible-backend rootdir)) (unless backend (error "Directory is not version controlled"))) - (setq default-directory rootdir) - (vc-print-log-internal backend (list rootdir) revision revision limit + (setq default-directory (expand-file-name rootdir)) + (vc-print-log-internal backend (list default-directory) revision revision limit (when with-diff 'with-diff)))) ;;;###autoload |