# HG changeset patch # User Dan Nicolaescu # Date 1262726374 28800 # Node ID debedd26160721eb71da56d6f70e75f2648d8316 # Parent c0641205dcbba2d858724a172c8df01cb97b1073 (vc-bzr-working-revision): Fix looking for a revision in a lightweight checkout. diff -r c0641205dcbb -r debedd261607 lisp/ChangeLog --- a/lisp/ChangeLog Tue Jan 05 21:37:43 2010 +0100 +++ b/lisp/ChangeLog Tue Jan 05 13:19:34 2010 -0800 @@ -1,3 +1,8 @@ +2010-01-05 Dan Nicolaescu + + * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision + in a lightweight checkout. + 2010-01-05 Kenichi Handa * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and diff -r c0641205dcbb -r debedd261607 lisp/vc-bzr.el --- a/lisp/vc-bzr.el Tue Jan 05 21:37:43 2010 +0100 +++ b/lisp/vc-bzr.el Tue Jan 05 13:19:34 2010 -0800 @@ -356,9 +356,19 @@ (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)