Mercurial > emacs
comparison lisp/vc-bzr.el @ 90999:35e3789db058
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 839-842)
- Update from CVS
- Change capitalization of VC backend names for new backends
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-240
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 03 Aug 2007 05:27:05 +0000 |
parents | 539530fa389c 36893fdf92ab |
children | 424b655804ca |
comparison
equal
deleted
inserted
replaced
90998:539530fa389c | 90999:35e3789db058 |
---|---|
61 (require 'cl) | 61 (require 'cl) |
62 (require 'vc)) ; for vc-exec-after | 62 (require 'vc)) ; for vc-exec-after |
63 | 63 |
64 ;; Clear up the cache to force vc-call to check again and discover | 64 ;; Clear up the cache to force vc-call to check again and discover |
65 ;; new functions when we reload this file. | 65 ;; new functions when we reload this file. |
66 (put 'BZR 'vc-functions nil) | 66 (put 'Bzr 'vc-functions nil) |
67 | 67 |
68 (defgroup vc-bzr nil | 68 (defgroup vc-bzr nil |
69 "VC bzr backend." | 69 "VC bzr backend." |
70 ;; :version "22" | 70 ;; :version "22" |
71 :group 'vc) | 71 :group 'vc) |
195 | 195 |
196 (defun vc-bzr-checkout-model (file) | 196 (defun vc-bzr-checkout-model (file) |
197 'implicit) | 197 'implicit) |
198 | 198 |
199 (defun vc-bzr-create-repo () | 199 (defun vc-bzr-create-repo () |
200 "Create a new BZR repository." | 200 "Create a new Bzr repository." |
201 (vc-bzr-command "init" nil 0 nil)) | 201 (vc-bzr-command "init" nil 0 nil)) |
202 | 202 |
203 (defun vc-bzr-register (files &optional rev comment) | 203 (defun vc-bzr-register (files &optional rev comment) |
204 "Register FILE under bzr. | 204 "Register FILE under bzr. |
205 Signal an error unless REV is nil. | 205 Signal an error unless REV is nil. |
438 (line-beginning-position) (line-end-position)) | 438 (line-beginning-position) (line-end-position)) |
439 bzr-root-directory))) | 439 bzr-root-directory))) |
440 (vc-file-setprop file 'vc-state 'up-to-date) | 440 (vc-file-setprop file 'vc-state 'up-to-date) |
441 ;; XXX: is this correct? what happens if one | 441 ;; XXX: is this correct? what happens if one |
442 ;; mixes different SCMs in the same dir? | 442 ;; mixes different SCMs in the same dir? |
443 (vc-file-setprop file 'vc-backend 'BZR)))) | 443 (vc-file-setprop file 'vc-backend 'Bzr)))) |
444 ;; `bzr status' reports on added/modified/renamed and unknown/ignored files | 444 ;; `bzr status' reports on added/modified/renamed and unknown/ignored files |
445 (setq at-start t) | 445 (setq at-start t) |
446 (with-temp-buffer | 446 (with-temp-buffer |
447 (vc-bzr-command "status" t 0 nil) | 447 (vc-bzr-command "status" t 0 nil) |
448 (goto-char (point-min)) | 448 (goto-char (point-min)) |
490 (if (eq 'edited (vc-state file)) | 490 (if (eq 'edited (vc-state file)) |
491 (let ((bzr-state (vc-file-getprop file 'vc-bzr-state))) | 491 (let ((bzr-state (vc-file-getprop file 'vc-bzr-state))) |
492 (if bzr-state | 492 (if bzr-state |
493 (concat "(" (symbol-name bzr-state) ")") | 493 (concat "(" (symbol-name bzr-state) ")") |
494 ;; else fall back to default vc representation | 494 ;; else fall back to default vc representation |
495 (vc-default-dired-state-info 'BZR file))))) | 495 (vc-default-dired-state-info 'Bzr file))))) |
496 | 496 |
497 ;; In case of just `(load "vc-bzr")', but that's probably the wrong | 497 ;; In case of just `(load "vc-bzr")', but that's probably the wrong |
498 ;; way to do it. | 498 ;; way to do it. |
499 (add-to-list 'vc-handled-backends 'BZR) | 499 (add-to-list 'vc-handled-backends 'Bzr) |
500 | 500 |
501 (eval-after-load "vc" | 501 (eval-after-load "vc" |
502 '(add-to-list 'vc-directory-exclusion-list ".bzr" t)) | 502 '(add-to-list 'vc-directory-exclusion-list ".bzr" t)) |
503 | 503 |
504 (defconst vc-bzr-unload-hook | 504 (defconst vc-bzr-unload-hook |
505 (lambda () | 505 (lambda () |
506 (setq vc-handled-backends (delq 'BZR vc-handled-backends)) | 506 (setq vc-handled-backends (delq 'Bzr vc-handled-backends)) |
507 (remove-hook 'vc-post-command-functions 'vc-bzr-post-command-function))) | 507 (remove-hook 'vc-post-command-functions 'vc-bzr-post-command-function))) |
508 | 508 |
509 (provide 'vc-bzr) | 509 (provide 'vc-bzr) |
510 ;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06 | 510 ;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06 |
511 ;;; vc-bzr.el ends here | 511 ;;; vc-bzr.el ends here |