emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/vc-bzr.el,v [EMACS_22_BASE]


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-bzr.el,v [EMACS_22_BASE]
Date: Fri, 14 Mar 2008 19:38:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Stefan Monnier <monnier>        08/03/14 19:38:46

Index: vc-bzr.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-bzr.el,v
retrieving revision 1.11.2.11
retrieving revision 1.11.2.12
diff -u -b -r1.11.2.11 -r1.11.2.12
--- vc-bzr.el   5 Jan 2008 18:11:24 -0000       1.11.2.11
+++ vc-bzr.el   14 Mar 2008 19:38:46 -0000      1.11.2.12
@@ -146,13 +146,19 @@
                 (vc-bzr-state file)     ; Some other unknown format?
               (let* ((relfile (file-relative-name file root))
                      (reldir (file-name-directory relfile)))
-                (re-search-forward
+                (when (re-search-forward
                  (concat "^\0"
-                         (if reldir (regexp-quote (directory-file-name 
reldir)))
+                               (if reldir (regexp-quote
+                                           (directory-file-name reldir)))
                          "\0"
                          (regexp-quote (file-name-nondirectory relfile))
                          "\0")
-                 nil t)))))))))
+                       nil t)
+                  ;; Make sure `bzr' agrees that this file is under Bzr's
+                  ;; control.  This is important because if `bzr' is not
+                  ;; installed vc-find-file may otherwise get an error in
+                  ;; the subsequent call to `vc-state'.
+                  (vc-bzr-state file))))))))))
 
 (defconst vc-bzr-state-words
   "added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown"
@@ -430,7 +436,7 @@
     ;; to allow saving space by sharing the text properties.
     (setq vc-bzr-annotation-table (make-hash-table :test 'equal))
     (goto-char (point-min))
-    (while (re-search-forward "^\\( *[0-9]+\\) +\\(.+\\) +\\([0-9]\\{8\\}\\) |"
+    (while (re-search-forward "^\\( *[0-9]+ *\\) \\([^\n ]+\\) 
+\\([0-9]\\{8\\}\\) |"
                               nil t)
       (let* ((rev (match-string 1))
              (author (match-string 2))
@@ -446,7 +452,7 @@
         (insert tag " |")))))
 
 (defun vc-bzr-annotate-time ()
-  (when (re-search-forward "^ *[0-9]+ |" nil t)
+  (when (re-search-forward "^ *[0-9]+ +|" nil t)
     (let ((prop (get-text-property (line-beginning-position) 'help-echo)))
       (string-match "[0-9]+\\'" prop)
       (vc-annotate-convert-time




reply via email to

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