Mercurial > emacs
comparison lisp/vc.el @ 94796:6a8a15e68e80
(vc-version-diff, vc-print-log, vc-revert, vc-rollback)
(vc-update): Remove unused let bindings.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 09 May 2008 07:03:15 +0000 |
parents | b9687393def1 |
children | 0c63a93bf877 |
comparison
equal
deleted
inserted
replaced
94795:188974bfdea0 | 94796:6a8a15e68e80 |
---|---|
1557 ;;;###autoload | 1557 ;;;###autoload |
1558 (defun vc-version-diff (files rev1 rev2) | 1558 (defun vc-version-diff (files rev1 rev2) |
1559 "Report diffs between revisions of the fileset in the repository history." | 1559 "Report diffs between revisions of the fileset in the repository history." |
1560 (interactive | 1560 (interactive |
1561 (let* ((vc-fileset (vc-deduce-fileset)) | 1561 (let* ((vc-fileset (vc-deduce-fileset)) |
1562 (backend (car files)) | |
1563 (state (cadr vc-fileset)) | |
1564 (files (cddr vc-fileset)) | 1562 (files (cddr vc-fileset)) |
1565 (first (car files)) | 1563 (first (car files)) |
1566 (completion-table | 1564 (completion-table |
1567 (vc-call revision-completion-table files)) | 1565 (vc-call revision-completion-table files)) |
1568 (rev1-default nil) | 1566 (rev1-default nil) |
2119 "List the change log of the current fileset in a window. | 2117 "List the change log of the current fileset in a window. |
2120 If WORKING-REVISION is non-nil, leave the point at that revision." | 2118 If WORKING-REVISION is non-nil, leave the point at that revision." |
2121 (interactive) | 2119 (interactive) |
2122 (let* ((vc-fileset (vc-deduce-fileset)) | 2120 (let* ((vc-fileset (vc-deduce-fileset)) |
2123 (backend (car vc-fileset)) | 2121 (backend (car vc-fileset)) |
2124 (state (cadr vc-fileset)) | |
2125 (files (cddr vc-fileset)) | 2122 (files (cddr vc-fileset)) |
2126 (working-revision (or working-revision (vc-working-revision (car files))))) | 2123 (working-revision (or working-revision (vc-working-revision (car files))))) |
2127 ;; Don't switch to the output buffer before running the command, | 2124 ;; Don't switch to the output buffer before running the command, |
2128 ;; so that any buffer-local settings in the vc-controlled | 2125 ;; so that any buffer-local settings in the vc-controlled |
2129 ;; buffer can be accessed by the command. | 2126 ;; buffer can be accessed by the command. |
2150 "Revert working copies of the selected fileset to their repository contents. | 2147 "Revert working copies of the selected fileset to their repository contents. |
2151 This asks for confirmation if the buffer contents are not identical | 2148 This asks for confirmation if the buffer contents are not identical |
2152 to the working revision (except for keyword expansion)." | 2149 to the working revision (except for keyword expansion)." |
2153 (interactive) | 2150 (interactive) |
2154 (let* ((vc-fileset (vc-deduce-fileset)) | 2151 (let* ((vc-fileset (vc-deduce-fileset)) |
2155 (backend (car vc-fileset)) | |
2156 (state (cadr vc-fileset)) | |
2157 (files (cddr vc-fileset))) | 2152 (files (cddr vc-fileset))) |
2158 ;; If any of the files is visited by the current buffer, make | 2153 ;; If any of the files is visited by the current buffer, make |
2159 ;; sure buffer is saved. If the user says `no', abort since | 2154 ;; sure buffer is saved. If the user says `no', abort since |
2160 ;; we cannot show the changes and ask for confirmation to | 2155 ;; we cannot show the changes and ask for confirmation to |
2161 ;; discard them. | 2156 ;; discard them. |
2184 This may be either a file-level or a repository-level operation, | 2179 This may be either a file-level or a repository-level operation, |
2185 depending on the underlying version-control system." | 2180 depending on the underlying version-control system." |
2186 (interactive) | 2181 (interactive) |
2187 (let* ((vc-fileset (vc-deduce-fileset)) | 2182 (let* ((vc-fileset (vc-deduce-fileset)) |
2188 (backend (car vc-fileset)) | 2183 (backend (car vc-fileset)) |
2189 (state (cadr vc-fileset)) | |
2190 (files (cddr vc-fileset)) | 2184 (files (cddr vc-fileset)) |
2191 (granularity (vc-call-backend backend 'revision-granularity))) | 2185 (granularity (vc-call-backend backend 'revision-granularity))) |
2192 (unless (vc-find-backend-function backend 'rollback) | 2186 (unless (vc-find-backend-function backend 'rollback) |
2193 (error "Rollback is not supported in %s" backend)) | 2187 (error "Rollback is not supported in %s" backend)) |
2194 (when (and (not (eq granularity 'repository)) (/= (length files) 1)) | 2188 (when (and (not (eq granularity 'repository)) (/= (length files) 1)) |
2240 contains changes, and the backend supports merging news, then any recent | 2234 contains changes, and the backend supports merging news, then any recent |
2241 changes from the current branch are merged into the working file." | 2235 changes from the current branch are merged into the working file." |
2242 (interactive) | 2236 (interactive) |
2243 (let* ((vc-fileset (vc-deduce-fileset)) | 2237 (let* ((vc-fileset (vc-deduce-fileset)) |
2244 (backend (car vc-fileset)) | 2238 (backend (car vc-fileset)) |
2245 (state (cadr vc-fileset)) | |
2246 (files (cddr vc-fileset))) | 2239 (files (cddr vc-fileset))) |
2247 (dolist (file files) | 2240 (dolist (file files) |
2248 (when (let ((buf (get-file-buffer file))) | 2241 (when (let ((buf (get-file-buffer file))) |
2249 (and buf (buffer-modified-p buf))) | 2242 (and buf (buffer-modified-p buf))) |
2250 (error "Please kill or save all modified buffers before updating.")) | 2243 (error "Please kill or save all modified buffers before updating.")) |