]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-bzr-working-revision): Fix looking for a revision
authorDan Nicolaescu <dann@ics.uci.edu>
Tue, 5 Jan 2010 21:19:34 +0000 (13:19 -0800)
committerDan Nicolaescu <dann@ics.uci.edu>
Tue, 5 Jan 2010 21:19:34 +0000 (13:19 -0800)
in a lightweight checkout.

lisp/ChangeLog
lisp/vc-bzr.el

index 1b49344036749fbe968ded3eac728a5d9fe30fa2..2dc2a1270bda4cf056dad03385582cd29b1aa580 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-05  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision
+       in a lightweight checkout.
+
 2010-01-05  Kenichi Handa  <handa@m17n.org>
 
        * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and
index fc62696af1d693d39319b3c5dfe6d2d17043d1c3..d0b8ec8ff6ae52d8febb432cdaa187fcd186ff15 100644 (file)
@@ -356,9 +356,19 @@ If any error occurred in running `bzr status', then return nil."
               (if (file-exists-p location-fname)
                   (with-temp-buffer
                     (insert-file-contents location-fname)
-                    (when (re-search-forward "file://\(.+\)" nil t)
-                      (setq branch-format-file (match-string 1))
-                      (file-exists-p branch-format-file)))
+                    ;; If the lightweight checkout points to a
+                    ;; location in the local file system, then we can
+                    ;; look there for the version information.
+                    (when (re-search-forward "file://\\(.+\\)" nil t)
+                      (let ((l-c-parent-dir (match-string 1)))
+                        (setq branch-format-file
+                              (expand-file-name vc-bzr-admin-branch-format-file
+                                                l-c-parent-dir))
+                        (setq lastrev-file
+                              (expand-file-name vc-bzr-admin-lastrev l-c-parent-dir))
+                        ;; FIXME: maybe it's overkill to check if both these files exist.
+                        (and (file-exists-p branch-format-file)
+                             (file-exists-p lastrev-file)))))
                 t)))
         (with-temp-buffer
           (insert-file-contents branch-format-file)