aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel1996-01-10 15:24:03 +0000
committerAndré Spiegel1996-01-10 15:24:03 +0000
commitae2506d066c492004bfed55c0ee24ab0d2968346 (patch)
tree1d22482047040de8c06d7228a91abbfbbb70eaea
parent4cb4ed4111d8ee2b22665015414b7fbc8392f05a (diff)
downloademacs-ae2506d066c492004bfed55c0ee24ab0d2968346.tar.gz
emacs-ae2506d066c492004bfed55c0ee24ab0d2968346.zip
(vc-cancel-version): Use search-forward to scan error message. Added
comments.
-rw-r--r--lisp/vc.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 386b62abe35..59457863b9a 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1646,10 +1646,16 @@ A prefix argument means do not revert the buffer afterwards."
1646 ;; Check out unlocked, and revert buffer. 1646 ;; Check out unlocked, and revert buffer.
1647 (vc-checkout (buffer-file-name) nil recent)) 1647 (vc-checkout (buffer-file-name) nil recent))
1648 (setq done t)) 1648 (setq done t))
1649 ;; If the checkout fails, vc-do-command signals an error.
1650 ;; We catch this error, check the reason, correct the
1651 ;; version number, and try a second time.
1649 (error (set-buffer "*vc*") 1652 (error (set-buffer "*vc*")
1650 (goto-char (point-min)) 1653 (goto-char (point-min))
1651 (if (re-search-forward "no side branches present for" nil t) 1654 (if (search-forward "no side branches present for" nil t)
1652 (progn (setq recent (vc-branch-part recent)) 1655 (progn (setq recent (vc-branch-part recent))
1656 ;; vc-do-command popped up a window with
1657 ;; the error message. Get rid of it, by
1658 ;; restoring the old window configuration.
1653 (set-window-configuration config)) 1659 (set-window-configuration config))
1654 ;; No, it was some other error: re-signal it. 1660 ;; No, it was some other error: re-signal it.
1655 (signal (car err) (cdr err)))))) 1661 (signal (car err) (cdr err))))))