summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2003-05-12 17:49:22 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2003-05-12 17:49:22 +0000
commit6adf3f60e4bb1f58865e49814b220ae3b99ca898 (patch)
tree50e5c98f790f0307b032325bf21df7c143a2f49e
parentb00453052c5e7ca3a5c84ce2d0cb37b863754b70 (diff)
downloademacs-6adf3f60e4bb1f58865e49814b220ae3b99ca898.tar.gz
(cvs-retrieve-revision): Make sure HEAD gets you the head of the branch.
-rw-r--r--lisp/pcvs.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index 2c0824843c3..bb405834a97 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -1,6 +1,6 @@
;;; pcvs.el --- a front-end to CVS
-;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,2002
+;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,02,2003
;; Free Software Foundation, Inc.
;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com
@@ -1638,8 +1638,14 @@ Signal an error if there is no backup file."
;; Discard stderr output to work around the CVS+SSH+libc
;; problem when stdout and stderr are the same.
;; FIXME: this doesn't seem to make any difference :-(
- (let ((res (call-process cvs-program nil '(t . nil) nil
- "-q" "update" "-p" "-r" rev file)))
+ (let ((res (apply 'call-process cvs-program nil '(t . nil) nil
+ "-q" "update" "-p"
+ ;; If `rev' is HEAD, don't pass it at all:
+ ;; the default behavior is to get the head
+ ;; of the current branch whereas "-r HEAD"
+ ;; stupidly gives you the head of the trunk.
+ (append (unless (equal rev "HEAD") (list "-r" rev))
+ (list file)))))
(when (and res (not (and (equal 0 res))))
(error "Something went wrong retrieving revision %s: %s" rev res))
(set-buffer-modified-p nil)