Commit ac3f4c6f authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Terminology cleanup.

parent ed4e8e8a
......@@ -3,8 +3,9 @@
* files.texi (Version Systems):
* vc-xtra.texi:
* vc1-xtra.texi:
* vc2-xtra.texi: Merge in changes for new VC
with fileset-oriented operations.
* vc2-xtra.texi: Merge in changes for new VC with fileset-oriented
operations. Change of terminology from 'version' to `revision'.
* emacs.texi: Change of terminology from 'version' to `revision'.
2007-10-09 Eric S. Raymond <esr@snark.thyrsus.com>
......
......@@ -460,7 +460,7 @@ Version Control
* Introduction to VC:: How version control works in general.
* VC Mode Line:: How the mode line shows version control status.
* Basic VC Editing:: How to edit a file under version control.
* Old Versions:: Examining and comparing old versions.
* Old Revisions:: Examining and comparing old versions.
* Secondary VC Commands:: The commands used a little less frequently.
* Branches:: Multiple lines of development.
* Remote Repositories:: Efficient access to remote CVS servers.
......
This diff is collapsed.
......@@ -61,10 +61,10 @@ setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
almost the same as the name used by @kbd{C-x v ~}
@iftex
(@pxref{Old Versions,,,emacs, the Emacs Manual}),
(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{Old Versions}),
(@pxref{Old Revisions}),
@end ifnottex
the only difference being the additional dot (@samp{.}) after the
version number. This similarity is intentional, because both kinds of
......@@ -247,10 +247,10 @@ you need not hesitate to create snapshots whenever they are useful.
You can give a snapshot name as an argument to @kbd{C-x v =} or
@kbd{C-x v ~}
@iftex
(@pxref{Old Versions,,,emacs, the Emacs Manual}).
(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
(@pxref{Old Versions}).
(@pxref{Old Revisions}).
@end ifnottex
Thus, you can use it to compare a snapshot against the current files,
or two snapshots against each other, or a snapshot against a named
......
2007-10-10 Eric S. Raymond <esr@snark.thyrsus.com>
* add-log.el:
* ediff-vers.el:
* log-view.el:
* pcvs.el:
* vc-arch.el:
* vc-bzr.el:
* vc-cvs.el:
* vc.el:
* vc-git.el:
* vc-hg.el:
* vc-hooks.el:
* vc-mcvs.el:
* vc-mtn.el:
* vc-rcs.el:
* vc-sccs.el:
* vc-svn.el: Terminology cleanup: workfile-version ->
working-revision,
{find,init,next,previous,annotate-*,log}-version ->
{find,init,next,previous,annotate-*,log}-revision,
annotate-focus-version -> annotate-working-revision, The term
'focus' is gone. The term 'revision' is now used consistently
everywhere that reference to a revision ID is intended, replacing
older use of 'version'.
2007-10-10 Juanma Barranquero <lekktu@gmail.com>
* follow.el: Change all instances of "Follow Mode" to "Follow
......
......@@ -379,7 +379,7 @@ With a numeric prefix ARG, go back ARG comments."
(defun change-log-version-number-search ()
"Return version number of current buffer's file.
This is the value returned by `vc-workfile-version' or, if that is
This is the value returned by `vc-working-revision' or, if that is
nil, by matching `change-log-version-number-regexp-list'."
(let* ((size (buffer-size))
(limit
......@@ -390,7 +390,7 @@ nil, by matching `change-log-version-number-regexp-list'."
;; Apply percentage only if buffer size is bigger than
;; approx 100 lines.
(if (> size (* 100 80)) (+ (point) (/ size 10)))))
(or (and buffer-file-name (vc-workfile-version buffer-file-name))
(or (and buffer-file-name (vc-working-revision buffer-file-name))
(save-restriction
(widen)
(let ((regexps change-log-version-number-regexp-list)
......
......@@ -200,7 +200,7 @@ comparison or merge operations are being performed."
(if ancestor-rev
(save-excursion
(if (string= ancestor-rev "")
(setq ancestor-rev (vc-workfile-version buffer-file-name)))
(setq ancestor-rev (vc-working-revision buffer-file-name)))
(vc-version-other-window ancestor-rev)
(setq ancestor-buf (current-buffer))))
(setq startup-hooks
......
......@@ -76,7 +76,7 @@
(eval-when-compile (require 'cl))
(require 'pcvs-util)
(autoload 'vc-find-version "vc")
(autoload 'vc-find-revision "vc")
(autoload 'vc-version-diff "vc")
(defvar cvs-minor-wrap-function)
......@@ -93,7 +93,7 @@
;; ("e" . cvs-mode-edit-log)
("d" . log-view-diff)
("a" . log-view-annotate-version)
("f" . log-view-find-version)
("f" . log-view-find-revision)
("n" . log-view-msg-next)
("p" . log-view-msg-prev)
("\t" . log-view-msg-next)
......@@ -116,7 +116,7 @@
;; ["Kill This Buffer" kill-this-buffer]
["Mark Log Entry for Diff" set-mark-command]
["Diff Revisions" log-view-diff]
["Visit Version" log-view-find-version]
["Visit Version" log-view-find-revision]
["Annotate Version" log-view-annotate-version]
["Next Log Entry" log-view-msg-next]
["Previous Log Entry" log-view-msg-prev]
......@@ -365,12 +365,12 @@ log entries."
(cvs-force-command "/F"))
(funcall f))))
(defun log-view-find-version (pos)
(defun log-view-find-revision (pos)
"Visit the version at point."
(interactive "d")
(save-excursion
(goto-char pos)
(switch-to-buffer (vc-find-version (log-view-current-file)
(switch-to-buffer (vc-find-revision (log-view-current-file)
(log-view-current-tag)))))
(defun log-view-annotate-version (pos)
......
......@@ -2411,7 +2411,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
(let* ((file (expand-file-name buffer-file-name))
(version (and (fboundp 'vc-backend)
(eq (vc-backend file) 'CVS)
(vc-workfile-version file))))
(vc-working-revision file))))
(when version
(save-excursion
(dolist (cvs-buf (buffer-list))
......
......@@ -265,7 +265,7 @@ Return non-nil if FILE is unchanged."
;; ID not found.
(if (equal (file-name-nondirectory sigfile)
(subst-char-in-string
?/ ?% (vc-arch-workfile-version file)))
?/ ?% (vc-arch-working-revision file)))
'added
;; Might be `added' or `up-to-date' as well.
;; FIXME: Check in the patch logs to find out.
......@@ -283,7 +283,7 @@ Return non-nil if FILE is unchanged."
'up-to-date
'edited)))))))))
(defun vc-arch-workfile-version (file)
(defun vc-arch-working-revision (file)
(let* ((root (expand-file-name "{arch}" (vc-arch-root file)))
(defbranch (vc-arch-default-version file)))
(when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch))
......@@ -321,7 +321,7 @@ Return non-nil if FILE is unchanged."
(defun vc-arch-mode-line-string (file)
"Return string for placement in modeline by `vc-mode-line' for FILE."
(let ((rev (vc-workfile-version file)))
(let ((rev (vc-working-revision file)))
(dolist (rule vc-arch-mode-line-rewrite)
(if (string-match (car rule) rev)
(setq rev (replace-match (cdr rule) t nil rev))))
......@@ -389,7 +389,7 @@ Return non-nil if FILE is unchanged."
(let ((file (car files)))
(if (and newvers
(vc-up-to-date-p file)
(equal newvers (vc-workfile-version file)))
(equal newvers (vc-working-revision file)))
;; Newvers is the base revision and the current file is unchanged,
;; so we can diff with the current file.
(setq newvers nil))
......@@ -406,7 +406,7 @@ Return non-nil if FILE is unchanged."
;; Arch does not support the typical flags.
;; (vc-switches 'Arch 'diff)
(file-relative-name file)
(if (equal oldvers (vc-workfile-version file))
(if (equal oldvers (vc-working-revision file))
nil
oldvers))))
(if async 1 status))))) ; async diff, pessimistic assumption.
......@@ -423,7 +423,7 @@ Return non-nil if FILE is unchanged."
"A wrapper around `vc-do-command' for use in vc-arch.el."
(apply 'vc-do-command buffer okstatus vc-arch-command file flags))
(defun vc-arch-init-version () nil)
(defun vc-arch-init-revision () nil)
;;; Completion of versions and revisions.
......@@ -559,7 +559,7 @@ Return non-nil if FILE is unchanged."
;;; Less obvious implementations.
(defun vc-arch-find-version (file rev buffer)
(defun vc-arch-find-revision (file rev buffer)
(let ((out (make-temp-file "vc-out")))
(unwind-protect
(progn
......
......@@ -238,7 +238,7 @@ If any error occurred in running `bzr status', then return nil."
(defun vc-bzr-workfile-unchanged-p (file)
(eq 'unchanged (car (vc-bzr-status file))))
(defun vc-bzr-workfile-version (file)
(defun vc-bzr-working-revision (file)
(lexical-let*
((rootdir (vc-bzr-root file))
(branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
......@@ -377,7 +377,7 @@ EDITABLE is ignored."
(defun vc-bzr-diff (files &optional rev1 rev2 buffer)
"VC bzr backend for diff."
(let ((working (vc-workfile-version (if (consp files) (car files) files))))
(let ((working (vc-working-revision (if (consp files) (car files) files))))
(if (and (equal rev1 working) (not rev2))
(setq rev1 nil))
(if (and (not rev1) rev2)
......@@ -546,7 +546,7 @@ Optional argument LOCALP is always ignored."
(vc-file-setprop file 'vc-state current-vc-state)
(vc-file-setprop file 'vc-bzr-state current-bzr-state)
(when (eq 'added current-bzr-state)
(vc-file-setprop file 'vc-workfile-version "0"))))
(vc-file-setprop file 'vc-working-revision "0"))))
(when (eq 'not-versioned current-bzr-state)
(let ((file (expand-file-name
(buffer-substring-no-properties
......
......@@ -229,13 +229,13 @@ See also variable `vc-cvs-sticky-date-format-string'."
(goto-char (point-max))
(widen)))))))
(defun vc-cvs-workfile-version (file)
"CVS-specific version of `vc-workfile-version'."
(defun vc-cvs-working-revision (file)
"CVS-specific version of `vc-working-revision'."
;; There is no need to consult RCS headers under CVS, because we
;; get the workfile version for free when we recognize that a file
;; is registered in CVS.
(vc-cvs-registered file)
(vc-file-getprop file 'vc-workfile-version))
(vc-file-getprop file 'vc-working-revision))
(defun vc-cvs-checkout-model (file)
"CVS-specific version of `vc-checkout-model'."
......@@ -261,7 +261,7 @@ committed and support display of sticky tags."
(let* ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag))
help-echo
(string
(if (string= (vc-workfile-version file) "0")
(if (string= (vc-working-revision file) "0")
;; A file that is added but not yet committed.
(progn
(setq help-echo "Added file (needs commit) under CVS")
......@@ -282,7 +282,7 @@ committed and support display of sticky tags."
"CVS-specific version of `vc-dired-state-info'."
(let ((cvs-state (vc-state file)))
(cond ((eq cvs-state 'edited)
(if (equal (vc-workfile-version file) "0")
(if (equal (vc-working-revision file) "0")
"(added)" "(modified)"))
((eq cvs-state 'needs-patch) "(patch)")
((eq cvs-state 'needs-merge) "(merge)"))))
......@@ -330,7 +330,7 @@ its parents."
(defun vc-cvs-checkin (files rev comment)
"CVS-specific version of `vc-backend-checkin'."
(unless (or (not rev) (vc-cvs-valid-version-number-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 revison is a valid symbolic tag name, we create it
......@@ -359,12 +359,12 @@ its parents."
(goto-char (point-min))
(shrink-window-if-larger-than-buffer)
(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
;; its properties so they have to be refetched.
(if (= (length files) 1)
(vc-file-setprop
(car files) 'vc-workfile-version
(car files) 'vc-working-revision
(vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2))
(mapc (lambda (file) (vc-file-clearprops file)) files))
;; Anyway, forget the checkout model of the file, because we might have
......@@ -379,7 +379,7 @@ its parents."
(if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev)))
(vc-cvs-command nil 0 files "update" "-A"))))
(defun vc-cvs-find-version (file rev buffer)
(defun vc-cvs-find-revision (file rev buffer)
(apply 'vc-cvs-command
buffer 0 file
"-Q" ; suppress diagnostic output
......@@ -404,8 +404,8 @@ REV is the revision to check out."
(vc-cvs-command nil 0 file "edit")
(set-file-modes file (logior (file-modes file) 128))
(if (equal file buffer-file-name) (toggle-read-only -1))))
;; Check out a particular version (or recreate the file).
(vc-file-setprop file 'vc-workfile-version nil)
;; Check out a particular revision (or recreate the file).
(vc-file-setprop file 'vc-working-revision nil)
(apply 'vc-cvs-command nil 0 file
(and editable "-w")
"update"
......@@ -426,7 +426,7 @@ REV is the revision to check out."
(vc-cvs-command nil 0 file "commit" "-mRemoved."))
(defun vc-cvs-revert (file &optional contents-done)
"Revert FILE to the version on which it was based."
"Revert FILE to the working revision on which it was based."
(vc-default-revert 'CVS file contents-done)
(unless (eq (vc-checkout-model file) 'implicit)
(if vc-cvs-use-edit
......@@ -434,13 +434,13 @@ REV is the revision to check out."
;; Make the file read-only by switching off all w-bits
(set-file-modes file (logand (file-modes file) 3950)))))
(defun vc-cvs-merge (file first-version &optional second-version)
(defun vc-cvs-merge (file first-revision &optional second-revision)
"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-cvs-command nil 0 file
"update" "-kk"
(concat "-j" first-version)
(concat "-j" second-version))
(concat "-j" first-revision)
(concat "-j" second-revision))
(vc-file-setprop file 'vc-state 'edited)
(with-current-buffer (get-buffer "*vc*")
(goto-char (point-min))
......@@ -451,18 +451,18 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(defun vc-cvs-merge-news (file)
"Merge in any new changes made to FILE."
(message "Merging changes into %s..." file)
;; (vc-file-setprop file 'vc-workfile-version nil)
;; (vc-file-setprop file 'vc-working-revision nil)
(vc-file-setprop file 'vc-checkout-time 0)
(vc-cvs-command nil 0 file "update")
;; Analyze the merge result reported by CVS, and set
;; file properties accordingly.
(with-current-buffer (get-buffer "*vc*")
(goto-char (point-min))
;; get new workfile version
;; get new working revision
(if (re-search-forward
"^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t)
(vc-file-setprop file 'vc-workfile-version (match-string 1))
(vc-file-setprop file 'vc-workfile-version nil))
(vc-file-setprop file 'vc-working-revision (match-string 1))
(vc-file-setprop file 'vc-working-revision nil))
;; get file status
(prog1
(if (eq (buffer-size) 0)
......@@ -512,7 +512,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
nil)
(defun vc-cvs-diff (files &optional oldvers newvers buffer)
"Get a difference report using CVS between two versions of FILE."
"Get a difference report using CVS between two revisions of FILE."
(let* ((async (and (not vc-disable-async-diff)
(vc-stay-local-p files)
(fboundp 'start-process)))
......@@ -559,14 +559,14 @@ The changes are between FIRST-VERSION and SECOND-VERSION."
(set-process-filter process vc-filter)
(funcall vc-filter process (substring string (match-beginning 0))))))
(defun vc-cvs-annotate-command (file buffer &optional version)
(defun vc-cvs-annotate-command (file buffer &optional revision)
"Execute \"cvs 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-cvs-command buffer
(if (and (vc-stay-local-p file) (fboundp 'start-process))
'async 0)
file "annotate"
(if version (concat "-r" version)))
(if revision (concat "-r" revision)))
;; Strip the leading few lines.
(let ((proc (get-buffer-process buffer)))
(if proc
......@@ -633,7 +633,7 @@ systime, or nil if there is none."
;;;
(defun vc-cvs-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
workspace is immediately moved to that new branch)."
(vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name)
......@@ -663,13 +663,13 @@ If UPDATE is non-nil, then update (resynch) any affected buffers."
((or (string= state "U")
(string= state "P"))
(vc-file-setprop file 'vc-state 'up-to-date)
(vc-file-setprop file 'vc-workfile-version nil)
(vc-file-setprop file 'vc-working-revision nil)
(vc-file-setprop file 'vc-checkout-time
(nth 5 (file-attributes file))))
((or (string= state "M")
(string= state "C"))
(vc-file-setprop file 'vc-state 'edited)
(vc-file-setprop file 'vc-workfile-version nil)
(vc-file-setprop file 'vc-working-revision nil)
(vc-file-setprop file 'vc-checkout-time 0)))
(vc-file-setprop file 'vc-cvs-sticky-tag sticky-tag)
(vc-resynch-buffer file t t))))
......@@ -800,7 +800,7 @@ essential information."
"\\(RCS Version\\|RCS Revision\\|Repository revision\\):\
\[\t ]+\\([0-9.]+\\)"
nil t))
(vc-file-setprop file 'vc-latest-version (match-string 2)))
(vc-file-setprop file 'vc-latest-revision (match-string 2)))
(vc-file-setprop
file 'vc-state
(cond
......@@ -843,8 +843,8 @@ CVS/Entries should only be accessed through this function."
(and (string-match "^[a-zA-Z]" tag)
(not (string-match "[^a-z0-9A-Z-_]" tag))))
(defun vc-cvs-valid-version-number-p (tag)
"Return non-nil if TAG is a valid version number."
(defun vc-cvs-valid-revision-number-p (tag)
"Return non-nil if TAG is a valid revision number."
(and (string-match "^[0-9]" tag)
(not (string-match "[^0-9.]" tag))))
......@@ -908,7 +908,7 @@ is non-nil."
;; entry for a "locally added" file (not yet committed)
((looking-at "/[^/]+/0/")
(vc-file-setprop file 'vc-checkout-time 0)
(vc-file-setprop file 'vc-workfile-version "0")
(vc-file-setprop file 'vc-working-revision "0")
(if set-state (vc-file-setprop file 'vc-state 'edited)))
;; normal entry
((looking-at
......@@ -922,7 +922,7 @@ is non-nil."
;; sticky tag
"\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty)
"\\(.*\\)")) ;Sticky tag
(vc-file-setprop file 'vc-workfile-version (match-string 1))
(vc-file-setprop file 'vc-working-revision (match-string 1))
(vc-file-setprop file 'vc-cvs-sticky-tag
(vc-cvs-parse-sticky-tag (match-string 4)
(match-string 5)))
......
......@@ -53,7 +53,7 @@
;; * state (file) OK
;; - state-heuristic (file) NOT NEEDED
;; - dir-state (dir) OK
;; * workfile-version (file) OK
;; * working-revision (file) OK
;; - latest-on-branch-p (file) NOT NEEDED
;; * checkout-model (file) OK
;; - workfile-unchanged-p (file) OK
......@@ -62,13 +62,13 @@
;; STATE-CHANGING FUNCTIONS
;; * create-repo () OK
;; * register (files &optional rev comment) OK
;; - init-version (file) NOT NEEDED
;; - init-revision (file) NOT NEEDED
;; - responsible-p (file) OK
;; - could-register (file) NOT NEEDED, DEFAULT IS GOOD
;; - receive-file (file rev) NOT NEEDED
;; - unregister (file) OK
;; * checkin (files rev comment) OK
;; * find-version (file rev buffer) OK
;; * find-revision (file rev buffer) OK
;; * checkout (file &optional editable rev) OK
;; * revert (file &optional contents-done) OK
;; - rollback (files) COULD BE SUPPORTED
......@@ -177,8 +177,8 @@
(vc-file-setprop file 'vc-state 'nil)))
(forward-line)))))
(defun vc-git-workfile-version (file)
"Git-specific version of `vc-workfile-version'."
(defun vc-git-working-revision (file)
"Git-specific version of `vc-working-revision'."
(let ((str (with-output-to-string
(with-current-buffer standard-output
(call-process "git" nil '(t nil) nil "symbolic-ref" "HEAD")))))
......@@ -194,7 +194,7 @@
(defun vc-git-mode-line-string (file)
"Return string for placement into the modeline for FILE."
(let* ((branch (vc-git-workfile-version file))
(let* ((branch (vc-git-working-revision file))
(def-ml (vc-default-mode-line-string 'Git file))
(help-echo (get-text-property 0 'help-echo def-ml)))
(if (zerop (length branch))
......@@ -232,7 +232,7 @@
(let ((coding-system-for-write git-commits-coding-system))
(vc-git-command nil 0 files "commit" "-m" comment "--only" "--")))
(defun vc-git-find-version (file rev buffer)
(defun vc-git-find-revision (file rev buffer)
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(fullname (substring
......
......@@ -45,7 +45,7 @@
;; * state (file) OK
;; - state-heuristic (file) ?? PROBABLY NOT NEEDED
;; - dir-state (dir) OK
;; * workfile-version (file) OK
;; * working-revision (file) OK
;; - latest-on-branch-p (file) ??
;; * checkout-model (file) OK
;; - workfile-unchanged-p (file) OK
......@@ -54,13 +54,13 @@
;; STATE-CHANGING FUNCTIONS
;; * register (files &optional rev comment) OK
;; * create-repo () OK
;; - init-version () NOT NEEDED
;; - init-revision () NOT NEEDED
;; - responsible-p (file) OK
;; - could-register (file) OK
;; - receive-file (file rev) ?? PROBABLY NOT NEEDED
;; - unregister (file) COMMENTED OUT, MAY BE INCORRECT
;; * checkin (files rev comment) OK
;; * find-version (file rev buffer) OK
;; * find-revision (file rev buffer) OK
;; * checkout (file &optional editable rev) OK
;; * revert (file &optional contents-done) OK
;; - rollback (files) ?? PROBABLY NOT NEEDED
......@@ -198,7 +198,7 @@
;; should not show up in vc-dired, so don't deal with them
;; here.
((eq status-char ?A)
(vc-file-setprop file 'vc-workfile-version "0")
(vc-file-setprop file 'vc-working-revision "0")
(vc-file-setprop file 'vc-state 'edited))
((eq status-char ?M)
(vc-file-setprop file 'vc-state 'edited))
......@@ -207,8 +207,8 @@
(vc-file-setprop file 'vc-state 'nil)))
(forward-line)))))
(defun vc-hg-workfile-version (file)
"Hg-specific version of `vc-workfile-version'."
(defun vc-hg-working-revision (file)
"Hg-specific version of `vc-working-revision'."
(let*
((status nil)
(out
......@@ -278,7 +278,7 @@
(defun vc-hg-diff (files &optional oldvers newvers buffer)
"Get a difference report using hg between two versions of FILES."
(let ((working (vc-workfile-version (car files))))
(let ((working (vc-working-revision (car files))))
(if (and (equal oldvers working) (not newvers))
(setq oldvers nil))
(if (and (not oldvers) newvers)
......@@ -402,7 +402,7 @@ COMMENT is ignored."
REV is ignored."
(vc-hg-command nil 0 files "commit" "-m" comment))
(defun vc-hg-find-version (file rev buffer)
(defun vc-hg-find-revision (file rev buffer)
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(if rev
......@@ -432,7 +432,7 @@ REV is the revision to check out into WORKFILE."
"Hg-specific version of `vc-dired-state-info'."
(let ((hg-state (vc-state file)))
(if (eq hg-state 'edited)
(if (equal (vc-workfile-version file) "0")
(if (equal (vc-working-revision file) "0")
"(added)" "(modified)")
;; fall back to the default VC representation
(vc-default-dired-state-info 'Hg file))))
......
......@@ -492,7 +492,7 @@ For registered files, the value returned is one of:
prompt the user to do it)."
;; FIXME: New (sub)states needed (?):
;; - `added' (i.e. `edited' but with no base version yet,
;; typically represented by vc-workfile-version = "0")
;; typically represented by vc-working-revision = "0")
;; - `conflict' (i.e. `edited' with conflict markers)
;; - `removed'
;; - `copied' and `moved' (might be handled by `removed' and `added')
......@@ -548,13 +548,13 @@ Return non-nil if FILE is unchanged."
(signal (car err) (cdr err))
(vc-call diff (list file)))))))
(defun vc-workfile-version (file)
(defun vc-working-revision (file)
"Return the repository version from which FILE was checked out.
If FILE is not registered, this function always returns nil."
(or (vc-file-getprop file 'vc-workfile-version)
(or (vc-file-getprop file 'vc-working-revision)
(if (vc-backend file)
(vc-file-setprop file 'vc-workfile-version
(vc-call workfile-version file)))))
(vc-file-setprop file 'vc-working-revision
(vc-call working-revision file)))))
(defun vc-default-registered (backend file)
"Check if FILE is registered in BACKEND using vc-BACKEND-master-templates."
......@@ -655,7 +655,7 @@ a regexp for matching all such backup files, regardless of the version."
"\\.~.+" (unless manual "\\.") "~")
(expand-file-name (concat (file-name-nondirectory file)
".~" (subst-char-in-string
?/ ?_ (or rev (vc-workfile-version file)))
?/ ?_ (or rev (vc-working-revision file)))
(unless manual ".") "~")
(file-name-directory file))))
......@@ -789,7 +789,7 @@ This function assumes that the file is registered."
(setq backend (symbol-name backend))
(let ((state (vc-state file))
(state-echo nil)
(rev (vc-workfile-version file)))
(rev (vc-working-revision file)))
(propertize
(cond ((or (eq state 'up-to-date)
(eq state 'needs-patch))
......
......@@ -196,8 +196,8 @@ This is only meaningful if you don't use the implicit checkout model
(goto-char (point-max))
(widen)))))))
(defun vc-mcvs-workfile-version (file)
(vc-cvs-workfile-version
(defun vc-mcvs-working-revision