summaryrefslogtreecommitdiff
path: root/lisp/vc/vc.el
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-11-22 00:31:20 -0500
committerEric S. Raymond <esr@thyrsus.com>2014-11-22 00:31:20 -0500
commit354a07b57092b9231734a9d983d074bd4d542f62 (patch)
treefd376a2ff5c5f352b8f377cfde077998d0ca4009 /lisp/vc/vc.el
parentaf46a2a43fab936a43d918fe0572eae51798a332 (diff)
downloademacs-354a07b57092b9231734a9d983d074bd4d542f62.tar.gz
Isolating support code for the file-granularity back ends: the easy part.
* vc-filewise.el: New file to isolate code used only by the file-oriented back ends (SCCS/RCS/CVS/SRC) which should not live in vc.el and certainly not in vc-hooks.el.
Diffstat (limited to 'lisp/vc/vc.el')
-rw-r--r--lisp/vc/vc.el27
1 files changed, 0 insertions, 27 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 90bf1f74f2d..aa9337ccf35 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2691,33 +2691,6 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
(vc-mode-line file new-backend)
(vc-checkin file new-backend comment (stringp comment)))))
-(defun vc-rename-master (oldmaster newfile templates)
- "Rename OLDMASTER to be the master file for NEWFILE based on TEMPLATES."
- (let* ((dir (file-name-directory (expand-file-name oldmaster)))
- (newdir (or (file-name-directory newfile) ""))
- (newbase (file-name-nondirectory newfile))
- (masters
- ;; List of potential master files for `newfile'
- (mapcar
- (lambda (s) (vc-possible-master s newdir newbase))
- templates)))
- (when (or (file-symlink-p oldmaster)
- (file-symlink-p (file-name-directory oldmaster)))
- (error "This is unsafe in the presence of symbolic links"))
- (rename-file
- oldmaster
- (catch 'found
- ;; If possible, keep the master file in the same directory.
- (dolist (f masters)
- (when (and f (string= (file-name-directory (expand-file-name f)) dir))
- (throw 'found f)))
- ;; If not, just use the first possible place.
- (dolist (f masters)
- (and f (or (not (setq dir (file-name-directory f)))
- (file-directory-p dir))
- (throw 'found f)))
- (error "New file lacks a version control directory")))))
-
;;;###autoload
(defun vc-delete-file (file)
"Delete file and mark it as such in the version control system.