diff options
| author | Stefan Monnier | 2000-05-10 22:28:36 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-05-10 22:28:36 +0000 |
| commit | b15b5618c8e291d687d36dbfcce1081a30683c3d (patch) | |
| tree | 7a3110a4f3cd8a396dc9b09d73997c0895d6e0a3 | |
| parent | 3e87f5fcf3d8c131717a32af51bdba5d57e242e1 (diff) | |
| download | emacs-b15b5618c8e291d687d36dbfcce1081a30683c3d.tar.gz emacs-b15b5618c8e291d687d36dbfcce1081a30683c3d.zip | |
(cvs-cleanup-collection): Remove obsolete code for
HEADER/FOOTER and fix bug with trailing empty directory.
(cvs-append-to-ignore): Use vc-editable-p if available.
(cvs-dir-member-p): Remove obsolete code for HEADER/FOOTER.
(vc-do-command): Tweak advice to handle the new VC.
| -rw-r--r-- | lisp/pcvs.el | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 4cb94c00842..30cbcdfa7d2 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu | 14 | ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu |
| 15 | ;; Keywords: CVS, version control, release management | 15 | ;; Keywords: CVS, version control, release management |
| 16 | ;; Version: $Name: $ | 16 | ;; Version: $Name: $ |
| 17 | ;; Revision: $Id: pcvs.el,v 1.1 2000/03/11 03:42:30 monnier Exp $ | 17 | ;; Revision: $Id: pcvs.el,v 1.2 2000/03/22 02:56:55 monnier Exp $ |
| 18 | 18 | ||
| 19 | ;; This file is part of GNU Emacs. | 19 | ;; This file is part of GNU Emacs. |
| 20 | 20 | ||
| @@ -57,6 +57,7 @@ | |||
| 57 | 57 | ||
| 58 | ;; ******** FIX THE DOCUMENTATION ********* | 58 | ;; ******** FIX THE DOCUMENTATION ********* |
| 59 | ;; | 59 | ;; |
| 60 | ;; - proper `g' that passes safe args and uses either cvs-status or cvs-examine | ||
| 60 | ;; - write cvs-fast-examine that parses CVS/Entries instead of running cvs | 61 | ;; - write cvs-fast-examine that parses CVS/Entries instead of running cvs |
| 61 | ;; we could even steal code from vc-cvs-hooks for that. | 62 | ;; we could even steal code from vc-cvs-hooks for that. |
| 62 | ;; - add toolbar entries | 63 | ;; - add toolbar entries |
| @@ -760,9 +761,7 @@ RM-MSGS if non-nil means remove messages." | |||
| 760 | (keep | 761 | (keep |
| 761 | (case type | 762 | (case type |
| 762 | ;; remove temp messages and keep the others | 763 | ;; remove temp messages and keep the others |
| 763 | (MESSAGE | 764 | (MESSAGE (not (or rm-msgs (eq subtype 'TEMP)))) |
| 764 | (or (memq subtype '(HEADER FOOTER)) | ||
| 765 | (not (or rm-msgs (eq subtype 'TEMP))))) | ||
| 766 | ;; remove entries | 765 | ;; remove entries |
| 767 | (DEAD nil) | 766 | (DEAD nil) |
| 768 | ;; handled also? | 767 | ;; handled also? |
| @@ -782,7 +781,13 @@ RM-MSGS if non-nil means remove messages." | |||
| 782 | (eq subtype 'FOOTER))) | 781 | (eq subtype 'FOOTER))) |
| 783 | (setf (cvs-fileinfo->type last-fi) 'DEAD) | 782 | (setf (cvs-fileinfo->type last-fi) 'DEAD) |
| 784 | (setq rerun t)) | 783 | (setq rerun t)) |
| 785 | (when keep (setq last-fi fi)))))))) | 784 | (when keep (setq last-fi fi))))) |
| 785 | ;; remove empty last dir | ||
| 786 | (when (and rm-dirs | ||
| 787 | (not first-dir) | ||
| 788 | (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE)) | ||
| 789 | (setf (cvs-fileinfo->type last-fi) 'DEAD) | ||
| 790 | (setq rerun t))))) | ||
| 786 | 791 | ||
| 787 | (defun cvs-get-cvsroot () | 792 | (defun cvs-get-cvsroot () |
| 788 | "Gets the CVSROOT for DIR." | 793 | "Gets the CVSROOT for DIR." |
| @@ -1673,7 +1678,9 @@ This command ignores files that are not flagged as `Unknown'." | |||
| 1673 | (when (ignore-errors | 1678 | (when (ignore-errors |
| 1674 | (and buffer-read-only | 1679 | (and buffer-read-only |
| 1675 | (eq 'CVS (vc-backend buffer-file-name)) | 1680 | (eq 'CVS (vc-backend buffer-file-name)) |
| 1676 | (not (vc-locking-user buffer-file-name)))) | 1681 | (not (if (fboundp 'vc-editable-p) |
| 1682 | (vc-editable-p buffer-file-name) | ||
| 1683 | (vc-locking-user buffer-file-name))))) | ||
| 1677 | ;; CVSREAD=on special case | 1684 | ;; CVSREAD=on special case |
| 1678 | (vc-toggle-read-only)) | 1685 | (vc-toggle-read-only)) |
| 1679 | (goto-char (point-max)) | 1686 | (goto-char (point-max)) |
| @@ -1913,8 +1920,7 @@ With prefix argument, prompt for cvs flags." | |||
| 1913 | (defun cvs-dir-member-p (fileinfo dir) | 1920 | (defun cvs-dir-member-p (fileinfo dir) |
| 1914 | "Return true if FILEINFO represents a file in directory DIR." | 1921 | "Return true if FILEINFO represents a file in directory DIR." |
| 1915 | (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) | 1922 | (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) |
| 1916 | (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)) | 1923 | (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) |
| 1917 | (not (memq (cvs-fileinfo->subtype fileinfo) '(HEADER FOOTER))))) | ||
| 1918 | 1924 | ||
| 1919 | (defun cvs-execute-single-file (fi extractor program constant-args) | 1925 | (defun cvs-execute-single-file (fi extractor program constant-args) |
| 1920 | "Internal function for `cvs-execute-single-file-list'." | 1926 | "Internal function for `cvs-execute-single-file-list'." |
| @@ -2005,8 +2011,7 @@ Anything else means to do it only if the prefix arg is equal to this value." | |||
| 2005 | (const :tag "Prefix" (4)))) | 2011 | (const :tag "Prefix" (4)))) |
| 2006 | 2012 | ||
| 2007 | ;;;###autoload | 2013 | ;;;###autoload |
| 2008 | (progn | 2014 | (progn (defun cvs-dired-noselect (dir) |
| 2009 | (defun cvs-dired-noselect (dir) | ||
| 2010 | "Run `cvs-examine' if DIR is a CVS administrative directory. | 2015 | "Run `cvs-examine' if DIR is a CVS administrative directory. |
| 2011 | The exact behavior is determined also by `cvs-dired-use-hook'." | 2016 | The exact behavior is determined also by `cvs-dired-use-hook'." |
| 2012 | (when (stringp dir) | 2017 | (when (stringp dir) |
| @@ -2028,8 +2033,12 @@ The exact behavior is determined also by `cvs-dired-use-hook'." | |||
| 2028 | (cvs-vc-command-advice "*vc-info*" (ad-get-arg 1) (ad-get-arg 3))) | 2033 | (cvs-vc-command-advice "*vc-info*" (ad-get-arg 1) (ad-get-arg 3))) |
| 2029 | 2034 | ||
| 2030 | (defadvice vc-do-command (after pcl-cvs-vc activate) | 2035 | (defadvice vc-do-command (after pcl-cvs-vc activate) |
| 2031 | (cvs-vc-command-advice (or (ad-get-arg 0) "*vc*") | 2036 | (cvs-vc-command-advice (if (eq t (ad-get-arg 0)) (current-buffer) |
| 2032 | (ad-get-arg 2) (ad-get-arg 5))) | 2037 | (or (ad-get-arg 0) "*vc*")) |
| 2038 | (ad-get-arg 2) | ||
| 2039 | (if (stringp (ad-get-arg 4)) | ||
| 2040 | (ad-get-arg 4) | ||
| 2041 | (ad-get-arg 5)))) | ||
| 2033 | 2042 | ||
| 2034 | (defun cvs-vc-command-advice (buffer command cvscmd) | 2043 | (defun cvs-vc-command-advice (buffer command cvscmd) |
| 2035 | (when (and (setq buffer (get-buffer buffer)) | 2044 | (when (and (setq buffer (get-buffer buffer)) |