summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 4a536900eb3..5491d67e700 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1879,6 +1879,19 @@ saving the buffer."
(called-interactively-p 'interactive))))))
;;;###autoload
+(defun vc-root-dir ()
+ "Return the root directory for the current VC tree.
+Return nil if the root directory cannot be identified."
+ (let ((backend (vc-deduce-backend)))
+ (if backend
+ (condition-case err
+ (vc-call-backend backend 'root default-directory)
+ (vc-not-supported
+ (unless (eq (cadr err) 'root)
+ (signal (car err) (cdr err)))
+ nil)))))
+
+;;;###autoload
(defun vc-revision-other-window (rev)
"Visit revision REV of the current file in another window.
If the current file is named `F', the revision is named `F.~REV~'.
@@ -2450,7 +2463,7 @@ depending on the underlying version-control system."
(error "Please revert all modified workfiles before rollback")))
;; Accumulate changes associated with the fileset
(vc-setup-buffer "*vc-diff*")
- (not-modified)
+ (set-buffer-modified-p nil)
(message "Finding changes...")
(let* ((tip (vc-working-revision (car files)))
;; FIXME: `previous-revision' should take the fileset.