Mercurial > emacs
comparison lisp/vc.el @ 43725:60a9d71aad02
(vc-transfer-file): Use `make-temp-file' instead of `make-temp-name'.
(vc-default-update-changelog): Remove conditional use of
`make-temp-name'.
author | André Spiegel <spiegel@gnu.org> |
---|---|
date | Tue, 05 Mar 2002 13:14:11 +0000 |
parents | 62c8a228bc1f |
children | 5c8c45f534eb |
comparison
equal
deleted
inserted
replaced
43724:16affaf7292b | 43725:60a9d71aad02 |
---|---|
4 | 4 |
5 ;; Author: FSF (see below for full credits) | 5 ;; Author: FSF (see below for full credits) |
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
7 ;; Keywords: tools | 7 ;; Keywords: tools |
8 | 8 |
9 ;; $Id: vc.el,v 1.328 2002/02/28 09:59:08 spiegel Exp $ | 9 ;; $Id: vc.el,v 1.329 2002/02/28 13:01:48 spiegel Exp $ |
10 | 10 |
11 ;; This file is part of GNU Emacs. | 11 ;; This file is part of GNU Emacs. |
12 | 12 |
13 ;; GNU Emacs is free software; you can redistribute it and/or modify | 13 ;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;; it under the terms of the GNU General Public License as published by | 14 ;; it under the terms of the GNU General Public License as published by |
2737 (if registered | 2737 (if registered |
2738 (set-file-modes file (logior (file-modes file) 128)) | 2738 (set-file-modes file (logior (file-modes file) 128)) |
2739 ;; `registered' might have switched under us. | 2739 ;; `registered' might have switched under us. |
2740 (vc-switch-backend file old-backend) | 2740 (vc-switch-backend file old-backend) |
2741 (let* ((rev (vc-workfile-version file)) | 2741 (let* ((rev (vc-workfile-version file)) |
2742 (modified-file (and edited (make-temp-name file))) | 2742 (modified-file (and edited (make-temp-file file))) |
2743 (unmodified-file (and modified-file (vc-version-backup-file file)))) | 2743 (unmodified-file (and modified-file (vc-version-backup-file file)))) |
2744 ;; Go back to the base unmodified file. | 2744 ;; Go back to the base unmodified file. |
2745 (unwind-protect | 2745 (unwind-protect |
2746 (progn | 2746 (progn |
2747 (when modified-file | 2747 (when modified-file |
2748 (copy-file file modified-file) | 2748 (copy-file file modified-file 'ok-if-already-exists) |
2749 ;; If we have a local copy of the unmodified file, handle that | 2749 ;; If we have a local copy of the unmodified file, handle that |
2750 ;; here and not in vc-revert-file because we don't want to | 2750 ;; here and not in vc-revert-file because we don't want to |
2751 ;; delete that copy -- it is still useful for OLD-BACKEND. | 2751 ;; delete that copy -- it is still useful for OLD-BACKEND. |
2752 (if unmodified-file | 2752 (if unmodified-file |
2753 (copy-file unmodified-file file 'ok-if-already-exists) | 2753 (copy-file unmodified-file file 'ok-if-already-exists) |
2884 Uses `rcs2log' which only works for RCS and CVS." | 2884 Uses `rcs2log' which only works for RCS and CVS." |
2885 ;; FIXME: We (c|sh)ould add support for cvs2cl | 2885 ;; FIXME: We (c|sh)ould add support for cvs2cl |
2886 (let ((odefault default-directory) | 2886 (let ((odefault default-directory) |
2887 (changelog (find-change-log)) | 2887 (changelog (find-change-log)) |
2888 ;; Presumably not portable to non-Unixy systems, along with rcs2log: | 2888 ;; Presumably not portable to non-Unixy systems, along with rcs2log: |
2889 (tempfile (funcall | 2889 (tempfile (make-temp-file |
2890 (if (fboundp 'make-temp-file) 'make-temp-file 'make-temp-name) | |
2891 (expand-file-name "vc" | 2890 (expand-file-name "vc" |
2892 (or small-temporary-file-directory | 2891 (or small-temporary-file-directory |
2893 temporary-file-directory)))) | 2892 temporary-file-directory)))) |
2894 (full-name (or add-log-full-name | 2893 (full-name (or add-log-full-name |
2895 (user-full-name) | 2894 (user-full-name) |