emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Michael Kifer
Subject: [Emacs-diffs] Changes to emacs/lisp/ediff-ptch.el
Date: Wed, 05 Oct 2005 20:09:55 -0400

Index: emacs/lisp/ediff-ptch.el
diff -c emacs/lisp/ediff-ptch.el:1.28 emacs/lisp/ediff-ptch.el:1.29
*** emacs/lisp/ediff-ptch.el:1.28       Sun Oct  2 09:35:20 2005
--- emacs/lisp/ediff-ptch.el    Thu Oct  6 00:09:48 2005
***************
*** 297,312 ****
                      ;; (file1 . file2). Get it using ediff-get-session-objA.
                      (ediff-get-session-objA-name session-info))
                     ;; base-dir1 is  the dir part of the 1st file in the patch
!                    (base-dir1 (file-name-directory (car proposed-file-names)))
                     ;; directory part of the 2nd file in the patch
!                    (base-dir2 (file-name-directory (cdr proposed-file-names)))
                     )
!               ;; If both base-dir1 and base-dir2 are relative, assume that
                ;; these dirs lead to the actual files starting at the present
                ;; directory. So, we don't strip these relative dirs from the
                ;; file names. This is a heuristic intended to improve guessing
!               (unless (or (and base-dir1 (file-name-absolute-p base-dir1))
!                           (and base-dir2 (file-name-absolute-p base-dir2)))
                  (setq base-dir1 ""
                        base-dir2 ""))
                (or (string= (car proposed-file-names) "/dev/null")
--- 297,319 ----
                      ;; (file1 . file2). Get it using ediff-get-session-objA.
                      (ediff-get-session-objA-name session-info))
                     ;; base-dir1 is  the dir part of the 1st file in the patch
!                    (base-dir1
!                     (or (file-name-directory (car proposed-file-names))
!                         ""))
                     ;; directory part of the 2nd file in the patch
!                    (base-dir2
!                     (or (file-name-directory (cdr proposed-file-names))
!                         ""))
                     )
!               ;; If both base-dir1 and base-dir2 are relative and exist,
!               ;; assume that
                ;; these dirs lead to the actual files starting at the present
                ;; directory. So, we don't strip these relative dirs from the
                ;; file names. This is a heuristic intended to improve guessing
!               (unless (or (file-name-absolute-p base-dir1)
!                           (file-name-absolute-p base-dir2)
!                           (not (file-exists-p base-dir1))
!                           (not (file-exists-p base-dir2)))
                  (setq base-dir1 ""
                        base-dir2 ""))
                (or (string= (car proposed-file-names) "/dev/null")
***************
*** 377,384 ****
                           (concat actual-dir (cdr proposed-file-names)))))
                ))
            ediff-patch-map)
!     ;; check for the shorter existing file in each pair and discard the other
!     ;; one
      (mapcar (lambda (session-info)
              (let* ((file1 (car (ediff-get-session-objA-name session-info)))
                     (file2 (cdr (ediff-get-session-objA-name session-info)))
--- 384,391 ----
                           (concat actual-dir (cdr proposed-file-names)))))
                ))
            ediff-patch-map)
!     ;; Check for the existing files in each pair and discard the nonexisting
!     ;; ones. If both exist, ask the user.
      (mapcar (lambda (session-info)
              (let* ((file1 (car (ediff-get-session-objA-name session-info)))
                     (file2 (cdr (ediff-get-session-objA-name session-info)))




reply via email to

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