emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/pcvs.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/pcvs.el
Date: Wed, 14 May 2003 11:02:05 -0400

Index: emacs/lisp/pcvs.el
diff -c emacs/lisp/pcvs.el:1.57 emacs/lisp/pcvs.el:1.58
*** emacs/lisp/pcvs.el:1.57     Tue May 13 11:22:39 2003
--- emacs/lisp/pcvs.el  Wed May 14 11:02:05 2003
***************
*** 1861,1884 ****
  This command ignores files that are not flagged as `Unknown'."
    (interactive)
    (dolist (fi (cvs-mode-marked 'ignore))
!     (cvs-append-to-ignore (cvs-fileinfo->dir fi) (cvs-fileinfo->file fi))
      (setf (cvs-fileinfo->type fi) 'DEAD))
    (cvs-cleanup-collection cvs-cookies nil nil nil))
  
  
! (defun cvs-append-to-ignore (dir str)
!   "Add STR to the .cvsignore file in DIR."
!   (save-window-excursion
!     (set-buffer (find-file-noselect (expand-file-name ".cvsignore" dir)))
      (when (ignore-errors
            (and buffer-read-only
                 (eq 'CVS (vc-backend buffer-file-name))
                 (not (vc-editable-p buffer-file-name))))
        ;; CVSREAD=on special case
!       (vc-toggle-read-only))
      (goto-char (point-max))
!     (unless (zerop (current-column)) (insert "\n"))
!     (insert str "\n")
      (if cvs-sort-ignore-file (sort-lines nil (point-min) (point-max)))
      (save-buffer)))
  
--- 1861,1887 ----
  This command ignores files that are not flagged as `Unknown'."
    (interactive)
    (dolist (fi (cvs-mode-marked 'ignore))
!     (cvs-append-to-ignore (cvs-fileinfo->dir fi) (cvs-fileinfo->file fi)
!                         (eq (cvs-fileinfo->subtype fi) 'NEW-DIR))
      (setf (cvs-fileinfo->type fi) 'DEAD))
    (cvs-cleanup-collection cvs-cookies nil nil nil))
  
  
! (defun cvs-append-to-ignore (dir str &optional old-dir)
!   "Add STR to the .cvsignore file in DIR.
! If OLD-DIR is non-nil, then this is a directory that we don't want
! to hear about anymore."
!   (with-current-buffer
!       (find-file-noselect (expand-file-name ".cvsignore" dir))
      (when (ignore-errors
            (and buffer-read-only
                 (eq 'CVS (vc-backend buffer-file-name))
                 (not (vc-editable-p buffer-file-name))))
        ;; CVSREAD=on special case
!       (vc-checkout buffer-file-name t))
      (goto-char (point-max))
!     (unless (bolp) (insert "\n"))
!     (insert str (if old-dir "/\n" "\n"))
      (if cvs-sort-ignore-file (sort-lines nil (point-min) (point-max)))
      (save-buffer)))
  




reply via email to

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