emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103517: * lisp/vc/vc-bzr.el (vc-bzr-


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103517: * lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0. (Bug#8170)
Date: Fri, 04 Mar 2011 09:24:02 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103517
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2011-03-04 09:24:02 -0800
message:
  * lisp/vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0.  (Bug#8170)
modified:
  lisp/ChangeLog
  lisp/vc/vc-bzr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-04 16:19:56 +0000
+++ b/lisp/ChangeLog    2011-03-04 17:24:02 +0000
@@ -1,3 +1,7 @@
+2011-03-04  Glenn Morris  <address@hidden>
+
+       * vc/vc-bzr.el (vc-bzr-after-dir-status): Handle bzr 2.3.0.  (Bug#8170)
+
 2011-03-04  Tom Tromey  <address@hidden>
 
        * progmodes/gud.el (gdb-script-mode): Derive from prog-mode.

=== modified file 'lisp/vc/vc-bzr.el'
--- a/lisp/vc/vc-bzr.el 2011-03-03 06:25:21 +0000
+++ b/lisp/vc/vc-bzr.el 2011-03-04 17:24:02 +0000
@@ -879,38 +879,40 @@
        (result nil))
       (goto-char (point-min))
       (while (not (eobp))
-       (setq status-str
-             (buffer-substring-no-properties (point) (+ (point) 3)))
-       (setq translated (cdr (assoc status-str translation)))
-       (cond
-        ((eq translated 'conflict)
-         ;; For conflicts the file appears twice in the listing: once
-         ;; with the M flag and once with the C flag, so take care
-         ;; not to add it twice to `result'.  Ugly.
-         (let* ((file
-                 (buffer-substring-no-properties
-                  ;;For files with conflicts the format is:
-                  ;;C   Text conflict in FILENAME
-                  ;; Bah.
-                  (+ (point) 21) (line-end-position)))
-                (entry (assoc file result)))
-           (when entry
-             (setf (nth 1 entry) 'conflict))))
-        ((eq translated 'renamed)
-         (re-search-forward "R[ M]  \\(.*\\) => \\(.*\\)$" (line-end-position) 
t)
-         (let ((new-name (file-relative-name (match-string 2) relative-dir))
-               (old-name (file-relative-name (match-string 1) relative-dir)))
-           (push (list new-name 'edited
-                     (vc-bzr-create-extra-fileinfo old-name)) result)))
-        ;; do nothing for non existent files
-        ((eq translated 'not-found))
-        (t
-         (push (list (file-relative-name
-                      (buffer-substring-no-properties
-                       (+ (point) 4)
-                       (line-end-position)) relative-dir)
-                     translated) result)))
-       (forward-line))
+        ;; Bzr 2.3.0 added this if there are shelves.  (Bug#8170)
+        (unless (looking-at "[1-9]+ shel\\(f\\|ves\\) exists?\\.")
+          (setq status-str
+                (buffer-substring-no-properties (point) (+ (point) 3)))
+          (setq translated (cdr (assoc status-str translation)))
+          (cond
+           ((eq translated 'conflict)
+            ;; For conflicts the file appears twice in the listing: once
+            ;; with the M flag and once with the C flag, so take care
+            ;; not to add it twice to `result'.  Ugly.
+            (let* ((file
+                    (buffer-substring-no-properties
+                     ;;For files with conflicts the format is:
+                     ;;C   Text conflict in FILENAME
+                     ;; Bah.
+                     (+ (point) 21) (line-end-position)))
+                   (entry (assoc file result)))
+              (when entry
+                (setf (nth 1 entry) 'conflict))))
+           ((eq translated 'renamed)
+            (re-search-forward "R[ M]  \\(.*\\) => \\(.*\\)$" 
(line-end-position) t)
+            (let ((new-name (file-relative-name (match-string 2) relative-dir))
+                  (old-name (file-relative-name (match-string 1) 
relative-dir)))
+              (push (list new-name 'edited
+                          (vc-bzr-create-extra-fileinfo old-name)) result)))
+           ;; do nothing for non existent files
+           ((eq translated 'not-found))
+           (t
+            (push (list (file-relative-name
+                         (buffer-substring-no-properties
+                          (+ (point) 4)
+                          (line-end-position)) relative-dir)
+                        translated) result))))
+        (forward-line))
       (funcall update-function result)))
 
 (defun vc-bzr-dir-status (dir update-function)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]