comparison lisp/vc-git.el @ 87477:b5060e79eb98

* vc-svn.el (vc-svn-parse-status): Recognize 'added, 'removed, and 'unregistered states. * vc-hooks.el (vc-state): Added 'removed state to documentation. * vc-hg (vc-hg-parse-status): Recognize 'added, 'removed, and 'up-to-date state. Deal with the possibility that C for clean might change to "=" in the next point release. * vc-git.el (vc-git-parse-status): Recognize 'removed. * vc.el (header comment): Better description of new dir-state. (vc-compatible-state): Defines which states are mutually compatible; usable with 'edited as a test for which can be committed on. (vc-dired-hook): Turn off undo in the VC-Dired buffer, a speed tweak. (vc-default-dired-state-info): Display 'removed state. * vc-bzr.el (vc-bzr-dir-state): Recognize 'added.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Sat, 29 Dec 2007 13:20:49 +0000
parents 71fc7b1db920
children de0bd1c6cbfd
comparison
equal deleted inserted replaced
87476:6455e422c87c 87477:b5060e79eb98
166 (expand-file-name 166 (expand-file-name
167 (buffer-substring-no-properties (+ (point) 2) 167 (buffer-substring-no-properties (+ (point) 2)
168 (line-end-position)))) 168 (line-end-position))))
169 (cond 169 (cond
170 ;; The rest of the possible states in "git ls-files -t" output: 170 ;; The rest of the possible states in "git ls-files -t" output:
171 ;; R removed/deleted
172 ;; K to be killed 171 ;; K to be killed
173 ;; should not show up in vc-dired, so don't deal with them 172 ;; should not show up in vc-dired, so don't deal with them
174 ;; here. 173 ;; here.
175 ((eq status-char ?H) 174 ((eq status-char ?H)
176 (vc-file-setprop file 'vc-state 'up-to-date)) 175 (vc-file-setprop file 'vc-state 'up-to-date))
176 ((eq status-char ?R)
177 (vc-file-setprop file 'vc-state 'removed))
177 ((eq status-char ?M) 178 ((eq status-char ?M)
178 (vc-file-setprop file 'vc-state 'edited)) 179 (vc-file-setprop file 'vc-state 'edited))
179 ((eq status-char ?C) 180 ((eq status-char ?C)
180 (vc-file-setprop file 'vc-state 'edited)) 181 (vc-file-setprop file 'vc-state 'edited))
181 ((eq status-char ??) 182 ((eq status-char ??)
182 (vc-file-setprop file 'vc-backend 'none) 183 (vc-file-setprop file 'vc-backend 'none)
183 (vc-file-setprop file 'vc-state 'nil))) 184 (vc-file-setprop file 'vc-state nil)))
184 (forward-line))))) 185 (forward-line)))))
185 186
186 (defun vc-git-working-revision (file) 187 (defun vc-git-working-revision (file)
187 "Git-specific version of `vc-working-revision'." 188 "Git-specific version of `vc-working-revision'."
188 (let ((str (with-output-to-string 189 (let ((str (with-output-to-string