aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond1993-03-29 15:38:31 +0000
committerEric S. Raymond1993-03-29 15:38:31 +0000
commit8ac8c82f02320a5dc905fea8b528ca9388aa52c1 (patch)
treed1e9492e1369865e1307e33973a0ab38d7cc156c
parent3e1b7a46b62da42bbc4d7c765054d80ca8a753a3 (diff)
downloademacs-8ac8c82f02320a5dc905fea8b528ca9388aa52c1.tar.gz
emacs-8ac8c82f02320a5dc905fea8b528ca9388aa52c1.zip
(vc-next-action, vc-peint-log, vc-diff, vc-revert-buffer) improved
logic for parent buffer finding.
-rw-r--r--lisp/vc.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index fbfa9729083..62ac86890ff 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -5,7 +5,7 @@
5;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 5;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
6;; Version: 5.3 6;; Version: 5.3
7 7
8;; $Id: vc.el,v 1.28 1993/03/17 13:58:48 eric Exp eric $ 8;; $Id: vc.el,v 1.29 1993/03/28 06:40:46 eric Exp eric $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -296,7 +296,7 @@ read-only copy of the changed file is left in place afterwards.
296 If the file is registered and locked by someone else, you are given 296 If the file is registered and locked by someone else, you are given
297the option to steal the lock." 297the option to steal the lock."
298 (interactive "P") 298 (interactive "P")
299 (if vc-parent-buffer 299 (while vc-parent-buffer
300 (pop-to-buffer vc-parent-buffer)) 300 (pop-to-buffer vc-parent-buffer))
301 (if buffer-file-name 301 (if buffer-file-name
302 (let 302 (let
@@ -584,7 +584,7 @@ popped up to accept a comment."
584(defun vc-diff (historic) 584(defun vc-diff (historic)
585 "Display diffs between file versions." 585 "Display diffs between file versions."
586 (interactive "P") 586 (interactive "P")
587 (if vc-parent-buffer 587 (while vc-parent-buffer
588 (pop-to-buffer vc-parent-buffer)) 588 (pop-to-buffer vc-parent-buffer))
589 (if historic 589 (if historic
590 (call-interactively 'vc-version-diff) 590 (call-interactively 'vc-version-diff)
@@ -657,7 +657,7 @@ files in or below it."
657Headers desired are inserted at the start of the buffer, and are pulled from 657Headers desired are inserted at the start of the buffer, and are pulled from
658the variable vc-header-alist" 658the variable vc-header-alist"
659 (interactive) 659 (interactive)
660 (if vc-parent-buffer 660 (while vc-parent-buffer
661 (pop-to-buffer vc-parent-buffer)) 661 (pop-to-buffer vc-parent-buffer))
662 (save-excursion 662 (save-excursion
663 (save-restriction 663 (save-restriction
@@ -789,7 +789,7 @@ levels in the snapshot."
789(defun vc-print-log () 789(defun vc-print-log ()
790 "List the change log of the current buffer in a window." 790 "List the change log of the current buffer in a window."
791 (interactive) 791 (interactive)
792 (if vc-parent-buffer 792 (while vc-parent-buffer
793 (pop-to-buffer vc-parent-buffer)) 793 (pop-to-buffer vc-parent-buffer))
794 (if (and buffer-file-name (vc-name buffer-file-name)) 794 (if (and buffer-file-name (vc-name buffer-file-name))
795 (progn 795 (progn
@@ -808,7 +808,7 @@ levels in the snapshot."
808This asks for confirmation if the buffer contents are not identical 808This asks for confirmation if the buffer contents are not identical
809to that version." 809to that version."
810 (interactive) 810 (interactive)
811 (if vc-parent-buffer 811 (while vc-parent-buffer
812 (pop-to-buffer vc-parent-buffer)) 812 (pop-to-buffer vc-parent-buffer))
813 (let ((file buffer-file-name) 813 (let ((file buffer-file-name)
814 (obuf (current-buffer)) (changed (vc-diff nil))) 814 (obuf (current-buffer)) (changed (vc-diff nil)))
@@ -829,10 +829,10 @@ to that version."
829(defun vc-cancel-version (norevert) 829(defun vc-cancel-version (norevert)
830 "Undo your latest checkin." 830 "Undo your latest checkin."
831 (interactive "P") 831 (interactive "P")
832 (if vc-parent-buffer 832 (while vc-parent-buffer
833 (pop-to-buffer vc-parent-buffer)) 833 (pop-to-buffer vc-parent-buffer))
834 (let ((target (concat (vc-latest-version (buffer-file-name)))) 834 (let* ((target (concat (vc-latest-version (buffer-file-name))))
835 (yours (concat (vc-your-latest-version))) 835 (yours (concat (vc-your-latest-version (buffer-file-name))))
836 (prompt (if (string-equal yours target) 836 (prompt (if (string-equal yours target)
837 "Remove your version %s from master?" 837 "Remove your version %s from master?"
838 "Version %s was not your change. Remove it anyway?"))) 838 "Version %s was not your change. Remove it anyway?")))
@@ -842,8 +842,7 @@ to that version."
842 (if norevert 842 (if norevert
843 (vc-mode-line (buffer-file-name)) 843 (vc-mode-line (buffer-file-name))
844 (vc-checkout (buffer-file-name) nil))) 844 (vc-checkout (buffer-file-name) nil)))
845 ) 845 ))
846 )
847 846
848(defun vc-rename-file (old new) 847(defun vc-rename-file (old new)
849 "Rename a file, taking its master files with it." 848 "Rename a file, taking its master files with it."