Mercurial > emacs
comparison lisp/vc-bzr.el @ 106742:debedd261607
(vc-bzr-working-revision): Fix looking for a revision
in a lightweight checkout.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 05 Jan 2010 13:19:34 -0800 |
parents | d804f575197b |
children | d94786c1fa6c |
comparison
equal
deleted
inserted
replaced
106741:c0641205dcbb | 106742:debedd261607 |
---|---|
354 ;; The existence of this file is how we distinguish | 354 ;; The existence of this file is how we distinguish |
355 ;; lightweight checkouts. | 355 ;; lightweight checkouts. |
356 (if (file-exists-p location-fname) | 356 (if (file-exists-p location-fname) |
357 (with-temp-buffer | 357 (with-temp-buffer |
358 (insert-file-contents location-fname) | 358 (insert-file-contents location-fname) |
359 (when (re-search-forward "file://\(.+\)" nil t) | 359 ;; If the lightweight checkout points to a |
360 (setq branch-format-file (match-string 1)) | 360 ;; location in the local file system, then we can |
361 (file-exists-p branch-format-file))) | 361 ;; look there for the version information. |
362 (when (re-search-forward "file://\\(.+\\)" nil t) | |
363 (let ((l-c-parent-dir (match-string 1))) | |
364 (setq branch-format-file | |
365 (expand-file-name vc-bzr-admin-branch-format-file | |
366 l-c-parent-dir)) | |
367 (setq lastrev-file | |
368 (expand-file-name vc-bzr-admin-lastrev l-c-parent-dir)) | |
369 ;; FIXME: maybe it's overkill to check if both these files exist. | |
370 (and (file-exists-p branch-format-file) | |
371 (file-exists-p lastrev-file))))) | |
362 t))) | 372 t))) |
363 (with-temp-buffer | 373 (with-temp-buffer |
364 (insert-file-contents branch-format-file) | 374 (insert-file-contents branch-format-file) |
365 (goto-char (point-min)) | 375 (goto-char (point-min)) |
366 (cond | 376 (cond |