Mercurial > emacs
comparison lisp/vc-rcs.el @ 48966:a327c58de610
(vc-rcs-checkout): Handle t argument for REV.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Thu, 26 Dec 2002 14:06:33 +0000 |
parents | 0cae7bc9a8b8 |
children | 8a48bb5e7e5b |
comparison
equal
deleted
inserted
replaced
48965:322a31d667aa | 48966:a327c58de610 |
---|---|
3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: FSF (see vc.el for full credits) | 5 ;; Author: FSF (see vc.el for full credits) |
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
7 | 7 |
8 ;; $Id: vc-rcs.el,v 1.30 2002/11/12 19:46:47 rost Exp $ | 8 ;; $Id: vc-rcs.el,v 1.31 2002/11/13 12:38:20 spiegel Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
398 nil 0 "co" (vc-name file) | 398 nil 0 "co" (vc-name file) |
399 ;; If locking is not strict, force to overwrite | 399 ;; If locking is not strict, force to overwrite |
400 ;; the writable workfile. | 400 ;; the writable workfile. |
401 (if (eq (vc-checkout-model file) 'implicit) "-f") | 401 (if (eq (vc-checkout-model file) 'implicit) "-f") |
402 (if editable "-l") | 402 (if editable "-l") |
403 (if rev (concat "-r" rev) | 403 (if (stringp rev) |
404 ;; if no explicit revision was specified, | 404 ;; a literal revision was specified |
405 ;; check out that of the working file | 405 (concat "-r" rev) |
406 (let ((workrev (vc-workfile-version file))) | 406 (let ((workrev (vc-workfile-version file))) |
407 (if workrev (concat "-r" workrev) | 407 (if workrev |
408 nil))) | 408 (concat "-r" |
409 (if (not rev) | |
410 ;; no revision specified: | |
411 ;; use current workfile version | |
412 workrev | |
413 ;; REV is t ... | |
414 (if (vc-branch-p workrev) | |
415 ;; ... go to head of current branch | |
416 (vc-branch-part workrev) | |
417 ;; ... go to head of trunk | |
418 (vc-rcs-set-default-branch file | |
419 nil) | |
420 "")))))) | |
409 switches) | 421 switches) |
410 ;; determine the new workfile version | 422 ;; determine the new workfile version |
411 (with-current-buffer "*vc*" | 423 (with-current-buffer "*vc*" |
412 (setq new-version | 424 (setq new-version |
413 (vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1))) | 425 (vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1))) |