comparison lisp/vc-cvs.el @ 33637:6cab2125de9c

(vc-cvs-checkout): Fix bug that broke C-x v ~-style checkouts.
author André Spiegel <spiegel@gnu.org>
date Mon, 20 Nov 2000 14:16:18 +0000
parents da206bbad86b
children 78bce41f17c5
comparison
equal deleted inserted replaced
33636:2c1708b98891 33637:6cab2125de9c
3 ;; Copyright (C) 1995,98,99,2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995,98,99,2000 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-cvs.el,v 1.11 2000/11/16 16:42:10 spiegel Exp $ 8 ;; $Id: vc-cvs.el,v 1.12 2000/11/16 18:10:52 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
314 ;; Adjust the default-directory so that the check-out creates 314 ;; Adjust the default-directory so that the check-out creates
315 ;; the file in the right place. 315 ;; the file in the right place.
316 (setq default-directory (file-name-directory filename)) 316 (setq default-directory (file-name-directory filename))
317 (if workfile 317 (if workfile
318 (let ((failed t) 318 (let ((failed t)
319 (backup-name (if (string= filename workfile) 319 (backup-name (if (string= file workfile)
320 (car (find-backup-file-name filename))))) 320 (car (find-backup-file-name filename)))))
321 (when backup-name 321 (when backup-name
322 (copy-file filename backup-name 322 (copy-file filename backup-name
323 'ok-if-already-exists 'keep-date) 323 'ok-if-already-exists 'keep-date)
324 (unless (file-writable-p filename) 324 (unless (file-writable-p filename)
337 (concat "-r" rev)) 337 (concat "-r" rev))
338 "-p" 338 "-p"
339 switches))) 339 switches)))
340 (setq failed nil)) 340 (setq failed nil))
341 (if failed 341 (if failed
342 (if backup-name 342 (if backup-name
343 (rename-file backup-name filename 343 (rename-file backup-name filename
344 'ok-if-already-exists) 344 'ok-if-already-exists)
345 (if (file-exists-p filename) 345 (if (file-exists-p filename)
346 (delete-file filename))) 346 (delete-file filename)))
347 (and backup-name 347 (and backup-name
348 (not vc-make-backup-files) 348 (not vc-make-backup-files)
349 (delete-file backup-name))))) 349 (delete-file backup-name)))))
350 (if (and (file-exists-p file) (not rev)) 350 (if (and (file-exists-p file) (not rev))
351 ;; If no revision was specified, just make the file writable 351 ;; If no revision was specified, just make the file writable