emacs-diffs
[Top][All Lists]
Advanced

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

master 0faa2c9 1/2: Remove the "Summary: " but from cvs checkins


From: Lars Ingebrigtsen
Subject: master 0faa2c9 1/2: Remove the "Summary: " but from cvs checkins
Date: Thu, 20 Aug 2020 10:12:17 -0400 (EDT)

branch: master
commit 0faa2c95904914731ec68d09fe5fcbbc375db6b1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Remove the "Summary: " but from cvs checkins
    
    * lisp/vc/vc-cvs.el (vc-cvs-checkin): Remove the "Summary:" bit
    from the comment (bug#40506).
---
 lisp/vc/vc-cvs.el | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index e8231ec..a2bed1e 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -339,30 +339,31 @@ its parents."
 
 (defun vc-cvs-checkin (files comment &optional rev)
   "CVS-specific version of `vc-backend-checkin'."
- (unless (or (not rev) (vc-cvs-valid-revision-number-p rev))
-   (if (not (vc-cvs-valid-symbolic-tag-name-p rev))
+  (unless (or (not rev) (vc-cvs-valid-revision-number-p rev))
+    (if (not (vc-cvs-valid-symbolic-tag-name-p rev))
        (error "%s is not a valid symbolic tag name" rev)
-     ;; If the input revision is a valid symbolic tag name, we create it
-     ;; as a branch, commit and switch to it.
-     (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev))
-     (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev))
-     (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev))
+      ;; If the input revision is a valid symbolic tag name, we create it
+      ;; as a branch, commit and switch to it.
+      (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev))
+      (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev))
+      (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev))
            files)))
-  (let ((status (apply 'vc-cvs-command nil 1 files
-                      "ci" (if rev (concat "-r" rev))
-                       (concat "-m" comment)
-                      (vc-switches 'CVS 'checkin))))
+  (let ((status (apply
+                 'vc-cvs-command nil 1 files
+                "ci" (if rev (concat "-r" rev))
+                 (concat "-m" (car (log-edit-extract-headers nil comment)))
+                (vc-switches 'CVS 'checkin))))
     (set-buffer "*vc*")
     (goto-char (point-min))
     (when (not (zerop status))
       ;; Check checkin problem.
       (cond
        ((re-search-forward "Up-to-date check failed" nil t)
-       (mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge))
+        (mapc (lambda (file) (vc-file-setprop file 'vc-state 'needs-merge))
              files)
         (error "%s" (substitute-command-keys
-                (concat "Up-to-date check failed: "
-                        "type \\[vc-next-action] to merge in changes"))))
+                     (concat "Up-to-date check failed: "
+                             "type \\[vc-next-action] to merge in changes"))))
        (t
         (pop-to-buffer (current-buffer))
         (goto-char (point-min))
@@ -372,7 +373,7 @@ its parents."
     ;; Otherwise we can't necessarily tell what goes with what; clear
     ;; its properties so they have to be refetched.
     (if (= (length files) 1)
-       (vc-file-setprop
+        (vc-file-setprop
         (car files) 'vc-working-revision
         (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
       (mapc 'vc-file-clearprops files))
@@ -385,7 +386,7 @@ its parents."
     ;; if this was an explicit check-in (does not include creation of
     ;; a branch), remove the sticky tag.
     (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev)))
-       (vc-cvs-command nil 0 files "update" "-A"))))
+        (vc-cvs-command nil 0 files "update" "-A"))))
 
 (defun vc-cvs-find-revision (file rev buffer)
   (apply 'vc-cvs-command



reply via email to

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