comparison lisp/vc-arch.el @ 89971:cce1c0ee76ee

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36 Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523 Merge from emacs--gnus--5.10, gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534 Update from CVS * miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0 tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1 Import from CVS branch gnus-5_10-branch * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2 Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19 Remove autoconf-generated files from archive * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20 Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 09 Sep 2004 09:36:36 +0000
parents 59dcbfe97385 992d9837a265
children 566253900690
comparison
equal deleted inserted replaced
89970:a849e5779b8c 89971:cce1c0ee76ee
1 ;;; vc-arch.el --- VC backend for the Arch version-control system 1 ;;; vc-arch.el --- VC backend for the Arch version-control system
2 2
3 ;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 ;; Free Software Foundation, Inc.
4 5
5 ;; Author: FSF (see vc.el for full credits) 6 ;; Author: FSF (see vc.el for full credits)
6 ;; Maintainer: Stefan Monnier <monnier@gnu.org> 7 ;; Maintainer: Stefan Monnier <monnier@gnu.org>
7 8
8 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
251 (let ((id (vc-arch-file-id file))) 252 (let ((id (vc-arch-file-id file)))
252 (setq id (replace-regexp-in-string "[ \t]" "_" id)) 253 (setq id (replace-regexp-in-string "[ \t]" "_" id))
253 (with-current-buffer (find-file-noselect sigfile) 254 (with-current-buffer (find-file-noselect sigfile)
254 (goto-char (point-min)) 255 (goto-char (point-min))
255 (while (and (search-forward id nil 'move) 256 (while (and (search-forward id nil 'move)
256 (progn (goto-char (- (match-beginning 0) 2)) 257 (save-excursion
257 ;; Ignore E_ entries used for foo.id files. 258 (goto-char (- (match-beginning 0) 2))
258 (or (not (bolp)) (looking-at "E_"))))) 259 ;; 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_")))))
259 (if (eobp) 264 (if (eobp)
260 ;; ID not found. 265 ;; ID not found.
261 (if (equal (file-name-nondirectory sigfile) 266 (if (equal (file-name-nondirectory sigfile)
262 (subst-char-in-string 267 (subst-char-in-string
263 ?/ ?% (vc-arch-workfile-version file))) 268 ?/ ?% (vc-arch-workfile-version file)))
301 (if (and (string-match "-\\([0-9]+\\)\\'" file) 306 (if (and (string-match "-\\([0-9]+\\)\\'" file)
302 (setq tmp (string-to-number (match-string 1 file))) 307 (setq tmp (string-to-number (match-string 1 file)))
303 (or (not sealed) (eq (aref file 0) ?v)) 308 (or (not sealed) (eq (aref file 0) ?v))
304 (>= tmp rev-nb)) 309 (>= tmp rev-nb))
305 (setq rev-nb tmp rev file))) 310 (setq rev-nb tmp rev file)))
306 (concat defbranch "--" rev))))) 311 ;; 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"))))))
307 314
308 315
309 (defcustom vc-arch-mode-line-rewrite 316 (defcustom vc-arch-mode-line-rewrite
310 '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]")) 317 '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]"))
311 "Rewrite rules to shorten Arch's revision names on the mode-line." 318 "Rewrite rules to shorten Arch's revision names on the mode-line."
416 423
417 (defun vc-arch-init-version () nil) 424 (defun vc-arch-init-version () nil)
418 425
419 (provide 'vc-arch) 426 (provide 'vc-arch)
420 427
421 ;;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 428 ;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704
422 ;;; vc-arch.el ends here 429 ;;; vc-arch.el ends here