gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc.el - Implementation of cvs admin -mrev:message file


From: Sandip Chitale
Subject: Re: vc.el - Implementation of cvs admin -mrev:message file
Date: Sun, 15 Aug 2004 08:52:49 -0700

"Stefan Monnier" <address@hidden> wrote in message news:address@hidden
> > The CVS admin -m command allows updating of checkin comments of any version.
> > The following implements that functionality.
>
> > I would like to use completing-read to read the REV number? Anyone know
> > how to do it?
>
> If you use a recent version of PCL-CVS (i.e. from the CVS repository of
> Emacs), you can hit `l' to get the cvs log, then go to the message you want
> to change and hit `e'.


Ok. I will give that a try.

>
> Completion is disappointing for this kind of command:
> - it's a fair bit of work.

I was able to achieve it with this:

(defun vc-cvs-version-list (file)
  "Return list of versions for FILE."
  (let (versions)
    (with-temp-buffer
      (vc-do-command t 0 "cvs" file "log" "-N")
      (goto-char (point-min))
      (while (re-search-forward "^revision \\([0-9.]+\\)" nil t)
 (append-to-list 'versions (list (cons (match-string 1) nil)))
 (goto-char (match-end 0))))
    versions))

> - it's slow, especially with remote repositories.
> - it's pretty useless here because the version-string space is "dense",
>   so the completion will complete "1." for you and that's about it.
>

I agree that the version-string space is "dense" so completion may not be
useful for completions sake but may be useful to restrict to valid versions.

thanks,
Sandip




reply via email to

[Prev in Thread] Current Thread [Next in Thread]