diff options
Diffstat (limited to 'lisp/vc')
| -rw-r--r-- | lisp/vc/add-log.el | 2 | ||||
| -rw-r--r-- | lisp/vc/diff-mode.el | 4 | ||||
| -rw-r--r-- | lisp/vc/ediff-diff.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-init.el | 2 | ||||
| -rw-r--r-- | lisp/vc/ediff-ptch.el | 8 | ||||
| -rw-r--r-- | lisp/vc/ediff-util.el | 18 | ||||
| -rw-r--r-- | lisp/vc/ediff-wind.el | 4 | ||||
| -rw-r--r-- | lisp/vc/ediff.el | 4 | ||||
| -rw-r--r-- | lisp/vc/log-edit.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-annotate.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-bzr.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-cvs.el | 52 | ||||
| -rw-r--r-- | lisp/vc/vc-dav.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-mtn.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-rcs.el | 26 | ||||
| -rw-r--r-- | lisp/vc/vc-sccs.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-src.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 32 |
21 files changed, 83 insertions, 92 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index d120d052215..9ab8d75fbb5 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -158,7 +158,7 @@ use the file's name relative to the directory of the change log file." :group 'change-log) (defcustom change-log-version-number-regexp-list - (let ((re "\\([0-9]+\.[0-9.]+\\)")) + (let ((re "\\([0-9]+\\.[0-9.]+\\)")) (list ;; (defconst ad-version "2.15" (concat "^(def[^ \t\n]+[ \t]+[^ \t\n][ \t]\"" re) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 37ed4a53b44..464e3754eb9 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1427,8 +1427,8 @@ modified lines of the diff." (diff-hunk-style))))) (set (make-local-variable 'whitespace-trailing-regexp) (if (eq style 'context) - "^[-\+!] .*?\\([\t ]+\\)$" - "^[-\+!<>].*?\\([\t ]+\\)$")))) + "^[-+!] .*?\\([\t ]+\\)$" + "^[-+!<>].*?\\([\t ]+\\)$")))) (defun diff-delete-if-empty () ;; An empty diff file means there's no more diffs to integrate, so we diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index 352892c945a..7647544d65d 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -168,7 +168,7 @@ This variable can be set either in .emacs or toggled interactively. Use `setq-default' if setting it in .emacs") (ediff-defvar-local ediff-auto-refine-limit 14000 - "Auto-refine only the regions of this size \(in bytes\) or less.") + "Auto-refine only the regions of this size (in bytes) or less.") ;;; General diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index 8c935bfab19..bf211599b9f 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -776,7 +776,7 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs." ;; A var local to each control panel buffer. Indicates highlighting style ;; in effect for this buffer: `face', `ascii', -;; `off' -- turned off \(on a dumb terminal only\). +;; `off' -- turned off (on a dumb terminal only). (ediff-defvar-local ediff-highlighting-style (if (and (ediff-has-face-support-p) ediff-use-faces) 'face 'ascii) "") diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index b45d533caea..a3b8bf0a28a 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -90,14 +90,14 @@ See also `ediff-backup-specs'." ;; traditional `patch' (format "-b %s" ediff-backup-extension)))) "Backup directives to pass to the patch program. -Ediff requires that the old version of the file \(before applying the patch\) +Ediff requires that the old version of the file \(before applying the patch) be saved in a file named `the-patch-file.extension'. Usually `extension' is `.orig', but this can be changed by the user and may depend on the system. Therefore, Ediff needs to know the backup extension used by the patch program. Some versions of the patch program let you specify `-b backup-extension'. Other versions only permit `-b', which assumes the extension `.orig' -\(in which case ediff-backup-extension MUST be also `.orig'\). The latest +\(in which case ediff-backup-extension MUST be also `.orig'). The latest versions of GNU patch require `-b -z backup-extension'. Note that both `ediff-backup-extension' and `ediff-backup-specs' @@ -333,7 +333,7 @@ program." (ediff-with-current-buffer standard-output (fundamental-mode)) (princ - (format " + (format-message " The patch file contains a context diff for %s %s @@ -342,7 +342,7 @@ to be patched on your system. If you know the correct file name, please enter it now. If you don't know and still would like to apply patches to -other files, enter /dev/null +other files, enter `/dev/null'. " (substring (car proposed-file-names) 6) (substring (cdr proposed-file-names) 6)))) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index bf5bb5cd5da..e664f9fdac3 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1500,7 +1500,7 @@ Used in ediff-windows/regions only." (select-window wind))) (defun ediff-scroll-vertically (&optional arg) - "Vertically scroll buffers A, B \(and C if appropriate\). + "Vertically scroll buffers A, B (and C if appropriate). With optional argument ARG, scroll ARG lines; otherwise scroll by nearly the one half of the height of window-A." (interactive "P") @@ -1544,7 +1544,7 @@ the one half of the height of window-A." (defun ediff-scroll-horizontally (&optional arg) - "Horizontally scroll buffers A, B \(and C if appropriate\). + "Horizontally scroll buffers A, B (and C if appropriate). If an argument is given, that is how many columns are scrolled, else nearly the width of the A/B/C windows." (interactive "P") @@ -1822,7 +1822,7 @@ If the prefix is negative, count differences from the end." (defun ediff-jump-to-difference-at-point (arg) "Go to difference closest to the point in buffer A, B, or C. -The buffer depends on last command character \(a, b, or c\) that invoked this +The buffer depends on last command character \(a, b, or c) that invoked this command. For instance, if the command was `ga' then the point value in buffer A is used. With a prefix argument, synchronize all files around the current point position @@ -1921,7 +1921,7 @@ in the specified buffer." ;;; Copying diffs. (defun ediff-diff-to-diff (arg &optional keys) - "Copy buffer-X'th difference region to buffer Y \(X,Y are A, B, or C\). + "Copy buffer-X'th difference region to buffer Y (X,Y are A, B, or C). If numerical prefix argument, copy the difference specified in the arg. Otherwise, copy the difference given by `ediff-current-difference'. This command assumes it is bound to a 2-character key sequence, `ab', `ba', @@ -1986,7 +1986,7 @@ ARG is a prefix argument. If nil, copy the current difference region." -;; Copy diff N from FROM-BUF-TYPE \(given as A, B or C\) to TO-BUF-TYPE. +;; Copy diff N from FROM-BUF-TYPE (given as A, B or C) to TO-BUF-TYPE. ;; If optional DO-NOT-SAVE is non-nil, do not save the old value of the ;; target diff. This is used in merging, when constructing the merged ;; version. @@ -2065,7 +2065,7 @@ ARG is a prefix argument. If nil, copy the current difference region." (message "%s" messg)) )) -;; Save Nth diff of buffer BUF-TYPE \(A, B, or C\). +;; Save Nth diff of buffer BUF-TYPE (A, B, or C). ;; That is to say, the Nth diff on the `ediff-killed-diffs-alist'. REG ;; is the region to save. It is redundant here, but is passed anyway, for ;; convenience. @@ -2385,10 +2385,10 @@ the number seen by the user." "Finish an Ediff session and exit Ediff. Unselects the selected difference, if any, restores the read-only and modified flags of the compared file buffers, kills Ediff buffers for this session -\(but not buffers A, B, C\). +\(but not buffers A, B, C). If `ediff-keep-variants' is nil, the user will be asked whether the buffers -containing the variants should be removed \(if they haven't been modified\). +containing the variants should be removed \(if they haven't been modified). If it is t, they will be preserved unconditionally. A prefix argument, temporarily reverses the meaning of this variable." (interactive "P") @@ -3312,7 +3312,7 @@ and `wd' saves the diff output. With prefix argument, `wd' saves plain diff output. Without an argument, it saves customized diff argument, if available -\(and plain output, if customized output was not generated\)." +\(and plain output, if customized output was not generated)." (interactive "P") (ediff-barf-if-not-control-buffer) (ediff-compute-custom-diffs-maybe) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index c31df824996..e0887f03b62 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -211,7 +211,7 @@ responsibility." "Function to call to determine the desired location for the control panel. Expects three parameters: the control buffer, the desired width and height of the control frame. It returns an association list -of the form \(\(top . <position>\) \(left . <position>\)\)" +of the form \((top . <position>) \(left . <position>))" :type 'function :group 'ediff-window) @@ -432,7 +432,7 @@ into icons, regardless of the window manager." three-way-comparison ediff-3way-comparison-job)) ;; if in minibuffer go somewhere else (if (save-match-data - (string-match "\*Minibuf-" (buffer-name (window-buffer)))) + (string-match "\\*Minibuf-" (buffer-name (window-buffer)))) (select-window (next-window nil 'ignore-minibuf))) (delete-other-windows) (set-window-dedicated-p (selected-window) nil) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 65ca0bd4408..3a2d1e48aac 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -963,7 +963,7 @@ If WIND-B is nil, use window next to WIND-A." ;;;###autoload (defun ediff-regions-wordwise (buffer-A buffer-B &optional startup-hooks) "Run Ediff on a pair of regions in specified buffers. -Regions \(i.e., point and mark\) can be set in advance or marked interactively. +Regions (i.e., point and mark) can be set in advance or marked interactively. This function is effective only for relatively small regions, up to 200 lines. For large regions, use `ediff-regions-linewise'." (interactive @@ -1003,7 +1003,7 @@ lines. For large regions, use `ediff-regions-linewise'." ;;;###autoload (defun ediff-regions-linewise (buffer-A buffer-B &optional startup-hooks) "Run Ediff on a pair of regions in specified buffers. -Regions \(i.e., point and mark\) can be set in advance or marked interactively. +Regions (i.e., point and mark) can be set in advance or marked interactively. Each region is enlarged to contain full lines. This function is effective for large regions, over 100-200 lines. For small regions, use `ediff-regions-wordwise'." diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index acbd9c0cd9f..9857116e2d4 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -905,7 +905,7 @@ Return non-nil if it is." The return value looks like this: (LOGBUFFER (ENTRYSTART ENTRYEND) ...) where LOGBUFFER is the name of the ChangeLog buffer, and each -\(ENTRYSTART . ENTRYEND\) pair is a buffer region." +\(ENTRYSTART . ENTRYEND) pair is a buffer region." (let ((changelog-file-name (let ((default-directory (file-name-directory (expand-file-name file))) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index 3a50c9b6a2d..ab3161e11e6 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -269,7 +269,7 @@ cover the range from the oldest annotation to the newest." (/ (- (if full newest current) oldest) (vc-annotate-oldest-in-map vc-annotate-color-map)) (if full newest)) - (message "Redisplaying annotation...done \(%s\)" + (message "Redisplaying annotation...done (%s)" (if full (format "Spanned from %.1f to %.1f days old" (- current oldest) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5f8dd0bf0e8..9b2711d8146 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -649,7 +649,7 @@ or a superior directory.") "" (replace-regexp-in-string "\n[ \t]?" " " str))))) -(defun vc-bzr-checkin (files comment) +(defun vc-bzr-checkin (files comment &optional _rev) "Check FILES in to bzr with log message COMMENT." (apply 'vc-bzr-command "commit" nil 0 files (cons "-m" (log-edit-extract-headers diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 0aa9c5a1e22..5f5807fb3c6 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -107,7 +107,7 @@ switches." :version "25.1" :group 'vc-cvs) -(defcustom vc-cvs-header '("\$Id\$") +(defcustom vc-cvs-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) @@ -332,38 +332,20 @@ its parents." (directory-file-name dir)))) (eq dir t))) -;; vc-cvs-checkin used to take a 'rev' second argument that allowed -;; checking in onto a specified branch tip rather than the current -;; default branch, but nothing in the entire rest of VC exercised -;; this code. Removing it simplifies the backend interface for all -;; modes. -;; -;; Here's the setup code preserved in amber, in case the logic needs -;; to be broken out into a method someday; (if rev (concat "-r" rev)) -;; used to be part of the switches passed to vc-cvs-command. -;; -;; (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)) -;; files))) -;; -;; The following postamble cleaned up after the branch change: -;; -;; ;; 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")))) -;; files))) -;; -(defun vc-cvs-checkin (files comment) +(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)) + (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)) + files))) (let ((status (apply 'vc-cvs-command nil 1 files - "ci" (concat "-m" comment) + "ci" (if rev (concat "-r" rev)) + (concat "-m" comment) (vc-switches 'CVS 'checkin)))) (set-buffer "*vc*") (goto-char (point-min)) @@ -394,7 +376,11 @@ its parents." ;; tell it from the permissions of the file (see ;; vc-cvs-checkout-model). (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) - files))) + files) + ;; 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")))) (defun vc-cvs-find-revision (file rev buffer) (apply 'vc-cvs-command @@ -932,7 +918,7 @@ state." (when (and full (re-search-forward "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ -\[\t ]+\\([0-9.]+\\)" +[\t ]+\\([0-9.]+\\)" nil t)) (vc-file-setprop file 'vc-latest-revision (match-string 2))) (vc-file-setprop diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 3326f2964c9..880e14be63e 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -82,7 +82,7 @@ See `vc-checkout-model' for a list of possible values." ;; Do we need to do anything here? FIXME? ) -(defun vc-dav-checkin (url comment) +(defun vc-dav-checkin (url comment &optional _rev) "Commit changes in URL to WebDAV. COMMENT is used as a check-in comment." ;; This should PUT the resource and release any locks that we hold. ) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 8a0f5547c4d..2f0439365e8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -674,7 +674,7 @@ If toggling on, also insert its message into the buffer." "Major mode for editing Git log messages. It is based on `log-edit-mode', and has Git-specific extensions.") -(defun vc-git-checkin (files comment) +(defun vc-git-checkin (files comment &optional _rev) (let* ((file1 (or (car files) default-directory)) (root (vc-git-root file1)) (default-directory (expand-file-name root)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f634e2eac53..49573986125 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -465,7 +465,7 @@ Optional arg REVISION is a revision to annotate from." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-hg-checkin (files comment) +(defun vc-hg-checkin (files comment &optional _rev) "Hg-specific version of `vc-backend-checkin'. REV is ignored." (apply 'vc-hg-command nil 0 files diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 685ef3b6742..b56a08f2a9e 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -199,7 +199,7 @@ switches." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-mtn-checkin (files comment) +(defun vc-mtn-checkin (files comment &optional _rev) (apply 'vc-mtn-command nil 0 files (nconc (list "commit" "-m") (log-edit-extract-headers '(("Author" . "--author") diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 71ffa55a6e9..ba1336424ea 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -76,7 +76,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "21.1" :group 'vc-rcs) -(defcustom vc-rcs-header '("\$Id\$") +(defcustom vc-rcs-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :type '(repeat string) :version "24.1" ; no longer consult the obsolete vc-header-alist @@ -306,27 +306,23 @@ whether to remove it." (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) (delete-directory dir))))) -;; It used to be possible to pass in a value for the variable rev, but -;; nothing in the rest of VC used this capability. Removing it makes the -;; backend interface simpler for all modes. -;; -(defun vc-rcs-checkin (files comment) +(defun vc-rcs-checkin (files comment &optional rev) "RCS-specific version of `vc-backend-checkin'." - (let (rev (switches (vc-switches 'RCS 'checkin))) + (let ((switches (vc-switches 'RCS 'checkin))) ;; Now operate on the files (dolist (file (vc-expand-dirs files 'RCS)) (let ((old-version (vc-working-revision file)) new-version (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) ;; Force branch creation if an appropriate ;; default branch has been set. - (and default-branch + (and (not rev) + default-branch (string-match (concat "^" (regexp-quote old-version) "\\.") default-branch) (setq rev default-branch) (setq switches (cons "-f" switches))) - (if old-version - (setq rev (vc-branch-part old-version)) - (error "can't find current branch")) + (if (and (not rev) old-version) + (setq rev (vc-branch-part old-version))) (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file) ;; if available, use the secure check-in option (and (vc-rcs-release-p "5.6.4") "-j") @@ -1118,12 +1114,12 @@ Returns: nil if no headers were found (defun vc-release-greater-or-equal (r1 r2) "Compare release numbers, represented as strings. Release components are assumed cardinal numbers, not decimal fractions -\(5.10 is a higher release than 5.9\). Omitted fields are considered -lower \(5.6.7 is earlier than 5.6.7.1\). Comparison runs till the end +\(5.10 is a higher release than 5.9). Omitted fields are considered +lower \(5.6.7 is earlier than 5.6.7.1). Comparison runs till the end of the string is found, or a non-numeric component shows up \(5.6.7 is earlier than \"5.6.7 beta\", which is probably not what you want in -some cases\). This code is suitable for existing RCS release numbers. -CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5\)." +some cases). This code is suitable for existing RCS release numbers. +CVS releases are handled reasonably, too \(1.3 < 1.4* < 1.5)." (let (v1 v2 i1 i2) (catch 'done (or (and (string-match "^\\.?\\([0-9]+\\)" r1) diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 8d8d9e844ed..a3facc56d5d 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -222,10 +222,11 @@ to the SCCS command." (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "") (file-name-nondirectory file))))) -(defun vc-sccs-checkin (files comment) +(defun vc-sccs-checkin (files comment &optional rev) "SCCS-specific version of `vc-backend-checkin'." (dolist (file (vc-expand-dirs files 'SCCS)) (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file) + (if rev (concat "-r" rev)) (concat "-y" comment) (vc-switches 'SCCS 'checkin)) (vc-sccs-do-command nil 0 "get" (vc-master-name file)))) diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index d9aa1b13e88..69e403668b1 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -227,7 +227,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." file (file-name-directory file))))) -(defun vc-src-checkin (files comment) +(defun vc-src-checkin (files comment &optional _rev) "SRC-specific version of `vc-backend-checkin'. REV is ignored." (vc-src-command nil files "commit" "-m" comment)) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 755dbc1ca3b..4ef63a23db5 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -106,7 +106,7 @@ switches." :version "25.1" :group 'vc-svn) -(defcustom vc-svn-header '("\$Id\$") +(defcustom vc-svn-header '("$Id\ $") "Header keywords to be inserted by `vc-insert-headers'." :version "24.1" ; no longer consult the obsolete vc-header-alist :type '(repeat string) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 3b9e788b7ab..f08e562efe5 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -233,12 +233,13 @@ ;; Unregister FILE from this backend. This is only needed if this ;; backend may be used as a "more local" backend for temporary editing. ;; -;; * checkin (files comment) +;; * checkin (files comment &optional rev) ;; ;; Commit changes in FILES to this backend. COMMENT is used as a ;; check-in comment. The implementation should pass the value of -;; vc-checkin-switches to the backend command. The revision argument -;; of some older VC versions is no longer supported. +;; vc-checkin-switches to the backend command. The optional REV +;; revision argument is only supported with some older VCSes, like +;; RCS and CVS, and is otherwise silently ignored. ;; ;; * find-revision (file rev buffer) ;; @@ -850,9 +851,9 @@ See `run-hooks'." (defcustom vc-static-header-alist '(("\\.c\\'" . - "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n#endif /* lint */\n")) + "\n#ifndef lint\nstatic char vcid[] = \"%s\";\n#endif /* lint */\n")) "Associate static header string templates with file types. -A \%s in the template is replaced with the first string associated with +A %s in the template is replaced with the first string associated with the file's version control type in `vc-BACKEND-header'." :type '(repeat (cons :format "%v" (regexp :tag "File Type") @@ -1221,10 +1222,15 @@ For old-style locking-based version control systems, like RCS: (message "No files remain to be committed") (if (not verbose) (vc-checkin ready-for-commit backend) - (let ((new-backend (vc-read-backend "New backend: "))) - (if new-backend - (dolist (file files) - (vc-transfer-file file new-backend)))))))) + (let* ((revision (read-string "New revision or backend: ")) + (revision-downcase (downcase revision))) + (if (member + revision-downcase + (mapcar (lambda (arg) (downcase (symbol-name arg))) + vc-handled-backends)) + (let ((vsym (intern revision-downcase))) + (dolist (file files) (vc-transfer-file file vsym))) + (vc-checkin ready-for-commit backend nil nil revision))))))) ;; locked by somebody else (locking VCSes only) ((stringp state) ;; In the old days, we computed the revision once and used it on @@ -1522,11 +1528,13 @@ Type \\[vc-next-action] to check in changes.") ".\n") (message "Please explain why you stole the lock. Type C-c C-c when done."))) -(defun vc-checkin (files backend &optional comment initial-contents) +(defun vc-checkin (files backend &optional comment initial-contents rev) "Check in FILES. COMMENT is a comment string; if omitted, a buffer is popped up to accept a comment. If INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents of the log entry buffer. +The optional argument REV may be a string specifying the new revision +level (only supported for some older VCSes, like RCS and CVS). Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (when vc-before-checkin-hook @@ -1549,7 +1557,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." ;; vc-checkin-switches, but 'the' local buffer is ;; not a well-defined concept for filesets. (progn - (vc-call-backend backend 'checkin files comment) + (vc-call-backend backend 'checkin files comment rev) (mapc 'vc-delete-automatic-version-backups files)) `((vc-state . up-to-date) (vc-checkout-time . ,(nth 5 (file-attributes file))) @@ -2093,7 +2101,7 @@ changes from the current branch." (defun vc-tag-precondition (dir) "Scan the tree below DIR, looking for files not up-to-date. If any file is not up-to-date, return the name of the first such file. -\(This means, neither tag creation nor retrieval is allowed.\) +\(This means, neither tag creation nor retrieval is allowed.) If one or more of the files are currently visited, return `visited'. Otherwise, return nil." (let ((status nil)) |
