Mercurial > emacs
comparison lisp/vc-hg.el @ 87574:21fcd219fd6e
* mouse.el (mouse-popup-menubar): Fix typo.
* emacs-lisp/bytecomp.el (byte-compile-from-buffer): Move one more
form inside with-current-buffer.
* progmodes/antlr-mode.el (provide): Move to the end of file.
(require): Don't require font-lock and compile.
(outline-level, imenu-use-markers, imenu-create-index-function):
Move declarations to top level.
(cond-emacs-xemacs-macfn): Declare for compiler.
* vc-bzr.el (vc-bzr-root):
* vc-arch.el (vc-arch-root): Only set a property if the file is
managed by this backend.
* vc-hg.el (vc-hg-state): Support the new status code for
up-to-date.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 04 Jan 2008 08:34:15 +0000 |
parents | be64fe15280d |
children | efe45ef69877 |
comparison
equal
deleted
inserted
replaced
87573:7e5487d828ff | 87574:21fcd219fd6e |
---|---|
170 (error nil))))))) | 170 (error nil))))))) |
171 (when (eq 0 status) | 171 (when (eq 0 status) |
172 (when (null (string-match ".*: No such file or directory$" out)) | 172 (when (null (string-match ".*: No such file or directory$" out)) |
173 (let ((state (aref out 0))) | 173 (let ((state (aref out 0))) |
174 (cond | 174 (cond |
175 ((eq state ?C) 'up-to-date) | 175 ((eq state ?=) 'up-to-date) |
176 ((eq state ?A) 'edited) | 176 ((eq state ?A) 'edited) |
177 ((eq state ?M) 'edited) | 177 ((eq state ?M) 'edited) |
178 ((eq state ?I) 'ignored) | 178 ((eq state ?I) 'ignored) |
179 ((eq state ?R) 'unregistered) | 179 ((eq state ?R) 'unregistered) |
180 ((eq state ??) 'unregistered) | 180 ((eq state ??) 'unregistered) |
181 ((eq state ?C) 'up-to-date) ;; Older mercurials use this | |
181 (t 'up-to-date))))))) | 182 (t 'up-to-date))))))) |
182 | 183 |
183 (defun vc-hg-dir-state (dir) | 184 (defun vc-hg-dir-state (dir) |
184 (with-temp-buffer | 185 (with-temp-buffer |
185 (buffer-disable-undo) ;; Because these buffers can get huge | 186 (buffer-disable-undo) ;; Because these buffers can get huge |
197 ;; State flag for a clean file is now C, might change to =. | 198 ;; State flag for a clean file is now C, might change to =. |
198 ;; The rest of the possible states in "hg status" output: | 199 ;; The rest of the possible states in "hg status" output: |
199 ;; ! = deleted, but still tracked | 200 ;; ! = deleted, but still tracked |
200 ;; should not show up in vc-dired, so don't deal with them | 201 ;; should not show up in vc-dired, so don't deal with them |
201 ;; here. | 202 ;; here. |
202 ((eq status-char ?C) | 203 |
204 ;; Mercurial up to 0.9.5 used C, = is used now. | |
205 ((or (eq status-char ?=) (eq status-char ?C)) | |
203 (vc-file-setprop file 'vc-backend 'Hg) | 206 (vc-file-setprop file 'vc-backend 'Hg) |
204 (vc-file-setprop file 'vc-state 'up-to-date)) | 207 (vc-file-setprop file 'vc-state 'up-to-date)) |
205 ((eq status-char ?A) | 208 ((eq status-char ?A) |
206 (vc-file-setprop file 'vc-backend 'Hg) | 209 (vc-file-setprop file 'vc-backend 'Hg) |
207 (vc-file-setprop file 'vc-working-revision "0") | 210 (vc-file-setprop file 'vc-working-revision "0") |