Mercurial > emacs
comparison lisp/vc-git.el @ 78404:27f00e50116a
Change capitalization of VC backend names for new backends
Revision: emacs@sv.gnu.org/emacs--rel--22--patch-87
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 03 Aug 2007 05:09:21 +0000 |
parents | 2dd5d799a16d |
children | 429a17d4958d |
comparison
equal
deleted
inserted
replaced
78403:d85da03a88cb | 78404:27f00e50116a |
---|---|
28 ;; system. | 28 ;; system. |
29 ;; | 29 ;; |
30 | 30 |
31 ;;; Installation: | 31 ;;; Installation: |
32 | 32 |
33 ;; To install: put this file on the load-path and add GIT to the list | 33 ;; To install: put this file on the load-path and add Git to the list |
34 ;; of supported backends in `vc-handled-backends'; the following line, | 34 ;; of supported backends in `vc-handled-backends'; the following line, |
35 ;; placed in your ~/.emacs, will accomplish this: | 35 ;; placed in your ~/.emacs, will accomplish this: |
36 ;; | 36 ;; |
37 ;; (add-to-list 'vc-handled-backends 'GIT) | 37 ;; (add-to-list 'vc-handled-backends 'Git) |
38 | 38 |
39 ;;; Todo: | 39 ;;; Todo: |
40 ;; - check if more functions could use vc-git-command instead | 40 ;; - check if more functions could use vc-git-command instead |
41 ;; of start-process. | 41 ;; of start-process. |
42 ;; - changelog generation | 42 ;; - changelog generation |
212 "Git-specific version of `vc-dired-state-info'." | 212 "Git-specific version of `vc-dired-state-info'." |
213 (let ((git-state (vc-state file))) | 213 (let ((git-state (vc-state file))) |
214 (if (eq git-state 'edited) | 214 (if (eq git-state 'edited) |
215 "(modified)" | 215 "(modified)" |
216 ;; fall back to the default VC representation | 216 ;; fall back to the default VC representation |
217 (vc-default-dired-state-info 'GIT file)))) | 217 (vc-default-dired-state-info 'Git file)))) |
218 | 218 |
219 ;;; STATE-CHANGING FUNCTIONS | 219 ;;; STATE-CHANGING FUNCTIONS |
220 | 220 |
221 (defun vc-git-create-repo () | 221 (defun vc-git-create-repo () |
222 "Create a new GIT repository." | 222 "Create a new Git repository." |
223 (vc-git-command "init" nil 0 nil)) | 223 (vc-git-command "init" nil 0 nil)) |
224 | 224 |
225 (defun vc-git-register (files &optional rev comment) | 225 (defun vc-git-register (files &optional rev comment) |
226 "Register FILE into the git version-control system." | 226 "Register FILE into the git version-control system." |
227 (vc-git-command nil 0 files "update-index" "--add" "--")) | 227 (vc-git-command nil 0 files "update-index" "--add" "--")) |
285 | 285 |
286 (defvar log-view-message-re) | 286 (defvar log-view-message-re) |
287 (defvar log-view-file-re) | 287 (defvar log-view-file-re) |
288 (defvar log-view-font-lock-keywords) | 288 (defvar log-view-font-lock-keywords) |
289 | 289 |
290 (define-derived-mode vc-git-log-view-mode log-view-mode "GIT-Log-View" | 290 (define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View" |
291 (require 'add-log) ;; we need the faces add-log | 291 (require 'add-log) ;; we need the faces add-log |
292 ;; Don't have file markers, so use impossible regexp. | 292 ;; Don't have file markers, so use impossible regexp. |
293 (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") | 293 (set (make-local-variable 'log-view-file-re) "^File:[ \t]+\\(.+\\)") |
294 (set (make-local-variable 'log-view-message-re) | 294 (set (make-local-variable 'log-view-message-re) |
295 "^commit *\\([0-9a-z]+\\)") | 295 "^commit *\\([0-9a-z]+\\)") |