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: Tue, 26 Apr 2005 16:35:51 -0400

Index: emacs/lisp/pcvs.el
diff -c emacs/lisp/pcvs.el:1.79 emacs/lisp/pcvs.el:1.80
*** emacs/lisp/pcvs.el:1.79     Sun Apr  3 21:18:51 2005
--- emacs/lisp/pcvs.el  Tue Apr 26 20:35:51 2005
***************
*** 233,239 ****
                             nil        ;don't update display while running
                             "status"
                             "-v"
!                            (cvs-fileinfo->full-path (car marked)))
               (goto-char (point-min))
               (let ((tags (cvs-status-get-tags)))
                 (when (listp tags) tags)))))))
--- 233,239 ----
                             nil        ;don't update display while running
                             "status"
                             "-v"
!                            (cvs-fileinfo->full-name (car marked)))
               (goto-char (point-min))
               (let ((tags (cvs-status-get-tags)))
                 (when (listp tags) tags)))))))
***************
*** 512,518 ****
        (let* ((dir+files+rest
              (if (or (null fis) (not single-dir))
                  ;; not single-dir mode: just process the whole thing
!                 (list "" (mapcar 'cvs-fileinfo->full-path fis) nil)
                ;; single-dir mode: extract the same-dir-elements
                (let ((dir (cvs-fileinfo->dir (car fis))))
                  ;; output the concerned dir so the parser can translate paths
--- 512,518 ----
        (let* ((dir+files+rest
              (if (or (null fis) (not single-dir))
                  ;; not single-dir mode: just process the whole thing
!                 (list "" (mapcar 'cvs-fileinfo->full-name fis) nil)
                ;; single-dir mode: extract the same-dir-elements
                (let ((dir (cvs-fileinfo->dir (car fis))))
                  ;; output the concerned dir so the parser can translate paths
***************
*** 611,617 ****
             (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery)
                     (if cvs-cvsroot (list "-d" cvs-cvsroot))
                     args
!                    (mapcar 'cvs-fileinfo->full-path fis))))))
  
  (defun cvs-update-header (cmd add)
    (let* ((hf (ewoc-get-hf cvs-cookies))
--- 611,617 ----
             (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery)
                     (if cvs-cvsroot (list "-d" cvs-cvsroot))
                     args
!                    (mapcar 'cvs-fileinfo->full-name fis))))))
  
  (defun cvs-update-header (cmd add)
    (let* ((hf (ewoc-get-hf cvs-cookies))
***************
*** 831,837 ****
    (and (or (eq (cvs-fileinfo->type fi) 'REMOVED)
           (and (eq (cvs-fileinfo->type fi) 'CONFLICT)
                (eq (cvs-fileinfo->subtype fi) 'REMOVED)))
!        (file-exists-p (cvs-fileinfo->full-path fi))))
  
  ;; called at the following times:
  ;; - postparse  ((eq cvs-auto-remove-handled t) cvs-auto-remove-directories 
nil)
--- 831,837 ----
    (and (or (eq (cvs-fileinfo->type fi) 'REMOVED)
           (and (eq (cvs-fileinfo->type fi) 'CONFLICT)
                (eq (cvs-fileinfo->subtype fi) 'REMOVED)))
!        (file-exists-p (cvs-fileinfo->full-name fi))))
  
  ;; called at the following times:
  ;; - postparse  ((eq cvs-auto-remove-handled t) cvs-auto-remove-directories 
nil)
***************
*** 1406,1412 ****
  (defun cvs-mode-files (&rest -cvs-mode-files-args)
    (cvs-mode!
     (lambda ()
!      (mapcar 'cvs-fileinfo->full-path
             (apply 'cvs-mode-marked -cvs-mode-files-args)))))
  
  ;;
--- 1406,1412 ----
  (defun cvs-mode-files (&rest -cvs-mode-files-args)
    (cvs-mode!
     (lambda ()
!      (mapcar 'cvs-fileinfo->full-name
             (apply 'cvs-mode-marked -cvs-mode-files-args)))))
  
  ;;
***************
*** 1564,1570 ****
      ;; find directories and look for fis needing a description
      (dolist (fi fis)
        (cond
!        ((file-directory-p (cvs-fileinfo->full-path fi)) (push fi dirs))
         ((eq (cvs-fileinfo->type fi) 'UNKNOWN) (setq needdesc t))))
      ;; prompt for description if necessary
      (let* ((msg (if (and needdesc
--- 1564,1570 ----
      ;; find directories and look for fis needing a description
      (dolist (fi fis)
        (cond
!        ((file-directory-p (cvs-fileinfo->full-name fi)) (push fi dirs))
         ((eq (cvs-fileinfo->type fi) 'UNKNOWN) (setq needdesc t))))
      ;; prompt for description if necessary
      (let* ((msg (if (and needdesc
***************
*** 1642,1649 ****
  Signal an error if there is no backup file."
    (let ((backup-file (cvs-fileinfo->backup-file fileinfo)))
      (unless backup-file
!       (error "%s has no backup file" (cvs-fileinfo->full-path fileinfo)))
!     (list backup-file (cvs-fileinfo->full-path fileinfo))))
  
  ;;
  ;; Emerge support
--- 1642,1649 ----
  Signal an error if there is no backup file."
    (let ((backup-file (cvs-fileinfo->backup-file fileinfo)))
      (unless backup-file
!       (error "%s has no backup file" (cvs-fileinfo->full-name fileinfo)))
!     (list backup-file (cvs-fileinfo->full-name fileinfo))))
  
  ;;
  ;; Emerge support
***************
*** 1697,1703 ****
  
  (defun cvs-retrieve-revision (fileinfo rev)
    "Retrieve the given REVision of the file in FILEINFO into a new buffer."
!   (let* ((file (cvs-fileinfo->full-path fileinfo))
         (buffile (concat file "." rev)))
      (or (find-buffer-visiting buffile)
        (with-current-buffer (create-file-buffer buffile)
--- 1697,1703 ----
  
  (defun cvs-retrieve-revision (fileinfo rev)
    "Retrieve the given REVision of the file in FILEINFO into a new buffer."
!   (let* ((file (cvs-fileinfo->full-name fileinfo))
         (buffile (concat file "." rev)))
      (or (find-buffer-visiting buffile)
        (with-current-buffer (create-file-buffer buffile)
***************
*** 1729,1735 ****
    (interactive)
    (let ((fi (cvs-mode-marked 'merge nil :one t :file t)))
      (let ((merge (cvs-fileinfo->merge fi))
!         (file (cvs-fileinfo->full-path fi))
          (backup-file (cvs-fileinfo->backup-file fi)))
        (if (not (and merge backup-file))
          (let ((buf (find-file-noselect file)))
--- 1729,1735 ----
    (interactive)
    (let ((fi (cvs-mode-marked 'merge nil :one t :file t)))
      (let ((merge (cvs-fileinfo->merge fi))
!         (file (cvs-fileinfo->full-name fi))
          (backup-file (cvs-fileinfo->backup-file fi)))
        (if (not (and merge backup-file))
          (let ((buf (find-file-noselect file)))
***************
*** 1760,1766 ****
       (list (or rev1 (cvs-flags-query 'cvs-idiff-version))
           rev2)))
    (let ((fi (cvs-mode-marked 'diff "idiff" :one t :file t)))
!     (let* ((file (cvs-fileinfo->full-path fi))
           (rev1-buf (cvs-retrieve-revision fi (or rev1 "BASE")))
           (rev2-buf (if rev2 (cvs-retrieve-revision fi rev2)))
           ;; this binding is used by cvs-ediff-startup-hook
--- 1760,1766 ----
       (list (or rev1 (cvs-flags-query 'cvs-idiff-version))
           rev2)))
    (let ((fi (cvs-mode-marked 'diff "idiff" :one t :file t)))
!     (let* ((file (cvs-fileinfo->full-name fi))
           (rev1-buf (cvs-retrieve-revision fi (or rev1 "BASE")))
           (rev2-buf (if rev2 (cvs-retrieve-revision fi rev2)))
           ;; this binding is used by cvs-ediff-startup-hook
***************
*** 1778,1790 ****
        (error "idiff-other cannot be applied to more than 2 files at a time"))
      (let* ((fi1 (car fis))
           (rev1-buf (if rev1 (cvs-retrieve-revision fi1 rev1)
!                      (find-file-noselect (cvs-fileinfo->full-path fi1))))
           rev2-buf)
        (if (cdr fis)
          (let ((fi2 (nth 1 fis)))
            (setq rev2-buf
                  (if rev2 (cvs-retrieve-revision fi2 rev2)
!                   (find-file-noselect (cvs-fileinfo->full-path fi2)))))
        (error "idiff-other doesn't know what other file/buffer to use"))
        (let* (;; this binding is used by cvs-ediff-startup-hook
             (cvs-transient-buffers (list rev1-buf rev2-buf)))
--- 1778,1790 ----
        (error "idiff-other cannot be applied to more than 2 files at a time"))
      (let* ((fi1 (car fis))
           (rev1-buf (if rev1 (cvs-retrieve-revision fi1 rev1)
!                      (find-file-noselect (cvs-fileinfo->full-name fi1))))
           rev2-buf)
        (if (cdr fis)
          (let ((fi2 (nth 1 fis)))
            (setq rev2-buf
                  (if rev2 (cvs-retrieve-revision fi2 rev2)
!                   (find-file-noselect (cvs-fileinfo->full-name fi2)))))
        (error "idiff-other doesn't know what other file/buffer to use"))
        (let* (;; this binding is used by cvs-ediff-startup-hook
             (cvs-transient-buffers (list rev1-buf rev2-buf)))
***************
*** 1799,1805 ****
      (let (ret)
        (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))
        (when (cvs-string-prefix-p
!              (expand-file-name (cvs-fileinfo->full-path fi) dir)
               buffer-file-name)
          (setq ret t)))
        ret)))
--- 1799,1805 ----
      (let (ret)
        (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." ""))))
        (when (cvs-string-prefix-p
!              (expand-file-name (cvs-fileinfo->full-name fi) dir)
               buffer-file-name)
          (setq ret t)))
        ret)))
***************
*** 2002,2008 ****
             (set-buffer cvs-buf)
             (setq default-directory odir))
         (let ((buf (if rev (cvs-retrieve-revision fi rev)
!                     (find-file-noselect (cvs-fileinfo->full-path fi)))))
           (funcall (cond ((eq other 'dont-select) 'display-buffer)
                          (other
                           (if view 'view-buffer-other-window
--- 2002,2008 ----
             (set-buffer cvs-buf)
             (setq default-directory odir))
         (let ((buf (if rev (cvs-retrieve-revision fi rev)
!                     (find-file-noselect (cvs-fileinfo->full-name fi)))))
           (funcall (cond ((eq other 'dont-select) 'display-buffer)
                          (other
                           (if view 'view-buffer-other-window
***************
*** 2093,2106 ****
         (silent (or (not cvs-confirm-removals)
                     (cvs-every (lambda (fi)
                                  (or (not (file-exists-p
!                                           (cvs-fileinfo->full-path fi)))
                                      (cvs-applicable-p fi 'safe-rm)))
                                files)))
         (tmpbuf (cvs-temp-buffer)))
      (when (and (not silent) (equal cvs-confirm-removals 'list))
        (with-current-buffer tmpbuf
        (let ((inhibit-read-only t))
!         (cvs-insert-strings (mapcar 'cvs-fileinfo->full-path fis))
          (cvs-pop-to-buffer-same-frame (current-buffer))
          (shrink-window-if-larger-than-buffer))))
      (if (not (or silent
--- 2093,2106 ----
         (silent (or (not cvs-confirm-removals)
                     (cvs-every (lambda (fi)
                                  (or (not (file-exists-p
!                                           (cvs-fileinfo->full-name fi)))
                                      (cvs-applicable-p fi 'safe-rm)))
                                files)))
         (tmpbuf (cvs-temp-buffer)))
      (when (and (not silent) (equal cvs-confirm-removals 'list))
        (with-current-buffer tmpbuf
        (let ((inhibit-read-only t))
!         (cvs-insert-strings (mapcar 'cvs-fileinfo->full-name fis))
          (cvs-pop-to-buffer-same-frame (current-buffer))
          (shrink-window-if-larger-than-buffer))))
      (if (not (or silent
***************
*** 2119,2125 ****
        (progn (message "Aborting") nil)
        (dolist (fi files)
        (let* ((type (cvs-fileinfo->type fi))
!              (file (cvs-fileinfo->full-path fi)))
          (when (or all (eq type 'UNKNOWN))
            (when (file-exists-p file) (delete-file file))
            (unless all (setf (cvs-fileinfo->type fi) 'DEAD) t))))
--- 2119,2125 ----
        (progn (message "Aborting") nil)
        (dolist (fi files)
        (let* ((type (cvs-fileinfo->type fi))
!              (file (cvs-fileinfo->full-name fi)))
          (when (or all (eq type 'UNKNOWN))
            (when (file-exists-p file) (delete-file file))
            (unless all (setf (cvs-fileinfo->type fi) 'DEAD) t))))
***************
*** 2166,2172 ****
    (interactive)
    (let ((marked (cvs-get-marked (cvs-ignore-marks-p "byte-compile"))))
      (dolist (fi marked)
!       (let ((filename (cvs-fileinfo->full-path fi)))
        (when (string-match "\\.el\\'" filename)
          (byte-compile-file filename))))))
  
--- 2166,2172 ----
    (interactive)
    (let ((marked (cvs-get-marked (cvs-ignore-marks-p "byte-compile"))))
      (dolist (fi marked)
!       (let ((filename (cvs-fileinfo->full-name fi)))
        (when (string-match "\\.el\\'" filename)
          (byte-compile-file filename))))))
  
***************
*** 2237,2243 ****
  
  (defun cvs-revert-if-needed (fis)
    (dolist (fileinfo fis)
!     (let* ((file (cvs-fileinfo->full-path fileinfo))
           (buffer (find-buffer-visiting file)))
        ;; For a revert to happen the user must be editing the file...
        (unless (or (null buffer)
--- 2237,2243 ----
  
  (defun cvs-revert-if-needed (fis)
    (dolist (fileinfo fis)
!     (let* ((file (cvs-fileinfo->full-name fileinfo))
           (buffer (find-buffer-visiting file)))
        ;; For a revert to happen the user must be editing the file...
        (unless (or (null buffer)




reply via email to

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