aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-12-10 18:54:07 -0800
committerGlenn Morris2010-12-10 18:54:07 -0800
commit2b404597762b85483fc89f716848efac34847aa9 (patch)
tree0b928727e64b265690e28e68d9e42817fa585361
parent6961d41cfbf7256ecd1f1b7befe59cf635deb73b (diff)
downloademacs-2b404597762b85483fc89f716848efac34847aa9.tar.gz
emacs-2b404597762b85483fc89f716848efac34847aa9.zip
Misc vc-bzr.el.
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic): Also check that the executable state of the file matches. (Bug#7544) (vc-bzr-register, vc-bzr-checkin) (vc-bzr-annotate-extract-revision-at-line): Doc fixes. (vc-directory-exclusion-list): Remove unnecessary eval-after-load. Comment changes: Remove outdated comments about defunct upstream. Set maintainer to FSF.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc/vc-bzr.el57
2 files changed, 40 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 130bc61f642..1659f610f7e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
12010-12-11 Glenn Morris <rgm@gnu.org> 12010-12-11 Glenn Morris <rgm@gnu.org>
2 2
3 * vc/vc-bzr.el (vc-bzr-state-heuristic): Also check that the executable
4 state of the file matches. (Bug#7544)
5 (vc-bzr-register, vc-bzr-checkin)
6 (vc-bzr-annotate-extract-revision-at-line): Doc fixes.
7 (vc-directory-exclusion-list): Remove unnecessary eval-after-load.
8
3 * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension. 9 * textmodes/sgml-mode.el (sgml-xml-guess): Add .xhtml extension.
4 10
52010-12-11 Karel Klíč <kklic@redhat.com> 112010-12-11 Karel Klíč <kklic@redhat.com>
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 9c253e027e4..9b0d402c078 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1,13 +1,13 @@
1;;; vc-bzr.el --- VC backend for the bzr revision control system 1;;; vc-bzr.el --- VC backend for the bzr revision control system
2 2
3;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3;; Copyright (C) 2006, 2007, 2008, 2009, 2010
4;; Free Software Foundation, Inc.
4 5
5;; Author: Dave Love <fx@gnu.org> 6;; Author: Dave Love <fx@gnu.org>
6;; Riccardo Murri <riccardo.murri@gmail.com> 7;; Riccardo Murri <riccardo.murri@gmail.com>
8;; Maintainer: FSF
7;; Keywords: vc tools 9;; Keywords: vc tools
8;; Created: Sept 2006 10;; Created: Sept 2006
9;; Version: 2008-01-04
10;; URL: http://launchpad.net/vc-bzr
11;; Package: vc 11;; Package: vc
12 12
13;; This file is part of GNU Emacs. 13;; This file is part of GNU Emacs.
@@ -27,11 +27,9 @@
27 27
28;;; Commentary: 28;;; Commentary:
29 29
30;; See <URL:http://bazaar-vcs.org/> concerning bzr. See 30;; See <URL:http://bazaar.canonical.com/> concerning bzr.
31;; <URL:http://launchpad.net/vc-bzr> for alternate development
32;; branches of `vc-bzr'.
33 31
34;; Load this library to register bzr support in VC. 32;; This library provides bzr support in VC.
35 33
36;; Known bugs 34;; Known bugs
37;; ========== 35;; ==========
@@ -42,9 +40,6 @@
42;; (that is, the target contents) are changed. 40;; (that is, the target contents) are changed.
43;; See https://bugs.launchpad.net/vc-bzr/+bug/116607 41;; See https://bugs.launchpad.net/vc-bzr/+bug/116607
44 42
45;; For an up-to-date list of bugs, please see:
46;; https://bugs.launchpad.net/vc-bzr/+bugs
47
48;;; Properties of the backend 43;;; Properties of the backend
49 44
50(defun vc-bzr-revision-granularity () 'repository) 45(defun vc-bzr-revision-granularity () 'repository)
@@ -104,6 +99,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and
104;;;###autoload 99;;;###autoload
105(defconst vc-bzr-admin-dirname ".bzr" 100(defconst vc-bzr-admin-dirname ".bzr"
106 "Name of the directory containing Bzr repository status files.") 101 "Name of the directory containing Bzr repository status files.")
102;; Used in the autoloaded vc-bzr-registered; see below.
107;;;###autoload 103;;;###autoload
108(defconst vc-bzr-admin-checkout-format-file 104(defconst vc-bzr-admin-checkout-format-file
109 (concat vc-bzr-admin-dirname "/checkout/format")) 105 (concat vc-bzr-admin-dirname "/checkout/format"))
@@ -154,7 +150,7 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and
154 150
155(defun vc-bzr-state-heuristic (file) 151(defun vc-bzr-state-heuristic (file)
156 "Like `vc-bzr-state' but hopefully without running Bzr." 152 "Like `vc-bzr-state' but hopefully without running Bzr."
157 ;; `bzr status' was excrutiatingly slow with large histories and 153 ;; `bzr status' was excruciatingly slow with large histories and
158 ;; pending merges, so try to avoid using it until they fix their 154 ;; pending merges, so try to avoid using it until they fix their
159 ;; performance problems. 155 ;; performance problems.
160 ;; This function tries first to parse Bzr internal file 156 ;; This function tries first to parse Bzr internal file
@@ -188,12 +184,16 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and
188 "\\([^\0]*\\)\0" ;"a/f/d", a=removed? 184 "\\([^\0]*\\)\0" ;"a/f/d", a=removed?
189 "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)? 185 "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)?
190 "\\([^\0]*\\)\0" ;size?p 186 "\\([^\0]*\\)\0" ;size?p
191 "[^\0]*\0" ;"y/n", executable? 187 ;; y/n. Whether or not the current copy
188 ;; was executable the last time bzr checked?
189 "[^\0]*\0"
192 "[^\0]*\0" ;? 190 "[^\0]*\0" ;?
193 "\\([^\0]*\\)\0" ;"a/f/d" a=added? 191 "\\([^\0]*\\)\0" ;"a/f/d" a=added?
194 "\\([^\0]*\\)\0" ;sha1 again? 192 "\\([^\0]*\\)\0" ;sha1 again?
195 "\\([^\0]*\\)\0" ;size again? 193 "\\([^\0]*\\)\0" ;size again?
196 "[^\0]*\0" ;"y/n", executable again? 194 ;; y/n. Whether or not the repo thinks
195 ;; the file should be executable?
196 "\\([^\0]*\\)\0"
197 "[^\0]*\0" ;last revid? 197 "[^\0]*\0" ;last revid?
198 ;; There are more fields when merges are pending. 198 ;; There are more fields when merges are pending.
199 ) 199 )
@@ -207,8 +207,22 @@ Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and
207 ((eq (char-after (match-beginning 4)) ?a) 'added) 207 ((eq (char-after (match-beginning 4)) ?a) 'added)
208 ((or (and (eq (string-to-number (match-string 3)) 208 ((or (and (eq (string-to-number (match-string 3))
209 (nth 7 (file-attributes file))) 209 (nth 7 (file-attributes file)))
210 (equal (match-string 5) 210 (equal (match-string 5)
211 (vc-bzr-sha1 file))) 211 (vc-bzr-sha1 file))
212 ;; For a file, does the executable state match?
213 ;; (Bug#7544)
214 (or (not
215 (eq (char-after (match-beginning 1)) ?f))
216 (let ((exe
217 (memq
218 ?x
219 (mapcar
220 'identity
221 (nth 8 (file-attributes file))))))
222 (if (eq (char-after (match-beginning 7))
223 ?y)
224 exe
225 (not exe)))))
212 (and 226 (and
213 ;; It looks like for lightweight 227 ;; It looks like for lightweight
214 ;; checkouts \2 is empty and we need to 228 ;; checkouts \2 is empty and we need to
@@ -523,7 +537,7 @@ If any error occurred in running `bzr status', then return nil."
523 (error "Don't know how to compute the next revision of %s" rev))) 537 (error "Don't know how to compute the next revision of %s" rev)))
524 538
525(defun vc-bzr-register (files &optional rev comment) 539(defun vc-bzr-register (files &optional rev comment)
526 "Register FILE under bzr. 540 "Register FILES under bzr.
527Signal an error unless REV is nil. 541Signal an error unless REV is nil.
528COMMENT is ignored." 542COMMENT is ignored."
529 (if rev (error "Can't register explicit revision with bzr")) 543 (if rev (error "Can't register explicit revision with bzr"))
@@ -555,7 +569,7 @@ or a superior directory.")
555(declare-function log-edit-extract-headers "log-edit" (headers string)) 569(declare-function log-edit-extract-headers "log-edit" (headers string))
556 570
557(defun vc-bzr-checkin (files rev comment) 571(defun vc-bzr-checkin (files rev comment)
558 "Check FILE in to bzr with log message COMMENT. 572 "Check FILES in to bzr with log message COMMENT.
559REV non-nil gets an error." 573REV non-nil gets an error."
560 (if rev (error "Can't check in a specific revision with bzr")) 574 (if rev (error "Can't check in a specific revision with bzr"))
561 (apply 'vc-bzr-command "commit" nil 0 575 (apply 'vc-bzr-command "commit" nil 0
@@ -744,7 +758,7 @@ property containing author and date information."
744 (string-to-number (substring str 0 4)))))))) 758 (string-to-number (substring str 0 4))))))))
745 759
746(defun vc-bzr-annotate-extract-revision-at-line () 760(defun vc-bzr-annotate-extract-revision-at-line ()
747 "Return revision for current line of annoation buffer, or nil. 761 "Return revision for current line of annotation buffer, or nil.
748Return nil if current line isn't annotated." 762Return nil if current line isn't annotated."
749 (save-excursion 763 (save-excursion
750 (beginning-of-line) 764 (beginning-of-line)
@@ -1040,7 +1054,7 @@ stream. Standard error output is discarded."
1040(defun vc-bzr-shelve-delete-at-point () 1054(defun vc-bzr-shelve-delete-at-point ()
1041 (interactive) 1055 (interactive)
1042 (let ((shelve (vc-bzr-shelve-get-at-point (point)))) 1056 (let ((shelve (vc-bzr-shelve-get-at-point (point))))
1043 (when (y-or-n-p (format "Remove shelf %s ?" shelve)) 1057 (when (y-or-n-p (format "Remove shelf %s ? " shelve))
1044 (vc-bzr-command "unshelve" nil 0 nil "--delete-only" shelve) 1058 (vc-bzr-command "unshelve" nil 0 nil "--delete-only" shelve)
1045 (vc-dir-refresh)))) 1059 (vc-dir-refresh))))
1046 1060
@@ -1150,9 +1164,6 @@ stream. Standard error output is discarded."
1150 vc-bzr-revision-keywords)) 1164 vc-bzr-revision-keywords))
1151 string pred)))))) 1165 string pred))))))
1152 1166
1153(eval-after-load "vc"
1154 '(add-to-list 'vc-directory-exclusion-list vc-bzr-admin-dirname t))
1155
1156(provide 'vc-bzr) 1167(provide 'vc-bzr)
1157;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06 1168
1158;;; vc-bzr.el ends here 1169;;; vc-bzr.el ends here