aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-03-04 09:24:02 -0800
committerGlenn Morris2011-03-04 09:24:02 -0800
commit85a55d3871ce4efbde1666bd48b4fca1c638ee99 (patch)
treec330b227dbacd6a2d3bb59d7cc845b522922d32b
parent38c179c925150cf72d4afac1075e900e36177e53 (diff)
downloademacs-85a55d3871ce4efbde1666bd48b4fca1c638ee99.tar.gz
emacs-85a55d3871ce4efbde1666bd48b4fca1c638ee99.zip
* lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170)
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc/vc-bzr.el66
2 files changed, 38 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d22a209afa3..2fca345992d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-03-04 Glenn Morris <rgm@gnu.org>
2
3 * vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170)
4
12011-03-04 Tom Tromey <tromey@redhat.com> 52011-03-04 Tom Tromey <tromey@redhat.com>
2 6
3 * progmodes/gud.el (gdb-script-mode): Derive from prog-mode. 7 * progmodes/gud.el (gdb-script-mode): Derive from prog-mode.
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 99b70b06882..a0a16601ed7 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -879,38 +879,40 @@ stream. Standard error output is discarded."
879 (result nil)) 879 (result nil))
880 (goto-char (point-min)) 880 (goto-char (point-min))
881 (while (not (eobp)) 881 (while (not (eobp))
882 (setq status-str 882 ;; Bzr 2.3.0 added this if there are shelves. (Bug#8170)
883 (buffer-substring-no-properties (point) (+ (point) 3))) 883 (unless (looking-at "[1-9]+ shel\\(f\\|ves\\) exists?\\.")
884 (setq translated (cdr (assoc status-str translation))) 884 (setq status-str
885 (cond 885 (buffer-substring-no-properties (point) (+ (point) 3)))
886 ((eq translated 'conflict) 886 (setq translated (cdr (assoc status-str translation)))
887 ;; For conflicts the file appears twice in the listing: once 887 (cond
888 ;; with the M flag and once with the C flag, so take care 888 ((eq translated 'conflict)
889 ;; not to add it twice to `result'. Ugly. 889 ;; For conflicts the file appears twice in the listing: once
890 (let* ((file 890 ;; with the M flag and once with the C flag, so take care
891 (buffer-substring-no-properties 891 ;; not to add it twice to `result'. Ugly.
892 ;;For files with conflicts the format is: 892 (let* ((file
893 ;;C Text conflict in FILENAME 893 (buffer-substring-no-properties
894 ;; Bah. 894 ;;For files with conflicts the format is:
895 (+ (point) 21) (line-end-position))) 895 ;;C Text conflict in FILENAME
896 (entry (assoc file result))) 896 ;; Bah.
897 (when entry 897 (+ (point) 21) (line-end-position)))
898 (setf (nth 1 entry) 'conflict)))) 898 (entry (assoc file result)))
899 ((eq translated 'renamed) 899 (when entry
900 (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t) 900 (setf (nth 1 entry) 'conflict))))
901 (let ((new-name (file-relative-name (match-string 2) relative-dir)) 901 ((eq translated 'renamed)
902 (old-name (file-relative-name (match-string 1) relative-dir))) 902 (re-search-forward "R[ M] \\(.*\\) => \\(.*\\)$" (line-end-position) t)
903 (push (list new-name 'edited 903 (let ((new-name (file-relative-name (match-string 2) relative-dir))
904 (vc-bzr-create-extra-fileinfo old-name)) result))) 904 (old-name (file-relative-name (match-string 1) relative-dir)))
905 ;; do nothing for non existent files 905 (push (list new-name 'edited
906 ((eq translated 'not-found)) 906 (vc-bzr-create-extra-fileinfo old-name)) result)))
907 (t 907 ;; do nothing for non existent files
908 (push (list (file-relative-name 908 ((eq translated 'not-found))
909 (buffer-substring-no-properties 909 (t
910 (+ (point) 4) 910 (push (list (file-relative-name
911 (line-end-position)) relative-dir) 911 (buffer-substring-no-properties
912 translated) result))) 912 (+ (point) 4)
913 (forward-line)) 913 (line-end-position)) relative-dir)
914 translated) result))))
915 (forward-line))
914 (funcall update-function result))) 916 (funcall update-function result)))
915 917
916(defun vc-bzr-dir-status (dir update-function) 918(defun vc-bzr-dir-status (dir update-function)