1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 11:00:45 -08:00

Carry through today's big terminology change to a few places where I

missed it in the back ends.
This commit is contained in:
Eric S. Raymond 2007-10-10 19:39:23 +00:00
parent a888f521f0
commit 5b5afd508a
7 changed files with 66 additions and 66 deletions

View file

@ -284,7 +284,7 @@ If any error occurred in running `bzr status', then return nil."
"Register FILE under bzr. "Register FILE under bzr.
Signal an error unless REV is nil. Signal an error unless REV is nil.
COMMENT is ignored." COMMENT is ignored."
(if rev (error "Can't register explicit version with bzr")) (if rev (error "Can't register explicit revision with bzr"))
(vc-bzr-command "add" nil 0 files)) (vc-bzr-command "add" nil 0 files))
;; Could run `bzr status' in the directory and see if it succeeds, but ;; Could run `bzr status' in the directory and see if it succeeds, but
@ -313,7 +313,7 @@ or a superior directory.")
(defun vc-bzr-checkin (files rev comment) (defun vc-bzr-checkin (files rev comment)
"Check FILE in to bzr with log message COMMENT. "Check FILE in to bzr with log message COMMENT.
REV non-nil gets an error." REV non-nil gets an error."
(if rev (error "Can't check in a specific version with bzr")) (if rev (error "Can't check in a specific revision with bzr"))
(vc-bzr-command "commit" nil 0 files "-m" comment)) (vc-bzr-command "commit" nil 0 files "-m" comment))
(defun vc-bzr-checkout (file &optional editable rev destfile) (defun vc-bzr-checkout (file &optional editable rev destfile)
@ -365,11 +365,11 @@ EDITABLE is ignored."
(unless (fboundp 'vc-default-log-view-mode) (unless (fboundp 'vc-default-log-view-mode)
(add-hook 'log-view-mode-hook 'vc-bzr-log-view-mode))) (add-hook 'log-view-mode-hook 'vc-bzr-log-view-mode)))
(defun vc-bzr-show-log-entry (version) (defun vc-bzr-show-log-entry (revision)
"Find entry for patch name VERSION in bzr change log buffer." "Find entry for patch name REVISION in bzr change log buffer."
(goto-char (point-min)) (goto-char (point-min))
(let (case-fold-search) (let (case-fold-search)
(if (re-search-forward (concat "^-+\nrevno: " version "$") nil t) (if (re-search-forward (concat "^-+\nrevno: " revision "$") nil t)
(beginning-of-line 0) (beginning-of-line 0)
(goto-char (point-min))))) (goto-char (point-min)))))
@ -394,8 +394,8 @@ EDITABLE is ignored."
(defalias 'vc-bzr-diff-tree 'vc-bzr-diff) (defalias 'vc-bzr-diff-tree 'vc-bzr-diff)
;; FIXME: vc-{next,previous}-version need fixing in vc.el to deal with ;; FIXME: vc-{next,previous}-revision need fixing in vc.el to deal with
;; straight integer versions. ;; straight integer revisions.
(defun vc-bzr-delete-file (file) (defun vc-bzr-delete-file (file)
"Delete FILE and delete it in the bzr repository." "Delete FILE and delete it in the bzr repository."
@ -412,12 +412,12 @@ EDITABLE is ignored."
"Internal use.") "Internal use.")
(make-variable-buffer-local 'vc-bzr-annotation-table) (make-variable-buffer-local 'vc-bzr-annotation-table)
(defun vc-bzr-annotate-command (file buffer &optional version) (defun vc-bzr-annotate-command (file buffer &optional revision)
"Prepare BUFFER for `vc-annotate' on FILE. "Prepare BUFFER for `vc-annotate' on FILE.
Each line is tagged with the revision number, which has a `help-echo' Each line is tagged with the revision number, which has a `help-echo'
property containing author and date information." property containing author and date information."
(apply #'vc-bzr-command "annotate" buffer 0 file "--long" "--all" (apply #'vc-bzr-command "annotate" buffer 0 file "--long" "--all"
(if version (list "-r" version))) (if revision (list "-r" revision)))
(with-current-buffer buffer (with-current-buffer buffer
;; Store the tags for the annotated source lines in a hash table ;; Store the tags for the annotated source lines in a hash table
;; to allow saving space by sharing the text properties. ;; to allow saving space by sharing the text properties.

View file

@ -77,11 +77,11 @@
;; wouldn't be identified as a merge by git, ;; wouldn't be identified as a merge by git,
;; so it's probably not a good idea. ;; so it's probably not a good idea.
;; - merge-news (file) see `merge' ;; - merge-news (file) see `merge'
;; - steal-lock (file &optional version) NOT NEEDED ;; - steal-lock (file &optional revision) NOT NEEDED
;; HISTORY FUNCTIONS ;; HISTORY FUNCTIONS
;; * print-log (files &optional buffer) OK ;; * print-log (files &optional buffer) OK
;; - log-view-mode () OK ;; - log-view-mode () OK
;; - show-log-entry (version) NOT NEEDED, DEFAULT IS GOOD ;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD
;; - wash-log (file) COULD BE SUPPORTED ;; - wash-log (file) COULD BE SUPPORTED
;; - logentry-check () NOT NEEDED ;; - logentry-check () NOT NEEDED
;; - comment-history (file) ?? ;; - comment-history (file) ??
@ -100,8 +100,8 @@
;; MISCELLANEOUS ;; MISCELLANEOUS
;; - make-version-backups-p (file) NOT NEEDED ;; - make-version-backups-p (file) NOT NEEDED
;; - repository-hostname (dirname) NOT NEEDED ;; - repository-hostname (dirname) NOT NEEDED
;; - previous-version (file rev) OK ;; - previous-revision (file rev) OK
;; - next-version (file rev) OK ;; - next-revision (file rev) OK
;; - check-headers () COULD BE SUPPORTED ;; - check-headers () COULD BE SUPPORTED
;; - clear-headers () NOT NEEDED ;; - clear-headers () NOT NEEDED
;; - delete-file (file) OK ;; - delete-file (file) OK
@ -372,8 +372,8 @@
;;; MISCELLANEOUS ;;; MISCELLANEOUS
(defun vc-git-previous-version (file rev) (defun vc-git-previous-revision (file rev)
"Git-specific version of `vc-previous-version'." "Git-specific version of `vc-previous-revision'."
(let ((default-directory (file-name-directory (expand-file-name file))) (let ((default-directory (file-name-directory (expand-file-name file)))
(file (file-name-nondirectory file))) (file (file-name-nondirectory file)))
(vc-git-symbolic-commit (vc-git-symbolic-commit
@ -390,8 +390,8 @@
(point) (point)
(1- (point-max)))))))) (1- (point-max))))))))
(defun vc-git-next-version (file rev) (defun vc-git-next-revision (file rev)
"Git-specific version of `vc-next-version'." "Git-specific version of `vc-next-revision'."
(let* ((default-directory (file-name-directory (let* ((default-directory (file-name-directory
(expand-file-name file))) (expand-file-name file)))
(file (file-name-nondirectory file)) (file (file-name-nondirectory file))

View file

@ -66,11 +66,11 @@
;; - rollback (files) ?? PROBABLY NOT NEEDED ;; - rollback (files) ?? PROBABLY NOT NEEDED
;; - merge (file rev1 rev2) NEEDED ;; - merge (file rev1 rev2) NEEDED
;; - merge-news (file) NEEDED ;; - merge-news (file) NEEDED
;; - steal-lock (file &optional version) NOT NEEDED ;; - steal-lock (file &optional revision) NOT NEEDED
;; HISTORY FUNCTIONS ;; HISTORY FUNCTIONS
;; * print-log (files &optional buffer) OK ;; * print-log (files &optional buffer) OK
;; - log-view-mode () OK ;; - log-view-mode () OK
;; - show-log-entry (version) NOT NEEDED, DEFAULT IS GOOD ;; - show-log-entry (revision) NOT NEEDED, DEFAULT IS GOOD
;; - wash-log (file) ?? ;; - wash-log (file) ??
;; - logentry-check () NOT NEEDED ;; - logentry-check () NOT NEEDED
;; - comment-history (file) NOT NEEDED ;; - comment-history (file) NOT NEEDED
@ -89,8 +89,8 @@
;; MISCELLANEOUS ;; MISCELLANEOUS
;; - make-version-backups-p (file) ?? ;; - make-version-backups-p (file) ??
;; - repository-hostname (dirname) ?? ;; - repository-hostname (dirname) ??
;; - previous-version (file rev) OK ;; - previous-revision (file rev) OK
;; - next-version (file rev) OK ;; - next-revision (file rev) OK
;; - check-headers () ?? ;; - check-headers () ??
;; - clear-headers () ?? ;; - clear-headers () ??
;; - delete-file (file) TEST IT ;; - delete-file (file) TEST IT
@ -277,7 +277,7 @@
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))
(defun vc-hg-diff (files &optional oldvers newvers buffer) (defun vc-hg-diff (files &optional oldvers newvers buffer)
"Get a difference report using hg between two versions of FILES." "Get a difference report using hg between two revisions of FILES."
(let ((working (vc-working-revision (car files)))) (let ((working (vc-working-revision (car files))))
(if (and (equal oldvers working) (not newvers)) (if (and (equal oldvers working) (not newvers))
(setq oldvers nil)) (setq oldvers nil))
@ -312,10 +312,10 @@
(defun vc-hg-diff-tree (file &optional oldvers newvers buffer) (defun vc-hg-diff-tree (file &optional oldvers newvers buffer)
(vc-hg-diff (list file) oldvers newvers buffer)) (vc-hg-diff (list file) oldvers newvers buffer))
(defun vc-hg-annotate-command (file buffer &optional version) (defun vc-hg-annotate-command (file buffer &optional revision)
"Execute \"hg annotate\" on FILE, inserting the contents in BUFFER. "Execute \"hg annotate\" on FILE, inserting the contents in BUFFER.
Optional arg VERSION is a version to annotate from." Optional arg REVISION is a revision to annotate from."
(vc-hg-command buffer 0 file "annotate" "-d" "-n" (if version (concat "-r" version))) (vc-hg-command buffer 0 file "annotate" "-d" "-n" (if revision (concat "-r" revision)))
(with-current-buffer buffer (with-current-buffer buffer
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward "^[0-9]") (re-search-forward "^[0-9]")
@ -338,22 +338,22 @@ Optional arg VERSION is a version to annotate from."
(beginning-of-line) (beginning-of-line)
(if (looking-at vc-hg-annotate-re) (match-string-no-properties 1)))) (if (looking-at vc-hg-annotate-re) (match-string-no-properties 1))))
(defun vc-hg-previous-version (file rev) (defun vc-hg-previous-revision (file rev)
(let ((newrev (1- (string-to-number rev)))) (let ((newrev (1- (string-to-number rev))))
(when (>= newrev 0) (when (>= newrev 0)
(number-to-string newrev)))) (number-to-string newrev))))
(defun vc-hg-next-version (file rev) (defun vc-hg-next-revision (file rev)
(let ((newrev (1+ (string-to-number rev))) (let ((newrev (1+ (string-to-number rev)))
(tip-version (tip-revision
(with-temp-buffer (with-temp-buffer
(vc-hg-command t 0 nil "tip") (vc-hg-command t 0 nil "tip")
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward "^changeset:[ \t]*\\([0-9]+\\):") (re-search-forward "^changeset:[ \t]*\\([0-9]+\\):")
(string-to-number (match-string-no-properties 1))))) (string-to-number (match-string-no-properties 1)))))
;; We don't want to exceed the maximum possible version number, ie ;; We don't want to exceed the maximum possible revision number, ie
;; the tip version. ;; the tip revision.
(when (<= newrev tip-version) (when (<= newrev tip-revision)
(number-to-string newrev)))) (number-to-string newrev))))
;; Modelled after the similar function in vc-bzr.el ;; Modelled after the similar function in vc-bzr.el

View file

@ -267,7 +267,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(defun vc-mcvs-checkin (files rev comment) (defun vc-mcvs-checkin (files rev comment)
"Meta-CVS-specific version of `vc-backend-checkin'." "Meta-CVS-specific version of `vc-backend-checkin'."
(unless (or (not rev) (vc-mcvs-valid-version-number-p rev)) (unless (or (not rev) (vc-mcvs-valid-revision-number-p rev))
(if (not (vc-mcvs-valid-symbolic-tag-name-p rev)) (if (not (vc-mcvs-valid-symbolic-tag-name-p rev))
(error "%s is not a valid symbolic tag name" rev) (error "%s is not a valid symbolic tag name" rev)
;; If the input revision is a valid symbolic tag name, we create it ;; If the input revision is a valid symbolic tag name, we create it
@ -302,7 +302,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(goto-char (point-min)) (goto-char (point-min))
(shrink-window-if-larger-than-buffer) (shrink-window-if-larger-than-buffer)
(error "Check-in failed")))) (error "Check-in failed"))))
;; Single-file commit? Then update the version by parsing the buffer. ;; Single-file commit? Then update the revision by parsing the buffer.
;; Otherwise we can't necessarily tell what goes with what; clear ;; Otherwise we can't necessarily tell what goes with what; clear
;; its properties so they have to be refetched. ;; its properties so they have to be refetched.
(if (= (length files) 1) (if (= (length files) 1)
@ -348,7 +348,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(vc-mcvs-command nil 0 file "edit") (vc-mcvs-command nil 0 file "edit")
(set-file-modes file (logior (file-modes file) 128)) (set-file-modes file (logior (file-modes file) 128))
(if (equal file buffer-file-name) (toggle-read-only -1)))) (if (equal file buffer-file-name) (toggle-read-only -1))))
;; Check out a particular version (or recreate the file). ;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil) (vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-mcvs-command nil 0 file (apply 'vc-mcvs-command nil 0 file
(if editable "-w") (if editable "-w")
@ -364,7 +364,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
(vc-mcvs-command nil 0 new "move" (file-relative-name old))) (vc-mcvs-command nil 0 new "move" (file-relative-name old)))
(defun vc-mcvs-revert (file &optional contents-done) (defun vc-mcvs-revert (file &optional contents-done)
"Revert FILE to the version it was based on." "Revert FILE to the working revision it was based on."
(vc-default-revert 'MCVS file contents-done) (vc-default-revert 'MCVS file contents-done)
(unless (eq (vc-checkout-model file) 'implicit) (unless (eq (vc-checkout-model file) 'implicit)
(if vc-mcvs-use-edit (if vc-mcvs-use-edit
@ -372,13 +372,13 @@ This is only possible if Meta-CVS is responsible for FILE's directory.")
;; Make the file read-only by switching off all w-bits ;; Make the file read-only by switching off all w-bits
(set-file-modes file (logand (file-modes file) 3950))))) (set-file-modes file (logand (file-modes file) 3950)))))
(defun vc-mcvs-merge (file first-version &optional second-version) (defun vc-mcvs-merge (file first-revision &optional second-revision)
"Merge changes into current working copy of FILE. "Merge changes into current working copy of FILE.
The changes are between FIRST-VERSION and SECOND-VERSION." The changes are between FIRST-REVISION and SECOND-REVISION."
(vc-mcvs-command nil 0 file (vc-mcvs-command nil 0 file
"update" "-kk" "update" "-kk"
(concat "-j" first-version) (concat "-j" first-revision)
(concat "-j" second-version)) (concat "-j" second-revision))
(vc-file-setprop file 'vc-state 'edited) (vc-file-setprop file 'vc-state 'edited)
(with-current-buffer (get-buffer "*vc*") (with-current-buffer (get-buffer "*vc*")
(goto-char (point-min)) (goto-char (point-min))
@ -396,7 +396,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
;; file properties accordingly. ;; file properties accordingly.
(with-current-buffer (get-buffer "*vc*") (with-current-buffer (get-buffer "*vc*")
(goto-char (point-min)) (goto-char (point-min))
;; get new workfile version ;; get new working revision
(if (re-search-forward (if (re-search-forward
"^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t)
(vc-file-setprop file 'vc-working-revision (match-string 1)) (vc-file-setprop file 'vc-working-revision (match-string 1))
@ -447,7 +447,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
files "log"))) files "log")))
(defun vc-mcvs-diff (files &optional oldvers newvers buffer) (defun vc-mcvs-diff (files &optional oldvers newvers buffer)
"Get a difference report using Meta-CVS between two versions of FILES." "Get a difference report using Meta-CVS between two revisions of FILES."
(let* ((async (and (not vc-disable-async-diff) (let* ((async (and (not vc-disable-async-diff)
(vc-stay-local-p files) (vc-stay-local-p files)
(fboundp 'start-process))) (fboundp 'start-process)))
@ -476,13 +476,13 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(and rev2 (concat "-r" rev2)) (and rev2 (concat "-r" rev2))
(vc-switches 'MCVS 'diff))))) (vc-switches 'MCVS 'diff)))))
(defun vc-mcvs-annotate-command (file buffer &optional version) (defun vc-mcvs-annotate-command (file buffer &optional revision)
"Execute \"mcvs annotate\" on FILE, inserting the contents in BUFFER. "Execute \"mcvs annotate\" on FILE, inserting the contents in BUFFER.
Optional arg VERSION is a version to annotate from." Optional arg REVISION is a revision to annotate from."
(vc-mcvs-command (vc-mcvs-command
buffer buffer
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0) (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
file "annotate" (if version (concat "-r" version))) file "annotate" (if revision (concat "-r" revision)))
(with-current-buffer buffer (with-current-buffer buffer
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward "^[0-9]") (re-search-forward "^[0-9]")
@ -496,7 +496,7 @@ Optional arg VERSION is a version to annotate from."
;;; ;;;
(defun vc-mcvs-create-snapshot (dir name branchp) (defun vc-mcvs-create-snapshot (dir name branchp)
"Assign to DIR's current version a given NAME. "Assign to DIR's current revision a given NAME.
If BRANCHP is non-nil, the name is created as a branch (and the current If BRANCHP is non-nil, the name is created as a branch (and the current
workspace is immediately moved to that new branch)." workspace is immediately moved to that new branch)."
(if (not branchp) (if (not branchp)
@ -596,7 +596,7 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS."
(forward-line 1)))) (forward-line 1))))
(defalias 'vc-mcvs-valid-symbolic-tag-name-p 'vc-cvs-valid-symbolic-tag-name-p) (defalias 'vc-mcvs-valid-symbolic-tag-name-p 'vc-cvs-valid-symbolic-tag-name-p)
(defalias 'vc-mcvs-valid-version-number-p 'vc-cvs-valid-version-number-p) (defalias 'vc-mcvs-valid-revision-number-p 'vc-cvs-valid-revision-number-p)
(provide 'vc-mcvs) (provide 'vc-mcvs)

View file

@ -163,7 +163,7 @@
'(("^[ |]+Author: \\(.*\\)" (1 'change-log-email)) '(("^[ |]+Author: \\(.*\\)" (1 'change-log-email))
("^[ |]+Date: \\(.*\\)" (1 'change-log-date-face)))))) ("^[ |]+Date: \\(.*\\)" (1 'change-log-date-face))))))
;; (defun vc-mtn-show-log-entry (version) ;; (defun vc-mtn-show-log-entry (revision)
;; ) ;; )
(defun vc-mtn-wash-log (file)) (defun vc-mtn-wash-log (file))

