From: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
Subject: Update: vc-cvs-dir-state
Date: Mon, 17 Feb 2003 00:22:23 +0900 [thread overview]
Message-ID: <200302161522.AAA05849@latour.mse.kyutech.ac.jp> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=ISO-2022-JP-2, Size: 1342 bytes --]
Dear vc-cvs.el maintainer,
It is sometimes useful to have unregistered subdirectories in a
directory which is under the control of CVS. However, current
implementation of vc-cvs-dir-state in vc-cvs.el (of Emacs 21.2) does
not work if a directory contains unregistered subdirectories. Here is
more useful implementation of vc-cvs-dir-state. It checks if a given
subdirectory is under the control of CVS or not. By using this,
vc-directory never get fails even if a directory contains unregistered
subdirectories.
Masanobu UMEDA
----------------------------------------------------------------------
(defun vc-cvs-dir-state (dir)
"Find the CVS state of all files in DIR."
;; Get the state only if DIR is under the control of CVS.
(if (file-readable-p (expand-file-name "CVS/Entries" dir))
(if (vc-cvs-stay-local-p dir)
(vc-cvs-dir-state-heuristic dir)
(let ((default-directory dir))
;; Don't specify DIR in this command, the default-directory is
;; enough. Otherwise it might fail with remote repositories.
(with-temp-buffer
(vc-do-command t 0 "cvs" nil "status" "-l")
(goto-char (point-min))
(while (re-search-forward "^=+\n\\([^=\n].*\n\\|\n\\)+" nil t)
(narrow-to-region (match-beginning 0) (match-end 0))
(vc-cvs-parse-status)
(goto-char (point-max))
(widen)))))))
next reply other threads:[~2003-02-16 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-16 15:22 Masanobu UMEDA [this message]
2003-02-16 22:17 ` Update: vc-cvs-dir-state Stefan Monnier
2003-02-17 8:18 ` Andre Spiegel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200302161522.AAA05849@latour.mse.kyutech.ac.jp \
--to=umerin@mse.kyutech.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).