1 |
;;; vc-arch.el --- VC backend for the Arch version-control system |
;;; vc-arch.el --- VC backend for the Arch version-control system |
2 |
|
|
3 |
;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc. |
;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: FSF (see vc.el for full credits) |
;; Author: FSF (see vc.el for full credits) |
7 |
;; Maintainer: Stefan Monnier <monnier@gnu.org> |
;; Maintainer: Stefan Monnier <monnier@gnu.org> |
254 |
(with-current-buffer (find-file-noselect sigfile) |
(with-current-buffer (find-file-noselect sigfile) |
255 |
(goto-char (point-min)) |
(goto-char (point-min)) |
256 |
(while (and (search-forward id nil 'move) |
(while (and (search-forward id nil 'move) |
257 |
(progn (goto-char (- (match-beginning 0) 2)) |
(save-excursion |
258 |
;; Ignore E_ entries used for foo.id files. |
(goto-char (- (match-beginning 0) 2)) |
259 |
(or (not (bolp)) (looking-at "E_"))))) |
;; For `names', the lines start with `?./foo/bar'. |
260 |
|
;; For others there's 2 chars before the ./foo/bar. |
261 |
|
(or (not (or (bolp) (looking-at "\n?"))) |
262 |
|
;; Ignore E_ entries used for foo.id files. |
263 |
|
(looking-at "E_"))))) |
264 |
(if (eobp) |
(if (eobp) |
265 |
;; ID not found. |
;; ID not found. |
266 |
(if (equal (file-name-nondirectory sigfile) |
(if (equal (file-name-nondirectory sigfile) |
308 |
(or (not sealed) (eq (aref file 0) ?v)) |
(or (not sealed) (eq (aref file 0) ?v)) |
309 |
(>= tmp rev-nb)) |
(>= tmp rev-nb)) |
310 |
(setq rev-nb tmp rev file))) |
(setq rev-nb tmp rev file))) |
311 |
(concat defbranch "--" rev))))) |
;; Use "none-000" if the tree hasn't yet been committed on the |
312 |
|
;; default branch. We'll then get "Arch:000[branch]" on the mode-line. |
313 |
|
(concat defbranch "--" (or rev "none-000")))))) |
314 |
|
|
315 |
|
|
316 |
(defcustom vc-arch-mode-line-rewrite |
(defcustom vc-arch-mode-line-rewrite |
425 |
|
|
426 |
(provide 'vc-arch) |
(provide 'vc-arch) |
427 |
|
|
428 |
;;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 |
;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 |
429 |
;;; vc-arch.el ends here |
;;; vc-arch.el ends here |