comparison lisp/vc-arch.el @ 56954:242cddb00aef

(vc-arch-workfile-version): Handle the special case before the first commit.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 07 Sep 2004 04:49:03 +0000
parents 9d529d2aac14
children 992d9837a265
comparison
equal deleted inserted replaced
56953:2cc3f5b16438 56954:242cddb00aef
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.
301 (if (and (string-match "-\\([0-9]+\\)\\'" file) 302 (if (and (string-match "-\\([0-9]+\\)\\'" file)
302 (setq tmp (string-to-number (match-string 1 file))) 303 (setq tmp (string-to-number (match-string 1 file)))
303 (or (not sealed) (eq (aref file 0) ?v)) 304 (or (not sealed) (eq (aref file 0) ?v))
304 (>= tmp rev-nb)) 305 (>= tmp rev-nb))
305 (setq rev-nb tmp rev file))) 306 (setq rev-nb tmp rev file)))
306 (concat defbranch "--" rev))))) 307 ;; Use "none-000" if the tree hasn't yet been committed on the
308 ;; default branch. We'll then get "Arch:000[branch]" on the mode-line.
309 (concat defbranch "--" (or rev "none-000"))))))
307 310
308 311
309 (defcustom vc-arch-mode-line-rewrite 312 (defcustom vc-arch-mode-line-rewrite
310 '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]")) 313 '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]"))
311 "Rewrite rules to shorten Arch's revision names on the mode-line." 314 "Rewrite rules to shorten Arch's revision names on the mode-line."
416 419
417 (defun vc-arch-init-version () nil) 420 (defun vc-arch-init-version () nil)
418 421
419 (provide 'vc-arch) 422 (provide 'vc-arch)
420 423
421 ;;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 424 ;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704
422 ;;; vc-arch.el ends here 425 ;;; vc-arch.el ends here