File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 9
9
10
10
# :apply-seq-window
11
11
# :apply-seq-diff
12
+ # :apply-seq-patch
13
+ # :apply-patch
12
14
13
15
# :render-diff
14
16
# :render-diff-window
Original file line number Diff line number Diff line change 341
341
:index-file (and index (pathname index))
342
342
:prereq-string prereq)
343
343
patches)))))))
344
+
345
+ (defun apply-seq-patch (original-seq patch)
346
+ " Apply PATCH to the sequence ORIGINAL-SEQ."
347
+ (apply-seq-diff original-seq (diff patch)))
348
+
349
+ (defun apply-patch (patch &aux original)
350
+ " Apply PATCH."
351
+ (do-file-lines (line (original-pathname (diff patch))) (push line original))
352
+ (with-open-file (out (original-pathname (diff patch))
353
+ :direction :output :if-exists :supersede )
354
+ (format out " ~{ ~a ~^ ~% ~} ~% " (apply-seq-patch (nreverse original) patch))))
You can’t perform that action at this time.
0 commit comments