View file

@ -148,10 +148,10 @@ For a description of possible values, see `vc-check-master-templates'."
(defun vc-sccs-working-revision (file) (defun vc-sccs-working-revision (file)
"SCCS-specific version of `vc-working-revision'." "SCCS-specific version of `vc-working-revision'."
(with-temp-buffer (with-temp-buffer
;; The workfile version is always the latest version number. ;; The working revision is always the latest revision number.
;; To find this number, search the entire delta table, ;; To find this number, search the entire delta table,
;; rather than just the first entry, because the ;; rather than just the first entry, because the
;; first entry might be a deleted ("R") version. ;; first entry might be a deleted ("R") revision.
(vc-insert-file (vc-name file) "^\001e\n\001[^s]") (vc-insert-file (vc-name file) "^\001e\n\001[^s]")
(vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1)))
@ -230,7 +230,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile."
(vc-switches 'SCCS 'checkout))) (vc-switches 'SCCS 'checkout)))
(defun vc-sccs-checkout (file &optional editable rev) (defun vc-sccs-checkout (file &optional editable rev)
"Retrieve a copy of a saved version of SCCS controlled FILE. "Retrieve a copy of a saved revision of SCCS controlled FILE.
EDITABLE non-nil means that the file should be writable and EDITABLE non-nil means that the file should be writable and
locked. REV is the revision to check out." locked. REV is the revision to check out."
(let ((file-buffer (get-file-buffer file)) (let ((file-buffer (get-file-buffer file))
@ -258,7 +258,7 @@ locked. REV is the revision to check out."
switches)))) switches))))
(message "Checking out %s...done" file))) (message "Checking out %s...done" file)))
(defun vc-sccs-cancel-version (files) (defun vc-sccs-rollback (files)
"Roll back, undoing the most recent checkins of FILES." "Roll back, undoing the most recent checkins of FILES."
(if (not files) (if (not files)
(error "SCCS backend doesn't support directory-level rollback.")) (error "SCCS backend doesn't support directory-level rollback."))
@ -275,8 +275,8 @@ locked. REV is the revision to check out."
"Revert FILE to the version it was based on." "Revert FILE to the version it was based on."
(vc-do-command nil 0 "unget" (vc-name file)) (vc-do-command nil 0 "unget" (vc-name file))
(vc-do-command nil 0 "get" (vc-name file)) (vc-do-command nil 0 "get" (vc-name file))
;; Checking out explicit versions is not supported under SCCS, yet. ;; Checking out explicit revisions is not supported under SCCS, yet.
;; We always "revert" to the latest version; therefore ;; We always "revert" to the latest revision; therefore
;; vc-working-revision is cleared here so that it gets recomputed. ;; vc-working-revision is cleared here so that it gets recomputed.
(vc-file-setprop file 'vc-working-revision nil)) (vc-file-setprop file 'vc-working-revision nil))
@ -322,7 +322,7 @@ locked. REV is the revision to check out."
;;; ;;;
(defun vc-sccs-assign-name (file name) (defun vc-sccs-assign-name (file name)
"Assign to FILE's latest version a given NAME." "Assign to FILE's latest revision a given NAME."
(vc-sccs-add-triple name file (vc-working-revision file))) (vc-sccs-add-triple name file (vc-working-revision file)))
@ -388,7 +388,7 @@ find any project directory."
(defun vc-sccs-parse-locks () (defun vc-sccs-parse-locks ()
"Parse SCCS locks in current buffer. "Parse SCCS locks in current buffer.
The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)." The result is a list of the form ((REVISION . USER) (REVISION . USER) ...)."
(let (master-locks) (let (master-locks)
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "^\\([0-9.]+\\) [0-9.]+ \\([^ ]+\\) .*\n?" (while (re-search-forward "^\\([0-9.]+\\) [0-9.]+ \\([^ ]+\\) .*\n?"
@ -409,8 +409,8 @@ The result is a list of the form ((VERSION . USER) (VERSION . USER) ...)."
(kill-buffer (current-buffer)))) (kill-buffer (current-buffer))))
(defun vc-sccs-lookup-triple (file name) (defun vc-sccs-lookup-triple (file name)
"Return the numeric version corresponding to a named snapshot of FILE. "Return the numeric revision corresponding to a named snapshot of FILE.
If NAME is nil or a version number string it's just passed through." If NAME is nil or a revision number string it's just passed through."
(if (or (null name) (if (or (null name)
(let ((firstchar (aref name 0))) (let ((firstchar (aref name 0)))
(and (>= firstchar ?0) (<= firstchar ?9)))) (and (>= firstchar ?0) (<= firstchar ?9))))

View file

@ -185,14 +185,14 @@ If you want to force an empty list of arguments, use t."
((eq svn-state 'needs-patch) "(patch)") ((eq svn-state 'needs-patch) "(patch)")
((eq svn-state 'needs-merge) "(merge)")))) ((eq svn-state 'needs-merge) "(merge)"))))
(defun vc-svn-previous-version (file rev) (defun vc-svn-previous-revision (file rev)
(let ((newrev (1- (string-to-number rev)))) (let ((newrev (1- (string-to-number rev))))
(when (< 0 newrev) (when (< 0 newrev)
(number-to-string newrev)))) (number-to-string newrev))))
(defun vc-svn-next-version (file rev) (defun vc-svn-next-revision (file rev)
(let ((newrev (1+ (string-to-number rev)))) (let ((newrev (1+ (string-to-number rev))))
;; The "workfile version" is an uneasy conceptual fit under Subversion; ;; The "working revision" is an uneasy conceptual fit under Subversion;
;; we use it as the upper bound until a better idea comes along. If the ;; we use it as the upper bound until a better idea comes along. If the
;; workfile version W coincides with the tree's latest revision R, then ;; workfile version W coincides with the tree's latest revision R, then
;; this check prevents a "no such revision: R+1" error. Otherwise, it ;; this check prevents a "no such revision: R+1" error. Otherwise, it
@ -328,7 +328,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
;; file properties accordingly. ;; file properties accordingly.
(with-current-buffer (get-buffer "*vc*") (with-current-buffer (get-buffer "*vc*")
(goto-char (point-min)) (goto-char (point-min))
;; get new workfile version ;; get new working revision
(if (re-search-forward (if (re-search-forward
"^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t)
(vc-file-setprop file 'vc-working-revision (match-string 2)) (vc-file-setprop file 'vc-working-revision (match-string 2))
@ -393,7 +393,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
buffer buffer
(if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0) (if (and (= (length files) 1) (vc-stay-local-p (car files)) (fboundp 'start-process)) 'async 0)
files "log" files "log"
;; By default Subversion only shows the log upto the working version, ;; By default Subversion only shows the log upto the working revision,
;; whereas we also want the log of the subsequent commits. At least ;; whereas we also want the log of the subsequent commits. At least
;; that's what the vc-cvs.el code does. ;; that's what the vc-cvs.el code does.
"-rHEAD:0"))) "-rHEAD:0")))
@ -404,7 +404,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
nil) nil)
(defun vc-svn-diff (files &optional oldvers newvers buffer) (defun vc-svn-diff (files &optional oldvers newvers buffer)
"Get a difference report using SVN between two versions of fileset FILES." "Get a difference report using SVN between two revisions of fileset FILES."
(and oldvers (and oldvers
(catch 'no (catch 'no
(dolist (f files) (dolist (f files)
@ -446,7 +446,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
;;; ;;;
(defun vc-svn-create-snapshot (dir name branchp) (defun vc-svn-create-snapshot (dir name branchp)
"Assign to DIR's current version a given NAME. "Assign to DIR's current revision a given NAME.
If BRANCHP is non-nil, the name is created as a branch (and the current If BRANCHP is non-nil, the name is created as a branch (and the current
workspace is immediately moved to that new branch). workspace is immediately moved to that new branch).
NAME is assumed to be a URL." NAME is assumed to be a URL."
@ -602,8 +602,8 @@ information about FILENAME and return its status."
(and (string-match "^[a-zA-Z]" tag) (and (string-match "^[a-zA-Z]" tag)
(not (string-match "[^a-z0-9A-Z-_]" tag)))) (not (string-match "[^a-z0-9A-Z-_]" tag))))
(defun vc-svn-valid-version-number-p (tag) (defun vc-svn-valid-revision-number-p (tag)
"Return non-nil if TAG is a valid version number." "Return non-nil if TAG is a valid revision number."
(and (string-match "^[0-9]" tag) (and (string-match "^[0-9]" tag)
(not (string-match "[^0-9]" tag)))) (not (string-match "[^0-9]" tag))))