* Update: vc-cvs-dir-state
@ 2003-02-16 15:22 Masanobu UMEDA
2003-02-16 22:17 ` Stefan Monnier
2003-02-17 8:18 ` Andre Spiegel
0 siblings, 2 replies; 3+ messages in thread
From: Masanobu UMEDA @ 2003-02-16 15:22 UTC (permalink / 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)))))))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Update: vc-cvs-dir-state
2003-02-16 15:22 Update: vc-cvs-dir-state Masanobu UMEDA
@ 2003-02-16 22:17 ` Stefan Monnier
2003-02-17 8:18 ` Andre Spiegel
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2003-02-16 22:17 UTC (permalink / raw)
Cc: emacs-devel
> 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.
That looks right, thanks.
Stefan
PS: please use a `diff -u' (or `diff -c') output format rather than sending
the "more useful implementation" so it's more obvious what's changed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Update: vc-cvs-dir-state
2003-02-16 15:22 Update: vc-cvs-dir-state Masanobu UMEDA
2003-02-16 22:17 ` Stefan Monnier
@ 2003-02-17 8:18 ` Andre Spiegel
1 sibling, 0 replies; 3+ messages in thread
From: Andre Spiegel @ 2003-02-17 8:18 UTC (permalink / raw)
Cc: emacs-devel
On Sun, 2003-02-16 at 16:22, Masanobu UMEDA wrote:
> 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.
I've installed this. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-02-17 8:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-16 15:22 Update: vc-cvs-dir-state Masanobu UMEDA
2003-02-16 22:17 ` Stefan Monnier
2003-02-17 8:18 ` Andre Spiegel
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).