comparison lisp/vc-cvs.el @ 41707:94df6eb103b3

(vc-cvs-parse-status): Store file state in property, don't just return it.
author André Spiegel <spiegel@gnu.org>
date Fri, 30 Nov 2001 13:47:39 +0000
parents 143b4b27b6c9
children 0f4506820432
comparison
equal deleted inserted replaced
41706:4289324b443e 41707:94df6eb103b3
3 ;; Copyright (C) 1995,98,99,2000,2001 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995,98,99,2000,2001 Free Software Foundation, Inc.
4 4
5 ;; Author: FSF (see vc.el for full credits) 5 ;; Author: FSF (see vc.el for full credits)
6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org> 6 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
7 7
8 ;; $Id: vc-cvs.el,v 1.26 2001/10/22 07:57:00 spiegel Exp $ 8 ;; $Id: vc-cvs.el,v 1.27 2001/11/25 23:52:51 monnier Exp $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
691 (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)) 691 (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t))
692 (setq status "Unknown") 692 (setq status "Unknown")
693 (setq status (match-string 1))) 693 (setq status (match-string 1)))
694 (if (and full 694 (if (and full
695 (re-search-forward 695 (re-search-forward
696 "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ 696 "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\
697 \[\t ]+\\([0-9.]+\\)" 697 \[\t ]+\\([0-9.]+\\)"
698 nil t)) 698 nil t))
699 (vc-file-setprop file 'vc-latest-version (match-string 2))) 699 (vc-file-setprop file 'vc-latest-version (match-string 2)))
700 (cond 700 (vc-file-setprop
701 ((string-match "Up-to-date" status) 701 file 'vc-state
702 (vc-file-setprop file 'vc-checkout-time 702 (cond
703 (nth 5 (file-attributes file))) 703 ((string-match "Up-to-date" status)
704 'up-to-date) 704 (vc-file-setprop file 'vc-checkout-time
705 ((string-match "Locally Modified" status) 'edited) 705 (nth 5 (file-attributes file)))
706 ((string-match "Needs Merge" status) 'needs-merge) 706 'up-to-date)
707 ((string-match "Needs \\(Checkout\\|Patch\\)" status) 'needs-patch) 707 ((string-match "Locally Modified" status) 'edited)
708 (t 'edited))))))) 708 ((string-match "Needs Merge" status) 'needs-merge)
709 ((string-match "Needs \\(Checkout\\|Patch\\)" status) 'needs-patch)
710 (t 'edited))))))))
709 711
710 (defun vc-cvs-dir-state-heuristic (dir) 712 (defun vc-cvs-dir-state-heuristic (dir)
711 "Find the CVS state of all files in DIR, using only local information." 713 "Find the CVS state of all files in DIR, using only local information."
712 (with-temp-buffer 714 (with-temp-buffer
713 (vc-insert-file (expand-file-name "CVS/Entries" dir)) 715 (vc-insert-file (expand-file-name "CVS/Entries" dir))