[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6645f73: If there are multiple patches, collect the .rej f
From: |
Lars Ingebrigtsen |
Subject: |
[elpa] master 6645f73: If there are multiple patches, collect the .rej from all of them |
Date: |
Sat, 19 Sep 2020 17:11:53 -0400 (EDT) |
branch: master
commit 6645f73a8850496f17317f3f2d7d5475946fa775
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
If there are multiple patches, collect the .rej from all of them
---
packages/debbugs/debbugs-gnu.el | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index 4516423..f2179f7 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -2421,13 +2421,25 @@ If SELECTIVELY, query the user before applying the
patch."
(y-or-n-p (format "%s\nApply?"
(buffer-substring (point-min)
(min 200 (point-max))))))
- (call-process-region (point-min) (point-max)
- "patch" nil output-buffer nil
- "-r" rej "--no-backup-if-mismatch"
- "-l" "-f"
- "-d" (expand-file-name
- debbugs-gnu-current-directory)
- "-p1"))))
+ (let (old-rej)
+ (when (file-exists-p rej)
+ (with-temp-buffer
+ (insert-file-contents rej)
+ (setq old-rej (buffer-string)))
+ (delete-file rej))
+ (call-process-region (point-min) (point-max)
+ "patch" nil output-buffer nil
+ "-r" rej "--no-backup-if-mismatch"
+ "-l" "-f"
+ "-d" (expand-file-name
+ debbugs-gnu-current-directory)
+ "-p1")
+ (when old-rej
+ (with-temp-buffer
+ (insert old-rej)
+ (when (file-exists-p rej)
+ (insert-file-contents rej))
+ (write-region (point-min) (point-max) rej nil 'silent)))))))
(set-buffer output-buffer)
(when (file-exists-p rej)
(goto-char (point-max))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 6645f73: If there are multiple patches, collect the .rej from all of them,
Lars Ingebrigtsen <=