summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-06-09 01:21:18 +0000
committerKarl Heuer <kwzh@gnu.org>1995-06-09 01:21:18 +0000
commit684544a850579f3db417288b13cc6411d5316f3f (patch)
tree1260b96e482d9f4168f8224e686fa03f3f83e53e /lisp
parent511aa33a4e8197f23f63a6a174809de367589586 (diff)
downloademacs-684544a850579f3db417288b13cc6411d5316f3f.tar.gz
(vc-backend-checkin): Handle RCS `co'-output in the event
that a check-in only results in reverting to the previous version. Also be more robust if the new version number cannot be told from what `co' says.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 4d5e29c86f6..3b9fbbb7741 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1683,14 +1683,16 @@ From a program, any arguments are passed to the `rcs2log' script."
(progn
(set-buffer "*vc*")
(goto-char (point-min))
- (if (re-search-forward "new revision: \\([0-9.]+\\);" nil t)
+ (if (or (re-search-forward
+ "new revision: \\([0-9.]+\\);" nil t)
+ (re-search-forward
+ "reverting to previous revision \\([0-9.]+\\)" nil t))
(progn (setq rev (buffer-substring (match-beginning 1)
(match-end 1)))
(vc-file-setprop file 'vc-workfile-version rev)))
- (if (vc-trunk-p rev)
- (vc-do-command 0 "rcs" file 'MASTER "-b")
- (vc-do-command 0 "rcs" file 'MASTER
- (concat "-b" (vc-branch-part rev))))
+ (if rev (vc-do-command 0 "rcs" file 'MASTER
+ (if (vc-trunk-p rev) "-b"
+ (concat "-b" (vc-branch-part rev)))))
(if lock-version
;; exit status of 1 is also accepted.
;; It means that the lock was removed before.