comparison lisp/vc.el @ 51627:1329f6a6c949

(vc-rename-file): Fix typo.
author Luc Teirlinck <teirllm@auburn.edu>
date Fri, 20 Jun 2003 13:21:24 +0000
parents 91b1fb194872
children ca4a1b3128f7
comparison
equal deleted inserted replaced
51626:75610d89d904 51627:1329f6a6c949
5 5
6 ;; Author: FSF (see below for full credits) 6 ;; Author: FSF (see below for full credits)
7 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8 ;; Keywords: tools 8 ;; Keywords: tools
9 9
10 ;; $Id: vc.el,v 1.354 2003/05/26 10:33:00 spiegel Exp $ 10 ;; $Id: vc.el,v 1.355 2003/05/31 16:47:57 monnier Exp $
11 11
12 ;; This file is part of GNU Emacs. 12 ;; This file is part of GNU Emacs.
13 13
14 ;; GNU Emacs is free software; you can redistribute it and/or modify 14 ;; GNU Emacs is free software; you can redistribute it and/or modify
15 ;; it under the terms of the GNU General Public License as published by 15 ;; it under the terms of the GNU General Public License as published by
416 ;; - rename-file (old new) 416 ;; - rename-file (old new)
417 ;; 417 ;;
418 ;; Rename file OLD to NEW, both in the working area and in the 418 ;; Rename file OLD to NEW, both in the working area and in the
419 ;; repository. If this function is not provided, the renaming 419 ;; repository. If this function is not provided, the renaming
420 ;; will be done by (vc-delete-file old) and (vc-register new). 420 ;; will be done by (vc-delete-file old) and (vc-register new).
421 ;; 421 ;;
422 422
423 ;;; Code: 423 ;;; Code:
424 424
425 (require 'vc-hooks) 425 (require 'vc-hooks)
426 (require 'ring) 426 (require 'ring)
1745 and past information to determine the current status of a file. 1745 and past information to determine the current status of a file.
1746 1746
1747 The value can also be a regular expression or list of regular 1747 The value can also be a regular expression or list of regular
1748 expressions to match against the host name of a repository; then VC 1748 expressions to match against the host name of a repository; then VC
1749 only stays local for hosts that match it. Alternatively, the value 1749 only stays local for hosts that match it. Alternatively, the value
1750 can be a list of regular expressions where the first element is the 1750 can be a list of regular expressions where the first element is the
1751 symbol `except'; then VC always stays local except for hosts matched 1751 symbol `except'; then VC always stays local except for hosts matched
1752 by these regular expressions." 1752 by these regular expressions."
1753 :type '(choice (const :tag "Always stay local" t) 1753 :type '(choice (const :tag "Always stay local" t)
1754 (const :tag "Don't stay local" nil) 1754 (const :tag "Don't stay local" nil)
1755 (list :format "\nExamine hostname and %v" :tag "Examine hostname ..." 1755 (list :format "\nExamine hostname and %v" :tag "Examine hostname ..."
1756 (set :format "%v" :inline t (const :format "%t" :tag "don't" except)) 1756 (set :format "%v" :inline t (const :format "%t" :tag "don't" except))
1757 (regexp :format " stay local,\n%t: %v" :tag "if it matches") 1757 (regexp :format " stay local,\n%t: %v" :tag "if it matches")
1758 (repeat :format "%v%i\n" :inline t (regexp :tag "or")))) 1758 (repeat :format "%v%i\n" :inline t (regexp :tag "or"))))
1759 :version "21.4" 1759 :version "21.4"
1760 :group 'vc) 1760 :group 'vc)
2669 "Delete file and mark it as such in the version control system." 2669 "Delete file and mark it as such in the version control system."
2670 (interactive "fVC delete file: ") 2670 (interactive "fVC delete file: ")
2671 (let ((buf (get-file-buffer file)) 2671 (let ((buf (get-file-buffer file))
2672 (backend (vc-backend file))) 2672 (backend (vc-backend file)))
2673 (unless backend 2673 (unless backend
2674 (error "File %s is not under version control" 2674 (error "File %s is not under version control"
2675 (file-name-nondirectory file))) 2675 (file-name-nondirectory file)))
2676 (unless (vc-find-backend-function backend 'delete-file) 2676 (unless (vc-find-backend-function backend 'delete-file)
2677 (error "Deleting files under %s is not supported in VC" backend)) 2677 (error "Deleting files under %s is not supported in VC" backend))
2678 (if (and buf (buffer-modified-p buf)) 2678 (if (and buf (buffer-modified-p buf))
2679 (error "Please save files before deleting them")) 2679 (error "Please save files before deleting them"))
2705 (error "Please save files before moving them")) 2705 (error "Please save files before moving them"))
2706 (if (get-file-buffer new) 2706 (if (get-file-buffer new)
2707 (error "Already editing new file name")) 2707 (error "Already editing new file name"))
2708 (if (file-exists-p new) 2708 (if (file-exists-p new)
2709 (error "New file already exists")) 2709 (error "New file already exists"))
2710 (let ((state (vc-state file))) 2710 (let ((state (vc-state old)))
2711 (unless (memq state '(up-to-date edited)) 2711 (unless (memq state '(up-to-date edited))
2712 (error "Please %s files before moving them" 2712 (error "Please %s files before moving them"
2713 (if (stringp state) "check in" "update")))) 2713 (if (stringp state) "check in" "update"))))
2714 (vc-call rename-file old new) 2714 (vc-call rename-file old new)
2715 (vc-file-clearprops old) 2715 (vc-file-clearprops old)