From ac3f4c6f0213219ce488c46667a8bed6f915e71f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 10 Oct 2007 18:52:45 +0000 Subject: [PATCH] Terminology cleanup. --- doc/emacs/ChangeLog | 5 +- doc/emacs/emacs.texi | 2 +- doc/emacs/files.texi | 198 +++++++++++------------ doc/emacs/vc2-xtra.texi | 8 +- lisp/ChangeLog | 26 +++ lisp/add-log.el | 4 +- lisp/ediff-vers.el | 2 +- lisp/log-view.el | 10 +- lisp/pcvs.el | 2 +- lisp/vc-arch.el | 14 +- lisp/vc-bzr.el | 6 +- lisp/vc-cvs.el | 64 ++++---- lisp/vc-git.el | 14 +- lisp/vc-hg.el | 18 +-- lisp/vc-hooks.el | 14 +- lisp/vc-mcvs.el | 22 +-- lisp/vc-mtn.el | 4 +- lisp/vc-rcs.el | 56 +++---- lisp/vc-sccs.el | 20 +-- lisp/vc-svn.el | 28 ++-- lisp/vc.el | 418 ++++++++++++++++++++++++------------------------ 21 files changed, 482 insertions(+), 453 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 32a7765b2e8..531d6859316 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -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 diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 96cf365497d..25c7f648159 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -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. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 5ecd161a911..20460993f5d 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1233,7 +1233,7 @@ customizable variable @code{vc-handled-backends} to @code{nil} * 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. @ifnottex @@ -1669,7 +1669,7 @@ makes it writable so that you can change it. @item If the file is locked by you, and contains changes, @kbd{C-x v v} checks in the changes. In order to do this, it first reads the log entry -for the new version. @xref{Log Buffer}. +for the new revision. @xref{Log Buffer}. @item If the file is locked by you, but you have not changed it since you @@ -1711,7 +1711,7 @@ to commit your own changes, type @kbd{C-x v m @key{RET}}.) @item If there are no new changes in the repository, but you have made modifications in your work file, @kbd{C-x v v} checks in your changes. -In order to do this, it first reads the log entry for the new version. +In order to do this, it first reads the log entry for the new revision. @xref{Log Buffer}. @item @@ -1723,9 +1723,9 @@ require locking, except that automatic merging of changes from the repository is not implemented. Unfortunately, this means that nothing informs you if another user has checked in changes in the same file since you began editing it, and when this happens, his changes will be -effectively removed when you check in your version (though they will +effectively removed when you check in your revision (though they will remain in the repository, so they will not be entirely lost). You must -therefore verify that the current version is unchanged, before you +therefore verify that the current revision is unchanged, before you check in your changes. In addition, locking is possible with RCS even in this mode, although @@ -1738,7 +1738,7 @@ changes in the repository automatically and notify you when they occur. @node Advanced C-x v v @subsubsection Advanced Control in @kbd{C-x v v} -@cindex version number to check in/out +@cindex revision number to check in/out When you give a prefix argument to @code{vc-next-action} (@kbd{C-u C-x v v}), it still performs the next logical version control operation, but accepts additional arguments to specify precisely how @@ -1746,17 +1746,17 @@ to do the operation. @itemize @bullet @item -If the file is modified (or locked), you can specify the version -number to use for the new version that you check in. This is one way +If the file is modified (or locked), you can specify the revision ID +to use for the new version that you check in. This is one way to create a new branch (@pxref{Branches}). @item If the file is not modified (and unlocked), you can specify the -version to select; this lets you start working from an older version, -or on another branch. If you do not enter any version, that takes you -to the highest version on the current branch; therefore @kbd{C-u C-x -v v @key{RET}} is a convenient way to get the latest version of a file from -the repository. +revision to select; this lets you start working from an older +revision, or on another branch. If you do not enter any revision, +that takes you to the highest (``head'') revision on the current +branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to +get the latest version of a file from the repository. @item @cindex specific version control system @@ -1844,66 +1844,66 @@ these versions are used outside the minibuffer). mode, which involves running two hooks: @code{text-mode-hook} and @code{vc-log-mode-hook}. @xref{Hooks}. -@node Old Versions -@subsection Examining And Comparing Old Versions +@node Old Revisions +@subsection Examining And Comparing Old Revisions One of the convenient features of version control is the ability -to examine any version of a file, or compare two versions. +to examine any revision of a file, or compare two revisions. @table @kbd -@item C-x v ~ @var{version} @key{RET} -Examine version @var{version} of the visited file, in a buffer of its +@item C-x v ~ @var{revision} @key{RET} +Examine revision @var{revision} of the visited file, in a buffer of its own. @item C-x v = Compare the buffer contents of the current -fileset with the focus version from which you started editing. +fileset with the repository revision from which you started editing. @item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} -Compare the specified two repository versions of the current fileset. +Compare the specified two repository revisions of the current fileset. @item C-x v g -Display the file with per-line version information and using colors. +Display the file with per-line revision information and using colors. @end table -@findex vc-version-other-window +@findex vc-revision-other-window @kindex C-x v ~ - To examine an old version in its entirety, visit the file and then type -@kbd{C-x v ~ @var{version} @key{RET}} (@code{vc-version-other-window}). -This puts the text of version @var{version} in a file named -@file{@var{filename}.~@var{version}~}, and visits it in its own buffer -in a separate window. (In RCS, you can also select an old version + To examine an old revision in its entirety, visit the file and then type +@kbd{C-x v ~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). +This puts the text of revision @var{revision} in a file named +@file{@var{filename}.~@var{revision}~}, and visits it in its own buffer +in a separate window. (In RCS, you can also select an old revision and create a branch from it. @xref{Branches}.) @findex vc-diff @kindex C-x v = @kbd{C-x v =} compares the current buffer contents of each file in the current fileset (saving them in the file if necessary) with the -repository version from which you started editing each file (this is not -necessarily the latest version of the file). The diff will be displayed +repository revision from which you started editing each file (this is not +necessarily the latest revision of the file). The diff will be displayed in a special buffer in another window. @findex vc-diff @kindex C-u C-x v = - You can compare two repository versions of the current fileset with + You can compare two repository revisions of the current fileset with the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads -two version numbers or tags. The diff will be displayed in a special +two revision numbers or tags. The diff will be displayed in a special buffer in another window. - You can specify a checked-in version by its number; an empty input + You can specify a checked-in revision by its number or ID; an empty input specifies the current contents of the work file (which may be different -from all the checked-in versions). You can also specify a snapshot name +from all the checked-in revisions). You can also specify a snapshot name @iftex (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) @end iftex @ifnottex (@pxref{Snapshots}) @end ifnottex -instead of one or both version numbers. +instead of one or both revision ID. Note that if your version-control system is file-oriented (SCCS, RCS, CVS) rather than fileset-oriented (CVS, Subversion, GNU Arch) specifying -a version of a multiple-file fileset by number (as opposed to a snapshot +a revision of a multiple-file fileset by number (as opposed to a snapshot name or RSCCS/RCS tag) is unlikely to return diffs that are connected in any meaningful way. @@ -1928,12 +1928,12 @@ the options in @code{vc-rcs-diff-switches}. The Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and @kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always find the corresponding locations in the current work file. (Older -versions are not, in general, present as files on your disk.) +revisions are not, in general, present as files on your disk.) @findex vc-annotate @kindex C-x v g For some back ends, you can display the file @dfn{annotated} with -per-line version information and using colors to enhance the visual +per-line revision information and using colors to enhance the visual appearance, with the command @kbd{M-x vc-annotate}. It creates a new buffer (the ``annotate buffer'') displaying the file's text, with each part colored to show how old it is. Text colored red is new, blue means @@ -1942,7 +1942,7 @@ the color is scaled over the full range of ages, such that the oldest changes are blue, and the newest changes are red. When you give a prefix argument to this command, it uses the -minibuffer to read two arguments: which version number to display and +minibuffer to read two arguments: which revision number to display and annotate (instead of the current file contents), and the time span in days the color range should cover. @@ -1980,9 +1980,9 @@ the author's description of the changes in the revision on the current line. @item W -Annotate the focus version--the one you are editing. If you used +Annotate the working revision--the one you are editing. If you used @kbd{P} and @kbd{N} to browse to other revisions, use this key to -return to your current version. +return to your working revision. @end table @node Secondary VC Commands @@ -2035,15 +2035,15 @@ situation. If locking is in use, @kbd{C-x v i} leaves the file unlocked and read-only. Type @kbd{C-x v v} if you wish to start editing it. After registering a file with CVS, you must subsequently commit the initial -version by typing @kbd{C-x v v}. Until you do that, the version +revision by typing @kbd{C-x v v}. Until you do that, the revision ID appears as @samp{@@@@} in the mode line. -@vindex vc-default-init-version -@cindex initial version number to register - The initial version number for a newly registered file is 1.1, by +@vindex vc-default-init-revision +@cindex initial revision number to register + The initial revision number for a newly registered file is 1.1, by default. You can specify a different default by setting the variable -@code{vc-default-init-version}, or you can give @kbd{C-x v i} a numeric -argument; then it reads the initial version number for this particular +@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a numeric +argument; then it reads the initial revision number for this particular file using the minibuffer. @vindex vc-initial-comment @@ -2056,12 +2056,12 @@ the initial comment works like reading a log entry (@pxref{Log Buffer}). @table @kbd @item C-x v l -Display version control state and change history. +Display revision control state and change history. @end table @kindex C-x v l @findex vc-print-log - To view the detailed version control status and history of a file, + To view the detailed revision control status and history of a file, type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of changes to the current file, including the text of the log entries. The output appears in a separate window. The point is centered at the @@ -2109,7 +2109,7 @@ It also takes a numeric prefix argument as a repeat count. @item f Visit the revision indicated at the current line, like typing @kbd{C-x -v ~} and specifying this revision's number (@pxref{Old Versions}). +v ~} and specifying this revision's number (@pxref{Old Revisions}). @item d Display the diff (@pxref{Comparing Files}) between the revision @@ -2123,7 +2123,7 @@ current line was committed. @table @kbd @item C-x v u -Revert the buffer and the file to the version from which you started +Revert the buffer and the file to the working revision from which you started editing the file. @item C-x v c @@ -2134,11 +2134,12 @@ This undoes your last check-in. @kindex C-x v u @findex vc-revert-buffer If you want to discard your current set of changes and revert to the -version from which you started editing the file, use @kbd{C-x v u} +working revision from which you started editing the file, use @kbd{C-x v u} (@code{vc-revert-buffer}). This leaves the file unlocked; if locking is in use, you must first lock the file again before you change it again. @kbd{C-x v u} requires confirmation, unless it sees that you -haven't made any changes with respect to the master version. +haven't made any changes with respect to the master copy of the +working revision. @kbd{C-x v u} is also the command to unlock a file if you lock it and then decide not to change it. @@ -2147,8 +2148,8 @@ then decide not to change it. @findex vc-rollback To cancel a change that you already checked in, use @kbd{C-x v c} (@code{vc-rollback}). This command discards all record of the most -recent checked-in version, but only if your work file corresponds to -that version---you cannot use @kbd{C-x v c} to cancel a version that is +recent checked-in revision, but only if your work file corresponds to +that revision---you cannot use @kbd{C-x v c} to cancel a revision that is not the latest on its branch. Note that many version-control systems do not support rollback at all; this command is something of a historical relic. @@ -2166,7 +2167,7 @@ relic. @cindex trunk (version control) One use of version control is to maintain multiple ``current'' -versions of a file. For example, you might have different versions of a +revisions of a file. For example, you might have different revisions of a program in which you are gradually adding various unfinished new features. Each such independent line of development is called a @dfn{branch}. VC allows you to create branches, switch between @@ -2174,17 +2175,17 @@ different branches, and merge changes from one branch to another. Please note, however, that branches are not supported for SCCS. A file's main line of development is usually called the @dfn{trunk}. -The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At -any such version, you can start an independent branch. A branch -starting at version 1.2 would have version number 1.2.1.1, and consecutive -versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, -and so on. If there is a second branch also starting at version 1.2, it -would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. - -@cindex head version - If you omit the final component of a version number, that is called a -@dfn{branch number}. It refers to the highest existing version on that -branch---the @dfn{head version} of that branch. The branches in the +The revisions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At +any such revision, you can start an independent branch. A branch +starting at revision 1.2 would have revision number 1.2.1.1, and consecutive +revisions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, +and so on. If there is a second branch also starting at revision 1.2, it +would consist of revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. + +@cindex head revision + If you omit the final component of a revision number, that is called a +@dfn{branch number}. It refers to the highest existing revision on that +branch---the @dfn{head revision} of that branch. The branches in the example above have branch numbers 1.2.1 and 1.2.2. @menu @@ -2199,14 +2200,15 @@ example above have branch numbers 1.2.1 and 1.2.2. @subsubsection Switching between Branches To switch between branches, type @kbd{C-u C-x v v} and specify the -version number you want to select. On a locking-based system, this +revision ID you want to select. On a locking-based system, this version is then visited @emph{unlocked} (write-protected), so you can examine it before locking it. Switching branches in this way is allowed only when the file is not locked. - You can omit the minor version number, thus giving only the branch -number; this takes you to the head version on the chosen branch. If you -only type @key{RET}, Emacs goes to the highest version on the trunk. + On a VS with RCS-like revision numbering, you can omit the minor +revision number, thus giving only the branch number; this takes you to +the head version on the chosen branch. If you only type @key{RET}, +Emacs goes to the highest version on the trunk. After you have switched to any branch (including the main branch), you stay on it for subsequent VC commands, until you explicitly select some @@ -2215,36 +2217,36 @@ other branch. @node Creating Branches @subsubsection Creating New Branches - To create a new branch from a head version (one that is the latest in -the branch that contains it), first select that version if necessary, + To create a new branch from a head revision (one that is the latest in +the branch that contains it), first select that revision if necessary, lock it with @kbd{C-x v v}, and make whatever changes you want. Then, when you check in the changes, use @kbd{C-u C-x v v}. This lets you -specify the version number for the new version. You should specify a -suitable branch number for a branch starting at the current version. -For example, if the current version is 2.5, the branch number should be +specify the revision number for the new revision. You should specify a +suitable branch number for a branch starting at the current revision. +For example, if the current revision is 2.5, the branch number should be 2.5.1, 2.5.2, and so on, depending on the number of existing branches at that point. - To create a new branch at an older version (one that is no longer the -head of a branch), first select that version (@pxref{Switching + To create a new branch at an older revision (one that is no longer the +head of a branch), first select that revision (@pxref{Switching Branches}). Your procedure will then differ depending on whether you are using a locking or merging-based VCS. - On a locking VCS, you will need to lock the old version branch with + On a locking VCS, you will need to lock the old revision branch with @kbd{C-x v v}. You'll be asked to confirm, when you lock the old -version, that you really mean to create a new branch---if you say no, -you'll be offered a chance to lock the latest version instead. On +revision, that you really mean to create a new branch---if you say no, +you'll be offered a chance to lock the latest revision instead. On a merging-based VCS you will skip this step. Then make your changes and type @kbd{C-x v v} again to check in a new -version. This automatically creates a new branch starting from the -selected version. You need not specially request a new branch, because -that's the only way to add a new version at a point that is not the head +revision. This automatically creates a new branch starting from the +selected revision. You need not specially request a new branch, because +that's the only way to add a new revision at a point that is not the head of a branch. After the branch is created, you ``stay'' on it. That means that -subsequent check-ins create new versions on that branch. To leave the -branch, you must explicitly select a different version with @kbd{C-u C-x +subsequent check-ins create new revisions on that branch. To leave the +branch, you must explicitly select a different revision with @kbd{C-u C-x v v}. To transfer changes from one branch to another, use the merge command, described in the next section. @@ -2274,26 +2276,26 @@ since you checked the file out (we call this @dfn{merging the news}). This is the common way to pick up recent changes from the repository, regardless of whether you have already changed the file yourself. - You can also enter a branch number or a pair of version numbers in + You can also enter a branch number or a pair of revision numbers in the minibuffer. Then @kbd{C-x v m} finds the changes from that -branch, or the differences between the two versions you specified, and -merges them into the current version of the current file. +branch, or the differences between the two revisions you specified, and +merges them into the current revision of the current file. As an example, suppose that you have finished a certain feature on branch 1.3.1. In the meantime, development on the trunk has proceeded -to version 1.5. To merge the changes from the branch to the trunk, -first go to the head version of the trunk, by typing @kbd{C-u C-x v v -@key{RET}}. Version 1.5 is now current. If locking is used for the file, -type @kbd{C-x v v} to lock version 1.5 so that you can change it. Next, +to revision 1.5. To merge the changes from the branch to the trunk, +first go to the head revision of the trunk, by typing @kbd{C-u C-x v v +@key{RET}}. Revision 1.5 is now current. If locking is used for the file, +type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next, type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on -branch 1.3.1 (relative to version 1.3, where the branch started, up to -the last version on the branch) and merges it into the current version +branch 1.3.1 (relative to revision 1.3, where the branch started, up to +the last revision on the branch) and merges it into the current revision of the work file. You can now check in the changed file, thus creating -version 1.6 containing the changes from the branch. +revision 1.6 containing the changes from the branch. It is possible to do further editing after merging the branch, before the next check-in. But it is usually wiser to check in the merged -version, then lock it and make the further changes. This will keep +revision, then lock it and make the further changes. This will keep a better record of the history of changes. @cindex conflicts @@ -2311,7 +2313,7 @@ Ediff, Ediff, ediff, The Ediff Manual}). If you say no, the conflicting changes are both inserted into the file, surrounded by @dfn{conflict markers}. The example below shows how a conflict region looks; the file is called @samp{name} and the current -master file version with user B's changes in it is 1.11. +master file revision with user B's changes in it is 1.11. @c @w here is so CVS won't think this is a conflict. @smallexample @@ -2338,7 +2340,7 @@ different branches of a file. CVS allows this by default; for RCS, it is possible if you create multiple source directories. Each source directory should have a link named @file{RCS} which points to a common directory of RCS master files. Then each source directory can have its -own choice of selected versions, but all share the same common RCS +own choice of selected revisions, but all share the same common RCS records. This technique works reliably and automatically, provided that the diff --git a/doc/emacs/vc2-xtra.texi b/doc/emacs/vc2-xtra.texi index 685d737f0f1..a4ef91c74f4 100644 --- a/doc/emacs/vc2-xtra.texi +++ b/doc/emacs/vc2-xtra.texi @@ -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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7b471c09c50..7ea87811145 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,29 @@ +2007-10-10 Eric S. Raymond + + * 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 * follow.el: Change all instances of "Follow Mode" to "Follow diff --git a/lisp/add-log.el b/lisp/add-log.el index 546f87b4e4d..a58d6318670 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -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) diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index d0a323980c2..97232afce76 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el @@ -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 diff --git a/lisp/log-view.el b/lisp/log-view.el index b215917a559..194afb8d5de 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -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) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 1e45fe6974b..a0bac0b2871 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -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)) diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index 840a19a0f66..96957de0812 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -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 diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 18abed00939..e889ea86c1e 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -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 diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 0a17388ae34..5ffb4815182 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -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))) diff --git a/lisp/vc-git.el b/lisp/vc-git.el index d68b33be76a..6ea04a1e45b 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -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 diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 6b9565b8bd8..62d7024a91d 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -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)))) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 822a7eae682..d2825f9b5bb 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -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)) diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el index 766daf3c97b..7893e47adb9 100644 --- a/lisp/vc-mcvs.el +++ b/lisp/vc-mcvs.el @@ -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 (file) + (vc-cvs-working-revision (expand-file-name (vc-file-getprop file 'mcvs-inode) (vc-file-getprop file 'mcvs-root)))) @@ -253,7 +253,7 @@ the Meta-CVS command (in that order)." (vc-switches 'MCVS 'register)) ;; I'm not sure exactly why, but if we don't setup the inode and root ;; prop of the file, things break later on in vc-mode-line that - ;; ends up calling vc-mcvs-workfile-version. + ;; ends up calling vc-mcvs-working-revision. ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p ;; doesn't try to call `mcvs diff' on the file. (vc-mcvs-registered file))) @@ -307,7 +307,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") ;; 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 @@ -322,7 +322,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev))) (vc-mcvs-command nil 0 files "update" "-A")))) -(defun vc-mcvs-find-version (file rev buffer) +(defun vc-mcvs-find-revision (file rev buffer) (apply 'vc-mcvs-command buffer 0 file "-Q" ; suppress diagnostic output @@ -349,7 +349,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") (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) + (vc-file-setprop file 'vc-working-revision nil) (apply 'vc-mcvs-command nil 0 file (if editable "-w") "update" @@ -389,7 +389,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (defun vc-mcvs-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-mcvs-command nil 0 file "update") ;; Analyze the merge result reported by Meta-CVS, and set @@ -399,8 +399,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION." ;; get new workfile version (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) @@ -528,13 +528,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-mcvs-sticky-tag sticky-tag) (vc-resynch-buffer file t t)))) diff --git a/lisp/vc-mtn.el b/lisp/vc-mtn.el index e24bf399ba1..a4739c633e0 100644 --- a/lisp/vc-mtn.el +++ b/lisp/vc-mtn.el @@ -81,7 +81,7 @@ 'edited 'up-to-date)))) -(defun vc-mtn-workfile-version (file) +(defun vc-mtn-working-revision (file) ;; If `mtn' fails or returns status>0, or if the search fails, just ;; return nil. (ignore-errors @@ -134,7 +134,7 @@ (defun vc-mtn-checkin (files rev comment) (vc-mtn-command nil 0 files "commit" "-m" comment)) -(defun vc-mtn-find-version (file rev buffer) +(defun vc-mtn-find-revision (file rev buffer) (vc-mtn-command buffer 0 file "cat" "-r" rev)) ;; (defun vc-mtn-checkout (file &optional editable rev) diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index e50e74e5eba..35eba607bea 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -123,12 +123,12 @@ For a description of possible values, see `vc-check-master-templates'." (and vc-consult-headers (vc-rcs-consult-headers file))) (let ((state - ;; vc-workfile-version might not be known; in that case the + ;; vc-working-revision might not be known; in that case the ;; property is nil. vc-rcs-fetch-master-state knows how to ;; handle that. (vc-rcs-fetch-master-state file (vc-file-getprop file - 'vc-workfile-version)))) + 'vc-working-revision)))) (if (not (eq state 'up-to-date)) state (if (vc-workfile-unchanged-p file) @@ -181,19 +181,19 @@ For a description of possible values, see `vc-check-master-templates'." (vc-rcs-state file)))) (vc-rcs-state file))))) -(defun vc-rcs-workfile-version (file) - "RCS-specific version of `vc-workfile-version'." +(defun vc-rcs-working-revision (file) + "RCS-specific version of `vc-working-revision'." (or (and vc-consult-headers (vc-rcs-consult-headers file) - (vc-file-getprop file 'vc-workfile-version)) + (vc-file-getprop file 'vc-working-revision)) (progn (vc-rcs-fetch-master-state file) - (vc-file-getprop file 'vc-workfile-version)))) + (vc-file-getprop file 'vc-working-revision)))) (defun vc-rcs-latest-on-branch-p (file &optional version) "Return non-nil if workfile version of FILE is the latest on its branch. When VERSION is given, perform check for that version." - (unless version (setq version (vc-workfile-version file))) + (unless version (setq version (vc-working-revision file))) (with-temp-buffer (string= version (if (vc-trunk-p version) @@ -221,7 +221,7 @@ When VERSION is given, perform check for that version." "RCS-specific implementation of `vc-workfile-unchanged-p'." ;; Try to use rcsdiff --brief. If rcsdiff does not understand that, ;; do a double take and remember the fact for the future - (let* ((version (concat "-r" (vc-workfile-version file))) + (let* ((version (concat "-r" (vc-working-revision file))) (status (if (eq vc-rcsdiff-knows-brief 'no) (vc-do-command nil 1 "rcsdiff" file version) (vc-do-command nil 2 "rcsdiff" file "--brief" version)))) @@ -292,7 +292,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." (expand-file-name name (file-name-directory file)))))) - (vc-file-setprop file 'vc-workfile-version + (vc-file-setprop file 'vc-working-revision (if (re-search-forward "^initial revision: \\([0-9.]+\\).*\n" nil t) @@ -335,7 +335,7 @@ whether to remove it." (let ((switches (vc-switches 'RCS 'checkin))) ;; Now operate on the files (dolist (file files) - (let ((old-version (vc-workfile-version file)) new-version + (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. @@ -353,7 +353,7 @@ whether to remove it." (concat (if vc-keep-workfiles "-u" "-r") rev) (concat "-m" comment) switches) - (vc-file-setprop file 'vc-workfile-version nil) + (vc-file-setprop file 'vc-working-revision nil) ;; determine the new workfile version (set-buffer "*vc*") @@ -363,7 +363,7 @@ whether to remove it." (re-search-forward "reverting to previous revision \\([0-9.]+\\)" nil t)) (setq new-version (match-string 1)) - (vc-file-setprop file 'vc-workfile-version new-version)) + (vc-file-setprop file 'vc-working-revision new-version)) ;; if we got to a different branch, adjust the default ;; branch accordingly @@ -382,7 +382,7 @@ whether to remove it." (vc-do-command nil 1 "rcs" (vc-name file) (concat "-u" old-version))))))))) -(defun vc-rcs-find-version (file rev buffer) +(defun vc-rcs-find-revision (file rev buffer) (apply 'vc-do-command buffer 0 "co" (vc-name file) "-q" ;; suppress diagnostic output @@ -421,7 +421,7 @@ whether to remove it." (if (stringp rev) ;; a literal revision was specified (concat "-r" rev) - (let ((workrev (vc-workfile-version file))) + (let ((workrev (vc-working-revision file))) (if workrev (concat "-r" (if (not rev) @@ -441,7 +441,7 @@ whether to remove it." (with-current-buffer "*vc*" (setq new-version (vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1))) - (vc-file-setprop file 'vc-workfile-version new-version) + (vc-file-setprop file 'vc-working-revision new-version) ;; if necessary, adjust the default branch (and rev (not (string= rev "")) (vc-rcs-set-default-branch @@ -457,7 +457,7 @@ whether to remove it." (if (not files) (error "RCS backend doesn't support directory-level rollback.")) (dolist (file files) - (let* ((discard (vc-workfile-version file)) + (let* ((discard (vc-working-revision file)) (previous (if (vc-trunk-p discard) "" (vc-branch-part discard))) (config (current-window-configuration)) (done nil)) @@ -492,7 +492,7 @@ whether to remove it." "Revert FILE to the version it was based on." (vc-do-command nil 0 "co" (vc-name file) "-f" (concat (if (eq (vc-state file) 'edited) "-u" "-r") - (vc-workfile-version file)))) + (vc-working-revision file)))) (defun vc-rcs-merge (file first-version &optional second-version) "Merge changes into current working copy of FILE. @@ -811,11 +811,11 @@ to its master version." (or value (vc-branch-part branch)))) -(defun vc-rcs-fetch-master-state (file &optional workfile-version) +(defun vc-rcs-fetch-master-state (file &optional working-revision) "Compute the master file's idea of the state of FILE. If a WORKFILE-VERSION is given, compute the state of that version, otherwise determine the workfile version based on the master file. -This function sets the properties `vc-workfile-version' and +This function sets the properties `vc-working-revision' and `vc-checkout-model' to their correct values, based on the master file." (with-temp-buffer @@ -826,7 +826,7 @@ file." (let ((workfile-is-latest nil) (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) (vc-file-setprop file 'vc-rcs-default-branch default-branch) - (unless workfile-version + (unless working-revision ;; Workfile version not known yet. Determine that first. It ;; is either the head of the trunk, the head of the default ;; branch, or the "default branch" itself, if that is a full @@ -834,19 +834,19 @@ file." (cond ;; no default branch ((or (not default-branch) (string= "" default-branch)) - (setq workfile-version + (setq working-revision (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) (setq workfile-is-latest t)) ;; default branch is actually a revision ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" default-branch) - (setq workfile-version default-branch)) + (setq working-revision default-branch)) ;; else, search for the head of the default branch (t (vc-insert-file (vc-name file) "^desc") - (setq workfile-version + (setq working-revision (vc-rcs-find-most-recent-rev default-branch)) (setq workfile-is-latest t))) - (vc-file-setprop file 'vc-workfile-version workfile-version)) + (vc-file-setprop file 'vc-working-revision working-revision)) ;; Check strict locking (goto-char (point-min)) (vc-file-setprop file 'vc-checkout-model @@ -856,14 +856,14 @@ file." (goto-char (point-min)) (let ((locking-user (vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):" - (regexp-quote workfile-version) + (regexp-quote working-revision) "[^0-9.]") 1))) (cond ;; not locked ((not locking-user) (if (or workfile-is-latest - (vc-rcs-latest-on-branch-p file workfile-version)) + (vc-rcs-latest-on-branch-p file working-revision)) ;; workfile version is latest on branch 'up-to-date ;; workfile version is not latest on branch @@ -873,7 +873,7 @@ file." (string= locking-user (vc-user-login-name file))) (if (or (eq (vc-checkout-model file) 'locking) workfile-is-latest - (vc-rcs-latest-on-branch-p file workfile-version)) + (vc-rcs-latest-on-branch-p file working-revision)) 'edited ;; Locking is not used for the file, but the owner does ;; have a lock, and there is a higher version on the current @@ -954,7 +954,7 @@ Returns: nil if no headers were found ;; else: nothing found ;; ------------------- (t nil))) - (if status (vc-file-setprop file 'vc-workfile-version version)) + (if status (vc-file-setprop file 'vc-working-revision version)) (and (eq status 'rev-and-lock) (vc-file-setprop file 'vc-state (cond diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el index 2389cb36203..fd5e24ae5e5 100644 --- a/lisp/vc-sccs.el +++ b/lisp/vc-sccs.el @@ -111,8 +111,8 @@ For a description of possible values, see `vc-check-master-templates'." (with-temp-buffer (if (vc-insert-file (vc-sccs-lock-file file)) (let* ((locks (vc-sccs-parse-locks)) - (workfile-version (vc-workfile-version file)) - (locking-user (cdr (assoc workfile-version locks)))) + (working-revision (vc-working-revision file)) + (locking-user (cdr (assoc working-revision locks)))) (if (not locking-user) (if (vc-workfile-unchanged-p file) 'up-to-date @@ -145,8 +145,8 @@ For a description of possible values, see `vc-check-master-templates'." (vc-sccs-state file)))) (vc-sccs-state file))) -(defun vc-sccs-workfile-version (file) - "SCCS-specific version of `vc-workfile-version'." +(defun vc-sccs-working-revision (file) + "SCCS-specific version of `vc-working-revision'." (with-temp-buffer ;; The workfile version is always the latest version number. ;; To find this number, search the entire delta table, @@ -163,7 +163,7 @@ For a description of possible values, see `vc-check-master-templates'." "SCCS-specific implementation of `vc-workfile-unchanged-p'." (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) (list "--brief" "-q" - (concat "-r" (vc-workfile-version file)))))) + (concat "-r" (vc-working-revision file)))))) ;;; @@ -219,7 +219,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." (if vc-keep-workfiles (vc-do-command nil 0 "get" (vc-name file))))) -(defun vc-sccs-find-version (file rev buffer) +(defun vc-sccs-find-revision (file rev buffer) (apply 'vc-do-command buffer 0 "get" (vc-name file) "-s" ;; suppress diagnostic output @@ -263,7 +263,7 @@ locked. REV is the revision to check out." (if (not files) (error "SCCS backend doesn't support directory-level rollback.")) (dolist (file files) - (let ((discard (vc-workfile-version file))) + (let ((discard (vc-working-revision file))) (if (null (yes-or-no-p (format "Remove version %s from %s history? " discard file))) (error "Aborted")) @@ -277,8 +277,8 @@ locked. REV is the revision to check out." (vc-do-command nil 0 "get" (vc-name file)) ;; Checking out explicit versions is not supported under SCCS, yet. ;; We always "revert" to the latest version; therefore - ;; vc-workfile-version is cleared here so that it gets recomputed. - (vc-file-setprop file 'vc-workfile-version nil)) + ;; vc-working-revision is cleared here so that it gets recomputed. + (vc-file-setprop file 'vc-working-revision nil)) (defun vc-sccs-steal-lock (file &optional rev) "Steal the lock on the current workfile for FILE and revision REV." @@ -323,7 +323,7 @@ locked. REV is the revision to check out." (defun vc-sccs-assign-name (file name) "Assign to FILE's latest version a given NAME." - (vc-sccs-add-triple name file (vc-workfile-version file))) + (vc-sccs-add-triple name file (vc-working-revision file))) ;;; diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index bf003f2ac97..a4e1d19a90c 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -160,13 +160,13 @@ If you want to force an empty list of arguments, use t." (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) (vc-svn-parse-status)))) -(defun vc-svn-workfile-version (file) - "SVN-specific version of `vc-workfile-version'." +(defun vc-svn-working-revision (file) + "SVN-specific version of `vc-working-revision'." ;; There is no need to consult RCS headers under SVN, because we ;; get the workfile version for free when we recognize that a file ;; is registered in SVN. (vc-svn-registered file) - (vc-file-getprop file 'vc-workfile-version)) + (vc-file-getprop file 'vc-working-revision)) (defun vc-svn-checkout-model (file) "SVN-specific version of `vc-checkout-model'." @@ -180,7 +180,7 @@ If you want to force an empty list of arguments, use t." "SVN-specific version of `vc-dired-state-info'." (let ((svn-state (vc-state file))) (cond ((eq svn-state 'edited) - (if (equal (vc-workfile-version file) "0") + (if (equal (vc-working-revision file) "0") "(added)" "(modified)")) ((eq svn-state 'needs-patch) "(patch)") ((eq svn-state 'needs-merge) "(merge)")))) @@ -198,7 +198,7 @@ If you want to force an empty list of arguments, use t." ;; this check prevents a "no such revision: R+1" error. Otherwise, it ;; inhibits showing of W+1 through R, which could be considered anywhere ;; from gracious to impolite. - (unless (< (string-to-number (vc-file-getprop file 'vc-workfile-version)) + (unless (< (string-to-number (vc-file-getprop file 'vc-working-revision)) newrev) (number-to-string newrev)))) @@ -256,11 +256,11 @@ This is only possible if SVN is responsible for FILE's directory.") (error "Check-in failed")))) ;; Update file properties ;; (vc-file-setprop - ;; file 'vc-workfile-version + ;; file 'vc-working-revision ;; (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) )) -(defun vc-svn-find-version (file rev buffer) +(defun vc-svn-find-revision (file rev buffer) "SVN-specific retrieval of a specified version into a buffer." (apply 'vc-svn-command buffer 0 file @@ -281,7 +281,7 @@ This is only possible if SVN is responsible for FILE's directory.") ;; If no revision was specified, there's nothing to do. nil ;; Check out a particular version (or recreate the file). - (vc-file-setprop file 'vc-workfile-version nil) + (vc-file-setprop file 'vc-working-revision nil) (apply 'vc-svn-command nil 0 file "update" ;; default for verbose checkout: clear the sticky tag so @@ -321,7 +321,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (defun vc-svn-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-svn-command nil 0 file "update") ;; Analyze the merge result reported by SVN, and set @@ -331,8 +331,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION." ;; get new workfile version (if (re-search-forward "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) - (vc-file-setprop file 'vc-workfile-version (match-string 2)) - (vc-file-setprop file 'vc-workfile-version nil)) + (vc-file-setprop file 'vc-working-revision (match-string 2)) + (vc-file-setprop file 'vc-working-revision nil)) ;; get file status (goto-char (point-min)) (prog1 @@ -408,7 +408,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (and oldvers (catch 'no (dolist (f files) - (or (equal oldvers (vc-workfile-version f)) + (or (equal oldvers (vc-working-revision f)) (throw 'no nil))) t) ;; Use nil rather than the current revision because svn handles @@ -566,7 +566,7 @@ information about FILENAME and return its status." (unless filename (vc-file-setprop file 'vc-backend 'SVN)) ;; Use the last-modified revision, so that searching in vc-print-log ;; output works. - (vc-file-setprop file 'vc-workfile-version (match-string 3)) + (vc-file-setprop file 'vc-working-revision (match-string 3)) ;; Remember Svn's own status. (vc-file-setprop file 'vc-svn-status status) (vc-file-setprop @@ -580,7 +580,7 @@ information about FILENAME and return its status." 'up-to-date)) ((eq status ?A) ;; If the file was actually copied, (match-string 2) is "-". - (vc-file-setprop file 'vc-workfile-version "0") + (vc-file-setprop file 'vc-working-revision "0") (vc-file-setprop file 'vc-checkout-time 0) 'edited) ((memq status '(?M ?C)) diff --git a/lisp/vc.el b/lisp/vc.el index d88852eb8c8..5505b13e49b 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -7,7 +7,7 @@ ;; Maintainer: Andre Spiegel ;; Keywords: tools -;; $Id: vc.el,v 1.139 2007/10/10 13:14:41 esr Exp $ +;; $Id$ ;; This file is part of GNU Emacs. @@ -110,7 +110,7 @@ ;; VC keeps some per-file information in the form of properties (see ;; vc-file-set/getprop in vc-hooks.el). The backend-specific functions ;; do not generally need to be aware of these properties. For example, -;; `vc-sys-workfile-version' should compute the focus version and +;; `vc-sys-working-revision' should compute the working revision and ;; return it; it should not look it up in the property, and it needn't ;; store it there either. However, if a backend-specific function does ;; store a value in a property, that value takes precedence over any @@ -164,19 +164,19 @@ ;; anything, but rather store the files' states into the corresponding ;; `vc-state' properties. ;; -;; * workfile-version (file) +;; * working-revision (file) ;; -;; Return the current focus version of FILE. This is the version fetched +;; Return the working revision of FILE. This is the revision fetched ;; by the last checkout or upate, not necessarily the same thing as the -;; head or tip version. Should return "0" for a file added but not yet +;; head or tip revision. Should return "0" for a file added but not yet ;; committed. ;; ;; - latest-on-branch-p (file) ;; -;; Return non-nil if the focus version of FILE is the latest version -;; on its branch (many VCSes call this the 'tip' or 'head' version). +;; Return non-nil if the working revision of FILE is the latest revision +;; on its branch (many VCSes call this the 'tip' or 'head' revision). ;; The default implementation always returns t, which means that -;; working with non-current versions is not supported by default. +;; working with non-current revisions is not supported by default. ;; ;; * checkout-model (file) ;; @@ -185,13 +185,13 @@ ;; ;; - workfile-unchanged-p (file) ;; -;; Return non-nil if FILE is unchanged from the focus version. This -;; function should do a brief comparison of FILE's contents with -;; those of the repository version. If the backend does not have -;; such a brief-comparison feature, the default implementation of -;; this function can be used, which delegates to a full -;; vc-BACKEND-diff. (Note that vc-BACKEND-diff must not run -;; asynchronously in this case, see variable +;; Return non-nil if FILE is unchanged from the working revision. +;; This function should do a brief comparison of FILE's contents +;; with those of the repository master of the working revision. If +;; the backend does not have such a brief-comparison feature, the +;; default implementation of this function can be used, which +;; delegates to a full vc-BACKEND-diff. (Note that vc-BACKEND-diff +;; must not run asynchronously in this case, see variable ;; `vc-disable-async-diff'.) ;; ;; - mode-line-string (file) @@ -226,11 +226,11 @@ ;; to the backend command. (Note: in older versions of VC, this ;; command took a single file argument and not a list.) ;; -;; - init-version (file) +;; - init-revision (file) ;; -;; The initial version to use when registering FILE if one is not +;; The initial revision to use when registering FILE if one is not ;; specified by the user. If not provided, the variable -;; vc-default-init-version is used instead. +;; vc-default-init-revision is used instead. ;; ;; - responsible-p (file) ;; @@ -267,7 +267,7 @@ ;; the backend command. (Note: in older versions of VC, this ;; command took a single file argument and not a list.) ;; -;; * find-version (file rev buffer) +;; * find-revision (file rev buffer) ;; ;; Fetch revision REV of file FILE and put it into BUFFER. ;; If REV is the empty string, fetch the head of the trunk. @@ -279,7 +279,7 @@ ;; Check out revision REV of FILE into the working area. If EDITABLE ;; is non-nil, FILE should be writable by the user and if locking is ;; used for FILE, a lock should also be set. If REV is non-nil, that -;; is the revision to check out (default is the focus version). +;; is the revision to check out (default is the working revision). ;; If REV is t, that means to check out the head of the current branch; ;; if it is the empty string, check out the head of the trunk. ;; The implementation should pass the value of vc-checkout-switches @@ -287,15 +287,15 @@ ;; ;; * revert (file &optional contents-done) ;; -;; Revert FILE back to the current focus version. If optional +;; Revert FILE back to the working revision. If optional ;; arg CONTENTS-DONE is non-nil, then the contents of FILE have ;; already been reverted from a version backup, and this function ;; only needs to update the status of FILE within the backend. ;; ;; - rollback (files) ;; -;; Remove the tip version of each of FILES from the repository. If -;; this function is not provided, trying to cancel a version is +;; Remove the tip revision of each of FILES from the repository. If +;; this function is not provided, trying to cancel a revision is ;; caught as an error. (Most backends don't provide it.) (Also ;; note that older versions of this backend command were called ;; 'cancel-version' and took a single file arg, not a list of @@ -309,9 +309,9 @@ ;; ;; Merge recent changes from the current branch into FILE. ;; -;; - steal-lock (file &optional version) +;; - steal-lock (file &optional revision) ;; -;; Steal any lock on the focus version of FILE, or on VERSION if +;; Steal any lock on the working revision of FILE, or on REVISION if ;; that is provided. This function is only needed if locking is ;; used for files under this backend, and if files can indeed be ;; locked by other users. @@ -330,9 +330,9 @@ ;; `log-view-mode' and is expected to be changed (if at all) to a derived ;; mode of `log-view-mode'. ;; -;; - show-log-entry (version) +;; - show-log-entry (revision) ;; -;; If provided, search the log entry for VERSION in the current buffer, +;; If provided, search the log entry for REVISION in the current buffer, ;; and make sure it is displayed in the buffer's window. The default ;; implementation of this function works for RCS-style logs. ;; @@ -366,13 +366,13 @@ ;; ;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if ;; BUFFER is nil. If REV1 and REV2 are non-nil, report differences -;; from REV1 to REV2. If REV1 is nil, use the current focus -;; version (as found in the repository) as the older version; if -;; REV2 is nil, use the current working-copy contents as the newer -;; version. This function should pass the value of (vc-switches -;; BACKEND 'diff) to the backend command. It should return a status -;; of either 0 (no differences found), or 1 (either non-empty diff -;; or the diff is run asynchronously). +;; from REV1 to REV2. If REV1 is nil, use the working revision (as +;; found in the repository) as the older revision; if REV2 is nil, +;; use the current working-copy contents as the newer revision. This +;; function should pass the value of (vc-switches BACKEND 'diff) to +;; the backend command. It should return a status of either 0 (no +;; differences found), or 1 (either non-empty diff or the diff is +;; run asynchronously). ;; ;; - revision-completion-table (file) ;; @@ -389,7 +389,7 @@ ;; - annotate-command (file buf &optional rev) ;; ;; If this function is provided, it should produce an annotated display -;; of FILE in BUF, relative to version REV. Annotation means each line +;; of FILE in BUF, relative to revision REV. Annotation means each line ;; of FILE displayed is prefixed with version information associated with ;; its addition (deleted lines leave no history) and that the text of the ;; file is fontified according to age. @@ -437,7 +437,7 @@ ;; ;; - assign-name (file name) ;; -;; Give name NAME to the current version of FILE, assuming it is +;; Give name NAME to the working revision of FILE, assuming it is ;; up-to-date. Only used by the default version of `create-snapshot'. ;; ;; - retrieve-snapshot (dir name update) @@ -447,13 +447,13 @@ ;; snapshot that are currently visited. The default implementation ;; does a sanity check whether there aren't any uncommitted changes at ;; or below DIR, and then performs a tree walk, using the `checkout' -;; function to retrieve the corresponding versions. +;; function to retrieve the corresponding revisions. ;; ;; MISCELLANEOUS ;; ;; - make-version-backups-p (file) ;; -;; Return non-nil if unmodified repository versions of FILE should be +;; Return non-nil if unmodified repository revisions of FILE should be ;; backed up locally. If this is done, VC can perform `diff' and ;; `revert' operations itself, without calling the backend system. The ;; default implementation always returns nil. @@ -466,15 +466,15 @@ ;; This function is used in `vc-stay-local-p' which backends can use ;; for their convenience. ;; -;; - previous-version (file rev) +;; - previous-revision (file rev) ;; -;; Return the version number that precedes REV for FILE, or nil if no such -;; version exists. +;; Return the revision number that precedes REV for FILE, or nil if no such +;; revision exists. ;; -;; - next-version (file rev) +;; - next-revision (file rev) ;; -;; Return the version number that follows REV for FILE, or nil if no such -;; version exists. +;; Return the revision number that follows REV for FILE, or nil if no such +;; revision exists. ;; ;; - check-headers () ;; @@ -559,8 +559,8 @@ preserve the setting." :type 'boolean :group 'vc) -(defcustom vc-default-init-version "1.1" - "A string used as the default version number when a new file is registered. +(defcustom vc-default-init-revision "1.1" + "A string used as the default revision number when a new file is registered. This can be overridden by giving a prefix argument to \\[vc-register]. This can also be overridden by a particular VC backend." :type 'string @@ -778,9 +778,9 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." (define-key m "D" 'vc-annotate-show-diff-revision-at-line) (define-key m "J" 'vc-annotate-revision-at-line) (define-key m "L" 'vc-annotate-show-log-revision-at-line) - (define-key m "N" 'vc-annotate-next-version) - (define-key m "P" 'vc-annotate-prev-version) - (define-key m "W" 'vc-annotate-focus-version) + (define-key m "N" 'vc-annotate-next-revision) + (define-key m "P" 'vc-annotate-prev-revision) + (define-key m "W" 'vc-annotate-working-revision) m) "Local keymap used for VC-Annotate mode.") @@ -838,7 +838,7 @@ Backends that offer asynchronous diffs should respect this variable in their implementation of vc-BACKEND-diff.") (defvar vc-log-fileset) -(defvar vc-log-version) +(defvar vc-log-revision) (defvar vc-dired-mode nil) (make-variable-buffer-local 'vc-dired-mode) @@ -1315,7 +1315,7 @@ Otherwise, throw an error. (defun vc-revert-buffer-internal (&optional arg no-confirm) "Revert buffer, keeping point and mark where user expects them. -Try to be clever in the face of changes due to expanded version control +Try to be clever in the face of changes due to expanded version-control key words. This is important for typeahead to work as expected. ARG and NO-CONFIRM are passed on to `revert-buffer'." (interactive "P") @@ -1381,7 +1381,7 @@ merge in the changes into your working copy." (backend (vc-backend (car files))) (state (vc-state (car files))) (model (vc-checkout-model (car files))) - version) + revision) ;; Verify that the fileset is homogenous (dolist (file (cdr files)) (if (not (eq (vc-state file) state)) @@ -1416,17 +1416,17 @@ merge in the changes into your working copy." ;; Files aren't registered ((not state) (mapc 'vc-register files)) - ;; Files are up-to-date, or need a merge and user specified a version + ;; Files are up-to-date, or need a merge and user specified a revision ((or (eq state 'up-to-date) (and verbose (eq state 'needs-patch))) (cond (verbose - ;; go to a different version - (setq version (read-string "Branch, version, or backend to move to: ")) - (let ((vsym (intern-soft (upcase version)))) + ;; go to a different revision + (setq revision (read-string "Branch, revision, or backend to move to: ")) + (let ((vsym (intern-soft (upcase revision)))) (if (member vsym vc-handled-backends) (mapc (lambda (file) vc-transfer-file file vsym) files) (mapc (lambda (file) - (vc-checkout file (eq model 'implicit) version)))))) + (vc-checkout file (eq model 'implicit) revision)))))) ((not (eq model 'implicit)) ;; check the files out (mapc (lambda (file) (vc-checkout file t)) files)) @@ -1472,27 +1472,27 @@ merge in the changes into your working copy." (if (not verbose) (vc-checkin ready-for-commit) (progn - (setq version (read-string "New version or backend: ")) - (let ((vsym (intern (upcase version)))) + (setq revision (read-string "New revision or backend: ")) + (let ((vsym (intern (upcase revision)))) (if (member vsym vc-handled-backends) (vc-transfer-file file vsym) - (vc-checkin ready-for-commit version)))))))) + (vc-checkin ready-for-commit revision)))))))) ;; locked by somebody else (locking VCSes only) ((stringp state) - (let ((version + (let ((revision (if verbose - (read-string "Version to steal: ") - (vc-workfile-version file)))) - (mapc (lambda (file) (vc-steal-lock file version) state) files))) + (read-string "Revision to steal: ") + (vc-working-revision file)))) + (mapc (lambda (file) (vc-steal-lock file revision) state) files))) ;; needs-patch ((eq state 'needs-patch) (dolist (file files) (if (yes-or-no-p (format - "%s is not up-to-date. Get latest version? " + "%s is not up-to-date. Get latest revision? " (file-name-nondirectory file))) (vc-checkout file (eq model 'implicit) t) (if (and (not (eq model 'implicit)) - (yes-or-no-p "Lock this version? ")) + (yes-or-no-p "Lock this revision? ")) (vc-checkout file t))))) ;; needs-merge ((eq state 'needs-merge) @@ -1510,7 +1510,7 @@ merge in the changes into your working copy." (if (save-window-excursion (vc-diff-internal (vc-backend file) nil (list file) - (vc-workfile-version file) nil) + (vc-working-revision file) nil) (goto-char (point-min)) (let ((inhibit-read-only t)) (insert @@ -1526,7 +1526,7 @@ merge in the changes into your working copy." (write-file buffer-file-name) (vc-mode-line file)) (if (not (yes-or-no-p - "Revert to checked-in version, instead? ")) + "Revert to checked-in revision, instead? ")) (error "Checkout aborted") (vc-revert-buffer-internal t t) (vc-checkout file t)))))))) @@ -1544,9 +1544,9 @@ merge in the changes into your working copy." (vc-call-backend backend 'create-repo)) ;;;###autoload -(defun vc-register (&optional set-version comment) +(defun vc-register (&optional set-revision comment) "Register the current file into a version control system. -With prefix argument SET-VERSION, allow user to specify initial version +With prefix argument SET-REVISION, allow user to specify initial revision level. If COMMENT is present, use that as an initial comment. The version control system to use is found by cycling through the list @@ -1571,11 +1571,11 @@ first backend that could register the file is used." (vc-buffer-sync) (vc-start-entry (list buffer-file-name) - (if set-version - (read-string (format "Initial version level for %s: " + (if set-revision + (read-string (format "Initial revision level for %s: " (buffer-name))) (vc-call-backend (vc-responsible-backend buffer-file-name) - 'init-version)) + 'init-revision)) (or comment (not vc-initial-comment)) nil "Enter initial comment." @@ -1666,7 +1666,7 @@ for vc-log-operation-hook." (if after-hook (setq vc-log-after-operation-hook after-hook)) (setq vc-log-operation action) - (setq vc-log-version rev) + (setq vc-log-revision rev) (when comment (erase-buffer) (when (stringp comment) (insert comment))) @@ -1734,7 +1734,7 @@ After check-out, runs the normal hook `vc-checkout-hook'." (defun vc-checkin (files &optional rev comment initial-contents) "Check in FILES. -The optional argument REV may be a string specifying the new version +The optional argument REV may be a string specifying the new revision level (if nil increment the current level). 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 @@ -1762,7 +1762,7 @@ Runs the normal hook `vc-checkin-hook'." (mapc 'vc-delete-automatic-version-backups files)) `((vc-state . up-to-date) (vc-checkout-time . ,(nth 5 (file-attributes file))) - (vc-workfile-version . nil))) + (vc-working-revision . nil))) (message "Checking in %s...done" (vc-delistify files))) 'vc-checkin-hook)) @@ -1788,7 +1788,7 @@ the buffer contents as a comment." ;; save the parameters held in buffer-local variables (let ((log-operation vc-log-operation) (log-fileset vc-log-fileset) - (log-version vc-log-version) + (log-revision vc-log-revision) (log-entry (buffer-string)) (after-hook vc-log-after-operation-hook) (tmp-vc-parent-buffer vc-parent-buffer)) @@ -1797,7 +1797,7 @@ the buffer contents as a comment." (save-excursion (funcall log-operation log-fileset - log-version + log-revision log-entry)) ;; Remove checkin window (after the checkin so that if that fails ;; we don't zap the *VC-log* buffer and the typing therein). @@ -1822,7 +1822,7 @@ the buffer contents as a comment." (defun vc-default-diff-tree (backend dir rev1 rev2) "List differences for all registered files at and below DIR. -The meaning of REV1 and REV2 is the same as for `vc-version-diff'." +The meaning of REV1 and REV2 is the same as for `vc-revision-diff'." ;; This implementation does an explicit tree walk, and calls ;; vc-BACKEND-diff directly for each file. An optimization ;; would be to use `vc-diff-internal', so that diffs can be local, @@ -1898,7 +1898,7 @@ The meaning of REV1 and REV2 is the same as for `vc-version-diff'." Diff output goes to the *vc-diff* buffer. The function returns t if the buffer had changes, nil otherwise." (let* ((filenames (vc-delistify files)) - (rev1-name (or rev1 "focus version")) + (rev1-name (or rev1 "working revision")) (rev2-name (or rev2 "workfile")) ;; Set coding system based on the first file. It's a kluge, ;; but the only way to set it for each file included would @@ -1912,7 +1912,7 @@ returns t if the buffer had changes, nil otherwise." ;; Do that work here so the backends don't have to futz with it. (let ((filtered '())) (dolist (file files) - (cond ((and (not (file-directory-p file)) (string= (vc-workfile-version file) "0")) + (cond ((and (not (file-directory-p file)) (string= (vc-working-revision file) "0")) (progn ;; This file is added but not yet committed; ;; there is no master file to diff against. @@ -1947,28 +1947,28 @@ returns t if the buffer had changes, nil otherwise." (rev1-default nil) (rev2-default nil)) (cond - ;; someday we may be able to do version completion on non-singleton + ;; someday we may be able to do revision completion on non-singleton ;; filesets, but not yet. ((/= (length files) 1) nil) - ;; if it's a directory, don't supply any version default + ;; if it's a directory, don't supply any revision default ((file-directory-p first) nil) - ;; if the file is not up-to-date, use current version as older version + ;; if the file is not up-to-date, use working revision as older revision ((not (vc-up-to-date-p first)) - (setq rev1-default (vc-workfile-version first))) - ;; if the file is not locked, use last and previous version as default + (setq rev1-default (vc-working-revision first))) + ;; if the file is not locked, use last and previous revisions as defaults (t - (setq rev1-default (vc-call previous-version first - (vc-workfile-version first))) + (setq rev1-default (vc-call previous-revision first + (vc-working-revision first))) (if (string= rev1-default "") (setq rev1-default nil)) - (setq rev2-default (vc-workfile-version first)))) + (setq rev2-default (vc-working-revision first)))) ;; construct argument list (let* ((rev1-prompt (if rev1-default - (concat "Older version (default " + (concat "Older revision (default " rev1-default "): ") - "Older version: ")) - (rev2-prompt (concat "Newer version (default " + "Older revision: ")) + (rev2-prompt (concat "Newer revision (default " (or rev2-default "current source") "): ")) (rev1 (if completion-table (completing-read rev1-prompt completion-table @@ -1987,11 +1987,11 @@ returns t if the buffer had changes, nil otherwise." ;;;###autoload (defun vc-diff (historic) - "Display diffs between file versions. + "Display diffs between file revisions. Normally this compares the current file and buffer with the most -recent checked in version of that file. This uses no arguments. With +recent checked in revision of that file. This uses no arguments. With a prefix argument HISTORIC, it reads the file name to use and two -version designators specifying which versions to compare." +revision designators specifying which revisions to compare." (interactive "P") (if historic (call-interactively 'vc-history-diff) @@ -2005,32 +2005,32 @@ version designators specifying which versions to compare." (vc-diff-internal backend t files nil nil (interactive-p))))) ;;;###autoload -(defun vc-version-other-window (rev) - "Visit version REV of the current file in another window. -If the current file is named `F', the version is named `F.~REV~'. +(defun vc-revision-other-window (rev) + "Visit revision REV of the current file in another window. +If the current file is named `F', the revision is named `F.~REV~'. If `F.~REV~' already exists, use it instead of checking it out again." (interactive (save-current-buffer (vc-ensure-vc-buffer) (let ((completion-table (vc-call revision-completion-table buffer-file-name)) - (prompt "Version to visit (default is focus version): ")) + (prompt "Revision to visit (default is working revision): ")) (list (if completion-table (completing-read prompt completion-table) (read-string prompt)))))) (vc-ensure-vc-buffer) (let* ((file buffer-file-name) - (version (if (string-equal rev "") - (vc-workfile-version file) + (revision (if (string-equal rev "") + (vc-working-revision file) rev))) - (switch-to-buffer-other-window (vc-find-version file version)))) + (switch-to-buffer-other-window (vc-find-revision file revision)))) -(defun vc-find-version (file version) - "Read VERSION of FILE into a buffer and return the buffer." - (let ((automatic-backup (vc-version-backup-file-name file version)) +(defun vc-find-revision (file revision) + "Read REVISION of FILE into a buffer and return the buffer." + (let ((automatic-backup (vc-version-backup-file-name file revision)) (filebuf (or (get-file-buffer file) (current-buffer))) - (filename (vc-version-backup-file-name file version 'manual))) + (filename (vc-version-backup-file-name file revision 'manual))) (unless (file-exists-p filename) (if (file-exists-p automatic-backup) (rename-file automatic-backup filename nil) @@ -2045,7 +2045,7 @@ If `F.~REV~' already exists, use it instead of checking it out again." ;; Change buffer to get local value of ;; vc-checkout-switches. (with-current-buffer filebuf - (vc-call find-version file version outbuf)))) + (vc-call find-revision file revision outbuf)))) (setq failed nil)) (if (and failed (file-exists-p filename)) (delete-file filename)))) @@ -2102,10 +2102,10 @@ The headers are reset to their non-expanded form." ;;;###autoload (defun vc-merge () - "Merge changes between two versions into the current buffer's file. -This asks for two versions to merge from in the minibuffer. If the -first version is a branch number, then merge all changes from that -branch. If the first version is empty, merge news, i.e. recent changes + "Merge changes between two revisions into the current buffer's file. +This asks for two revisions to merge from in the minibuffer. If the +first revision is a branch number, then merge all changes from that +branch. If the first revision is empty, merge news, i.e. recent changes from the current branch. See Info node `Merging'." @@ -2115,7 +2115,7 @@ See Info node `Merging'." (let* ((file buffer-file-name) (backend (vc-backend file)) (state (vc-state file)) - first-version second-version status) + first-revision second-revision status) (cond ((stringp state) ;; Locking VCses only (error "File is locked by %s" state)) @@ -2124,25 +2124,25 @@ See Info node `Merging'." "File must be checked out for merging. Check out now? ") (vc-checkout file t) (error "Merge aborted")))) - (setq first-version - (read-string (concat "Branch or version to merge from " + (setq first-revision + (read-string (concat "Branch or revision to merge from " "(default news on current branch): "))) - (if (string= first-version "") + (if (string= first-revision "") (if (not (vc-find-backend-function backend 'merge-news)) (error "Sorry, merging news is not implemented for %s" backend) (setq status (vc-call merge-news file))) (if (not (vc-find-backend-function backend 'merge)) (error "Sorry, merging is not implemented for %s" backend) - (if (not (vc-branch-p first-version)) - (setq second-version - (read-string "Second version: " - (concat (vc-branch-part first-version) "."))) - ;; We want to merge an entire branch. Set versions + (if (not (vc-branch-p first-revision)) + (setq second-revision + (read-string "Second revision: " + (concat (vc-branch-part first-revision) "."))) + ;; We want to merge an entire branch. Set revisions ;; accordingly, so that vc-BACKEND-merge understands us. - (setq second-version first-version) - ;; first-version must be the starting point of the branch - (setq first-version (vc-branch-part first-version))) - (setq status (vc-call merge file first-version second-version)))) + (setq second-revision first-revision) + ;; first-revision must be the starting point of the branch + (setq first-revision (vc-branch-part first-revision))) + (setq status (vc-call merge file first-revision second-revision)))) (vc-maybe-resolve-conflicts file status "WORKFILE" "MERGE SOURCE"))) (defun vc-maybe-resolve-conflicts (file status &optional name-A name-B) @@ -2424,10 +2424,10 @@ Otherwise, return nil." ;;;###autoload (defun vc-create-snapshot (dir name branchp) "Descending recursively from DIR, make a snapshot called NAME. -For each registered file, the version level of its latest version -becomes part of the named configuration. If the prefix argument -BRANCHP is given, the snapshot is made as a new branch and the files -are checked out in that new branch." +For each registered file, the working revision becomes part of +the named configuration. If the prefix argument BRANCHP is +given, the snapshot is made as a new branch and the files are +checked out in that new branch." (interactive (list (read-file-name "Directory: " default-directory default-directory t) (read-string "New snapshot name: ") @@ -2441,13 +2441,13 @@ are checked out in that new branch." ;;;###autoload (defun vc-retrieve-snapshot (dir name) "Descending recursively from DIR, retrieve the snapshot called NAME. -If NAME is empty, it refers to the latest versions. +If NAME is empty, it refers to the latest revisions. If locking is used for the files in DIR, then there must not be any locked files at or below DIR (but if NAME is empty, locked files are allowed and simply skipped)." (interactive (list (read-file-name "Directory: " default-directory default-directory t) - (read-string "Snapshot name to retrieve (default latest versions): "))) + (read-string "Snapshot name to retrieve (default latest revisions): "))) (let ((update (yes-or-no-p "Update any affected buffers? ")) (msg (if (or (not name) (string= name "")) (format "Updating %s... " (abbreviate-file-name dir)) @@ -2461,13 +2461,13 @@ allowed and simply skipped)." ;; Miscellaneous other entry points ;;;###autoload -(defun vc-print-log (&optional focus-rev) +(defun vc-print-log (&optional working-revision) "List the change log of the current fileset in a window. -If FOCUS-REV is non-nil, leave the point at that revision." +If WORKING-REVISION is non-nil, leave the point at that revision." (interactive) (let* ((files (vc-deduce-fileset)) (backend (vc-backend (car files))) - (focus-rev (or focus-rev (vc-workfile-version (car files))))) + (working-revision (or working-revision (vc-working-revision (car files))))) ;; Don't switch to the output buffer before running the command, ;; so that any buffer-local settings in the vc-controlled ;; buffer can be accessed by the command. @@ -2484,8 +2484,8 @@ If FOCUS-REV is non-nil, leave the point at that revision." (if (looking-at "[\b\t\n\v\f\r ]+") (delete-char (- (match-end 0) (match-beginning 0)))) (shrink-window-if-larger-than-buffer) - ;; move point to the log entry for the focus revision - (vc-call-backend ',backend 'show-log-entry ',focus-rev) + ;; move point to the log entry for the working revision + (vc-call-backend ',backend 'show-log-entry ',working-revision) (setq vc-sentinel-movepoint (point)) (set-buffer-modified-p nil))))) @@ -2493,7 +2493,7 @@ If FOCUS-REV is non-nil, leave the point at that revision." (defun vc-revert () "Revert working copies of the selected fileset to their repository contents. This asks for confirmation if the buffer contents are not identical -to the repository version (except for keyword expansion)." +to the working revision (except for keyword expansion)." (interactive) (let* ((files (vc-deduce-fileset)) (backend (vc-backend (car files)))) @@ -2552,8 +2552,8 @@ depending on the underlying version-control system." (vc-setup-buffer "*vc-diff*") (not-modified) (message "Finding changes...") - (let* ((tip (vc-workfile-version (car files))) - (previous (vc-call previous-version (car files) tip))) + (let* ((tip (vc-working-revision (car files))) + (previous (vc-call previous-revision (car files) tip))) (vc-diff-internal backend nil files previous tip)) ;; Display changes (unless (yes-or-no-p "Discard these revisions? ") @@ -2567,7 +2567,7 @@ depending on the underlying version-control system." (vc-call-backend backend 'rollback files) `((vc-state . ,'up-to-date) (vc-checkout-time . , (nth 5 (file-attributes file))) - (vc-workfile-version . nil))) + (vc-working-revision . nil))) (mapc (lambda (f) (vc-resynch-buffer f t t)) files) (message "Rolling back %s...done" (vc-delistify files)))) @@ -2576,9 +2576,9 @@ depending on the underlying version-control system." ;;;###autoload (defun vc-update () - "Update the current fileset's files to their tip versions. + "Update the current fileset's files to their tip revisions. For each one that contains no changes, and is not locked, then this simply -replaces the work file with the latest version on its branch. If the file +replaces the work file with the latest revision on its branch. If the file contains changes, and the backend supports merging news, then any recent changes from the current branch are merged into the working file." (interactive) @@ -2605,7 +2605,7 @@ changes from the current branch are merged into the working file." (defun vc-version-backup-file (file &optional rev) "Return name of backup file for revision REV of FILE. If version backups should be used for FILE, and there exists -such a backup for REV or the focus version of file, return +such a backup for REV or the working revision of file, return its name; otherwise return nil." (when (vc-call make-version-backups-p file) (let ((backup-file (vc-version-backup-file-name file rev))) @@ -2617,7 +2617,7 @@ its name; otherwise return nil." backup-file))))) (defun vc-revert-file (file) - "Revert FILE back to the repository version it was based on." + "Revert FILE back to the repository working revision it was based on." (with-vc-properties (list file) (let ((backup-file (vc-version-backup-file file))) @@ -2676,7 +2676,7 @@ To get a prompt, use a prefix argument." "Transfer FILE to another version control system NEW-BACKEND. If NEW-BACKEND has a higher precedence than FILE's current backend \(i.e. it comes earlier in `vc-handled-backends'), then register FILE in -NEW-BACKEND, using the version number from the current backend as the +NEW-BACKEND, using the revision number from the current backend as the base level. If NEW-BACKEND has a lower precedence than the current backend, then commit all changes that were made under the current backend to NEW-BACKEND, and unregister FILE from the current backend. @@ -2696,7 +2696,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. (set-file-modes file (logior (file-modes file) 128)) ;; `registered' might have switched under us. (vc-switch-backend file old-backend) - (let* ((rev (vc-workfile-version file)) + (let* ((rev (vc-working-revision file)) (modified-file (and edited (make-temp-file file))) (unmodified-file (and modified-file (vc-version-backup-file file)))) ;; Go back to the base unmodified file. @@ -2710,7 +2710,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. (if unmodified-file (copy-file unmodified-file file 'ok-if-already-exists 'keep-date) - (if (y-or-n-p "Get base version from master? ") + (if (y-or-n-p "Get base revision from master? ") (vc-revert-file file)))) (vc-call-backend new-backend 'receive-file file rev)) (when modified-file @@ -2800,7 +2800,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. (if (file-exists-p old) (rename-file old new)) ;; ?? Renaming a file might change its contents due to keyword expansion. ;; We should really check out a new copy if the old copy was precisely equal - ;; to some checked in version. However, testing for this is tricky.... + ;; to some checked-in revision. However, testing for this is tricky.... (if oldbuf (with-current-buffer oldbuf (let ((buffer-read-only buffer-read-only)) @@ -2847,7 +2847,7 @@ log entries should be gathered." (vc-call-backend (vc-responsible-backend default-directory) 'update-changelog args)) -;;; The default back end. Assumes RCS-like version numbering. +;;; The default back end. Assumes RCS-like revision numbering. (defun vc-default-revision-granularity () (error "Your backend will not work with this version of VC mode.")) @@ -2872,35 +2872,35 @@ log entries should be gathered." (substring rev 0 index)))) (defun vc-minor-part (rev) - "Return the minor version number of a revision number REV." + "Return the minor revision number of a revision number REV." (string-match "[0-9]+\\'" rev) (substring rev (match-beginning 0) (match-end 0))) -(defun vc-default-previous-version (backend file rev) - "Return the version number immediately preceding REV for FILE, -or nil if there is no previous version. This default -implementation works for MAJOR.MINOR-style version numbers as +(defun vc-default-previous-revision (backend file rev) + "Return the revision number immediately preceding REV for FILE, +or nil if there is no previous revision. This default +implementation works for MAJOR.MINOR-style revision numbers as used by RCS and CVS." (let ((branch (vc-branch-part rev)) (minor-num (string-to-number (vc-minor-part rev)))) (when branch (if (> minor-num 1) - ;; version does probably not start a branch or release + ;; revision does probably not start a branch or release (concat branch "." (number-to-string (1- minor-num))) (if (vc-trunk-p rev) ;; we are at the beginning of the trunk -- ;; don't know anything to return here nil ;; we are at the beginning of a branch -- - ;; return version of starting point + ;; return revision of starting point (vc-branch-part branch)))))) -(defun vc-default-next-version (backend file rev) - "Return the version number immediately following REV for FILE, -or nil if there is no next version. This default implementation -works for MAJOR.MINOR-style version numbers as used by RCS +(defun vc-default-next-revision (backend file rev) + "Return the revision number immediately following REV for FILE, +or nil if there is no next revision. This default implementation +works for MAJOR.MINOR-style revision numbers as used by RCS and CVS." - (when (not (string= rev (vc-workfile-version file))) + (when (not (string= rev (vc-working-revision file))) (let ((branch (vc-branch-part rev)) (minor-num (string-to-number (vc-minor-part rev)))) (concat branch "." (number-to-string (1+ minor-num)))))) @@ -2918,10 +2918,10 @@ The default implementation returns t for all files." (defun vc-default-latest-on-branch-p (backend file) "Return non-nil if FILE is the latest on its branch. This default implementation always returns non-nil, which means that -editing non-current versions is not supported by default." +editing non-current revisions is not supported by default." t) -(defun vc-default-init-version (backend) vc-default-init-version) +(defun vc-default-init-revision (backend) vc-default-init-revision) (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) @@ -2978,10 +2978,10 @@ Uses `rcs2log' which only works for RCS and CVS." (setq default-directory (file-name-directory changelog)) (delete-file tempfile))))) -(defun vc-default-find-version (backend file rev buffer) - "Provide the new `find-version' op based on the old `checkout' op. +(defun vc-default-find-revision (backend file rev buffer) + "Provide the new `find-revision' op based on the old `checkout' op. This is only for compatibility with old backends. They should be updated -to provide the `find-version' operation instead." +to provide the `find-revision' operation instead." (let ((tmpfile (make-temp-file (expand-file-name file)))) (unwind-protect (progn @@ -3074,7 +3074,7 @@ to provide the `find-version' operation instead." (defun vc-default-revert (backend file contents-done) (unless contents-done - (let ((rev (vc-workfile-version file)) + (let ((rev (vc-working-revision file)) (file-buffer (or (get-file-buffer file) (current-buffer)))) (message "Checking out %s..." file) (let ((failed t) @@ -3091,7 +3091,7 @@ to provide the `find-version' operation instead." ;; Change buffer to get local value of vc-checkout-switches. (with-current-buffer file-buffer (let ((default-directory (file-name-directory file))) - (vc-call find-version file rev outbuf))))) + (vc-call find-revision file rev outbuf))))) (setq failed nil)) (when backup-name (if failed @@ -3213,11 +3213,11 @@ cover the range from the oldest annotation to the newest." :style toggle :selected (eq vc-annotate-display-mode 'fullscale)] "--" - ["Annotate previous revision" vc-annotate-prev-version] - ["Annotate next revision" vc-annotate-next-version] + ["Annotate previous revision" vc-annotate-prev-revision] + ["Annotate next revision" vc-annotate-next-revision] ["Annotate revision at line" vc-annotate-revision-at-line] ["Annotate revision previous to line" vc-annotate-revision-previous-to-line] - ["Annotate latest revision" vc-annotate-focus-version] + ["Annotate latest revision" vc-annotate-working-revision] ["Show log of revision at line" vc-annotate-show-log-revision-at-line] ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line])) @@ -3257,8 +3257,8 @@ default, the time scale stretches back one year into the past; everything that is older than that is shown in blue. With a prefix argument, this command asks two questions in the -minibuffer. First, you may enter a version number; then the buffer -displays and annotates that version instead of the current version +minibuffer. First, you may enter a revision number; then the buffer +displays and annotates that revision instead of the working revision \(type RET in the minibuffer to leave that default unchanged). Then, you are prompted for the time span in days which the color range should cover. For example, a time span of 20 days means that changes @@ -3275,10 +3275,10 @@ colors. `vc-annotate-background' specifies the background color." (save-current-buffer (vc-ensure-vc-buffer) (list buffer-file-name - (let ((def (vc-workfile-version buffer-file-name))) + (let ((def (vc-working-revision buffer-file-name))) (if (null current-prefix-arg) def (read-string - (format "Annotate from version (default %s): " def) + (format "Annotate from revision (default %s): " def) nil nil def))) (if (null current-prefix-arg) vc-annotate-display-mode @@ -3327,31 +3327,31 @@ colors. `vc-annotate-background' specifies the background color." (unless (active-minibuffer-window) (message "Annotating... done"))))))) -(defun vc-annotate-prev-version (prefix) - "Visit the annotation of the version previous to this one. +(defun vc-annotate-prev-revision (prefix) + "Visit the annotation of the revision previous to this one. -With a numeric prefix argument, annotate the version that many -versions previous." +With a numeric prefix argument, annotate the revision that many +revisions previous." (interactive "p") - (vc-annotate-warp-version (- 0 prefix))) + (vc-annotate-warp-revision (- 0 prefix))) -(defun vc-annotate-next-version (prefix) - "Visit the annotation of the version after this one. +(defun vc-annotate-next-revision (prefix) + "Visit the annotation of the revision after this one. -With a numeric prefix argument, annotate the version that many -versions after." +With a numeric prefix argument, annotate the revision that many +revisions after." (interactive "p") - (vc-annotate-warp-version prefix)) + (vc-annotate-warp-revision prefix)) -(defun vc-annotate-focus-version () - "Visit the annotation of the focus version of this file." +(defun vc-annotate-working-revision () + "Visit the annotation of the working revision of this file." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") - (let ((warp-rev (vc-workfile-version vc-annotate-parent-file))) + (let ((warp-rev (vc-working-revision vc-annotate-parent-file))) (if (equal warp-rev vc-annotate-parent-rev) - (message "Already at version %s" warp-rev) - (vc-annotate-warp-version warp-rev))))) + (message "Already at revision %s" warp-rev) + (vc-annotate-warp-revision warp-rev))))) (defun vc-annotate-extract-revision-at-line () "Extract the revision number of the current line." @@ -3359,7 +3359,7 @@ versions after." (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line)) (defun vc-annotate-revision-at-line () - "Visit the annotation of the version identified in the current line." + "Visit the annotation of the revision identified in the current line." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") @@ -3367,11 +3367,11 @@ versions after." (if (not rev-at-line) (message "Cannot extract revision number from the current line") (if (equal rev-at-line vc-annotate-parent-rev) - (message "Already at version %s" rev-at-line) - (vc-annotate-warp-version rev-at-line)))))) + (message "Already at revision %s" rev-at-line) + (vc-annotate-warp-revision rev-at-line)))))) (defun vc-annotate-revision-previous-to-line () - "Visit the annotation of the version before the version at line." + "Visit the annotation of the revision before the revision at line." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") @@ -3380,11 +3380,11 @@ versions after." (if (not rev-at-line) (message "Cannot extract revision number from the current line") (setq prev-rev - (vc-call previous-version vc-annotate-parent-file rev-at-line)) - (vc-annotate-warp-version prev-rev))))) + (vc-call previous-revision vc-annotate-parent-file rev-at-line)) + (vc-annotate-warp-revision prev-rev))))) (defun vc-annotate-show-log-revision-at-line () - "Visit the log of the version at line." + "Visit the log of the revision at line." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") @@ -3394,7 +3394,7 @@ versions after." (vc-print-log rev-at-line))))) (defun vc-annotate-show-diff-revision-at-line () - "Visit the diff of the version at line from its previous version." + "Visit the diff of the revision at line from its previous revision." (interactive) (if (not (equal major-mode 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") @@ -3403,9 +3403,9 @@ versions after." (if (not rev-at-line) (message "Cannot extract revision number from the current line") (setq prev-rev - (vc-call previous-version vc-annotate-parent-file rev-at-line)) + (vc-call previous-revision vc-annotate-parent-file rev-at-line)) (if (not prev-rev) - (message "Cannot diff from any version prior to %s" rev-at-line) + (message "Cannot diff from any revision prior to %s" rev-at-line) (save-window-excursion (vc-diff-internal (vc-backend vc-annotate-parent-file) @@ -3414,12 +3414,12 @@ versions after." prev-rev rev-at-line)) (switch-to-buffer "*vc-diff*")))))) -(defun vc-annotate-warp-version (revspec) - "Annotate the version described by REVSPEC. +(defun vc-annotate-warp-revision (revspec) + "Annotate the revision described by REVSPEC. -If REVSPEC is a positive integer, warp that many versions +If REVSPEC is a positive integer, warp that many revisions forward, if possible, otherwise echo a warning message. If -REVSPEC is a negative integer, warp that many versions backward, +REVSPEC is a negative integer, warp that many revisions backward, if possible, otherwise echo a warning message. If REVSPEC is a string, then it describes a revision number, so warp to that revision." @@ -3433,23 +3433,23 @@ revision." ((and (integerp revspec) (> revspec 0)) (setq newrev vc-annotate-parent-rev) (while (and (> revspec 0) newrev) - (setq newrev (vc-call next-version + (setq newrev (vc-call next-revision vc-annotate-parent-file newrev)) (setq revspec (1- revspec))) (if (not newrev) - (message "Cannot increment %d versions from version %s" + (message "Cannot increment %d revisions from revision %s" revspeccopy vc-annotate-parent-rev))) ((and (integerp revspec) (< revspec 0)) (setq newrev vc-annotate-parent-rev) (while (and (< revspec 0) newrev) - (setq newrev (vc-call previous-version + (setq newrev (vc-call previous-revision vc-annotate-parent-file newrev)) (setq revspec (1+ revspec))) (if (not newrev) - (message "Cannot decrement %d versions from version %s" + (message "Cannot decrement %d revisions from revision %s" (- 0 revspeccopy) vc-annotate-parent-rev))) ((stringp revspec) (setq newrev revspec)) - (t (error "Invalid argument to vc-annotate-warp-version"))) + (t (error "Invalid argument to vc-annotate-warp-revision"))) (when newrev (vc-annotate vc-annotate-parent-file newrev vc-annotate-parent-display-mode @@ -3538,7 +3538,7 @@ The annotations are relative to the current time, unless overridden by OFFSET." (with-current-buffer vc-parent-buffer default-directory)) (log-edit 'vc-finish-logentry nil `(lambda () ',fileset)) (set (make-local-variable 'vc-log-fileset) fileset) - (make-local-variable 'vc-log-version) + (make-local-variable 'vc-log-revision) (set-buffer-modified-p nil) (setq buffer-file-name nil)) -- 2.11.4.GIT