diff options
| author | Eric S. Raymond | 2007-10-10 18:52:45 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-10-10 18:52:45 +0000 |
| commit | ac3f4c6f0213219ce488c46667a8bed6f915e71f (patch) | |
| tree | f9c3f270572da2ccd0cb9ce9786f56df0ee1ccef | |
| parent | ed4e8e8a4b9eeb73a54e686dc2264c635d2416e3 (diff) | |
| download | emacs-ac3f4c6f0213219ce488c46667a8bed6f915e71f.tar.gz emacs-ac3f4c6f0213219ce488c46667a8bed6f915e71f.zip | |
Terminology cleanup.
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 198 | ||||
| -rw-r--r-- | doc/emacs/vc2-xtra.texi | 8 | ||||
| -rw-r--r-- | lisp/ChangeLog | 26 | ||||
| -rw-r--r-- | lisp/add-log.el | 4 | ||||
| -rw-r--r-- | lisp/ediff-vers.el | 2 | ||||
| -rw-r--r-- | lisp/log-view.el | 10 | ||||
| -rw-r--r-- | lisp/pcvs.el | 2 | ||||
| -rw-r--r-- | lisp/vc-arch.el | 14 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 6 | ||||
| -rw-r--r-- | lisp/vc-cvs.el | 64 | ||||
| -rw-r--r-- | lisp/vc-git.el | 14 | ||||
| -rw-r--r-- | lisp/vc-hg.el | 18 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 14 | ||||
| -rw-r--r-- | lisp/vc-mcvs.el | 22 | ||||
| -rw-r--r-- | lisp/vc-mtn.el | 4 | ||||
| -rw-r--r-- | lisp/vc-rcs.el | 56 | ||||
| -rw-r--r-- | lisp/vc-sccs.el | 20 | ||||
| -rw-r--r-- | lisp/vc-svn.el | 28 | ||||
| -rw-r--r-- | 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 @@ | |||
| 3 | * files.texi (Version Systems): | 3 | * files.texi (Version Systems): |
| 4 | * vc-xtra.texi: | 4 | * vc-xtra.texi: |
| 5 | * vc1-xtra.texi: | 5 | * vc1-xtra.texi: |
| 6 | * vc2-xtra.texi: Merge in changes for new VC | 6 | * vc2-xtra.texi: Merge in changes for new VC with fileset-oriented |
| 7 | with fileset-oriented operations. | 7 | operations. Change of terminology from 'version' to `revision'. |
| 8 | * emacs.texi: Change of terminology from 'version' to `revision'. | ||
| 8 | 9 | ||
| 9 | 2007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> | 10 | 2007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> |
| 10 | 11 | ||
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 | |||
| 460 | * Introduction to VC:: How version control works in general. | 460 | * Introduction to VC:: How version control works in general. |
| 461 | * VC Mode Line:: How the mode line shows version control status. | 461 | * VC Mode Line:: How the mode line shows version control status. |
| 462 | * Basic VC Editing:: How to edit a file under version control. | 462 | * Basic VC Editing:: How to edit a file under version control. |
| 463 | * Old Versions:: Examining and comparing old versions. | 463 | * Old Revisions:: Examining and comparing old versions. |
| 464 | * Secondary VC Commands:: The commands used a little less frequently. | 464 | * Secondary VC Commands:: The commands used a little less frequently. |
| 465 | * Branches:: Multiple lines of development. | 465 | * Branches:: Multiple lines of development. |
| 466 | * Remote Repositories:: Efficient access to remote CVS servers. | 466 | * 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} | |||
| 1233 | * Introduction to VC:: How version control works in general. | 1233 | * Introduction to VC:: How version control works in general. |
| 1234 | * VC Mode Line:: How the mode line shows version control status. | 1234 | * VC Mode Line:: How the mode line shows version control status. |
| 1235 | * Basic VC Editing:: How to edit a file under version control. | 1235 | * Basic VC Editing:: How to edit a file under version control. |
| 1236 | * Old Versions:: Examining and comparing old versions. | 1236 | * Old Revisions:: Examining and comparing old versions. |
| 1237 | * Secondary VC Commands:: The commands used a little less frequently. | 1237 | * Secondary VC Commands:: The commands used a little less frequently. |
| 1238 | * Branches:: Multiple lines of development. | 1238 | * Branches:: Multiple lines of development. |
| 1239 | @ifnottex | 1239 | @ifnottex |
| @@ -1669,7 +1669,7 @@ makes it writable so that you can change it. | |||
| 1669 | @item | 1669 | @item |
| 1670 | If the file is locked by you, and contains changes, @kbd{C-x v v} checks | 1670 | If the file is locked by you, and contains changes, @kbd{C-x v v} checks |
| 1671 | in the changes. In order to do this, it first reads the log entry | 1671 | in the changes. In order to do this, it first reads the log entry |
| 1672 | for the new version. @xref{Log Buffer}. | 1672 | for the new revision. @xref{Log Buffer}. |
| 1673 | 1673 | ||
| 1674 | @item | 1674 | @item |
| 1675 | If the file is locked by you, but you have not changed it since you | 1675 | 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}}.) | |||
| 1711 | @item | 1711 | @item |
| 1712 | If there are no new changes in the repository, but you have made | 1712 | If there are no new changes in the repository, but you have made |
| 1713 | modifications in your work file, @kbd{C-x v v} checks in your changes. | 1713 | modifications in your work file, @kbd{C-x v v} checks in your changes. |
| 1714 | In order to do this, it first reads the log entry for the new version. | 1714 | In order to do this, it first reads the log entry for the new revision. |
| 1715 | @xref{Log Buffer}. | 1715 | @xref{Log Buffer}. |
| 1716 | 1716 | ||
| 1717 | @item | 1717 | @item |
| @@ -1723,9 +1723,9 @@ require locking, except that automatic merging of changes from the | |||
| 1723 | repository is not implemented. Unfortunately, this means that nothing | 1723 | repository is not implemented. Unfortunately, this means that nothing |
| 1724 | informs you if another user has checked in changes in the same file | 1724 | informs you if another user has checked in changes in the same file |
| 1725 | since you began editing it, and when this happens, his changes will be | 1725 | since you began editing it, and when this happens, his changes will be |
| 1726 | effectively removed when you check in your version (though they will | 1726 | effectively removed when you check in your revision (though they will |
| 1727 | remain in the repository, so they will not be entirely lost). You must | 1727 | remain in the repository, so they will not be entirely lost). You must |
| 1728 | therefore verify that the current version is unchanged, before you | 1728 | therefore verify that the current revision is unchanged, before you |
| 1729 | check in your changes. | 1729 | check in your changes. |
| 1730 | 1730 | ||
| 1731 | In addition, locking is possible with RCS even in this mode, although | 1731 | 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. | |||
| 1738 | @node Advanced C-x v v | 1738 | @node Advanced C-x v v |
| 1739 | @subsubsection Advanced Control in @kbd{C-x v v} | 1739 | @subsubsection Advanced Control in @kbd{C-x v v} |
| 1740 | 1740 | ||
| 1741 | @cindex version number to check in/out | 1741 | @cindex revision number to check in/out |
| 1742 | When you give a prefix argument to @code{vc-next-action} (@kbd{C-u | 1742 | When you give a prefix argument to @code{vc-next-action} (@kbd{C-u |
| 1743 | C-x v v}), it still performs the next logical version control | 1743 | C-x v v}), it still performs the next logical version control |
| 1744 | operation, but accepts additional arguments to specify precisely how | 1744 | operation, but accepts additional arguments to specify precisely how |
| @@ -1746,17 +1746,17 @@ to do the operation. | |||
| 1746 | 1746 | ||
| 1747 | @itemize @bullet | 1747 | @itemize @bullet |
| 1748 | @item | 1748 | @item |
| 1749 | If the file is modified (or locked), you can specify the version | 1749 | If the file is modified (or locked), you can specify the revision ID |
| 1750 | number to use for the new version that you check in. This is one way | 1750 | to use for the new version that you check in. This is one way |
| 1751 | to create a new branch (@pxref{Branches}). | 1751 | to create a new branch (@pxref{Branches}). |
| 1752 | 1752 | ||
| 1753 | @item | 1753 | @item |
| 1754 | If the file is not modified (and unlocked), you can specify the | 1754 | If the file is not modified (and unlocked), you can specify the |
| 1755 | version to select; this lets you start working from an older version, | 1755 | revision to select; this lets you start working from an older |
| 1756 | or on another branch. If you do not enter any version, that takes you | 1756 | revision, or on another branch. If you do not enter any revision, |
| 1757 | to the highest version on the current branch; therefore @kbd{C-u C-x | 1757 | that takes you to the highest (``head'') revision on the current |
| 1758 | v v @key{RET}} is a convenient way to get the latest version of a file from | 1758 | branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to |
| 1759 | the repository. | 1759 | get the latest version of a file from the repository. |
| 1760 | 1760 | ||
| 1761 | @item | 1761 | @item |
| 1762 | @cindex specific version control system | 1762 | @cindex specific version control system |
| @@ -1844,66 +1844,66 @@ these versions are used outside the minibuffer). | |||
| 1844 | mode, which involves running two hooks: @code{text-mode-hook} and | 1844 | mode, which involves running two hooks: @code{text-mode-hook} and |
| 1845 | @code{vc-log-mode-hook}. @xref{Hooks}. | 1845 | @code{vc-log-mode-hook}. @xref{Hooks}. |
| 1846 | 1846 | ||
| 1847 | @node Old Versions | 1847 | @node Old Revisions |
| 1848 | @subsection Examining And Comparing Old Versions | 1848 | @subsection Examining And Comparing Old Revisions |
| 1849 | 1849 | ||
| 1850 | One of the convenient features of version control is the ability | 1850 | One of the convenient features of version control is the ability |
| 1851 | to examine any version of a file, or compare two versions. | 1851 | to examine any revision of a file, or compare two revisions. |
| 1852 | 1852 | ||
| 1853 | @table @kbd | 1853 | @table @kbd |
| 1854 | @item C-x v ~ @var{version} @key{RET} | 1854 | @item C-x v ~ @var{revision} @key{RET} |
| 1855 | Examine version @var{version} of the visited file, in a buffer of its | 1855 | Examine revision @var{revision} of the visited file, in a buffer of its |
| 1856 | own. | 1856 | own. |
| 1857 | 1857 | ||
| 1858 | @item C-x v = | 1858 | @item C-x v = |
| 1859 | Compare the buffer contents of the current | 1859 | Compare the buffer contents of the current |
| 1860 | fileset with the focus version from which you started editing. | 1860 | fileset with the repository revision from which you started editing. |
| 1861 | 1861 | ||
| 1862 | @item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} | 1862 | @item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} |
| 1863 | Compare the specified two repository versions of the current fileset. | 1863 | Compare the specified two repository revisions of the current fileset. |
| 1864 | 1864 | ||
| 1865 | @item C-x v g | 1865 | @item C-x v g |
| 1866 | Display the file with per-line version information and using colors. | 1866 | Display the file with per-line revision information and using colors. |
| 1867 | @end table | 1867 | @end table |
| 1868 | 1868 | ||
| 1869 | @findex vc-version-other-window | 1869 | @findex vc-revision-other-window |
| 1870 | @kindex C-x v ~ | 1870 | @kindex C-x v ~ |
| 1871 | To examine an old version in its entirety, visit the file and then type | 1871 | To examine an old revision in its entirety, visit the file and then type |
| 1872 | @kbd{C-x v ~ @var{version} @key{RET}} (@code{vc-version-other-window}). | 1872 | @kbd{C-x v ~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). |
| 1873 | This puts the text of version @var{version} in a file named | 1873 | This puts the text of revision @var{revision} in a file named |
| 1874 | @file{@var{filename}.~@var{version}~}, and visits it in its own buffer | 1874 | @file{@var{filename}.~@var{revision}~}, and visits it in its own buffer |
| 1875 | in a separate window. (In RCS, you can also select an old version | 1875 | in a separate window. (In RCS, you can also select an old revision |
| 1876 | and create a branch from it. @xref{Branches}.) | 1876 | and create a branch from it. @xref{Branches}.) |
| 1877 | 1877 | ||
| 1878 | @findex vc-diff | 1878 | @findex vc-diff |
| 1879 | @kindex C-x v = | 1879 | @kindex C-x v = |
| 1880 | @kbd{C-x v =} compares the current buffer contents of each file in the | 1880 | @kbd{C-x v =} compares the current buffer contents of each file in the |
| 1881 | current fileset (saving them in the file if necessary) with the | 1881 | current fileset (saving them in the file if necessary) with the |
| 1882 | repository version from which you started editing each file (this is not | 1882 | repository revision from which you started editing each file (this is not |
| 1883 | necessarily the latest version of the file). The diff will be displayed | 1883 | necessarily the latest revision of the file). The diff will be displayed |
| 1884 | in a special buffer in another window. | 1884 | in a special buffer in another window. |
| 1885 | 1885 | ||
| 1886 | @findex vc-diff | 1886 | @findex vc-diff |
| 1887 | @kindex C-u C-x v = | 1887 | @kindex C-u C-x v = |
| 1888 | You can compare two repository versions of the current fileset with | 1888 | You can compare two repository revisions of the current fileset with |
| 1889 | the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads | 1889 | the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads |
| 1890 | two version numbers or tags. The diff will be displayed in a special | 1890 | two revision numbers or tags. The diff will be displayed in a special |
| 1891 | buffer in another window. | 1891 | buffer in another window. |
| 1892 | 1892 | ||
| 1893 | You can specify a checked-in version by its number; an empty input | 1893 | You can specify a checked-in revision by its number or ID; an empty input |
| 1894 | specifies the current contents of the work file (which may be different | 1894 | specifies the current contents of the work file (which may be different |
| 1895 | from all the checked-in versions). You can also specify a snapshot name | 1895 | from all the checked-in revisions). You can also specify a snapshot name |
| 1896 | @iftex | 1896 | @iftex |
| 1897 | (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) | 1897 | (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) |
| 1898 | @end iftex | 1898 | @end iftex |
| 1899 | @ifnottex | 1899 | @ifnottex |
| 1900 | (@pxref{Snapshots}) | 1900 | (@pxref{Snapshots}) |
| 1901 | @end ifnottex | 1901 | @end ifnottex |
| 1902 | instead of one or both version numbers. | 1902 | instead of one or both revision ID. |
| 1903 | 1903 | ||
| 1904 | Note that if your version-control system is file-oriented (SCCS, RCS, | 1904 | Note that if your version-control system is file-oriented (SCCS, RCS, |
| 1905 | CVS) rather than fileset-oriented (CVS, Subversion, GNU Arch) specifying | 1905 | CVS) rather than fileset-oriented (CVS, Subversion, GNU Arch) specifying |
| 1906 | a version of a multiple-file fileset by number (as opposed to a snapshot | 1906 | a revision of a multiple-file fileset by number (as opposed to a snapshot |
| 1907 | name or RSCCS/RCS tag) is unlikely to return diffs that are connected in | 1907 | name or RSCCS/RCS tag) is unlikely to return diffs that are connected in |
| 1908 | any meaningful way. | 1908 | any meaningful way. |
| 1909 | 1909 | ||
| @@ -1928,12 +1928,12 @@ the options in @code{vc-rcs-diff-switches}. The | |||
| 1928 | Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and | 1928 | Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and |
| 1929 | @kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always | 1929 | @kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always |
| 1930 | find the corresponding locations in the current work file. (Older | 1930 | find the corresponding locations in the current work file. (Older |
| 1931 | versions are not, in general, present as files on your disk.) | 1931 | revisions are not, in general, present as files on your disk.) |
| 1932 | 1932 | ||
| 1933 | @findex vc-annotate | 1933 | @findex vc-annotate |
| 1934 | @kindex C-x v g | 1934 | @kindex C-x v g |
| 1935 | For some back ends, you can display the file @dfn{annotated} with | 1935 | For some back ends, you can display the file @dfn{annotated} with |
| 1936 | per-line version information and using colors to enhance the visual | 1936 | per-line revision information and using colors to enhance the visual |
| 1937 | appearance, with the command @kbd{M-x vc-annotate}. It creates a new | 1937 | appearance, with the command @kbd{M-x vc-annotate}. It creates a new |
| 1938 | buffer (the ``annotate buffer'') displaying the file's text, with each | 1938 | buffer (the ``annotate buffer'') displaying the file's text, with each |
| 1939 | part colored to show how old it is. Text colored red is new, blue means | 1939 | 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 | |||
| 1942 | changes are blue, and the newest changes are red. | 1942 | changes are blue, and the newest changes are red. |
| 1943 | 1943 | ||
| 1944 | When you give a prefix argument to this command, it uses the | 1944 | When you give a prefix argument to this command, it uses the |
| 1945 | minibuffer to read two arguments: which version number to display and | 1945 | minibuffer to read two arguments: which revision number to display and |
| 1946 | annotate (instead of the current file contents), and the time span in | 1946 | annotate (instead of the current file contents), and the time span in |
| 1947 | days the color range should cover. | 1947 | days the color range should cover. |
| 1948 | 1948 | ||
| @@ -1980,9 +1980,9 @@ the author's description of the changes in the revision on the current | |||
| 1980 | line. | 1980 | line. |
| 1981 | 1981 | ||
| 1982 | @item W | 1982 | @item W |
| 1983 | Annotate the focus version--the one you are editing. If you used | 1983 | Annotate the working revision--the one you are editing. If you used |
| 1984 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to | 1984 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to |
| 1985 | return to your current version. | 1985 | return to your working revision. |
| 1986 | @end table | 1986 | @end table |
| 1987 | 1987 | ||
| 1988 | @node Secondary VC Commands | 1988 | @node Secondary VC Commands |
| @@ -2035,15 +2035,15 @@ situation. | |||
| 2035 | If locking is in use, @kbd{C-x v i} leaves the file unlocked and | 2035 | If locking is in use, @kbd{C-x v i} leaves the file unlocked and |
| 2036 | read-only. Type @kbd{C-x v v} if you wish to start editing it. After | 2036 | read-only. Type @kbd{C-x v v} if you wish to start editing it. After |
| 2037 | registering a file with CVS, you must subsequently commit the initial | 2037 | registering a file with CVS, you must subsequently commit the initial |
| 2038 | version by typing @kbd{C-x v v}. Until you do that, the version | 2038 | revision by typing @kbd{C-x v v}. Until you do that, the revision ID |
| 2039 | appears as @samp{@@@@} in the mode line. | 2039 | appears as @samp{@@@@} in the mode line. |
| 2040 | 2040 | ||
| 2041 | @vindex vc-default-init-version | 2041 | @vindex vc-default-init-revision |
| 2042 | @cindex initial version number to register | 2042 | @cindex initial revision number to register |
| 2043 | The initial version number for a newly registered file is 1.1, by | 2043 | The initial revision number for a newly registered file is 1.1, by |
| 2044 | default. You can specify a different default by setting the variable | 2044 | default. You can specify a different default by setting the variable |
| 2045 | @code{vc-default-init-version}, or you can give @kbd{C-x v i} a numeric | 2045 | @code{vc-default-init-revision}, or you can give @kbd{C-x v i} a numeric |
| 2046 | argument; then it reads the initial version number for this particular | 2046 | argument; then it reads the initial revision number for this particular |
| 2047 | file using the minibuffer. | 2047 | file using the minibuffer. |
| 2048 | 2048 | ||
| 2049 | @vindex vc-initial-comment | 2049 | @vindex vc-initial-comment |
| @@ -2056,12 +2056,12 @@ the initial comment works like reading a log entry (@pxref{Log Buffer}). | |||
| 2056 | 2056 | ||
| 2057 | @table @kbd | 2057 | @table @kbd |
| 2058 | @item C-x v l | 2058 | @item C-x v l |
| 2059 | Display version control state and change history. | 2059 | Display revision control state and change history. |
| 2060 | @end table | 2060 | @end table |
| 2061 | 2061 | ||
| 2062 | @kindex C-x v l | 2062 | @kindex C-x v l |
| 2063 | @findex vc-print-log | 2063 | @findex vc-print-log |
| 2064 | To view the detailed version control status and history of a file, | 2064 | To view the detailed revision control status and history of a file, |
| 2065 | type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of | 2065 | type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of |
| 2066 | changes to the current file, including the text of the log entries. The | 2066 | changes to the current file, including the text of the log entries. The |
| 2067 | output appears in a separate window. The point is centered at the | 2067 | 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. | |||
| 2109 | 2109 | ||
| 2110 | @item f | 2110 | @item f |
| 2111 | Visit the revision indicated at the current line, like typing @kbd{C-x | 2111 | Visit the revision indicated at the current line, like typing @kbd{C-x |
| 2112 | v ~} and specifying this revision's number (@pxref{Old Versions}). | 2112 | v ~} and specifying this revision's number (@pxref{Old Revisions}). |
| 2113 | 2113 | ||
| 2114 | @item d | 2114 | @item d |
| 2115 | Display the diff (@pxref{Comparing Files}) between the revision | 2115 | Display the diff (@pxref{Comparing Files}) between the revision |
| @@ -2123,7 +2123,7 @@ current line was committed. | |||
| 2123 | 2123 | ||
| 2124 | @table @kbd | 2124 | @table @kbd |
| 2125 | @item C-x v u | 2125 | @item C-x v u |
| 2126 | Revert the buffer and the file to the version from which you started | 2126 | Revert the buffer and the file to the working revision from which you started |
| 2127 | editing the file. | 2127 | editing the file. |
| 2128 | 2128 | ||
| 2129 | @item C-x v c | 2129 | @item C-x v c |
| @@ -2134,11 +2134,12 @@ This undoes your last check-in. | |||
| 2134 | @kindex C-x v u | 2134 | @kindex C-x v u |
| 2135 | @findex vc-revert-buffer | 2135 | @findex vc-revert-buffer |
| 2136 | If you want to discard your current set of changes and revert to the | 2136 | If you want to discard your current set of changes and revert to the |
| 2137 | version from which you started editing the file, use @kbd{C-x v u} | 2137 | working revision from which you started editing the file, use @kbd{C-x v u} |
| 2138 | (@code{vc-revert-buffer}). This leaves the file unlocked; if locking | 2138 | (@code{vc-revert-buffer}). This leaves the file unlocked; if locking |
| 2139 | is in use, you must first lock the file again before you change it | 2139 | is in use, you must first lock the file again before you change it |
| 2140 | again. @kbd{C-x v u} requires confirmation, unless it sees that you | 2140 | again. @kbd{C-x v u} requires confirmation, unless it sees that you |
| 2141 | haven't made any changes with respect to the master version. | 2141 | haven't made any changes with respect to the master copy of the |
| 2142 | working revision. | ||
| 2142 | 2143 | ||
| 2143 | @kbd{C-x v u} is also the command to unlock a file if you lock it and | 2144 | @kbd{C-x v u} is also the command to unlock a file if you lock it and |
| 2144 | then decide not to change it. | 2145 | then decide not to change it. |
| @@ -2147,8 +2148,8 @@ then decide not to change it. | |||
| 2147 | @findex vc-rollback | 2148 | @findex vc-rollback |
| 2148 | To cancel a change that you already checked in, use @kbd{C-x v c} | 2149 | To cancel a change that you already checked in, use @kbd{C-x v c} |
| 2149 | (@code{vc-rollback}). This command discards all record of the most | 2150 | (@code{vc-rollback}). This command discards all record of the most |
| 2150 | recent checked-in version, but only if your work file corresponds to | 2151 | recent checked-in revision, but only if your work file corresponds to |
| 2151 | that version---you cannot use @kbd{C-x v c} to cancel a version that is | 2152 | that revision---you cannot use @kbd{C-x v c} to cancel a revision that is |
| 2152 | not the latest on its branch. Note that many version-control systems do | 2153 | not the latest on its branch. Note that many version-control systems do |
| 2153 | not support rollback at all; this command is something of a historical | 2154 | not support rollback at all; this command is something of a historical |
| 2154 | relic. | 2155 | relic. |
| @@ -2166,7 +2167,7 @@ relic. | |||
| 2166 | @cindex trunk (version control) | 2167 | @cindex trunk (version control) |
| 2167 | 2168 | ||
| 2168 | One use of version control is to maintain multiple ``current'' | 2169 | One use of version control is to maintain multiple ``current'' |
| 2169 | versions of a file. For example, you might have different versions of a | 2170 | revisions of a file. For example, you might have different revisions of a |
| 2170 | program in which you are gradually adding various unfinished new | 2171 | program in which you are gradually adding various unfinished new |
| 2171 | features. Each such independent line of development is called a | 2172 | features. Each such independent line of development is called a |
| 2172 | @dfn{branch}. VC allows you to create branches, switch between | 2173 | @dfn{branch}. VC allows you to create branches, switch between |
| @@ -2174,17 +2175,17 @@ different branches, and merge changes from one branch to another. | |||
| 2174 | Please note, however, that branches are not supported for SCCS. | 2175 | Please note, however, that branches are not supported for SCCS. |
| 2175 | 2176 | ||
| 2176 | A file's main line of development is usually called the @dfn{trunk}. | 2177 | A file's main line of development is usually called the @dfn{trunk}. |
| 2177 | The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At | 2178 | The revisions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At |
| 2178 | any such version, you can start an independent branch. A branch | 2179 | any such revision, you can start an independent branch. A branch |
| 2179 | starting at version 1.2 would have version number 1.2.1.1, and consecutive | 2180 | starting at revision 1.2 would have revision number 1.2.1.1, and consecutive |
| 2180 | versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, | 2181 | revisions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, |
| 2181 | and so on. If there is a second branch also starting at version 1.2, it | 2182 | and so on. If there is a second branch also starting at revision 1.2, it |
| 2182 | would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. | 2183 | would consist of revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. |
| 2183 | 2184 | ||
| 2184 | @cindex head version | 2185 | @cindex head revision |
| 2185 | If you omit the final component of a version number, that is called a | 2186 | If you omit the final component of a revision number, that is called a |
| 2186 | @dfn{branch number}. It refers to the highest existing version on that | 2187 | @dfn{branch number}. It refers to the highest existing revision on that |
| 2187 | branch---the @dfn{head version} of that branch. The branches in the | 2188 | branch---the @dfn{head revision} of that branch. The branches in the |
| 2188 | example above have branch numbers 1.2.1 and 1.2.2. | 2189 | example above have branch numbers 1.2.1 and 1.2.2. |
| 2189 | 2190 | ||
| 2190 | @menu | 2191 | @menu |
| @@ -2199,14 +2200,15 @@ example above have branch numbers 1.2.1 and 1.2.2. | |||
| 2199 | @subsubsection Switching between Branches | 2200 | @subsubsection Switching between Branches |
| 2200 | 2201 | ||
| 2201 | To switch between branches, type @kbd{C-u C-x v v} and specify the | 2202 | To switch between branches, type @kbd{C-u C-x v v} and specify the |
| 2202 | version number you want to select. On a locking-based system, this | 2203 | revision ID you want to select. On a locking-based system, this |
| 2203 | version is then visited @emph{unlocked} (write-protected), so you can | 2204 | version is then visited @emph{unlocked} (write-protected), so you can |
| 2204 | examine it before locking it. Switching branches in this way is allowed | 2205 | examine it before locking it. Switching branches in this way is allowed |
| 2205 | only when the file is not locked. | 2206 | only when the file is not locked. |
| 2206 | 2207 | ||
| 2207 | You can omit the minor version number, thus giving only the branch | 2208 | On a VS with RCS-like revision numbering, you can omit the minor |
| 2208 | number; this takes you to the head version on the chosen branch. If you | 2209 | revision number, thus giving only the branch number; this takes you to |
| 2209 | only type @key{RET}, Emacs goes to the highest version on the trunk. | 2210 | the head version on the chosen branch. If you only type @key{RET}, |
| 2211 | Emacs goes to the highest version on the trunk. | ||
| 2210 | 2212 | ||
| 2211 | After you have switched to any branch (including the main branch), you | 2213 | After you have switched to any branch (including the main branch), you |
| 2212 | stay on it for subsequent VC commands, until you explicitly select some | 2214 | stay on it for subsequent VC commands, until you explicitly select some |
| @@ -2215,36 +2217,36 @@ other branch. | |||
| 2215 | @node Creating Branches | 2217 | @node Creating Branches |
| 2216 | @subsubsection Creating New Branches | 2218 | @subsubsection Creating New Branches |
| 2217 | 2219 | ||
| 2218 | To create a new branch from a head version (one that is the latest in | 2220 | To create a new branch from a head revision (one that is the latest in |
| 2219 | the branch that contains it), first select that version if necessary, | 2221 | the branch that contains it), first select that revision if necessary, |
| 2220 | lock it with @kbd{C-x v v}, and make whatever changes you want. Then, | 2222 | lock it with @kbd{C-x v v}, and make whatever changes you want. Then, |
| 2221 | when you check in the changes, use @kbd{C-u C-x v v}. This lets you | 2223 | when you check in the changes, use @kbd{C-u C-x v v}. This lets you |
| 2222 | specify the version number for the new version. You should specify a | 2224 | specify the revision number for the new revision. You should specify a |
| 2223 | suitable branch number for a branch starting at the current version. | 2225 | suitable branch number for a branch starting at the current revision. |
| 2224 | For example, if the current version is 2.5, the branch number should be | 2226 | For example, if the current revision is 2.5, the branch number should be |
| 2225 | 2.5.1, 2.5.2, and so on, depending on the number of existing branches at | 2227 | 2.5.1, 2.5.2, and so on, depending on the number of existing branches at |
| 2226 | that point. | 2228 | that point. |
| 2227 | 2229 | ||
| 2228 | To create a new branch at an older version (one that is no longer the | 2230 | To create a new branch at an older revision (one that is no longer the |
| 2229 | head of a branch), first select that version (@pxref{Switching | 2231 | head of a branch), first select that revision (@pxref{Switching |
| 2230 | Branches}). Your procedure will then differ depending on whether you | 2232 | Branches}). Your procedure will then differ depending on whether you |
| 2231 | are using a locking or merging-based VCS. | 2233 | are using a locking or merging-based VCS. |
| 2232 | 2234 | ||
| 2233 | On a locking VCS, you will need to lock the old version branch with | 2235 | On a locking VCS, you will need to lock the old revision branch with |
| 2234 | @kbd{C-x v v}. You'll be asked to confirm, when you lock the old | 2236 | @kbd{C-x v v}. You'll be asked to confirm, when you lock the old |
| 2235 | version, that you really mean to create a new branch---if you say no, | 2237 | revision, that you really mean to create a new branch---if you say no, |
| 2236 | you'll be offered a chance to lock the latest version instead. On | 2238 | you'll be offered a chance to lock the latest revision instead. On |
| 2237 | a merging-based VCS you will skip this step. | 2239 | a merging-based VCS you will skip this step. |
| 2238 | 2240 | ||
| 2239 | Then make your changes and type @kbd{C-x v v} again to check in a new | 2241 | Then make your changes and type @kbd{C-x v v} again to check in a new |
| 2240 | version. This automatically creates a new branch starting from the | 2242 | revision. This automatically creates a new branch starting from the |
| 2241 | selected version. You need not specially request a new branch, because | 2243 | selected revision. You need not specially request a new branch, because |
| 2242 | that's the only way to add a new version at a point that is not the head | 2244 | that's the only way to add a new revision at a point that is not the head |
| 2243 | of a branch. | 2245 | of a branch. |
| 2244 | 2246 | ||
| 2245 | After the branch is created, you ``stay'' on it. That means that | 2247 | After the branch is created, you ``stay'' on it. That means that |
| 2246 | subsequent check-ins create new versions on that branch. To leave the | 2248 | subsequent check-ins create new revisions on that branch. To leave the |
| 2247 | branch, you must explicitly select a different version with @kbd{C-u C-x | 2249 | branch, you must explicitly select a different revision with @kbd{C-u C-x |
| 2248 | v v}. To transfer changes from one branch to another, use the merge | 2250 | v v}. To transfer changes from one branch to another, use the merge |
| 2249 | command, described in the next section. | 2251 | command, described in the next section. |
| 2250 | 2252 | ||
| @@ -2274,26 +2276,26 @@ since you checked the file out (we call this @dfn{merging the news}). | |||
| 2274 | This is the common way to pick up recent changes from the repository, | 2276 | This is the common way to pick up recent changes from the repository, |
| 2275 | regardless of whether you have already changed the file yourself. | 2277 | regardless of whether you have already changed the file yourself. |
| 2276 | 2278 | ||
| 2277 | You can also enter a branch number or a pair of version numbers in | 2279 | You can also enter a branch number or a pair of revision numbers in |
| 2278 | the minibuffer. Then @kbd{C-x v m} finds the changes from that | 2280 | the minibuffer. Then @kbd{C-x v m} finds the changes from that |
| 2279 | branch, or the differences between the two versions you specified, and | 2281 | branch, or the differences between the two revisions you specified, and |
| 2280 | merges them into the current version of the current file. | 2282 | merges them into the current revision of the current file. |
| 2281 | 2283 | ||
| 2282 | As an example, suppose that you have finished a certain feature on | 2284 | As an example, suppose that you have finished a certain feature on |
| 2283 | branch 1.3.1. In the meantime, development on the trunk has proceeded | 2285 | branch 1.3.1. In the meantime, development on the trunk has proceeded |
| 2284 | to version 1.5. To merge the changes from the branch to the trunk, | 2286 | to revision 1.5. To merge the changes from the branch to the trunk, |
| 2285 | first go to the head version of the trunk, by typing @kbd{C-u C-x v v | 2287 | first go to the head revision of the trunk, by typing @kbd{C-u C-x v v |
| 2286 | @key{RET}}. Version 1.5 is now current. If locking is used for the file, | 2288 | @key{RET}}. Revision 1.5 is now current. If locking is used for the file, |
| 2287 | type @kbd{C-x v v} to lock version 1.5 so that you can change it. Next, | 2289 | type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next, |
| 2288 | type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on | 2290 | type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on |
| 2289 | branch 1.3.1 (relative to version 1.3, where the branch started, up to | 2291 | branch 1.3.1 (relative to revision 1.3, where the branch started, up to |
| 2290 | the last version on the branch) and merges it into the current version | 2292 | the last revision on the branch) and merges it into the current revision |
| 2291 | of the work file. You can now check in the changed file, thus creating | 2293 | of the work file. You can now check in the changed file, thus creating |
| 2292 | version 1.6 containing the changes from the branch. | 2294 | revision 1.6 containing the changes from the branch. |
| 2293 | 2295 | ||
| 2294 | It is possible to do further editing after merging the branch, before | 2296 | It is possible to do further editing after merging the branch, before |
| 2295 | the next check-in. But it is usually wiser to check in the merged | 2297 | the next check-in. But it is usually wiser to check in the merged |
| 2296 | version, then lock it and make the further changes. This will keep | 2298 | revision, then lock it and make the further changes. This will keep |
| 2297 | a better record of the history of changes. | 2299 | a better record of the history of changes. |
| 2298 | 2300 | ||
| 2299 | @cindex conflicts | 2301 | @cindex conflicts |
| @@ -2311,7 +2313,7 @@ Ediff, Ediff, ediff, The Ediff Manual}). | |||
| 2311 | If you say no, the conflicting changes are both inserted into the | 2313 | If you say no, the conflicting changes are both inserted into the |
| 2312 | file, surrounded by @dfn{conflict markers}. The example below shows how | 2314 | file, surrounded by @dfn{conflict markers}. The example below shows how |
| 2313 | a conflict region looks; the file is called @samp{name} and the current | 2315 | a conflict region looks; the file is called @samp{name} and the current |
| 2314 | master file version with user B's changes in it is 1.11. | 2316 | master file revision with user B's changes in it is 1.11. |
| 2315 | 2317 | ||
| 2316 | @c @w here is so CVS won't think this is a conflict. | 2318 | @c @w here is so CVS won't think this is a conflict. |
| 2317 | @smallexample | 2319 | @smallexample |
| @@ -2338,7 +2340,7 @@ different branches of a file. CVS allows this by default; for RCS, it | |||
| 2338 | is possible if you create multiple source directories. Each source | 2340 | is possible if you create multiple source directories. Each source |
| 2339 | directory should have a link named @file{RCS} which points to a common | 2341 | directory should have a link named @file{RCS} which points to a common |
| 2340 | directory of RCS master files. Then each source directory can have its | 2342 | directory of RCS master files. Then each source directory can have its |
| 2341 | own choice of selected versions, but all share the same common RCS | 2343 | own choice of selected revisions, but all share the same common RCS |
| 2342 | records. | 2344 | records. |
| 2343 | 2345 | ||
| 2344 | This technique works reliably and automatically, provided that the | 2346 | 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}). | |||
| 61 | of file @var{file} is @code{@var{file}.~@var{version}.~}. This is | 61 | of file @var{file} is @code{@var{file}.~@var{version}.~}. This is |
| 62 | almost the same as the name used by @kbd{C-x v ~} | 62 | almost the same as the name used by @kbd{C-x v ~} |
| 63 | @iftex | 63 | @iftex |
| 64 | (@pxref{Old Versions,,,emacs, the Emacs Manual}), | 64 | (@pxref{Old Revisions,,,emacs, the Emacs Manual}), |
| 65 | @end iftex | 65 | @end iftex |
| 66 | @ifnottex | 66 | @ifnottex |
| 67 | (@pxref{Old Versions}), | 67 | (@pxref{Old Revisions}), |
| 68 | @end ifnottex | 68 | @end ifnottex |
| 69 | the only difference being the additional dot (@samp{.}) after the | 69 | the only difference being the additional dot (@samp{.}) after the |
| 70 | version number. This similarity is intentional, because both kinds of | 70 | 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. | |||
| 247 | You can give a snapshot name as an argument to @kbd{C-x v =} or | 247 | You can give a snapshot name as an argument to @kbd{C-x v =} or |
| 248 | @kbd{C-x v ~} | 248 | @kbd{C-x v ~} |
| 249 | @iftex | 249 | @iftex |
| 250 | (@pxref{Old Versions,,,emacs, the Emacs Manual}). | 250 | (@pxref{Old Revisions,,,emacs, the Emacs Manual}). |
| 251 | @end iftex | 251 | @end iftex |
| 252 | @ifnottex | 252 | @ifnottex |
| 253 | (@pxref{Old Versions}). | 253 | (@pxref{Old Revisions}). |
| 254 | @end ifnottex | 254 | @end ifnottex |
| 255 | Thus, you can use it to compare a snapshot against the current files, | 255 | Thus, you can use it to compare a snapshot against the current files, |
| 256 | or two snapshots against each other, or a snapshot against a named | 256 | 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 @@ | |||
| 1 | 2007-10-10 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 2 | |||
| 3 | * add-log.el: | ||
| 4 | * ediff-vers.el: | ||
| 5 | * log-view.el: | ||
| 6 | * pcvs.el: | ||
| 7 | * vc-arch.el: | ||
| 8 | * vc-bzr.el: | ||
| 9 | * vc-cvs.el: | ||
| 10 | * vc.el: | ||
| 11 | * vc-git.el: | ||
| 12 | * vc-hg.el: | ||
| 13 | * vc-hooks.el: | ||
| 14 | * vc-mcvs.el: | ||
| 15 | * vc-mtn.el: | ||
| 16 | * vc-rcs.el: | ||
| 17 | * vc-sccs.el: | ||
| 18 | * vc-svn.el: Terminology cleanup: workfile-version -> | ||
| 19 | working-revision, | ||
| 20 | {find,init,next,previous,annotate-*,log}-version -> | ||
| 21 | {find,init,next,previous,annotate-*,log}-revision, | ||
| 22 | annotate-focus-version -> annotate-working-revision, The term | ||
| 23 | 'focus' is gone. The term 'revision' is now used consistently | ||
| 24 | everywhere that reference to a revision ID is intended, replacing | ||
| 25 | older use of 'version'. | ||
| 26 | |||
| 1 | 2007-10-10 Juanma Barranquero <lekktu@gmail.com> | 27 | 2007-10-10 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 28 | ||
| 3 | * follow.el: Change all instances of "Follow Mode" to "Follow | 29 | * 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." | |||
| 379 | 379 | ||
| 380 | (defun change-log-version-number-search () | 380 | (defun change-log-version-number-search () |
| 381 | "Return version number of current buffer's file. | 381 | "Return version number of current buffer's file. |
| 382 | This is the value returned by `vc-workfile-version' or, if that is | 382 | This is the value returned by `vc-working-revision' or, if that is |
| 383 | nil, by matching `change-log-version-number-regexp-list'." | 383 | nil, by matching `change-log-version-number-regexp-list'." |
| 384 | (let* ((size (buffer-size)) | 384 | (let* ((size (buffer-size)) |
| 385 | (limit | 385 | (limit |
| @@ -390,7 +390,7 @@ nil, by matching `change-log-version-number-regexp-list'." | |||
| 390 | ;; Apply percentage only if buffer size is bigger than | 390 | ;; Apply percentage only if buffer size is bigger than |
| 391 | ;; approx 100 lines. | 391 | ;; approx 100 lines. |
| 392 | (if (> size (* 100 80)) (+ (point) (/ size 10))))) | 392 | (if (> size (* 100 80)) (+ (point) (/ size 10))))) |
| 393 | (or (and buffer-file-name (vc-workfile-version buffer-file-name)) | 393 | (or (and buffer-file-name (vc-working-revision buffer-file-name)) |
| 394 | (save-restriction | 394 | (save-restriction |
| 395 | (widen) | 395 | (widen) |
| 396 | (let ((regexps change-log-version-number-regexp-list) | 396 | (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." | |||
| 200 | (if ancestor-rev | 200 | (if ancestor-rev |
| 201 | (save-excursion | 201 | (save-excursion |
| 202 | (if (string= ancestor-rev "") | 202 | (if (string= ancestor-rev "") |
| 203 | (setq ancestor-rev (vc-workfile-version buffer-file-name))) | 203 | (setq ancestor-rev (vc-working-revision buffer-file-name))) |
| 204 | (vc-version-other-window ancestor-rev) | 204 | (vc-version-other-window ancestor-rev) |
| 205 | (setq ancestor-buf (current-buffer)))) | 205 | (setq ancestor-buf (current-buffer)))) |
| 206 | (setq startup-hooks | 206 | (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 @@ | |||
| 76 | 76 | ||
| 77 | (eval-when-compile (require 'cl)) | 77 | (eval-when-compile (require 'cl)) |
| 78 | (require 'pcvs-util) | 78 | (require 'pcvs-util) |
| 79 | (autoload 'vc-find-version "vc") | 79 | (autoload 'vc-find-revision "vc") |
| 80 | (autoload 'vc-version-diff "vc") | 80 | (autoload 'vc-version-diff "vc") |
| 81 | 81 | ||
| 82 | (defvar cvs-minor-wrap-function) | 82 | (defvar cvs-minor-wrap-function) |
| @@ -93,7 +93,7 @@ | |||
| 93 | ;; ("e" . cvs-mode-edit-log) | 93 | ;; ("e" . cvs-mode-edit-log) |
| 94 | ("d" . log-view-diff) | 94 | ("d" . log-view-diff) |
| 95 | ("a" . log-view-annotate-version) | 95 | ("a" . log-view-annotate-version) |
| 96 | ("f" . log-view-find-version) | 96 | ("f" . log-view-find-revision) |
| 97 | ("n" . log-view-msg-next) | 97 | ("n" . log-view-msg-next) |
| 98 | ("p" . log-view-msg-prev) | 98 | ("p" . log-view-msg-prev) |
| 99 | ("\t" . log-view-msg-next) | 99 | ("\t" . log-view-msg-next) |
| @@ -116,7 +116,7 @@ | |||
| 116 | ;; ["Kill This Buffer" kill-this-buffer] | 116 | ;; ["Kill This Buffer" kill-this-buffer] |
| 117 | ["Mark Log Entry for Diff" set-mark-command] | 117 | ["Mark Log Entry for Diff" set-mark-command] |
| 118 | ["Diff Revisions" log-view-diff] | 118 | ["Diff Revisions" log-view-diff] |
| 119 | ["Visit Version" log-view-find-version] | 119 | ["Visit Version" log-view-find-revision] |
| 120 | ["Annotate Version" log-view-annotate-version] | 120 | ["Annotate Version" log-view-annotate-version] |
| 121 | ["Next Log Entry" log-view-msg-next] | 121 | ["Next Log Entry" log-view-msg-next] |
| 122 | ["Previous Log Entry" log-view-msg-prev] | 122 | ["Previous Log Entry" log-view-msg-prev] |
| @@ -365,12 +365,12 @@ log entries." | |||
| 365 | (cvs-force-command "/F")) | 365 | (cvs-force-command "/F")) |
| 366 | (funcall f)))) | 366 | (funcall f)))) |
| 367 | 367 | ||
| 368 | (defun log-view-find-version (pos) | 368 | (defun log-view-find-revision (pos) |
| 369 | "Visit the version at point." | 369 | "Visit the version at point." |
| 370 | (interactive "d") | 370 | (interactive "d") |
| 371 | (save-excursion | 371 | (save-excursion |
| 372 | (goto-char pos) | 372 | (goto-char pos) |
| 373 | (switch-to-buffer (vc-find-version (log-view-current-file) | 373 | (switch-to-buffer (vc-find-revision (log-view-current-file) |
| 374 | (log-view-current-tag))))) | 374 | (log-view-current-tag))))) |
| 375 | 375 | ||
| 376 | (defun log-view-annotate-version (pos) | 376 | (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'." | |||
| 2411 | (let* ((file (expand-file-name buffer-file-name)) | 2411 | (let* ((file (expand-file-name buffer-file-name)) |
| 2412 | (version (and (fboundp 'vc-backend) | 2412 | (version (and (fboundp 'vc-backend) |
| 2413 | (eq (vc-backend file) 'CVS) | 2413 | (eq (vc-backend file) 'CVS) |
| 2414 | (vc-workfile-version file)))) | 2414 | (vc-working-revision file)))) |
| 2415 | (when version | 2415 | (when version |
| 2416 | (save-excursion | 2416 | (save-excursion |
| 2417 | (dolist (cvs-buf (buffer-list)) | 2417 | (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." | |||
| 265 | ;; ID not found. | 265 | ;; ID not found. |
| 266 | (if (equal (file-name-nondirectory sigfile) | 266 | (if (equal (file-name-nondirectory sigfile) |
| 267 | (subst-char-in-string | 267 | (subst-char-in-string |
| 268 | ?/ ?% (vc-arch-workfile-version file))) | 268 | ?/ ?% (vc-arch-working-revision file))) |
| 269 | 'added | 269 | 'added |
| 270 | ;; Might be `added' or `up-to-date' as well. | 270 | ;; Might be `added' or `up-to-date' as well. |
| 271 | ;; FIXME: Check in the patch logs to find out. | 271 | ;; FIXME: Check in the patch logs to find out. |
| @@ -283,7 +283,7 @@ Return non-nil if FILE is unchanged." | |||
| 283 | 'up-to-date | 283 | 'up-to-date |
| 284 | 'edited))))))))) | 284 | 'edited))))))))) |
| 285 | 285 | ||
| 286 | (defun vc-arch-workfile-version (file) | 286 | (defun vc-arch-working-revision (file) |
| 287 | (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) | 287 | (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) |
| 288 | (defbranch (vc-arch-default-version file))) | 288 | (defbranch (vc-arch-default-version file))) |
| 289 | (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch)) | 289 | (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch)) |
| @@ -321,7 +321,7 @@ Return non-nil if FILE is unchanged." | |||
| 321 | 321 | ||
| 322 | (defun vc-arch-mode-line-string (file) | 322 | (defun vc-arch-mode-line-string (file) |
| 323 | "Return string for placement in modeline by `vc-mode-line' for FILE." | 323 | "Return string for placement in modeline by `vc-mode-line' for FILE." |
| 324 | (let ((rev (vc-workfile-version file))) | 324 | (let ((rev (vc-working-revision file))) |
| 325 | (dolist (rule vc-arch-mode-line-rewrite) | 325 | (dolist (rule vc-arch-mode-line-rewrite) |
| 326 | (if (string-match (car rule) rev) | 326 | (if (string-match (car rule) rev) |
| 327 | (setq rev (replace-match (cdr rule) t nil rev)))) | 327 | (setq rev (replace-match (cdr rule) t nil rev)))) |
| @@ -389,7 +389,7 @@ Return non-nil if FILE is unchanged." | |||
| 389 | (let ((file (car files))) | 389 | (let ((file (car files))) |
| 390 | (if (and newvers | 390 | (if (and newvers |
| 391 | (vc-up-to-date-p file) | 391 | (vc-up-to-date-p file) |
| 392 | (equal newvers (vc-workfile-version file))) | 392 | (equal newvers (vc-working-revision file))) |
| 393 | ;; Newvers is the base revision and the current file is unchanged, | 393 | ;; Newvers is the base revision and the current file is unchanged, |
| 394 | ;; so we can diff with the current file. | 394 | ;; so we can diff with the current file. |
| 395 | (setq newvers nil)) | 395 | (setq newvers nil)) |
| @@ -406,7 +406,7 @@ Return non-nil if FILE is unchanged." | |||
| 406 | ;; Arch does not support the typical flags. | 406 | ;; Arch does not support the typical flags. |
| 407 | ;; (vc-switches 'Arch 'diff) | 407 | ;; (vc-switches 'Arch 'diff) |
| 408 | (file-relative-name file) | 408 | (file-relative-name file) |
| 409 | (if (equal oldvers (vc-workfile-version file)) | 409 | (if (equal oldvers (vc-working-revision file)) |
| 410 | nil | 410 | nil |
| 411 | oldvers)))) | 411 | oldvers)))) |
| 412 | (if async 1 status))))) ; async diff, pessimistic assumption. | 412 | (if async 1 status))))) ; async diff, pessimistic assumption. |
| @@ -423,7 +423,7 @@ Return non-nil if FILE is unchanged." | |||
| 423 | "A wrapper around `vc-do-command' for use in vc-arch.el." | 423 | "A wrapper around `vc-do-command' for use in vc-arch.el." |
| 424 | (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) | 424 | (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) |
| 425 | 425 | ||
| 426 | (defun vc-arch-init-version () nil) | 426 | (defun vc-arch-init-revision () nil) |
| 427 | 427 | ||
| 428 | ;;; Completion of versions and revisions. | 428 | ;;; Completion of versions and revisions. |
| 429 | 429 | ||
| @@ -559,7 +559,7 @@ Return non-nil if FILE is unchanged." | |||
| 559 | 559 | ||
| 560 | ;;; Less obvious implementations. | 560 | ;;; Less obvious implementations. |
| 561 | 561 | ||
| 562 | (defun vc-arch-find-version (file rev buffer) | 562 | (defun vc-arch-find-revision (file rev buffer) |
| 563 | (let ((out (make-temp-file "vc-out"))) | 563 | (let ((out (make-temp-file "vc-out"))) |
| 564 | (unwind-protect | 564 | (unwind-protect |
| 565 | (progn | 565 | (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." | |||
| 238 | (defun vc-bzr-workfile-unchanged-p (file) | 238 | (defun vc-bzr-workfile-unchanged-p (file) |
| 239 | (eq 'unchanged (car (vc-bzr-status file)))) | 239 | (eq 'unchanged (car (vc-bzr-status file)))) |
| 240 | 240 | ||
| 241 | (defun vc-bzr-workfile-version (file) | 241 | (defun vc-bzr-working-revision (file) |
| 242 | (lexical-let* | 242 | (lexical-let* |
| 243 | ((rootdir (vc-bzr-root file)) | 243 | ((rootdir (vc-bzr-root file)) |
| 244 | (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file | 244 | (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file |
| @@ -377,7 +377,7 @@ EDITABLE is ignored." | |||
| 377 | 377 | ||
| 378 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 378 | (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
| 379 | "VC bzr backend for diff." | 379 | "VC bzr backend for diff." |
| 380 | (let ((working (vc-workfile-version (if (consp files) (car files) files)))) | 380 | (let ((working (vc-working-revision (if (consp files) (car files) files)))) |
| 381 | (if (and (equal rev1 working) (not rev2)) | 381 | (if (and (equal rev1 working) (not rev2)) |
| 382 | (setq rev1 nil)) | 382 | (setq rev1 nil)) |
| 383 | (if (and (not rev1) rev2) | 383 | (if (and (not rev1) rev2) |
| @@ -546,7 +546,7 @@ Optional argument LOCALP is always ignored." | |||
| 546 | (vc-file-setprop file 'vc-state current-vc-state) | 546 | (vc-file-setprop file 'vc-state current-vc-state) |
| 547 | (vc-file-setprop file 'vc-bzr-state current-bzr-state) | 547 | (vc-file-setprop file 'vc-bzr-state current-bzr-state) |
| 548 | (when (eq 'added current-bzr-state) | 548 | (when (eq 'added current-bzr-state) |
| 549 | (vc-file-setprop file 'vc-workfile-version "0")))) | 549 | (vc-file-setprop file 'vc-working-revision "0")))) |
| 550 | (when (eq 'not-versioned current-bzr-state) | 550 | (when (eq 'not-versioned current-bzr-state) |
| 551 | (let ((file (expand-file-name | 551 | (let ((file (expand-file-name |
| 552 | (buffer-substring-no-properties | 552 | (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'." | |||
| 229 | (goto-char (point-max)) | 229 | (goto-char (point-max)) |
| 230 | (widen))))))) | 230 | (widen))))))) |
| 231 | 231 | ||
| 232 | (defun vc-cvs-workfile-version (file) | 232 | (defun vc-cvs-working-revision (file) |
| 233 | "CVS-specific version of `vc-workfile-version'." | 233 | "CVS-specific version of `vc-working-revision'." |
| 234 | ;; There is no need to consult RCS headers under CVS, because we | 234 | ;; There is no need to consult RCS headers under CVS, because we |
| 235 | ;; get the workfile version for free when we recognize that a file | 235 | ;; get the workfile version for free when we recognize that a file |
| 236 | ;; is registered in CVS. | 236 | ;; is registered in CVS. |
| 237 | (vc-cvs-registered file) | 237 | (vc-cvs-registered file) |
| 238 | (vc-file-getprop file 'vc-workfile-version)) | 238 | (vc-file-getprop file 'vc-working-revision)) |
| 239 | 239 | ||
| 240 | (defun vc-cvs-checkout-model (file) | 240 | (defun vc-cvs-checkout-model (file) |
| 241 | "CVS-specific version of `vc-checkout-model'." | 241 | "CVS-specific version of `vc-checkout-model'." |
| @@ -261,7 +261,7 @@ committed and support display of sticky tags." | |||
| 261 | (let* ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag)) | 261 | (let* ((sticky-tag (vc-file-getprop file 'vc-cvs-sticky-tag)) |
| 262 | help-echo | 262 | help-echo |
| 263 | (string | 263 | (string |
| 264 | (if (string= (vc-workfile-version file) "0") | 264 | (if (string= (vc-working-revision file) "0") |
| 265 | ;; A file that is added but not yet committed. | 265 | ;; A file that is added but not yet committed. |
| 266 | (progn | 266 | (progn |
| 267 | (setq help-echo "Added file (needs commit) under CVS") | 267 | (setq help-echo "Added file (needs commit) under CVS") |
| @@ -282,7 +282,7 @@ committed and support display of sticky tags." | |||
| 282 | "CVS-specific version of `vc-dired-state-info'." | 282 | "CVS-specific version of `vc-dired-state-info'." |
| 283 | (let ((cvs-state (vc-state file))) | 283 | (let ((cvs-state (vc-state file))) |
| 284 | (cond ((eq cvs-state 'edited) | 284 | (cond ((eq cvs-state 'edited) |
| 285 | (if (equal (vc-workfile-version file) "0") | 285 | (if (equal (vc-working-revision file) "0") |
| 286 | "(added)" "(modified)")) | 286 | "(added)" "(modified)")) |
| 287 | ((eq cvs-state 'needs-patch) "(patch)") | 287 | ((eq cvs-state 'needs-patch) "(patch)") |
| 288 | ((eq cvs-state 'needs-merge) "(merge)")))) | 288 | ((eq cvs-state 'needs-merge) "(merge)")))) |
| @@ -330,7 +330,7 @@ its parents." | |||
| 330 | 330 | ||
| 331 | (defun vc-cvs-checkin (files rev comment) | 331 | (defun vc-cvs-checkin (files rev comment) |
| 332 | "CVS-specific version of `vc-backend-checkin'." | 332 | "CVS-specific version of `vc-backend-checkin'." |
| 333 | (unless (or (not rev) (vc-cvs-valid-version-number-p rev)) | 333 | (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) |
| 334 | (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) | 334 | (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) |
| 335 | (error "%s is not a valid symbolic tag name" rev) | 335 | (error "%s is not a valid symbolic tag name" rev) |
| 336 | ;; If the input revison is a valid symbolic tag name, we create it | 336 | ;; If the input revison is a valid symbolic tag name, we create it |
| @@ -359,12 +359,12 @@ its parents." | |||
| 359 | (goto-char (point-min)) | 359 | (goto-char (point-min)) |
| 360 | (shrink-window-if-larger-than-buffer) | 360 | (shrink-window-if-larger-than-buffer) |
| 361 | (error "Check-in failed")))) | 361 | (error "Check-in failed")))) |
| 362 | ;; Single-file commit? Then update the version by parsing the buffer. | 362 | ;; Single-file commit? Then update the revision by parsing the buffer. |
| 363 | ;; Otherwise we can't necessarily tell what goes with what; clear | 363 | ;; Otherwise we can't necessarily tell what goes with what; clear |
| 364 | ;; its properties so they have to be refetched. | 364 | ;; its properties so they have to be refetched. |
| 365 | (if (= (length files) 1) | 365 | (if (= (length files) 1) |
| 366 | (vc-file-setprop | 366 | (vc-file-setprop |
| 367 | (car files) 'vc-workfile-version | 367 | (car files) 'vc-working-revision |
| 368 | (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) | 368 | (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) |
| 369 | (mapc (lambda (file) (vc-file-clearprops file)) files)) | 369 | (mapc (lambda (file) (vc-file-clearprops file)) files)) |
| 370 | ;; Anyway, forget the checkout model of the file, because we might have | 370 | ;; Anyway, forget the checkout model of the file, because we might have |
| @@ -379,7 +379,7 @@ its parents." | |||
| 379 | (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) | 379 | (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) |
| 380 | (vc-cvs-command nil 0 files "update" "-A")))) | 380 | (vc-cvs-command nil 0 files "update" "-A")))) |
| 381 | 381 | ||
| 382 | (defun vc-cvs-find-version (file rev buffer) | 382 | (defun vc-cvs-find-revision (file rev buffer) |
| 383 | (apply 'vc-cvs-command | 383 | (apply 'vc-cvs-command |
| 384 | buffer 0 file | 384 | buffer 0 file |
| 385 | "-Q" ; suppress diagnostic output | 385 | "-Q" ; suppress diagnostic output |
| @@ -404,8 +404,8 @@ REV is the revision to check out." | |||
| 404 | (vc-cvs-command nil 0 file "edit") | 404 | (vc-cvs-command nil 0 file "edit") |
| 405 | (set-file-modes file (logior (file-modes file) 128)) | 405 | (set-file-modes file (logior (file-modes file) 128)) |
| 406 | (if (equal file buffer-file-name) (toggle-read-only -1)))) | 406 | (if (equal file buffer-file-name) (toggle-read-only -1)))) |
| 407 | ;; Check out a particular version (or recreate the file). | 407 | ;; Check out a particular revision (or recreate the file). |
| 408 | (vc-file-setprop file 'vc-workfile-version nil) | 408 | (vc-file-setprop file 'vc-working-revision nil) |
| 409 | (apply 'vc-cvs-command nil 0 file | 409 | (apply 'vc-cvs-command nil 0 file |
| 410 | (and editable "-w") | 410 | (and editable "-w") |
| 411 | "update" | 411 | "update" |
| @@ -426,7 +426,7 @@ REV is the revision to check out." | |||
| 426 | (vc-cvs-command nil 0 file "commit" "-mRemoved.")) | 426 | (vc-cvs-command nil 0 file "commit" "-mRemoved.")) |
| 427 | 427 | ||
| 428 | (defun vc-cvs-revert (file &optional contents-done) | 428 | (defun vc-cvs-revert (file &optional contents-done) |
| 429 | "Revert FILE to the version on which it was based." | 429 | "Revert FILE to the working revision on which it was based." |
| 430 | (vc-default-revert 'CVS file contents-done) | 430 | (vc-default-revert 'CVS file contents-done) |
| 431 | (unless (eq (vc-checkout-model file) 'implicit) | 431 | (unless (eq (vc-checkout-model file) 'implicit) |
| 432 | (if vc-cvs-use-edit | 432 | (if vc-cvs-use-edit |
| @@ -434,13 +434,13 @@ REV is the revision to check out." | |||
| 434 | ;; Make the file read-only by switching off all w-bits | 434 | ;; Make the file read-only by switching off all w-bits |
| 435 | (set-file-modes file (logand (file-modes file) 3950))))) | 435 | (set-file-modes file (logand (file-modes file) 3950))))) |
| 436 | 436 | ||
| 437 | (defun vc-cvs-merge (file first-version &optional second-version) | 437 | (defun vc-cvs-merge (file first-revision &optional second-revision) |
| 438 | "Merge changes into current working copy of FILE. | 438 | "Merge changes into current working copy of FILE. |
| 439 | The changes are between FIRST-VERSION and SECOND-VERSION." | 439 | The changes are between FIRST-REVISION and SECOND-REVISION." |
| 440 | (vc-cvs-command nil 0 file | 440 | (vc-cvs-command nil 0 file |
| 441 | "update" "-kk" | 441 | "update" "-kk" |
| 442 | (concat "-j" first-version) | 442 | (concat "-j" first-revision) |
| 443 | (concat "-j" second-version)) | 443 | (concat "-j" second-revision)) |
| 444 | (vc-file-setprop file 'vc-state 'edited) | 444 | (vc-file-setprop file 'vc-state 'edited) |
| 445 | (with-current-buffer (get-buffer "*vc*") | 445 | (with-current-buffer (get-buffer "*vc*") |
| 446 | (goto-char (point-min)) | 446 | (goto-char (point-min)) |
| @@ -451,18 +451,18 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 451 | (defun vc-cvs-merge-news (file) | 451 | (defun vc-cvs-merge-news (file) |
| 452 | "Merge in any new changes made to FILE." | 452 | "Merge in any new changes made to FILE." |
| 453 | (message "Merging changes into %s..." file) | 453 | (message "Merging changes into %s..." file) |
| 454 | ;; (vc-file-setprop file 'vc-workfile-version nil) | 454 | ;; (vc-file-setprop file 'vc-working-revision nil) |
| 455 | (vc-file-setprop file 'vc-checkout-time 0) | 455 | (vc-file-setprop file 'vc-checkout-time 0) |
| 456 | (vc-cvs-command nil 0 file "update") | 456 | (vc-cvs-command nil 0 file "update") |
| 457 | ;; Analyze the merge result reported by CVS, and set | 457 | ;; Analyze the merge result reported by CVS, and set |
| 458 | ;; file properties accordingly. | 458 | ;; file properties accordingly. |
| 459 | (with-current-buffer (get-buffer "*vc*") | 459 | (with-current-buffer (get-buffer "*vc*") |
| 460 | (goto-char (point-min)) | 460 | (goto-char (point-min)) |
| 461 | ;; get new workfile version | 461 | ;; get new working revision |
| 462 | (if (re-search-forward | 462 | (if (re-search-forward |
| 463 | "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) | 463 | "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) |
| 464 | (vc-file-setprop file 'vc-workfile-version (match-string 1)) | 464 | (vc-file-setprop file 'vc-working-revision (match-string 1)) |
| 465 | (vc-file-setprop file 'vc-workfile-version nil)) | 465 | (vc-file-setprop file 'vc-working-revision nil)) |
| 466 | ;; get file status | 466 | ;; get file status |
| 467 | (prog1 | 467 | (prog1 |
| 468 | (if (eq (buffer-size) 0) | 468 | (if (eq (buffer-size) 0) |
| @@ -512,7 +512,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 512 | nil) | 512 | nil) |
| 513 | 513 | ||
| 514 | (defun vc-cvs-diff (files &optional oldvers newvers buffer) | 514 | (defun vc-cvs-diff (files &optional oldvers newvers buffer) |
| 515 | "Get a difference report using CVS between two versions of FILE." | 515 | "Get a difference report using CVS between two revisions of FILE." |
| 516 | (let* ((async (and (not vc-disable-async-diff) | 516 | (let* ((async (and (not vc-disable-async-diff) |
| 517 | (vc-stay-local-p files) | 517 | (vc-stay-local-p files) |
| 518 | (fboundp 'start-process))) | 518 | (fboundp 'start-process))) |
| @@ -559,14 +559,14 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 559 | (set-process-filter process vc-filter) | 559 | (set-process-filter process vc-filter) |
| 560 | (funcall vc-filter process (substring string (match-beginning 0)))))) | 560 | (funcall vc-filter process (substring string (match-beginning 0)))))) |
| 561 | 561 | ||
| 562 | (defun vc-cvs-annotate-command (file buffer &optional version) | 562 | (defun vc-cvs-annotate-command (file buffer &optional revision) |
| 563 | "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. | 563 | "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER. |
| 564 | Optional arg VERSION is a version to annotate from." | 564 | Optional arg REVISION is a revision to annotate from." |
| 565 | (vc-cvs-command buffer | 565 | (vc-cvs-command buffer |
| 566 | (if (and (vc-stay-local-p file) (fboundp 'start-process)) | 566 | (if (and (vc-stay-local-p file) (fboundp 'start-process)) |
| 567 | 'async 0) | 567 | 'async 0) |
| 568 | file "annotate" | 568 | file "annotate" |
| 569 | (if version (concat "-r" version))) | 569 | (if revision (concat "-r" revision))) |
| 570 | ;; Strip the leading few lines. | 570 | ;; Strip the leading few lines. |
| 571 | (let ((proc (get-buffer-process buffer))) | 571 | (let ((proc (get-buffer-process buffer))) |
| 572 | (if proc | 572 | (if proc |
| @@ -633,7 +633,7 @@ systime, or nil if there is none." | |||
| 633 | ;;; | 633 | ;;; |
| 634 | 634 | ||
| 635 | (defun vc-cvs-create-snapshot (dir name branchp) | 635 | (defun vc-cvs-create-snapshot (dir name branchp) |
| 636 | "Assign to DIR's current version a given NAME. | 636 | "Assign to DIR's current revision a given NAME. |
| 637 | If BRANCHP is non-nil, the name is created as a branch (and the current | 637 | If BRANCHP is non-nil, the name is created as a branch (and the current |
| 638 | workspace is immediately moved to that new branch)." | 638 | workspace is immediately moved to that new branch)." |
| 639 | (vc-cvs-command nil 0 dir "tag" "-c" (if branchp "-b") name) | 639 | (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." | |||
| 663 | ((or (string= state "U") | 663 | ((or (string= state "U") |
| 664 | (string= state "P")) | 664 | (string= state "P")) |
| 665 | (vc-file-setprop file 'vc-state 'up-to-date) | 665 | (vc-file-setprop file 'vc-state 'up-to-date) |
| 666 | (vc-file-setprop file 'vc-workfile-version nil) | 666 | (vc-file-setprop file 'vc-working-revision nil) |
| 667 | (vc-file-setprop file 'vc-checkout-time | 667 | (vc-file-setprop file 'vc-checkout-time |
| 668 | (nth 5 (file-attributes file)))) | 668 | (nth 5 (file-attributes file)))) |
| 669 | ((or (string= state "M") | 669 | ((or (string= state "M") |
| 670 | (string= state "C")) | 670 | (string= state "C")) |
| 671 | (vc-file-setprop file 'vc-state 'edited) | 671 | (vc-file-setprop file 'vc-state 'edited) |
| 672 | (vc-file-setprop file 'vc-workfile-version nil) | 672 | (vc-file-setprop file 'vc-working-revision nil) |
| 673 | (vc-file-setprop file 'vc-checkout-time 0))) | 673 | (vc-file-setprop file 'vc-checkout-time 0))) |
| 674 | (vc-file-setprop file 'vc-cvs-sticky-tag sticky-tag) | 674 | (vc-file-setprop file 'vc-cvs-sticky-tag sticky-tag) |
| 675 | (vc-resynch-buffer file t t)))) | 675 | (vc-resynch-buffer file t t)))) |
| @@ -800,7 +800,7 @@ essential information." | |||
| 800 | "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ | 800 | "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ |
| 801 | \[\t ]+\\([0-9.]+\\)" | 801 | \[\t ]+\\([0-9.]+\\)" |
| 802 | nil t)) | 802 | nil t)) |
| 803 | (vc-file-setprop file 'vc-latest-version (match-string 2))) | 803 | (vc-file-setprop file 'vc-latest-revision (match-string 2))) |
| 804 | (vc-file-setprop | 804 | (vc-file-setprop |
| 805 | file 'vc-state | 805 | file 'vc-state |
| 806 | (cond | 806 | (cond |
| @@ -843,8 +843,8 @@ CVS/Entries should only be accessed through this function." | |||
| 843 | (and (string-match "^[a-zA-Z]" tag) | 843 | (and (string-match "^[a-zA-Z]" tag) |
| 844 | (not (string-match "[^a-z0-9A-Z-_]" tag)))) | 844 | (not (string-match "[^a-z0-9A-Z-_]" tag)))) |
| 845 | 845 | ||
| 846 | (defun vc-cvs-valid-version-number-p (tag) | 846 | (defun vc-cvs-valid-revision-number-p (tag) |
| 847 | "Return non-nil if TAG is a valid version number." | 847 | "Return non-nil if TAG is a valid revision number." |
| 848 | (and (string-match "^[0-9]" tag) | 848 | (and (string-match "^[0-9]" tag) |
| 849 | (not (string-match "[^0-9.]" tag)))) | 849 | (not (string-match "[^0-9.]" tag)))) |
| 850 | 850 | ||
| @@ -908,7 +908,7 @@ is non-nil." | |||
| 908 | ;; entry for a "locally added" file (not yet committed) | 908 | ;; entry for a "locally added" file (not yet committed) |
| 909 | ((looking-at "/[^/]+/0/") | 909 | ((looking-at "/[^/]+/0/") |
| 910 | (vc-file-setprop file 'vc-checkout-time 0) | 910 | (vc-file-setprop file 'vc-checkout-time 0) |
| 911 | (vc-file-setprop file 'vc-workfile-version "0") | 911 | (vc-file-setprop file 'vc-working-revision "0") |
| 912 | (if set-state (vc-file-setprop file 'vc-state 'edited))) | 912 | (if set-state (vc-file-setprop file 'vc-state 'edited))) |
| 913 | ;; normal entry | 913 | ;; normal entry |
| 914 | ((looking-at | 914 | ((looking-at |
| @@ -922,7 +922,7 @@ is non-nil." | |||
| 922 | ;; sticky tag | 922 | ;; sticky tag |
| 923 | "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty) | 923 | "\\(.\\|\\)" ;Sticky tag type (date or tag name, could be empty) |
| 924 | "\\(.*\\)")) ;Sticky tag | 924 | "\\(.*\\)")) ;Sticky tag |
| 925 | (vc-file-setprop file 'vc-workfile-version (match-string 1)) | 925 | (vc-file-setprop file 'vc-working-revision (match-string 1)) |
| 926 | (vc-file-setprop file 'vc-cvs-sticky-tag | 926 | (vc-file-setprop file 'vc-cvs-sticky-tag |
| 927 | (vc-cvs-parse-sticky-tag (match-string 4) | 927 | (vc-cvs-parse-sticky-tag (match-string 4) |
| 928 | (match-string 5))) | 928 | (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 @@ | |||
| 53 | ;; * state (file) OK | 53 | ;; * state (file) OK |
| 54 | ;; - state-heuristic (file) NOT NEEDED | 54 | ;; - state-heuristic (file) NOT NEEDED |
| 55 | ;; - dir-state (dir) OK | 55 | ;; - dir-state (dir) OK |
| 56 | ;; * workfile-version (file) OK | 56 | ;; * working-revision (file) OK |
| 57 | ;; - latest-on-branch-p (file) NOT NEEDED | 57 | ;; - latest-on-branch-p (file) NOT NEEDED |
| 58 | ;; * checkout-model (file) OK | 58 | ;; * checkout-model (file) OK |
| 59 | ;; - workfile-unchanged-p (file) OK | 59 | ;; - workfile-unchanged-p (file) OK |
| @@ -62,13 +62,13 @@ | |||
| 62 | ;; STATE-CHANGING FUNCTIONS | 62 | ;; STATE-CHANGING FUNCTIONS |
| 63 | ;; * create-repo () OK | 63 | ;; * create-repo () OK |
| 64 | ;; * register (files &optional rev comment) OK | 64 | ;; * register (files &optional rev comment) OK |
| 65 | ;; - init-version (file) NOT NEEDED | 65 | ;; - init-revision (file) NOT NEEDED |
| 66 | ;; - responsible-p (file) OK | 66 | ;; - responsible-p (file) OK |
| 67 | ;; - could-register (file) NOT NEEDED, DEFAULT IS GOOD | 67 | ;; - could-register (file) NOT NEEDED, DEFAULT IS GOOD |
| 68 | ;; - receive-file (file rev) NOT NEEDED | 68 | ;; - receive-file (file rev) NOT NEEDED |
| 69 | ;; - unregister (file) OK | 69 | ;; - unregister (file) OK |
| 70 | ;; * checkin (files rev comment) OK | 70 | ;; * checkin (files rev comment) OK |
| 71 | ;; * find-version (file rev buffer) OK | 71 | ;; * find-revision (file rev buffer) OK |
| 72 | ;; * checkout (file &optional editable rev) OK | 72 | ;; * checkout (file &optional editable rev) OK |
| 73 | ;; * revert (file &optional contents-done) OK | 73 | ;; * revert (file &optional contents-done) OK |
| 74 | ;; - rollback (files) COULD BE SUPPORTED | 74 | ;; - rollback (files) COULD BE SUPPORTED |
| @@ -177,8 +177,8 @@ | |||
| 177 | (vc-file-setprop file 'vc-state 'nil))) | 177 | (vc-file-setprop file 'vc-state 'nil))) |
| 178 | (forward-line))))) | 178 | (forward-line))))) |
| 179 | 179 | ||
| 180 | (defun vc-git-workfile-version (file) | 180 | (defun vc-git-working-revision (file) |
| 181 | "Git-specific version of `vc-workfile-version'." | 181 | "Git-specific version of `vc-working-revision'." |
| 182 | (let ((str (with-output-to-string | 182 | (let ((str (with-output-to-string |
| 183 | (with-current-buffer standard-output | 183 | (with-current-buffer standard-output |
| 184 | (call-process "git" nil '(t nil) nil "symbolic-ref" "HEAD"))))) | 184 | (call-process "git" nil '(t nil) nil "symbolic-ref" "HEAD"))))) |
| @@ -194,7 +194,7 @@ | |||
| 194 | 194 | ||
| 195 | (defun vc-git-mode-line-string (file) | 195 | (defun vc-git-mode-line-string (file) |
| 196 | "Return string for placement into the modeline for FILE." | 196 | "Return string for placement into the modeline for FILE." |
| 197 | (let* ((branch (vc-git-workfile-version file)) | 197 | (let* ((branch (vc-git-working-revision file)) |
| 198 | (def-ml (vc-default-mode-line-string 'Git file)) | 198 | (def-ml (vc-default-mode-line-string 'Git file)) |
| 199 | (help-echo (get-text-property 0 'help-echo def-ml))) | 199 | (help-echo (get-text-property 0 'help-echo def-ml))) |
| 200 | (if (zerop (length branch)) | 200 | (if (zerop (length branch)) |
| @@ -232,7 +232,7 @@ | |||
| 232 | (let ((coding-system-for-write git-commits-coding-system)) | 232 | (let ((coding-system-for-write git-commits-coding-system)) |
| 233 | (vc-git-command nil 0 files "commit" "-m" comment "--only" "--"))) | 233 | (vc-git-command nil 0 files "commit" "-m" comment "--only" "--"))) |
| 234 | 234 | ||
| 235 | (defun vc-git-find-version (file rev buffer) | 235 | (defun vc-git-find-revision (file rev buffer) |
| 236 | (let ((coding-system-for-read 'binary) | 236 | (let ((coding-system-for-read 'binary) |
| 237 | (coding-system-for-write 'binary) | 237 | (coding-system-for-write 'binary) |
| 238 | (fullname (substring | 238 | (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 @@ | |||
| 45 | ;; * state (file) OK | 45 | ;; * state (file) OK |
| 46 | ;; - state-heuristic (file) ?? PROBABLY NOT NEEDED | 46 | ;; - state-heuristic (file) ?? PROBABLY NOT NEEDED |
| 47 | ;; - dir-state (dir) OK | 47 | ;; - dir-state (dir) OK |
| 48 | ;; * workfile-version (file) OK | 48 | ;; * working-revision (file) OK |
| 49 | ;; - latest-on-branch-p (file) ?? | 49 | ;; - latest-on-branch-p (file) ?? |
| 50 | ;; * checkout-model (file) OK | 50 | ;; * checkout-model (file) OK |
| 51 | ;; - workfile-unchanged-p (file) OK | 51 | ;; - workfile-unchanged-p (file) OK |
| @@ -54,13 +54,13 @@ | |||
| 54 | ;; STATE-CHANGING FUNCTIONS | 54 | ;; STATE-CHANGING FUNCTIONS |
| 55 | ;; * register (files &optional rev comment) OK | 55 | ;; * register (files &optional rev comment) OK |
| 56 | ;; * create-repo () OK | 56 | ;; * create-repo () OK |
| 57 | ;; - init-version () NOT NEEDED | 57 | ;; - init-revision () NOT NEEDED |
| 58 | ;; - responsible-p (file) OK | 58 | ;; - responsible-p (file) OK |
| 59 | ;; - could-register (file) OK | 59 | ;; - could-register (file) OK |
| 60 | ;; - receive-file (file rev) ?? PROBABLY NOT NEEDED | 60 | ;; - receive-file (file rev) ?? PROBABLY NOT NEEDED |
| 61 | ;; - unregister (file) COMMENTED OUT, MAY BE INCORRECT | 61 | ;; - unregister (file) COMMENTED OUT, MAY BE INCORRECT |
| 62 | ;; * checkin (files rev comment) OK | 62 | ;; * checkin (files rev comment) OK |
| 63 | ;; * find-version (file rev buffer) OK | 63 | ;; * find-revision (file rev buffer) OK |
| 64 | ;; * checkout (file &optional editable rev) OK | 64 | ;; * checkout (file &optional editable rev) OK |
| 65 | ;; * revert (file &optional contents-done) OK | 65 | ;; * revert (file &optional contents-done) OK |
| 66 | ;; - rollback (files) ?? PROBABLY NOT NEEDED | 66 | ;; - rollback (files) ?? PROBABLY NOT NEEDED |
| @@ -198,7 +198,7 @@ | |||
| 198 | ;; should not show up in vc-dired, so don't deal with them | 198 | ;; should not show up in vc-dired, so don't deal with them |
| 199 | ;; here. | 199 | ;; here. |
| 200 | ((eq status-char ?A) | 200 | ((eq status-char ?A) |
| 201 | (vc-file-setprop file 'vc-workfile-version "0") | 201 | (vc-file-setprop file 'vc-working-revision "0") |
| 202 | (vc-file-setprop file 'vc-state 'edited)) | 202 | (vc-file-setprop file 'vc-state 'edited)) |
| 203 | ((eq status-char ?M) | 203 | ((eq status-char ?M) |
| 204 | (vc-file-setprop file 'vc-state 'edited)) | 204 | (vc-file-setprop file 'vc-state 'edited)) |
| @@ -207,8 +207,8 @@ | |||
| 207 | (vc-file-setprop file 'vc-state 'nil))) | 207 | (vc-file-setprop file 'vc-state 'nil))) |
| 208 | (forward-line))))) | 208 | (forward-line))))) |
| 209 | 209 | ||
| 210 | (defun vc-hg-workfile-version (file) | 210 | (defun vc-hg-working-revision (file) |
| 211 | "Hg-specific version of `vc-workfile-version'." | 211 | "Hg-specific version of `vc-working-revision'." |
| 212 | (let* | 212 | (let* |
| 213 | ((status nil) | 213 | ((status nil) |
| 214 | (out | 214 | (out |
| @@ -278,7 +278,7 @@ | |||
| 278 | 278 | ||
| 279 | (defun vc-hg-diff (files &optional oldvers newvers buffer) | 279 | (defun vc-hg-diff (files &optional oldvers newvers buffer) |
| 280 | "Get a difference report using hg between two versions of FILES." | 280 | "Get a difference report using hg between two versions of FILES." |
| 281 | (let ((working (vc-workfile-version (car files)))) | 281 | (let ((working (vc-working-revision (car files)))) |
| 282 | (if (and (equal oldvers working) (not newvers)) | 282 | (if (and (equal oldvers working) (not newvers)) |
| 283 | (setq oldvers nil)) | 283 | (setq oldvers nil)) |
| 284 | (if (and (not oldvers) newvers) | 284 | (if (and (not oldvers) newvers) |
| @@ -402,7 +402,7 @@ COMMENT is ignored." | |||
| 402 | REV is ignored." | 402 | REV is ignored." |
| 403 | (vc-hg-command nil 0 files "commit" "-m" comment)) | 403 | (vc-hg-command nil 0 files "commit" "-m" comment)) |
| 404 | 404 | ||
| 405 | (defun vc-hg-find-version (file rev buffer) | 405 | (defun vc-hg-find-revision (file rev buffer) |
| 406 | (let ((coding-system-for-read 'binary) | 406 | (let ((coding-system-for-read 'binary) |
| 407 | (coding-system-for-write 'binary)) | 407 | (coding-system-for-write 'binary)) |
| 408 | (if rev | 408 | (if rev |
| @@ -432,7 +432,7 @@ REV is the revision to check out into WORKFILE." | |||
| 432 | "Hg-specific version of `vc-dired-state-info'." | 432 | "Hg-specific version of `vc-dired-state-info'." |
| 433 | (let ((hg-state (vc-state file))) | 433 | (let ((hg-state (vc-state file))) |
| 434 | (if (eq hg-state 'edited) | 434 | (if (eq hg-state 'edited) |
| 435 | (if (equal (vc-workfile-version file) "0") | 435 | (if (equal (vc-working-revision file) "0") |
| 436 | "(added)" "(modified)") | 436 | "(added)" "(modified)") |
| 437 | ;; fall back to the default VC representation | 437 | ;; fall back to the default VC representation |
| 438 | (vc-default-dired-state-info 'Hg file)))) | 438 | (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: | |||
| 492 | prompt the user to do it)." | 492 | prompt the user to do it)." |
| 493 | ;; FIXME: New (sub)states needed (?): | 493 | ;; FIXME: New (sub)states needed (?): |
| 494 | ;; - `added' (i.e. `edited' but with no base version yet, | 494 | ;; - `added' (i.e. `edited' but with no base version yet, |
| 495 | ;; typically represented by vc-workfile-version = "0") | 495 | ;; typically represented by vc-working-revision = "0") |
| 496 | ;; - `conflict' (i.e. `edited' with conflict markers) | 496 | ;; - `conflict' (i.e. `edited' with conflict markers) |
| 497 | ;; - `removed' | 497 | ;; - `removed' |
| 498 | ;; - `copied' and `moved' (might be handled by `removed' and `added') | 498 | ;; - `copied' and `moved' (might be handled by `removed' and `added') |
| @@ -548,13 +548,13 @@ Return non-nil if FILE is unchanged." | |||
| 548 | (signal (car err) (cdr err)) | 548 | (signal (car err) (cdr err)) |
| 549 | (vc-call diff (list file))))))) | 549 | (vc-call diff (list file))))))) |
| 550 | 550 | ||
| 551 | (defun vc-workfile-version (file) | 551 | (defun vc-working-revision (file) |
| 552 | "Return the repository version from which FILE was checked out. | 552 | "Return the repository version from which FILE was checked out. |
| 553 | If FILE is not registered, this function always returns nil." | 553 | If FILE is not registered, this function always returns nil." |
| 554 | (or (vc-file-getprop file 'vc-workfile-version) | 554 | (or (vc-file-getprop file 'vc-working-revision) |
| 555 | (if (vc-backend file) | 555 | (if (vc-backend file) |
| 556 | (vc-file-setprop file 'vc-workfile-version | 556 | (vc-file-setprop file 'vc-working-revision |
| 557 | (vc-call workfile-version file))))) | 557 | (vc-call working-revision file))))) |
| 558 | 558 | ||
| 559 | (defun vc-default-registered (backend file) | 559 | (defun vc-default-registered (backend file) |
| 560 | "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates." | 560 | "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." | |||
| 655 | "\\.~.+" (unless manual "\\.") "~") | 655 | "\\.~.+" (unless manual "\\.") "~") |
| 656 | (expand-file-name (concat (file-name-nondirectory file) | 656 | (expand-file-name (concat (file-name-nondirectory file) |
| 657 | ".~" (subst-char-in-string | 657 | ".~" (subst-char-in-string |
| 658 | ?/ ?_ (or rev (vc-workfile-version file))) | 658 | ?/ ?_ (or rev (vc-working-revision file))) |
| 659 | (unless manual ".") "~") | 659 | (unless manual ".") "~") |
| 660 | (file-name-directory file)))) | 660 | (file-name-directory file)))) |
| 661 | 661 | ||
| @@ -789,7 +789,7 @@ This function assumes that the file is registered." | |||
| 789 | (setq backend (symbol-name backend)) | 789 | (setq backend (symbol-name backend)) |
| 790 | (let ((state (vc-state file)) | 790 | (let ((state (vc-state file)) |
| 791 | (state-echo nil) | 791 | (state-echo nil) |
| 792 | (rev (vc-workfile-version file))) | 792 | (rev (vc-working-revision file))) |
| 793 | (propertize | 793 | (propertize |
| 794 | (cond ((or (eq state 'up-to-date) | 794 | (cond ((or (eq state 'up-to-date) |
| 795 | (eq state 'needs-patch)) | 795 | (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 | |||
| 196 | (goto-char (point-max)) | 196 | (goto-char (point-max)) |
| 197 | (widen))))))) | 197 | (widen))))))) |
| 198 | 198 | ||
| 199 | (defun vc-mcvs-workfile-version (file) | 199 | (defun vc-mcvs-working-revision (file) |
| 200 | (vc-cvs-workfile-version | 200 | (vc-cvs-working-revision |
| 201 | (expand-file-name (vc-file-getprop file 'mcvs-inode) | 201 | (expand-file-name (vc-file-getprop file 'mcvs-inode) |
| 202 | (vc-file-getprop file 'mcvs-root)))) | 202 | (vc-file-getprop file 'mcvs-root)))) |
| 203 | 203 | ||
| @@ -253,7 +253,7 @@ the Meta-CVS command (in that order)." | |||
| 253 | (vc-switches 'MCVS 'register)) | 253 | (vc-switches 'MCVS 'register)) |
| 254 | ;; I'm not sure exactly why, but if we don't setup the inode and root | 254 | ;; I'm not sure exactly why, but if we don't setup the inode and root |
| 255 | ;; prop of the file, things break later on in vc-mode-line that | 255 | ;; prop of the file, things break later on in vc-mode-line that |
| 256 | ;; ends up calling vc-mcvs-workfile-version. | 256 | ;; ends up calling vc-mcvs-working-revision. |
| 257 | ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p | 257 | ;; We also need to set vc-checkout-time so that vc-workfile-unchanged-p |
| 258 | ;; doesn't try to call `mcvs diff' on the file. | 258 | ;; doesn't try to call `mcvs diff' on the file. |
| 259 | (vc-mcvs-registered file))) | 259 | (vc-mcvs-registered file))) |
| @@ -307,7 +307,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") | |||
| 307 | ;; its properties so they have to be refetched. | 307 | ;; its properties so they have to be refetched. |
| 308 | (if (= (length files) 1) | 308 | (if (= (length files) 1) |
| 309 | (vc-file-setprop | 309 | (vc-file-setprop |
| 310 | (car files) 'vc-workfile-version | 310 | (car files) 'vc-working-revision |
| 311 | (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) | 311 | (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) |
| 312 | (mapc (lambda (file) (vc-file-clearprops file)) files)) | 312 | (mapc (lambda (file) (vc-file-clearprops file)) files)) |
| 313 | ;; Anyway, forget the checkout model of the file, because we might have | 313 | ;; 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.") | |||
| 322 | (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev))) | 322 | (if (and rev (not (vc-mcvs-valid-symbolic-tag-name-p rev))) |
| 323 | (vc-mcvs-command nil 0 files "update" "-A")))) | 323 | (vc-mcvs-command nil 0 files "update" "-A")))) |
| 324 | 324 | ||
| 325 | (defun vc-mcvs-find-version (file rev buffer) | 325 | (defun vc-mcvs-find-revision (file rev buffer) |
| 326 | (apply 'vc-mcvs-command | 326 | (apply 'vc-mcvs-command |
| 327 | buffer 0 file | 327 | buffer 0 file |
| 328 | "-Q" ; suppress diagnostic output | 328 | "-Q" ; suppress diagnostic output |
| @@ -349,7 +349,7 @@ This is only possible if Meta-CVS is responsible for FILE's directory.") | |||
| 349 | (set-file-modes file (logior (file-modes file) 128)) | 349 | (set-file-modes file (logior (file-modes file) 128)) |
| 350 | (if (equal file buffer-file-name) (toggle-read-only -1)))) | 350 | (if (equal file buffer-file-name) (toggle-read-only -1)))) |
| 351 | ;; Check out a particular version (or recreate the file). | 351 | ;; Check out a particular version (or recreate the file). |
| 352 | (vc-file-setprop file 'vc-workfile-version nil) | 352 | (vc-file-setprop file 'vc-working-revision nil) |
| 353 | (apply 'vc-mcvs-command nil 0 file | 353 | (apply 'vc-mcvs-command nil 0 file |
| 354 | (if editable "-w") | 354 | (if editable "-w") |
| 355 | "update" | 355 | "update" |
| @@ -389,7 +389,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 389 | (defun vc-mcvs-merge-news (file) | 389 | (defun vc-mcvs-merge-news (file) |
| 390 | "Merge in any new changes made to FILE." | 390 | "Merge in any new changes made to FILE." |
| 391 | (message "Merging changes into %s..." file) | 391 | (message "Merging changes into %s..." file) |
| 392 | ;; (vc-file-setprop file 'vc-workfile-version nil) | 392 | ;; (vc-file-setprop file 'vc-working-revision nil) |
| 393 | (vc-file-setprop file 'vc-checkout-time 0) | 393 | (vc-file-setprop file 'vc-checkout-time 0) |
| 394 | (vc-mcvs-command nil 0 file "update") | 394 | (vc-mcvs-command nil 0 file "update") |
| 395 | ;; Analyze the merge result reported by Meta-CVS, and set | 395 | ;; Analyze the merge result reported by Meta-CVS, and set |
| @@ -399,8 +399,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 399 | ;; get new workfile version | 399 | ;; get new workfile version |
| 400 | (if (re-search-forward | 400 | (if (re-search-forward |
| 401 | "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) | 401 | "^Merging differences between [0-9.]* and \\([0-9.]*\\) into" nil t) |
| 402 | (vc-file-setprop file 'vc-workfile-version (match-string 1)) | 402 | (vc-file-setprop file 'vc-working-revision (match-string 1)) |
| 403 | (vc-file-setprop file 'vc-workfile-version nil)) | 403 | (vc-file-setprop file 'vc-working-revision nil)) |
| 404 | ;; get file status | 404 | ;; get file status |
| 405 | (prog1 | 405 | (prog1 |
| 406 | (if (eq (buffer-size) 0) | 406 | (if (eq (buffer-size) 0) |
| @@ -528,13 +528,13 @@ If UPDATE is non-nil, then update (resynch) any affected buffers." | |||
| 528 | ((or (string= state "U") | 528 | ((or (string= state "U") |
| 529 | (string= state "P")) | 529 | (string= state "P")) |
| 530 | (vc-file-setprop file 'vc-state 'up-to-date) | 530 | (vc-file-setprop file 'vc-state 'up-to-date) |
| 531 | (vc-file-setprop file 'vc-workfile-version nil) | 531 | (vc-file-setprop file 'vc-working-revision nil) |
| 532 | (vc-file-setprop file 'vc-checkout-time | 532 | (vc-file-setprop file 'vc-checkout-time |
| 533 | (nth 5 (file-attributes file)))) | 533 | (nth 5 (file-attributes file)))) |
| 534 | ((or (string= state "M") | 534 | ((or (string= state "M") |
| 535 | (string= state "C")) | 535 | (string= state "C")) |
| 536 | (vc-file-setprop file 'vc-state 'edited) | 536 | (vc-file-setprop file 'vc-state 'edited) |
| 537 | (vc-file-setprop file 'vc-workfile-version nil) | 537 | (vc-file-setprop file 'vc-working-revision nil) |
| 538 | (vc-file-setprop file 'vc-checkout-time 0))) | 538 | (vc-file-setprop file 'vc-checkout-time 0))) |
| 539 | (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag) | 539 | (vc-file-setprop file 'vc-mcvs-sticky-tag sticky-tag) |
| 540 | (vc-resynch-buffer file t t)))) | 540 | (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 @@ | |||
| 81 | 'edited | 81 | 'edited |
| 82 | 'up-to-date)))) | 82 | 'up-to-date)))) |
| 83 | 83 | ||
| 84 | (defun vc-mtn-workfile-version (file) | 84 | (defun vc-mtn-working-revision (file) |
| 85 | ;; If `mtn' fails or returns status>0, or if the search fails, just | 85 | ;; If `mtn' fails or returns status>0, or if the search fails, just |
| 86 | ;; return nil. | 86 | ;; return nil. |
| 87 | (ignore-errors | 87 | (ignore-errors |
| @@ -134,7 +134,7 @@ | |||
| 134 | (defun vc-mtn-checkin (files rev comment) | 134 | (defun vc-mtn-checkin (files rev comment) |
| 135 | (vc-mtn-command nil 0 files "commit" "-m" comment)) | 135 | (vc-mtn-command nil 0 files "commit" "-m" comment)) |
| 136 | 136 | ||
| 137 | (defun vc-mtn-find-version (file rev buffer) | 137 | (defun vc-mtn-find-revision (file rev buffer) |
| 138 | (vc-mtn-command buffer 0 file "cat" "-r" rev)) | 138 | (vc-mtn-command buffer 0 file "cat" "-r" rev)) |
| 139 | 139 | ||
| 140 | ;; (defun vc-mtn-checkout (file &optional editable rev) | 140 | ;; (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'." | |||
| 123 | (and vc-consult-headers | 123 | (and vc-consult-headers |
| 124 | (vc-rcs-consult-headers file))) | 124 | (vc-rcs-consult-headers file))) |
| 125 | (let ((state | 125 | (let ((state |
| 126 | ;; vc-workfile-version might not be known; in that case the | 126 | ;; vc-working-revision might not be known; in that case the |
| 127 | ;; property is nil. vc-rcs-fetch-master-state knows how to | 127 | ;; property is nil. vc-rcs-fetch-master-state knows how to |
| 128 | ;; handle that. | 128 | ;; handle that. |
| 129 | (vc-rcs-fetch-master-state file | 129 | (vc-rcs-fetch-master-state file |
| 130 | (vc-file-getprop file | 130 | (vc-file-getprop file |
| 131 | 'vc-workfile-version)))) | 131 | 'vc-working-revision)))) |
| 132 | (if (not (eq state 'up-to-date)) | 132 | (if (not (eq state 'up-to-date)) |
| 133 | state | 133 | state |
| 134 | (if (vc-workfile-unchanged-p file) | 134 | (if (vc-workfile-unchanged-p file) |
| @@ -181,19 +181,19 @@ For a description of possible values, see `vc-check-master-templates'." | |||
| 181 | (vc-rcs-state file)))) | 181 | (vc-rcs-state file)))) |
| 182 | (vc-rcs-state file))))) | 182 | (vc-rcs-state file))))) |
| 183 | 183 | ||
| 184 | (defun vc-rcs-workfile-version (file) | 184 | (defun vc-rcs-working-revision (file) |
| 185 | "RCS-specific version of `vc-workfile-version'." | 185 | "RCS-specific version of `vc-working-revision'." |
| 186 | (or (and vc-consult-headers | 186 | (or (and vc-consult-headers |
| 187 | (vc-rcs-consult-headers file) | 187 | (vc-rcs-consult-headers file) |
| 188 | (vc-file-getprop file 'vc-workfile-version)) | 188 | (vc-file-getprop file 'vc-working-revision)) |
| 189 | (progn | 189 | (progn |
| 190 | (vc-rcs-fetch-master-state file) | 190 | (vc-rcs-fetch-master-state file) |
| 191 | (vc-file-getprop file 'vc-workfile-version)))) | 191 | (vc-file-getprop file 'vc-working-revision)))) |
| 192 | 192 | ||
| 193 | (defun vc-rcs-latest-on-branch-p (file &optional version) | 193 | (defun vc-rcs-latest-on-branch-p (file &optional version) |
| 194 | "Return non-nil if workfile version of FILE is the latest on its branch. | 194 | "Return non-nil if workfile version of FILE is the latest on its branch. |
| 195 | When VERSION is given, perform check for that version." | 195 | When VERSION is given, perform check for that version." |
| 196 | (unless version (setq version (vc-workfile-version file))) | 196 | (unless version (setq version (vc-working-revision file))) |
| 197 | (with-temp-buffer | 197 | (with-temp-buffer |
| 198 | (string= version | 198 | (string= version |
| 199 | (if (vc-trunk-p version) | 199 | (if (vc-trunk-p version) |
| @@ -221,7 +221,7 @@ When VERSION is given, perform check for that version." | |||
| 221 | "RCS-specific implementation of `vc-workfile-unchanged-p'." | 221 | "RCS-specific implementation of `vc-workfile-unchanged-p'." |
| 222 | ;; Try to use rcsdiff --brief. If rcsdiff does not understand that, | 222 | ;; Try to use rcsdiff --brief. If rcsdiff does not understand that, |
| 223 | ;; do a double take and remember the fact for the future | 223 | ;; do a double take and remember the fact for the future |
| 224 | (let* ((version (concat "-r" (vc-workfile-version file))) | 224 | (let* ((version (concat "-r" (vc-working-revision file))) |
| 225 | (status (if (eq vc-rcsdiff-knows-brief 'no) | 225 | (status (if (eq vc-rcsdiff-knows-brief 'no) |
| 226 | (vc-do-command nil 1 "rcsdiff" file version) | 226 | (vc-do-command nil 1 "rcsdiff" file version) |
| 227 | (vc-do-command nil 2 "rcsdiff" file "--brief" version)))) | 227 | (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." | |||
| 292 | (expand-file-name | 292 | (expand-file-name |
| 293 | name | 293 | name |
| 294 | (file-name-directory file)))))) | 294 | (file-name-directory file)))))) |
| 295 | (vc-file-setprop file 'vc-workfile-version | 295 | (vc-file-setprop file 'vc-working-revision |
| 296 | (if (re-search-forward | 296 | (if (re-search-forward |
| 297 | "^initial revision: \\([0-9.]+\\).*\n" | 297 | "^initial revision: \\([0-9.]+\\).*\n" |
| 298 | nil t) | 298 | nil t) |
| @@ -335,7 +335,7 @@ whether to remove it." | |||
| 335 | (let ((switches (vc-switches 'RCS 'checkin))) | 335 | (let ((switches (vc-switches 'RCS 'checkin))) |
| 336 | ;; Now operate on the files | 336 | ;; Now operate on the files |
| 337 | (dolist (file files) | 337 | (dolist (file files) |
| 338 | (let ((old-version (vc-workfile-version file)) new-version | 338 | (let ((old-version (vc-working-revision file)) new-version |
| 339 | (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) | 339 | (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) |
| 340 | ;; Force branch creation if an appropriate | 340 | ;; Force branch creation if an appropriate |
| 341 | ;; default branch has been set. | 341 | ;; default branch has been set. |
| @@ -353,7 +353,7 @@ whether to remove it." | |||
| 353 | (concat (if vc-keep-workfiles "-u" "-r") rev) | 353 | (concat (if vc-keep-workfiles "-u" "-r") rev) |
| 354 | (concat "-m" comment) | 354 | (concat "-m" comment) |
| 355 | switches) | 355 | switches) |
| 356 | (vc-file-setprop file 'vc-workfile-version nil) | 356 | (vc-file-setprop file 'vc-working-revision nil) |
| 357 | 357 | ||
| 358 | ;; determine the new workfile version | 358 | ;; determine the new workfile version |
| 359 | (set-buffer "*vc*") | 359 | (set-buffer "*vc*") |
| @@ -363,7 +363,7 @@ whether to remove it." | |||
| 363 | (re-search-forward | 363 | (re-search-forward |
| 364 | "reverting to previous revision \\([0-9.]+\\)" nil t)) | 364 | "reverting to previous revision \\([0-9.]+\\)" nil t)) |
| 365 | (setq new-version (match-string 1)) | 365 | (setq new-version (match-string 1)) |
| 366 | (vc-file-setprop file 'vc-workfile-version new-version)) | 366 | (vc-file-setprop file 'vc-working-revision new-version)) |
| 367 | 367 | ||
| 368 | ;; if we got to a different branch, adjust the default | 368 | ;; if we got to a different branch, adjust the default |
| 369 | ;; branch accordingly | 369 | ;; branch accordingly |
| @@ -382,7 +382,7 @@ whether to remove it." | |||
| 382 | (vc-do-command nil 1 "rcs" (vc-name file) | 382 | (vc-do-command nil 1 "rcs" (vc-name file) |
| 383 | (concat "-u" old-version))))))))) | 383 | (concat "-u" old-version))))))))) |
| 384 | 384 | ||
| 385 | (defun vc-rcs-find-version (file rev buffer) | 385 | (defun vc-rcs-find-revision (file rev buffer) |
| 386 | (apply 'vc-do-command | 386 | (apply 'vc-do-command |
| 387 | buffer 0 "co" (vc-name file) | 387 | buffer 0 "co" (vc-name file) |
| 388 | "-q" ;; suppress diagnostic output | 388 | "-q" ;; suppress diagnostic output |
| @@ -421,7 +421,7 @@ whether to remove it." | |||
| 421 | (if (stringp rev) | 421 | (if (stringp rev) |
| 422 | ;; a literal revision was specified | 422 | ;; a literal revision was specified |
| 423 | (concat "-r" rev) | 423 | (concat "-r" rev) |
| 424 | (let ((workrev (vc-workfile-version file))) | 424 | (let ((workrev (vc-working-revision file))) |
| 425 | (if workrev | 425 | (if workrev |
| 426 | (concat "-r" | 426 | (concat "-r" |
| 427 | (if (not rev) | 427 | (if (not rev) |
| @@ -441,7 +441,7 @@ whether to remove it." | |||
| 441 | (with-current-buffer "*vc*" | 441 | (with-current-buffer "*vc*" |
| 442 | (setq new-version | 442 | (setq new-version |
| 443 | (vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1))) | 443 | (vc-parse-buffer "^revision \\([0-9.]+\\).*\n" 1))) |
| 444 | (vc-file-setprop file 'vc-workfile-version new-version) | 444 | (vc-file-setprop file 'vc-working-revision new-version) |
| 445 | ;; if necessary, adjust the default branch | 445 | ;; if necessary, adjust the default branch |
| 446 | (and rev (not (string= rev "")) | 446 | (and rev (not (string= rev "")) |
| 447 | (vc-rcs-set-default-branch | 447 | (vc-rcs-set-default-branch |
| @@ -457,7 +457,7 @@ whether to remove it." | |||
| 457 | (if (not files) | 457 | (if (not files) |
| 458 | (error "RCS backend doesn't support directory-level rollback.")) | 458 | (error "RCS backend doesn't support directory-level rollback.")) |
| 459 | (dolist (file files) | 459 | (dolist (file files) |
| 460 | (let* ((discard (vc-workfile-version file)) | 460 | (let* ((discard (vc-working-revision file)) |
| 461 | (previous (if (vc-trunk-p discard) "" (vc-branch-part discard))) | 461 | (previous (if (vc-trunk-p discard) "" (vc-branch-part discard))) |
| 462 | (config (current-window-configuration)) | 462 | (config (current-window-configuration)) |
| 463 | (done nil)) | 463 | (done nil)) |
| @@ -492,7 +492,7 @@ whether to remove it." | |||
| 492 | "Revert FILE to the version it was based on." | 492 | "Revert FILE to the version it was based on." |
| 493 | (vc-do-command nil 0 "co" (vc-name file) "-f" | 493 | (vc-do-command nil 0 "co" (vc-name file) "-f" |
| 494 | (concat (if (eq (vc-state file) 'edited) "-u" "-r") | 494 | (concat (if (eq (vc-state file) 'edited) "-u" "-r") |
| 495 | (vc-workfile-version file)))) | 495 | (vc-working-revision file)))) |
| 496 | 496 | ||
| 497 | (defun vc-rcs-merge (file first-version &optional second-version) | 497 | (defun vc-rcs-merge (file first-version &optional second-version) |
| 498 | "Merge changes into current working copy of FILE. | 498 | "Merge changes into current working copy of FILE. |
| @@ -811,11 +811,11 @@ to its master version." | |||
| 811 | (or value | 811 | (or value |
| 812 | (vc-branch-part branch)))) | 812 | (vc-branch-part branch)))) |
| 813 | 813 | ||
| 814 | (defun vc-rcs-fetch-master-state (file &optional workfile-version) | 814 | (defun vc-rcs-fetch-master-state (file &optional working-revision) |
| 815 | "Compute the master file's idea of the state of FILE. | 815 | "Compute the master file's idea of the state of FILE. |
| 816 | If a WORKFILE-VERSION is given, compute the state of that version, | 816 | If a WORKFILE-VERSION is given, compute the state of that version, |
| 817 | otherwise determine the workfile version based on the master file. | 817 | otherwise determine the workfile version based on the master file. |
| 818 | This function sets the properties `vc-workfile-version' and | 818 | This function sets the properties `vc-working-revision' and |
| 819 | `vc-checkout-model' to their correct values, based on the master | 819 | `vc-checkout-model' to their correct values, based on the master |
| 820 | file." | 820 | file." |
| 821 | (with-temp-buffer | 821 | (with-temp-buffer |
| @@ -826,7 +826,7 @@ file." | |||
| 826 | (let ((workfile-is-latest nil) | 826 | (let ((workfile-is-latest nil) |
| 827 | (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) | 827 | (default-branch (vc-parse-buffer "^branch[ \t\n]+\\([^;]*\\);" 1))) |
| 828 | (vc-file-setprop file 'vc-rcs-default-branch default-branch) | 828 | (vc-file-setprop file 'vc-rcs-default-branch default-branch) |
| 829 | (unless workfile-version | 829 | (unless working-revision |
| 830 | ;; Workfile version not known yet. Determine that first. It | 830 | ;; Workfile version not known yet. Determine that first. It |
| 831 | ;; is either the head of the trunk, the head of the default | 831 | ;; is either the head of the trunk, the head of the default |
| 832 | ;; branch, or the "default branch" itself, if that is a full | 832 | ;; branch, or the "default branch" itself, if that is a full |
| @@ -834,19 +834,19 @@ file." | |||
| 834 | (cond | 834 | (cond |
| 835 | ;; no default branch | 835 | ;; no default branch |
| 836 | ((or (not default-branch) (string= "" default-branch)) | 836 | ((or (not default-branch) (string= "" default-branch)) |
| 837 | (setq workfile-version | 837 | (setq working-revision |
| 838 | (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) | 838 | (vc-parse-buffer "^head[ \t\n]+\\([^;]+\\);" 1)) |
| 839 | (setq workfile-is-latest t)) | 839 | (setq workfile-is-latest t)) |
| 840 | ;; default branch is actually a revision | 840 | ;; default branch is actually a revision |
| 841 | ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" | 841 | ((string-match "^[0-9]+\\.[0-9]+\\(\\.[0-9]+\\.[0-9]+\\)*$" |
| 842 | default-branch) | 842 | default-branch) |
| 843 | (setq workfile-version default-branch)) | 843 | (setq working-revision default-branch)) |
| 844 | ;; else, search for the head of the default branch | 844 | ;; else, search for the head of the default branch |
| 845 | (t (vc-insert-file (vc-name file) "^desc") | 845 | (t (vc-insert-file (vc-name file) "^desc") |
| 846 | (setq workfile-version | 846 | (setq working-revision |
| 847 | (vc-rcs-find-most-recent-rev default-branch)) | 847 | (vc-rcs-find-most-recent-rev default-branch)) |
| 848 | (setq workfile-is-latest t))) | 848 | (setq workfile-is-latest t))) |
| 849 | (vc-file-setprop file 'vc-workfile-version workfile-version)) | 849 | (vc-file-setprop file 'vc-working-revision working-revision)) |
| 850 | ;; Check strict locking | 850 | ;; Check strict locking |
| 851 | (goto-char (point-min)) | 851 | (goto-char (point-min)) |
| 852 | (vc-file-setprop file 'vc-checkout-model | 852 | (vc-file-setprop file 'vc-checkout-model |
| @@ -856,14 +856,14 @@ file." | |||
| 856 | (goto-char (point-min)) | 856 | (goto-char (point-min)) |
| 857 | (let ((locking-user | 857 | (let ((locking-user |
| 858 | (vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):" | 858 | (vc-parse-buffer (concat "^locks[ \t\n]+[^;]*[ \t\n]+\\([^:]+\\):" |
| 859 | (regexp-quote workfile-version) | 859 | (regexp-quote working-revision) |
| 860 | "[^0-9.]") | 860 | "[^0-9.]") |
| 861 | 1))) | 861 | 1))) |
| 862 | (cond | 862 | (cond |
| 863 | ;; not locked | 863 | ;; not locked |
| 864 | ((not locking-user) | 864 | ((not locking-user) |
| 865 | (if (or workfile-is-latest | 865 | (if (or workfile-is-latest |
| 866 | (vc-rcs-latest-on-branch-p file workfile-version)) | 866 | (vc-rcs-latest-on-branch-p file working-revision)) |
| 867 | ;; workfile version is latest on branch | 867 | ;; workfile version is latest on branch |
| 868 | 'up-to-date | 868 | 'up-to-date |
| 869 | ;; workfile version is not latest on branch | 869 | ;; workfile version is not latest on branch |
| @@ -873,7 +873,7 @@ file." | |||
| 873 | (string= locking-user (vc-user-login-name file))) | 873 | (string= locking-user (vc-user-login-name file))) |
| 874 | (if (or (eq (vc-checkout-model file) 'locking) | 874 | (if (or (eq (vc-checkout-model file) 'locking) |
| 875 | workfile-is-latest | 875 | workfile-is-latest |
| 876 | (vc-rcs-latest-on-branch-p file workfile-version)) | 876 | (vc-rcs-latest-on-branch-p file working-revision)) |
| 877 | 'edited | 877 | 'edited |
| 878 | ;; Locking is not used for the file, but the owner does | 878 | ;; Locking is not used for the file, but the owner does |
| 879 | ;; have a lock, and there is a higher version on the current | 879 | ;; have a lock, and there is a higher version on the current |
| @@ -954,7 +954,7 @@ Returns: nil if no headers were found | |||
| 954 | ;; else: nothing found | 954 | ;; else: nothing found |
| 955 | ;; ------------------- | 955 | ;; ------------------- |
| 956 | (t nil))) | 956 | (t nil))) |
| 957 | (if status (vc-file-setprop file 'vc-workfile-version version)) | 957 | (if status (vc-file-setprop file 'vc-working-revision version)) |
| 958 | (and (eq status 'rev-and-lock) | 958 | (and (eq status 'rev-and-lock) |
| 959 | (vc-file-setprop file 'vc-state | 959 | (vc-file-setprop file 'vc-state |
| 960 | (cond | 960 | (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'." | |||
| 111 | (with-temp-buffer | 111 | (with-temp-buffer |
| 112 | (if (vc-insert-file (vc-sccs-lock-file file)) | 112 | (if (vc-insert-file (vc-sccs-lock-file file)) |
| 113 | (let* ((locks (vc-sccs-parse-locks)) | 113 | (let* ((locks (vc-sccs-parse-locks)) |
| 114 | (workfile-version (vc-workfile-version file)) | 114 | (working-revision (vc-working-revision file)) |
| 115 | (locking-user (cdr (assoc workfile-version locks)))) | 115 | (locking-user (cdr (assoc working-revision locks)))) |
| 116 | (if (not locking-user) | 116 | (if (not locking-user) |
| 117 | (if (vc-workfile-unchanged-p file) | 117 | (if (vc-workfile-unchanged-p file) |
| 118 | 'up-to-date | 118 | 'up-to-date |
| @@ -145,8 +145,8 @@ For a description of possible values, see `vc-check-master-templates'." | |||
| 145 | (vc-sccs-state file)))) | 145 | (vc-sccs-state file)))) |
| 146 | (vc-sccs-state file))) | 146 | (vc-sccs-state file))) |
| 147 | 147 | ||
| 148 | (defun vc-sccs-workfile-version (file) | 148 | (defun vc-sccs-working-revision (file) |
| 149 | "SCCS-specific version of `vc-workfile-version'." | 149 | "SCCS-specific version of `vc-working-revision'." |
| 150 | (with-temp-buffer | 150 | (with-temp-buffer |
| 151 | ;; The workfile version is always the latest version number. | 151 | ;; The workfile version is always the latest version number. |
| 152 | ;; To find this number, search the entire delta table, | 152 | ;; To find this number, search the entire delta table, |
| @@ -163,7 +163,7 @@ For a description of possible values, see `vc-check-master-templates'." | |||
| 163 | "SCCS-specific implementation of `vc-workfile-unchanged-p'." | 163 | "SCCS-specific implementation of `vc-workfile-unchanged-p'." |
| 164 | (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) | 164 | (zerop (apply 'vc-do-command nil 1 "vcdiff" (vc-name file) |
| 165 | (list "--brief" "-q" | 165 | (list "--brief" "-q" |
| 166 | (concat "-r" (vc-workfile-version file)))))) | 166 | (concat "-r" (vc-working-revision file)))))) |
| 167 | 167 | ||
| 168 | 168 | ||
| 169 | ;;; | 169 | ;;; |
| @@ -219,7 +219,7 @@ expanded if `vc-keep-workfiles' is non-nil, otherwise, delete the workfile." | |||
| 219 | (if vc-keep-workfiles | 219 | (if vc-keep-workfiles |
| 220 | (vc-do-command nil 0 "get" (vc-name file))))) | 220 | (vc-do-command nil 0 "get" (vc-name file))))) |
| 221 | 221 | ||
| 222 | (defun vc-sccs-find-version (file rev buffer) | 222 | (defun vc-sccs-find-revision (file rev buffer) |
| 223 | (apply 'vc-do-command | 223 | (apply 'vc-do-command |
| 224 | buffer 0 "get" (vc-name file) | 224 | buffer 0 "get" (vc-name file) |
| 225 | "-s" ;; suppress diagnostic output | 225 | "-s" ;; suppress diagnostic output |
| @@ -263,7 +263,7 @@ locked. REV is the revision to check out." | |||
| 263 | (if (not files) | 263 | (if (not files) |
| 264 | (error "SCCS backend doesn't support directory-level rollback.")) | 264 | (error "SCCS backend doesn't support directory-level rollback.")) |
| 265 | (dolist (file files) | 265 | (dolist (file files) |
| 266 | (let ((discard (vc-workfile-version file))) | 266 | (let ((discard (vc-working-revision file))) |
| 267 | (if (null (yes-or-no-p (format "Remove version %s from %s history? " | 267 | (if (null (yes-or-no-p (format "Remove version %s from %s history? " |
| 268 | discard file))) | 268 | discard file))) |
| 269 | (error "Aborted")) | 269 | (error "Aborted")) |
| @@ -277,8 +277,8 @@ locked. REV is the revision to check out." | |||
| 277 | (vc-do-command nil 0 "get" (vc-name file)) | 277 | (vc-do-command nil 0 "get" (vc-name file)) |
| 278 | ;; Checking out explicit versions is not supported under SCCS, yet. | 278 | ;; Checking out explicit versions is not supported under SCCS, yet. |
| 279 | ;; We always "revert" to the latest version; therefore | 279 | ;; We always "revert" to the latest version; therefore |
| 280 | ;; vc-workfile-version is cleared here so that it gets recomputed. | 280 | ;; vc-working-revision is cleared here so that it gets recomputed. |
| 281 | (vc-file-setprop file 'vc-workfile-version nil)) | 281 | (vc-file-setprop file 'vc-working-revision nil)) |
| 282 | 282 | ||
| 283 | (defun vc-sccs-steal-lock (file &optional rev) | 283 | (defun vc-sccs-steal-lock (file &optional rev) |
| 284 | "Steal the lock on the current workfile for FILE and revision REV." | 284 | "Steal the lock on the current workfile for FILE and revision REV." |
| @@ -323,7 +323,7 @@ locked. REV is the revision to check out." | |||
| 323 | 323 | ||
| 324 | (defun vc-sccs-assign-name (file name) | 324 | (defun vc-sccs-assign-name (file name) |
| 325 | "Assign to FILE's latest version a given NAME." | 325 | "Assign to FILE's latest version a given NAME." |
| 326 | (vc-sccs-add-triple name file (vc-workfile-version file))) | 326 | (vc-sccs-add-triple name file (vc-working-revision file))) |
| 327 | 327 | ||
| 328 | 328 | ||
| 329 | ;;; | 329 | ;;; |
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." | |||
| 160 | (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) | 160 | (vc-svn-command t 0 nil "status" (if localp "-v" "-u")) |
| 161 | (vc-svn-parse-status)))) | 161 | (vc-svn-parse-status)))) |
| 162 | 162 | ||
| 163 | (defun vc-svn-workfile-version (file) | 163 | (defun vc-svn-working-revision (file) |
| 164 | "SVN-specific version of `vc-workfile-version'." | 164 | "SVN-specific version of `vc-working-revision'." |
| 165 | ;; There is no need to consult RCS headers under SVN, because we | 165 | ;; There is no need to consult RCS headers under SVN, because we |
| 166 | ;; get the workfile version for free when we recognize that a file | 166 | ;; get the workfile version for free when we recognize that a file |
| 167 | ;; is registered in SVN. | 167 | ;; is registered in SVN. |
| 168 | (vc-svn-registered file) | 168 | (vc-svn-registered file) |
| 169 | (vc-file-getprop file 'vc-workfile-version)) | 169 | (vc-file-getprop file 'vc-working-revision)) |
| 170 | 170 | ||
| 171 | (defun vc-svn-checkout-model (file) | 171 | (defun vc-svn-checkout-model (file) |
| 172 | "SVN-specific version of `vc-checkout-model'." | 172 | "SVN-specific version of `vc-checkout-model'." |
| @@ -180,7 +180,7 @@ If you want to force an empty list of arguments, use t." | |||
| 180 | "SVN-specific version of `vc-dired-state-info'." | 180 | "SVN-specific version of `vc-dired-state-info'." |
| 181 | (let ((svn-state (vc-state file))) | 181 | (let ((svn-state (vc-state file))) |
| 182 | (cond ((eq svn-state 'edited) | 182 | (cond ((eq svn-state 'edited) |
| 183 | (if (equal (vc-workfile-version file) "0") | 183 | (if (equal (vc-working-revision file) "0") |
| 184 | "(added)" "(modified)")) | 184 | "(added)" "(modified)")) |
| 185 | ((eq svn-state 'needs-patch) "(patch)") | 185 | ((eq svn-state 'needs-patch) "(patch)") |
| 186 | ((eq svn-state 'needs-merge) "(merge)")))) | 186 | ((eq svn-state 'needs-merge) "(merge)")))) |
| @@ -198,7 +198,7 @@ If you want to force an empty list of arguments, use t." | |||
| 198 | ;; this check prevents a "no such revision: R+1" error. Otherwise, it | 198 | ;; this check prevents a "no such revision: R+1" error. Otherwise, it |
| 199 | ;; inhibits showing of W+1 through R, which could be considered anywhere | 199 | ;; inhibits showing of W+1 through R, which could be considered anywhere |
| 200 | ;; from gracious to impolite. | 200 | ;; from gracious to impolite. |
| 201 | (unless (< (string-to-number (vc-file-getprop file 'vc-workfile-version)) | 201 | (unless (< (string-to-number (vc-file-getprop file 'vc-working-revision)) |
| 202 | newrev) | 202 | newrev) |
| 203 | (number-to-string newrev)))) | 203 | (number-to-string newrev)))) |
| 204 | 204 | ||
| @@ -256,11 +256,11 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 256 | (error "Check-in failed")))) | 256 | (error "Check-in failed")))) |
| 257 | ;; Update file properties | 257 | ;; Update file properties |
| 258 | ;; (vc-file-setprop | 258 | ;; (vc-file-setprop |
| 259 | ;; file 'vc-workfile-version | 259 | ;; file 'vc-working-revision |
| 260 | ;; (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) | 260 | ;; (vc-parse-buffer "^\\(new\\|initial\\) revision: \\([0-9.]+\\)" 2)) |
| 261 | )) | 261 | )) |
| 262 | 262 | ||
| 263 | (defun vc-svn-find-version (file rev buffer) | 263 | (defun vc-svn-find-revision (file rev buffer) |
| 264 | "SVN-specific retrieval of a specified version into a buffer." | 264 | "SVN-specific retrieval of a specified version into a buffer." |
| 265 | (apply 'vc-svn-command | 265 | (apply 'vc-svn-command |
| 266 | buffer 0 file | 266 | buffer 0 file |
| @@ -281,7 +281,7 @@ This is only possible if SVN is responsible for FILE's directory.") | |||
| 281 | ;; If no revision was specified, there's nothing to do. | 281 | ;; If no revision was specified, there's nothing to do. |
| 282 | nil | 282 | nil |
| 283 | ;; Check out a particular version (or recreate the file). | 283 | ;; Check out a particular version (or recreate the file). |
| 284 | (vc-file-setprop file 'vc-workfile-version nil) | 284 | (vc-file-setprop file 'vc-working-revision nil) |
| 285 | (apply 'vc-svn-command nil 0 file | 285 | (apply 'vc-svn-command nil 0 file |
| 286 | "update" | 286 | "update" |
| 287 | ;; default for verbose checkout: clear the sticky tag so | 287 | ;; default for verbose checkout: clear the sticky tag so |
| @@ -321,7 +321,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 321 | (defun vc-svn-merge-news (file) | 321 | (defun vc-svn-merge-news (file) |
| 322 | "Merge in any new changes made to FILE." | 322 | "Merge in any new changes made to FILE." |
| 323 | (message "Merging changes into %s..." file) | 323 | (message "Merging changes into %s..." file) |
| 324 | ;; (vc-file-setprop file 'vc-workfile-version nil) | 324 | ;; (vc-file-setprop file 'vc-working-revision nil) |
| 325 | (vc-file-setprop file 'vc-checkout-time 0) | 325 | (vc-file-setprop file 'vc-checkout-time 0) |
| 326 | (vc-svn-command nil 0 file "update") | 326 | (vc-svn-command nil 0 file "update") |
| 327 | ;; Analyze the merge result reported by SVN, and set | 327 | ;; Analyze the merge result reported by SVN, and set |
| @@ -331,8 +331,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 331 | ;; get new workfile version | 331 | ;; get new workfile version |
| 332 | (if (re-search-forward | 332 | (if (re-search-forward |
| 333 | "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) | 333 | "^\\(Updated to\\|At\\) revision \\([0-9]+\\)" nil t) |
| 334 | (vc-file-setprop file 'vc-workfile-version (match-string 2)) | 334 | (vc-file-setprop file 'vc-working-revision (match-string 2)) |
| 335 | (vc-file-setprop file 'vc-workfile-version nil)) | 335 | (vc-file-setprop file 'vc-working-revision nil)) |
| 336 | ;; get file status | 336 | ;; get file status |
| 337 | (goto-char (point-min)) | 337 | (goto-char (point-min)) |
| 338 | (prog1 | 338 | (prog1 |
| @@ -408,7 +408,7 @@ The changes are between FIRST-VERSION and SECOND-VERSION." | |||
| 408 | (and oldvers | 408 | (and oldvers |
| 409 | (catch 'no | 409 | (catch 'no |
| 410 | (dolist (f files) | 410 | (dolist (f files) |
| 411 | (or (equal oldvers (vc-workfile-version f)) | 411 | (or (equal oldvers (vc-working-revision f)) |
| 412 | (throw 'no nil))) | 412 | (throw 'no nil))) |
| 413 | t) | 413 | t) |
| 414 | ;; Use nil rather than the current revision because svn handles | 414 | ;; Use nil rather than the current revision because svn handles |
| @@ -566,7 +566,7 @@ information about FILENAME and return its status." | |||
| 566 | (unless filename (vc-file-setprop file 'vc-backend 'SVN)) | 566 | (unless filename (vc-file-setprop file 'vc-backend 'SVN)) |
| 567 | ;; Use the last-modified revision, so that searching in vc-print-log | 567 | ;; Use the last-modified revision, so that searching in vc-print-log |
| 568 | ;; output works. | 568 | ;; output works. |
| 569 | (vc-file-setprop file 'vc-workfile-version (match-string 3)) | 569 | (vc-file-setprop file 'vc-working-revision (match-string 3)) |
| 570 | ;; Remember Svn's own status. | 570 | ;; Remember Svn's own status. |
| 571 | (vc-file-setprop file 'vc-svn-status status) | 571 | (vc-file-setprop file 'vc-svn-status status) |
| 572 | (vc-file-setprop | 572 | (vc-file-setprop |
| @@ -580,7 +580,7 @@ information about FILENAME and return its status." | |||
| 580 | 'up-to-date)) | 580 | 'up-to-date)) |
| 581 | ((eq status ?A) | 581 | ((eq status ?A) |
| 582 | ;; If the file was actually copied, (match-string 2) is "-". | 582 | ;; If the file was actually copied, (match-string 2) is "-". |
| 583 | (vc-file-setprop file 'vc-workfile-version "0") | 583 | (vc-file-setprop file 'vc-working-revision "0") |
| 584 | (vc-file-setprop file 'vc-checkout-time 0) | 584 | (vc-file-setprop file 'vc-checkout-time 0) |
| 585 | 'edited) | 585 | 'edited) |
| 586 | ((memq status '(?M ?C)) | 586 | ((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 @@ | |||
| 7 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 7 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 8 | ;; Keywords: tools | 8 | ;; Keywords: tools |
| 9 | 9 | ||
| 10 | ;; $Id: vc.el,v 1.139 2007/10/10 13:14:41 esr Exp $ | 10 | ;; $Id$ |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| 13 | 13 | ||
| @@ -110,7 +110,7 @@ | |||
| 110 | ;; VC keeps some per-file information in the form of properties (see | 110 | ;; VC keeps some per-file information in the form of properties (see |
| 111 | ;; vc-file-set/getprop in vc-hooks.el). The backend-specific functions | 111 | ;; vc-file-set/getprop in vc-hooks.el). The backend-specific functions |
| 112 | ;; do not generally need to be aware of these properties. For example, | 112 | ;; do not generally need to be aware of these properties. For example, |
| 113 | ;; `vc-sys-workfile-version' should compute the focus version and | 113 | ;; `vc-sys-working-revision' should compute the working revision and |
| 114 | ;; return it; it should not look it up in the property, and it needn't | 114 | ;; return it; it should not look it up in the property, and it needn't |
| 115 | ;; store it there either. However, if a backend-specific function does | 115 | ;; store it there either. However, if a backend-specific function does |
| 116 | ;; store a value in a property, that value takes precedence over any | 116 | ;; store a value in a property, that value takes precedence over any |
| @@ -164,19 +164,19 @@ | |||
| 164 | ;; anything, but rather store the files' states into the corresponding | 164 | ;; anything, but rather store the files' states into the corresponding |
| 165 | ;; `vc-state' properties. | 165 | ;; `vc-state' properties. |
| 166 | ;; | 166 | ;; |
| 167 | ;; * workfile-version (file) | 167 | ;; * working-revision (file) |
| 168 | ;; | 168 | ;; |
| 169 | ;; Return the current focus version of FILE. This is the version fetched | 169 | ;; Return the working revision of FILE. This is the revision fetched |
| 170 | ;; by the last checkout or upate, not necessarily the same thing as the | 170 | ;; by the last checkout or upate, not necessarily the same thing as the |
| 171 | ;; head or tip version. Should return "0" for a file added but not yet | 171 | ;; head or tip revision. Should return "0" for a file added but not yet |
| 172 | ;; committed. | 172 | ;; committed. |
| 173 | ;; | 173 | ;; |
| 174 | ;; - latest-on-branch-p (file) | 174 | ;; - latest-on-branch-p (file) |
| 175 | ;; | 175 | ;; |
| 176 | ;; Return non-nil if the focus version of FILE is the latest version | 176 | ;; Return non-nil if the working revision of FILE is the latest revision |
| 177 | ;; on its branch (many VCSes call this the 'tip' or 'head' version). | 177 | ;; on its branch (many VCSes call this the 'tip' or 'head' revision). |
| 178 | ;; The default implementation always returns t, which means that | 178 | ;; The default implementation always returns t, which means that |
| 179 | ;; working with non-current versions is not supported by default. | 179 | ;; working with non-current revisions is not supported by default. |
| 180 | ;; | 180 | ;; |
| 181 | ;; * checkout-model (file) | 181 | ;; * checkout-model (file) |
| 182 | ;; | 182 | ;; |
| @@ -185,13 +185,13 @@ | |||
| 185 | ;; | 185 | ;; |
| 186 | ;; - workfile-unchanged-p (file) | 186 | ;; - workfile-unchanged-p (file) |
| 187 | ;; | 187 | ;; |
| 188 | ;; Return non-nil if FILE is unchanged from the focus version. This | 188 | ;; Return non-nil if FILE is unchanged from the working revision. |
| 189 | ;; function should do a brief comparison of FILE's contents with | 189 | ;; This function should do a brief comparison of FILE's contents |
| 190 | ;; those of the repository version. If the backend does not have | 190 | ;; with those of the repository master of the working revision. If |
| 191 | ;; such a brief-comparison feature, the default implementation of | 191 | ;; the backend does not have such a brief-comparison feature, the |
| 192 | ;; this function can be used, which delegates to a full | 192 | ;; default implementation of this function can be used, which |
| 193 | ;; vc-BACKEND-diff. (Note that vc-BACKEND-diff must not run | 193 | ;; delegates to a full vc-BACKEND-diff. (Note that vc-BACKEND-diff |
| 194 | ;; asynchronously in this case, see variable | 194 | ;; must not run asynchronously in this case, see variable |
| 195 | ;; `vc-disable-async-diff'.) | 195 | ;; `vc-disable-async-diff'.) |
| 196 | ;; | 196 | ;; |
| 197 | ;; - mode-line-string (file) | 197 | ;; - mode-line-string (file) |
| @@ -226,11 +226,11 @@ | |||
| 226 | ;; to the backend command. (Note: in older versions of VC, this | 226 | ;; to the backend command. (Note: in older versions of VC, this |
| 227 | ;; command took a single file argument and not a list.) | 227 | ;; command took a single file argument and not a list.) |
| 228 | ;; | 228 | ;; |
| 229 | ;; - init-version (file) | 229 | ;; - init-revision (file) |
| 230 | ;; | 230 | ;; |
| 231 | ;; The initial version to use when registering FILE if one is not | 231 | ;; The initial revision to use when registering FILE if one is not |
| 232 | ;; specified by the user. If not provided, the variable | 232 | ;; specified by the user. If not provided, the variable |
| 233 | ;; vc-default-init-version is used instead. | 233 | ;; vc-default-init-revision is used instead. |
| 234 | ;; | 234 | ;; |
| 235 | ;; - responsible-p (file) | 235 | ;; - responsible-p (file) |
| 236 | ;; | 236 | ;; |
| @@ -267,7 +267,7 @@ | |||
| 267 | ;; the backend command. (Note: in older versions of VC, this | 267 | ;; the backend command. (Note: in older versions of VC, this |
| 268 | ;; command took a single file argument and not a list.) | 268 | ;; command took a single file argument and not a list.) |
| 269 | ;; | 269 | ;; |
| 270 | ;; * find-version (file rev buffer) | 270 | ;; * find-revision (file rev buffer) |
| 271 | ;; | 271 | ;; |
| 272 | ;; Fetch revision REV of file FILE and put it into BUFFER. | 272 | ;; Fetch revision REV of file FILE and put it into BUFFER. |
| 273 | ;; If REV is the empty string, fetch the head of the trunk. | 273 | ;; If REV is the empty string, fetch the head of the trunk. |
| @@ -279,7 +279,7 @@ | |||
| 279 | ;; Check out revision REV of FILE into the working area. If EDITABLE | 279 | ;; Check out revision REV of FILE into the working area. If EDITABLE |
| 280 | ;; is non-nil, FILE should be writable by the user and if locking is | 280 | ;; is non-nil, FILE should be writable by the user and if locking is |
| 281 | ;; used for FILE, a lock should also be set. If REV is non-nil, that | 281 | ;; used for FILE, a lock should also be set. If REV is non-nil, that |
| 282 | ;; is the revision to check out (default is the focus version). | 282 | ;; is the revision to check out (default is the working revision). |
| 283 | ;; If REV is t, that means to check out the head of the current branch; | 283 | ;; If REV is t, that means to check out the head of the current branch; |
| 284 | ;; if it is the empty string, check out the head of the trunk. | 284 | ;; if it is the empty string, check out the head of the trunk. |
| 285 | ;; The implementation should pass the value of vc-checkout-switches | 285 | ;; The implementation should pass the value of vc-checkout-switches |
| @@ -287,15 +287,15 @@ | |||
| 287 | ;; | 287 | ;; |
| 288 | ;; * revert (file &optional contents-done) | 288 | ;; * revert (file &optional contents-done) |
| 289 | ;; | 289 | ;; |
| 290 | ;; Revert FILE back to the current focus version. If optional | 290 | ;; Revert FILE back to the working revision. If optional |
| 291 | ;; arg CONTENTS-DONE is non-nil, then the contents of FILE have | 291 | ;; arg CONTENTS-DONE is non-nil, then the contents of FILE have |
| 292 | ;; already been reverted from a version backup, and this function | 292 | ;; already been reverted from a version backup, and this function |
| 293 | ;; only needs to update the status of FILE within the backend. | 293 | ;; only needs to update the status of FILE within the backend. |
| 294 | ;; | 294 | ;; |
| 295 | ;; - rollback (files) | 295 | ;; - rollback (files) |
| 296 | ;; | 296 | ;; |
| 297 | ;; Remove the tip version of each of FILES from the repository. If | 297 | ;; Remove the tip revision of each of FILES from the repository. If |
| 298 | ;; this function is not provided, trying to cancel a version is | 298 | ;; this function is not provided, trying to cancel a revision is |
| 299 | ;; caught as an error. (Most backends don't provide it.) (Also | 299 | ;; caught as an error. (Most backends don't provide it.) (Also |
| 300 | ;; note that older versions of this backend command were called | 300 | ;; note that older versions of this backend command were called |
| 301 | ;; 'cancel-version' and took a single file arg, not a list of | 301 | ;; 'cancel-version' and took a single file arg, not a list of |
| @@ -309,9 +309,9 @@ | |||
| 309 | ;; | 309 | ;; |
| 310 | ;; Merge recent changes from the current branch into FILE. | 310 | ;; Merge recent changes from the current branch into FILE. |
| 311 | ;; | 311 | ;; |
| 312 | ;; - steal-lock (file &optional version) | 312 | ;; - steal-lock (file &optional revision) |
| 313 | ;; | 313 | ;; |
| 314 | ;; Steal any lock on the focus version of FILE, or on VERSION if | 314 | ;; Steal any lock on the working revision of FILE, or on REVISION if |
| 315 | ;; that is provided. This function is only needed if locking is | 315 | ;; that is provided. This function is only needed if locking is |
| 316 | ;; used for files under this backend, and if files can indeed be | 316 | ;; used for files under this backend, and if files can indeed be |
| 317 | ;; locked by other users. | 317 | ;; locked by other users. |
| @@ -330,9 +330,9 @@ | |||
| 330 | ;; `log-view-mode' and is expected to be changed (if at all) to a derived | 330 | ;; `log-view-mode' and is expected to be changed (if at all) to a derived |
| 331 | ;; mode of `log-view-mode'. | 331 | ;; mode of `log-view-mode'. |
| 332 | ;; | 332 | ;; |
| 333 | ;; - show-log-entry (version) | 333 | ;; - show-log-entry (revision) |
| 334 | ;; | 334 | ;; |
| 335 | ;; If provided, search the log entry for VERSION in the current buffer, | 335 | ;; If provided, search the log entry for REVISION in the current buffer, |
| 336 | ;; and make sure it is displayed in the buffer's window. The default | 336 | ;; and make sure it is displayed in the buffer's window. The default |
| 337 | ;; implementation of this function works for RCS-style logs. | 337 | ;; implementation of this function works for RCS-style logs. |
| 338 | ;; | 338 | ;; |
| @@ -366,13 +366,13 @@ | |||
| 366 | ;; | 366 | ;; |
| 367 | ;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if | 367 | ;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if |
| 368 | ;; BUFFER is nil. If REV1 and REV2 are non-nil, report differences | 368 | ;; BUFFER is nil. If REV1 and REV2 are non-nil, report differences |
| 369 | ;; from REV1 to REV2. If REV1 is nil, use the current focus | 369 | ;; from REV1 to REV2. If REV1 is nil, use the working revision (as |
| 370 | ;; version (as found in the repository) as the older version; if | 370 | ;; found in the repository) as the older revision; if REV2 is nil, |
| 371 | ;; REV2 is nil, use the current working-copy contents as the newer | 371 | ;; use the current working-copy contents as the newer revision. This |
| 372 | ;; version. This function should pass the value of (vc-switches | 372 | ;; function should pass the value of (vc-switches BACKEND 'diff) to |
| 373 | ;; BACKEND 'diff) to the backend command. It should return a status | 373 | ;; the backend command. It should return a status of either 0 (no |
| 374 | ;; of either 0 (no differences found), or 1 (either non-empty diff | 374 | ;; differences found), or 1 (either non-empty diff or the diff is |
| 375 | ;; or the diff is run asynchronously). | 375 | ;; run asynchronously). |
| 376 | ;; | 376 | ;; |
| 377 | ;; - revision-completion-table (file) | 377 | ;; - revision-completion-table (file) |
| 378 | ;; | 378 | ;; |
| @@ -389,7 +389,7 @@ | |||
| 389 | ;; - annotate-command (file buf &optional rev) | 389 | ;; - annotate-command (file buf &optional rev) |
| 390 | ;; | 390 | ;; |
| 391 | ;; If this function is provided, it should produce an annotated display | 391 | ;; If this function is provided, it should produce an annotated display |
| 392 | ;; of FILE in BUF, relative to version REV. Annotation means each line | 392 | ;; of FILE in BUF, relative to revision REV. Annotation means each line |
| 393 | ;; of FILE displayed is prefixed with version information associated with | 393 | ;; of FILE displayed is prefixed with version information associated with |
| 394 | ;; its addition (deleted lines leave no history) and that the text of the | 394 | ;; its addition (deleted lines leave no history) and that the text of the |
| 395 | ;; file is fontified according to age. | 395 | ;; file is fontified according to age. |
| @@ -437,7 +437,7 @@ | |||
| 437 | ;; | 437 | ;; |
| 438 | ;; - assign-name (file name) | 438 | ;; - assign-name (file name) |
| 439 | ;; | 439 | ;; |
| 440 | ;; Give name NAME to the current version of FILE, assuming it is | 440 | ;; Give name NAME to the working revision of FILE, assuming it is |
| 441 | ;; up-to-date. Only used by the default version of `create-snapshot'. | 441 | ;; up-to-date. Only used by the default version of `create-snapshot'. |
| 442 | ;; | 442 | ;; |
| 443 | ;; - retrieve-snapshot (dir name update) | 443 | ;; - retrieve-snapshot (dir name update) |
| @@ -447,13 +447,13 @@ | |||
| 447 | ;; snapshot that are currently visited. The default implementation | 447 | ;; snapshot that are currently visited. The default implementation |
| 448 | ;; does a sanity check whether there aren't any uncommitted changes at | 448 | ;; does a sanity check whether there aren't any uncommitted changes at |
| 449 | ;; or below DIR, and then performs a tree walk, using the `checkout' | 449 | ;; or below DIR, and then performs a tree walk, using the `checkout' |
| 450 | ;; function to retrieve the corresponding versions. | 450 | ;; function to retrieve the corresponding revisions. |
| 451 | ;; | 451 | ;; |
| 452 | ;; MISCELLANEOUS | 452 | ;; MISCELLANEOUS |
| 453 | ;; | 453 | ;; |
| 454 | ;; - make-version-backups-p (file) | 454 | ;; - make-version-backups-p (file) |
| 455 | ;; | 455 | ;; |
| 456 | ;; Return non-nil if unmodified repository versions of FILE should be | 456 | ;; Return non-nil if unmodified repository revisions of FILE should be |
| 457 | ;; backed up locally. If this is done, VC can perform `diff' and | 457 | ;; backed up locally. If this is done, VC can perform `diff' and |
| 458 | ;; `revert' operations itself, without calling the backend system. The | 458 | ;; `revert' operations itself, without calling the backend system. The |
| 459 | ;; default implementation always returns nil. | 459 | ;; default implementation always returns nil. |
| @@ -466,15 +466,15 @@ | |||
| 466 | ;; This function is used in `vc-stay-local-p' which backends can use | 466 | ;; This function is used in `vc-stay-local-p' which backends can use |
| 467 | ;; for their convenience. | 467 | ;; for their convenience. |
| 468 | ;; | 468 | ;; |
| 469 | ;; - previous-version (file rev) | 469 | ;; - previous-revision (file rev) |
| 470 | ;; | 470 | ;; |
| 471 | ;; Return the version number that precedes REV for FILE, or nil if no such | 471 | ;; Return the revision number that precedes REV for FILE, or nil if no such |
| 472 | ;; version exists. | 472 | ;; revision exists. |
| 473 | ;; | 473 | ;; |
| 474 | ;; - next-version (file rev) | 474 | ;; - next-revision (file rev) |
| 475 | ;; | 475 | ;; |
| 476 | ;; Return the version number that follows REV for FILE, or nil if no such | 476 | ;; Return the revision number that follows REV for FILE, or nil if no such |
| 477 | ;; version exists. | 477 | ;; revision exists. |
| 478 | ;; | 478 | ;; |
| 479 | ;; - check-headers () | 479 | ;; - check-headers () |
| 480 | ;; | 480 | ;; |
| @@ -559,8 +559,8 @@ preserve the setting." | |||
| 559 | :type 'boolean | 559 | :type 'boolean |
| 560 | :group 'vc) | 560 | :group 'vc) |
| 561 | 561 | ||
| 562 | (defcustom vc-default-init-version "1.1" | 562 | (defcustom vc-default-init-revision "1.1" |
| 563 | "A string used as the default version number when a new file is registered. | 563 | "A string used as the default revision number when a new file is registered. |
| 564 | This can be overridden by giving a prefix argument to \\[vc-register]. This | 564 | This can be overridden by giving a prefix argument to \\[vc-register]. This |
| 565 | can also be overridden by a particular VC backend." | 565 | can also be overridden by a particular VC backend." |
| 566 | :type 'string | 566 | :type 'string |
| @@ -778,9 +778,9 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." | |||
| 778 | (define-key m "D" 'vc-annotate-show-diff-revision-at-line) | 778 | (define-key m "D" 'vc-annotate-show-diff-revision-at-line) |
| 779 | (define-key m "J" 'vc-annotate-revision-at-line) | 779 | (define-key m "J" 'vc-annotate-revision-at-line) |
| 780 | (define-key m "L" 'vc-annotate-show-log-revision-at-line) | 780 | (define-key m "L" 'vc-annotate-show-log-revision-at-line) |
| 781 | (define-key m "N" 'vc-annotate-next-version) | 781 | (define-key m "N" 'vc-annotate-next-revision) |
| 782 | (define-key m "P" 'vc-annotate-prev-version) | 782 | (define-key m "P" 'vc-annotate-prev-revision) |
| 783 | (define-key m "W" 'vc-annotate-focus-version) | 783 | (define-key m "W" 'vc-annotate-working-revision) |
| 784 | m) | 784 | m) |
| 785 | "Local keymap used for VC-Annotate mode.") | 785 | "Local keymap used for VC-Annotate mode.") |
| 786 | 786 | ||
| @@ -838,7 +838,7 @@ Backends that offer asynchronous diffs should respect this variable | |||
| 838 | in their implementation of vc-BACKEND-diff.") | 838 | in their implementation of vc-BACKEND-diff.") |
| 839 | 839 | ||
| 840 | (defvar vc-log-fileset) | 840 | (defvar vc-log-fileset) |
| 841 | (defvar vc-log-version) | 841 | (defvar vc-log-revision) |
| 842 | 842 | ||
| 843 | (defvar vc-dired-mode nil) | 843 | (defvar vc-dired-mode nil) |
| 844 | (make-variable-buffer-local 'vc-dired-mode) | 844 | (make-variable-buffer-local 'vc-dired-mode) |
| @@ -1315,7 +1315,7 @@ Otherwise, throw an error. | |||
| 1315 | 1315 | ||
| 1316 | (defun vc-revert-buffer-internal (&optional arg no-confirm) | 1316 | (defun vc-revert-buffer-internal (&optional arg no-confirm) |
| 1317 | "Revert buffer, keeping point and mark where user expects them. | 1317 | "Revert buffer, keeping point and mark where user expects them. |
| 1318 | Try to be clever in the face of changes due to expanded version control | 1318 | Try to be clever in the face of changes due to expanded version-control |
| 1319 | key words. This is important for typeahead to work as expected. | 1319 | key words. This is important for typeahead to work as expected. |
| 1320 | ARG and NO-CONFIRM are passed on to `revert-buffer'." | 1320 | ARG and NO-CONFIRM are passed on to `revert-buffer'." |
| 1321 | (interactive "P") | 1321 | (interactive "P") |
| @@ -1381,7 +1381,7 @@ merge in the changes into your working copy." | |||
| 1381 | (backend (vc-backend (car files))) | 1381 | (backend (vc-backend (car files))) |
| 1382 | (state (vc-state (car files))) | 1382 | (state (vc-state (car files))) |
| 1383 | (model (vc-checkout-model (car files))) | 1383 | (model (vc-checkout-model (car files))) |
| 1384 | version) | 1384 | revision) |
| 1385 | ;; Verify that the fileset is homogenous | 1385 | ;; Verify that the fileset is homogenous |
| 1386 | (dolist (file (cdr files)) | 1386 | (dolist (file (cdr files)) |
| 1387 | (if (not (eq (vc-state file) state)) | 1387 | (if (not (eq (vc-state file) state)) |
| @@ -1416,17 +1416,17 @@ merge in the changes into your working copy." | |||
| 1416 | ;; Files aren't registered | 1416 | ;; Files aren't registered |
| 1417 | ((not state) | 1417 | ((not state) |
| 1418 | (mapc 'vc-register files)) | 1418 | (mapc 'vc-register files)) |
| 1419 | ;; Files are up-to-date, or need a merge and user specified a version | 1419 | ;; Files are up-to-date, or need a merge and user specified a revision |
| 1420 | ((or (eq state 'up-to-date) (and verbose (eq state 'needs-patch))) | 1420 | ((or (eq state 'up-to-date) (and verbose (eq state 'needs-patch))) |
| 1421 | (cond | 1421 | (cond |
| 1422 | (verbose | 1422 | (verbose |
| 1423 | ;; go to a different version | 1423 | ;; go to a different revision |
| 1424 | (setq version (read-string "Branch, version, or backend to move to: ")) | 1424 | (setq revision (read-string "Branch, revision, or backend to move to: ")) |
| 1425 | (let ((vsym (intern-soft (upcase version)))) | 1425 | (let ((vsym (intern-soft (upcase revision)))) |
| 1426 | (if (member vsym vc-handled-backends) | 1426 | (if (member vsym vc-handled-backends) |
| 1427 | (mapc (lambda (file) vc-transfer-file file vsym) files) | 1427 | (mapc (lambda (file) vc-transfer-file file vsym) files) |
| 1428 | (mapc (lambda (file) | 1428 | (mapc (lambda (file) |
| 1429 | (vc-checkout file (eq model 'implicit) version)))))) | 1429 | (vc-checkout file (eq model 'implicit) revision)))))) |
| 1430 | ((not (eq model 'implicit)) | 1430 | ((not (eq model 'implicit)) |
| 1431 | ;; check the files out | 1431 | ;; check the files out |
| 1432 | (mapc (lambda (file) (vc-checkout file t)) files)) | 1432 | (mapc (lambda (file) (vc-checkout file t)) files)) |
| @@ -1472,27 +1472,27 @@ merge in the changes into your working copy." | |||
| 1472 | (if (not verbose) | 1472 | (if (not verbose) |
| 1473 | (vc-checkin ready-for-commit) | 1473 | (vc-checkin ready-for-commit) |
| 1474 | (progn | 1474 | (progn |
| 1475 | (setq version (read-string "New version or backend: ")) | 1475 | (setq revision (read-string "New revision or backend: ")) |
| 1476 | (let ((vsym (intern (upcase version)))) | 1476 | (let ((vsym (intern (upcase revision)))) |
| 1477 | (if (member vsym vc-handled-backends) | 1477 | (if (member vsym vc-handled-backends) |
| 1478 | (vc-transfer-file file vsym) | 1478 | (vc-transfer-file file vsym) |
| 1479 | (vc-checkin ready-for-commit version)))))))) | 1479 | (vc-checkin ready-for-commit revision)))))))) |
| 1480 | ;; locked by somebody else (locking VCSes only) | 1480 | ;; locked by somebody else (locking VCSes only) |
| 1481 | ((stringp state) | 1481 | ((stringp state) |
| 1482 | (let ((version | 1482 | (let ((revision |
| 1483 | (if verbose | 1483 | (if verbose |
| 1484 | (read-string "Version to steal: ") | 1484 | (read-string "Revision to steal: ") |
| 1485 | (vc-workfile-version file)))) | 1485 | (vc-working-revision file)))) |
| 1486 | (mapc (lambda (file) (vc-steal-lock file version) state) files))) | 1486 | (mapc (lambda (file) (vc-steal-lock file revision) state) files))) |
| 1487 | ;; needs-patch | 1487 | ;; needs-patch |
| 1488 | ((eq state 'needs-patch) | 1488 | ((eq state 'needs-patch) |
| 1489 | (dolist (file files) | 1489 | (dolist (file files) |
| 1490 | (if (yes-or-no-p (format | 1490 | (if (yes-or-no-p (format |
| 1491 | "%s is not up-to-date. Get latest version? " | 1491 | "%s is not up-to-date. Get latest revision? " |
| 1492 | (file-name-nondirectory file))) | 1492 | (file-name-nondirectory file))) |
| 1493 | (vc-checkout file (eq model 'implicit) t) | 1493 | (vc-checkout file (eq model 'implicit) t) |
| 1494 | (if (and (not (eq model 'implicit)) | 1494 | (if (and (not (eq model 'implicit)) |
| 1495 | (yes-or-no-p "Lock this version? ")) | 1495 | (yes-or-no-p "Lock this revision? ")) |
| 1496 | (vc-checkout file t))))) | 1496 | (vc-checkout file t))))) |
| 1497 | ;; needs-merge | 1497 | ;; needs-merge |
| 1498 | ((eq state 'needs-merge) | 1498 | ((eq state 'needs-merge) |
| @@ -1510,7 +1510,7 @@ merge in the changes into your working copy." | |||
| 1510 | (if (save-window-excursion | 1510 | (if (save-window-excursion |
| 1511 | (vc-diff-internal | 1511 | (vc-diff-internal |
| 1512 | (vc-backend file) nil (list file) | 1512 | (vc-backend file) nil (list file) |
| 1513 | (vc-workfile-version file) nil) | 1513 | (vc-working-revision file) nil) |
| 1514 | (goto-char (point-min)) | 1514 | (goto-char (point-min)) |
| 1515 | (let ((inhibit-read-only t)) | 1515 | (let ((inhibit-read-only t)) |
| 1516 | (insert | 1516 | (insert |
| @@ -1526,7 +1526,7 @@ merge in the changes into your working copy." | |||
| 1526 | (write-file buffer-file-name) | 1526 | (write-file buffer-file-name) |
| 1527 | (vc-mode-line file)) | 1527 | (vc-mode-line file)) |
| 1528 | (if (not (yes-or-no-p | 1528 | (if (not (yes-or-no-p |
| 1529 | "Revert to checked-in version, instead? ")) | 1529 | "Revert to checked-in revision, instead? ")) |
| 1530 | (error "Checkout aborted") | 1530 | (error "Checkout aborted") |
| 1531 | (vc-revert-buffer-internal t t) | 1531 | (vc-revert-buffer-internal t t) |
| 1532 | (vc-checkout file t)))))))) | 1532 | (vc-checkout file t)))))))) |
| @@ -1544,9 +1544,9 @@ merge in the changes into your working copy." | |||
| 1544 | (vc-call-backend backend 'create-repo)) | 1544 | (vc-call-backend backend 'create-repo)) |
| 1545 | 1545 | ||
| 1546 | ;;;###autoload | 1546 | ;;;###autoload |
| 1547 | (defun vc-register (&optional set-version comment) | 1547 | (defun vc-register (&optional set-revision comment) |
| 1548 | "Register the current file into a version control system. | 1548 | "Register the current file into a version control system. |
| 1549 | With prefix argument SET-VERSION, allow user to specify initial version | 1549 | With prefix argument SET-REVISION, allow user to specify initial revision |
| 1550 | level. If COMMENT is present, use that as an initial comment. | 1550 | level. If COMMENT is present, use that as an initial comment. |
| 1551 | 1551 | ||
| 1552 | The version control system to use is found by cycling through the list | 1552 | 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." | |||
| 1571 | (vc-buffer-sync) | 1571 | (vc-buffer-sync) |
| 1572 | 1572 | ||
| 1573 | (vc-start-entry (list buffer-file-name) | 1573 | (vc-start-entry (list buffer-file-name) |
| 1574 | (if set-version | 1574 | (if set-revision |
| 1575 | (read-string (format "Initial version level for %s: " | 1575 | (read-string (format "Initial revision level for %s: " |
| 1576 | (buffer-name))) | 1576 | (buffer-name))) |
| 1577 | (vc-call-backend (vc-responsible-backend buffer-file-name) | 1577 | (vc-call-backend (vc-responsible-backend buffer-file-name) |
| 1578 | 'init-version)) | 1578 | 'init-revision)) |
| 1579 | (or comment (not vc-initial-comment)) | 1579 | (or comment (not vc-initial-comment)) |
| 1580 | nil | 1580 | nil |
| 1581 | "Enter initial comment." | 1581 | "Enter initial comment." |
| @@ -1666,7 +1666,7 @@ for vc-log-operation-hook." | |||
| 1666 | (if after-hook | 1666 | (if after-hook |
| 1667 | (setq vc-log-after-operation-hook after-hook)) | 1667 | (setq vc-log-after-operation-hook after-hook)) |
| 1668 | (setq vc-log-operation action) | 1668 | (setq vc-log-operation action) |
| 1669 | (setq vc-log-version rev) | 1669 | (setq vc-log-revision rev) |
| 1670 | (when comment | 1670 | (when comment |
| 1671 | (erase-buffer) | 1671 | (erase-buffer) |
| 1672 | (when (stringp comment) (insert comment))) | 1672 | (when (stringp comment) (insert comment))) |
| @@ -1734,7 +1734,7 @@ After check-out, runs the normal hook `vc-checkout-hook'." | |||
| 1734 | 1734 | ||
| 1735 | (defun vc-checkin (files &optional rev comment initial-contents) | 1735 | (defun vc-checkin (files &optional rev comment initial-contents) |
| 1736 | "Check in FILES. | 1736 | "Check in FILES. |
| 1737 | The optional argument REV may be a string specifying the new version | 1737 | The optional argument REV may be a string specifying the new revision |
| 1738 | level (if nil increment the current level). COMMENT is a comment | 1738 | level (if nil increment the current level). COMMENT is a comment |
| 1739 | string; if omitted, a buffer is popped up to accept a comment. If | 1739 | string; if omitted, a buffer is popped up to accept a comment. If |
| 1740 | INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents | 1740 | INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents |
| @@ -1762,7 +1762,7 @@ Runs the normal hook `vc-checkin-hook'." | |||
| 1762 | (mapc 'vc-delete-automatic-version-backups files)) | 1762 | (mapc 'vc-delete-automatic-version-backups files)) |
| 1763 | `((vc-state . up-to-date) | 1763 | `((vc-state . up-to-date) |
| 1764 | (vc-checkout-time . ,(nth 5 (file-attributes file))) | 1764 | (vc-checkout-time . ,(nth 5 (file-attributes file))) |
| 1765 | (vc-workfile-version . nil))) | 1765 | (vc-working-revision . nil))) |
| 1766 | (message "Checking in %s...done" (vc-delistify files))) | 1766 | (message "Checking in %s...done" (vc-delistify files))) |
| 1767 | 'vc-checkin-hook)) | 1767 | 'vc-checkin-hook)) |
| 1768 | 1768 | ||
| @@ -1788,7 +1788,7 @@ the buffer contents as a comment." | |||
| 1788 | ;; save the parameters held in buffer-local variables | 1788 | ;; save the parameters held in buffer-local variables |
| 1789 | (let ((log-operation vc-log-operation) | 1789 | (let ((log-operation vc-log-operation) |
| 1790 | (log-fileset vc-log-fileset) | 1790 | (log-fileset vc-log-fileset) |
| 1791 | (log-version vc-log-version) | 1791 | (log-revision vc-log-revision) |
| 1792 | (log-entry (buffer-string)) | 1792 | (log-entry (buffer-string)) |
| 1793 | (after-hook vc-log-after-operation-hook) | 1793 | (after-hook vc-log-after-operation-hook) |
| 1794 | (tmp-vc-parent-buffer vc-parent-buffer)) | 1794 | (tmp-vc-parent-buffer vc-parent-buffer)) |
| @@ -1797,7 +1797,7 @@ the buffer contents as a comment." | |||
| 1797 | (save-excursion | 1797 | (save-excursion |
| 1798 | (funcall log-operation | 1798 | (funcall log-operation |
| 1799 | log-fileset | 1799 | log-fileset |
| 1800 | log-version | 1800 | log-revision |
| 1801 | log-entry)) | 1801 | log-entry)) |
| 1802 | ;; Remove checkin window (after the checkin so that if that fails | 1802 | ;; Remove checkin window (after the checkin so that if that fails |
| 1803 | ;; we don't zap the *VC-log* buffer and the typing therein). | 1803 | ;; we don't zap the *VC-log* buffer and the typing therein). |
| @@ -1822,7 +1822,7 @@ the buffer contents as a comment." | |||
| 1822 | 1822 | ||
| 1823 | (defun vc-default-diff-tree (backend dir rev1 rev2) | 1823 | (defun vc-default-diff-tree (backend dir rev1 rev2) |
| 1824 | "List differences for all registered files at and below DIR. | 1824 | "List differences for all registered files at and below DIR. |
| 1825 | The meaning of REV1 and REV2 is the same as for `vc-version-diff'." | 1825 | The meaning of REV1 and REV2 is the same as for `vc-revision-diff'." |
| 1826 | ;; This implementation does an explicit tree walk, and calls | 1826 | ;; This implementation does an explicit tree walk, and calls |
| 1827 | ;; vc-BACKEND-diff directly for each file. An optimization | 1827 | ;; vc-BACKEND-diff directly for each file. An optimization |
| 1828 | ;; would be to use `vc-diff-internal', so that diffs can be local, | 1828 | ;; 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'." | |||
| 1898 | Diff output goes to the *vc-diff* buffer. The function | 1898 | Diff output goes to the *vc-diff* buffer. The function |
| 1899 | returns t if the buffer had changes, nil otherwise." | 1899 | returns t if the buffer had changes, nil otherwise." |
| 1900 | (let* ((filenames (vc-delistify files)) | 1900 | (let* ((filenames (vc-delistify files)) |
| 1901 | (rev1-name (or rev1 "focus version")) | 1901 | (rev1-name (or rev1 "working revision")) |
| 1902 | (rev2-name (or rev2 "workfile")) | 1902 | (rev2-name (or rev2 "workfile")) |
| 1903 | ;; Set coding system based on the first file. It's a kluge, | 1903 | ;; Set coding system based on the first file. It's a kluge, |
| 1904 | ;; but the only way to set it for each file included would | 1904 | ;; 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." | |||
| 1912 | ;; Do that work here so the backends don't have to futz with it. | 1912 | ;; Do that work here so the backends don't have to futz with it. |
| 1913 | (let ((filtered '())) | 1913 | (let ((filtered '())) |
| 1914 | (dolist (file files) | 1914 | (dolist (file files) |
| 1915 | (cond ((and (not (file-directory-p file)) (string= (vc-workfile-version file) "0")) | 1915 | (cond ((and (not (file-directory-p file)) (string= (vc-working-revision file) "0")) |
| 1916 | (progn | 1916 | (progn |
| 1917 | ;; This file is added but not yet committed; | 1917 | ;; This file is added but not yet committed; |
| 1918 | ;; there is no master file to diff against. | 1918 | ;; there is no master file to diff against. |
| @@ -1947,28 +1947,28 @@ returns t if the buffer had changes, nil otherwise." | |||
| 1947 | (rev1-default nil) | 1947 | (rev1-default nil) |
| 1948 | (rev2-default nil)) | 1948 | (rev2-default nil)) |
| 1949 | (cond | 1949 | (cond |
| 1950 | ;; someday we may be able to do version completion on non-singleton | 1950 | ;; someday we may be able to do revision completion on non-singleton |
| 1951 | ;; filesets, but not yet. | 1951 | ;; filesets, but not yet. |
| 1952 | ((/= (length files) 1) | 1952 | ((/= (length files) 1) |
| 1953 | nil) | 1953 | nil) |
| 1954 | ;; if it's a directory, don't supply any version default | 1954 | ;; if it's a directory, don't supply any revision default |
| 1955 | ((file-directory-p first) | 1955 | ((file-directory-p first) |
| 1956 | nil) | 1956 | nil) |
| 1957 | ;; if the file is not up-to-date, use current version as older version | 1957 | ;; if the file is not up-to-date, use working revision as older revision |
| 1958 | ((not (vc-up-to-date-p first)) | 1958 | ((not (vc-up-to-date-p first)) |
| 1959 | (setq rev1-default (vc-workfile-version first))) | 1959 | (setq rev1-default (vc-working-revision first))) |
| 1960 | ;; if the file is not locked, use last and previous version as default | 1960 | ;; if the file is not locked, use last and previous revisions as defaults |
| 1961 | (t | 1961 | (t |
| 1962 | (setq rev1-default (vc-call previous-version first | 1962 | (setq rev1-default (vc-call previous-revision first |
| 1963 | (vc-workfile-version first))) | 1963 | (vc-working-revision first))) |
| 1964 | (if (string= rev1-default "") (setq rev1-default nil)) | 1964 | (if (string= rev1-default "") (setq rev1-default nil)) |
| 1965 | (setq rev2-default (vc-workfile-version first)))) | 1965 | (setq rev2-default (vc-working-revision first)))) |
| 1966 | ;; construct argument list | 1966 | ;; construct argument list |
| 1967 | (let* ((rev1-prompt (if rev1-default | 1967 | (let* ((rev1-prompt (if rev1-default |
| 1968 | (concat "Older version (default " | 1968 | (concat "Older revision (default " |
| 1969 | rev1-default "): ") | 1969 | rev1-default "): ") |
| 1970 | "Older version: ")) | 1970 | "Older revision: ")) |
| 1971 | (rev2-prompt (concat "Newer version (default " | 1971 | (rev2-prompt (concat "Newer revision (default " |
| 1972 | (or rev2-default "current source") "): ")) | 1972 | (or rev2-default "current source") "): ")) |
| 1973 | (rev1 (if completion-table | 1973 | (rev1 (if completion-table |
| 1974 | (completing-read rev1-prompt completion-table | 1974 | (completing-read rev1-prompt completion-table |
| @@ -1987,11 +1987,11 @@ returns t if the buffer had changes, nil otherwise." | |||
| 1987 | 1987 | ||
| 1988 | ;;;###autoload | 1988 | ;;;###autoload |
| 1989 | (defun vc-diff (historic) | 1989 | (defun vc-diff (historic) |
| 1990 | "Display diffs between file versions. | 1990 | "Display diffs between file revisions. |
| 1991 | Normally this compares the current file and buffer with the most | 1991 | Normally this compares the current file and buffer with the most |
| 1992 | recent checked in version of that file. This uses no arguments. With | 1992 | recent checked in revision of that file. This uses no arguments. With |
| 1993 | a prefix argument HISTORIC, it reads the file name to use and two | 1993 | a prefix argument HISTORIC, it reads the file name to use and two |
| 1994 | version designators specifying which versions to compare." | 1994 | revision designators specifying which revisions to compare." |
| 1995 | (interactive "P") | 1995 | (interactive "P") |
| 1996 | (if historic | 1996 | (if historic |
| 1997 | (call-interactively 'vc-history-diff) | 1997 | (call-interactively 'vc-history-diff) |
| @@ -2005,32 +2005,32 @@ version designators specifying which versions to compare." | |||
| 2005 | (vc-diff-internal backend t files nil nil (interactive-p))))) | 2005 | (vc-diff-internal backend t files nil nil (interactive-p))))) |
| 2006 | 2006 | ||
| 2007 | ;;;###autoload | 2007 | ;;;###autoload |
| 2008 | (defun vc-version-other-window (rev) | 2008 | (defun vc-revision-other-window (rev) |
| 2009 | "Visit version REV of the current file in another window. | 2009 | "Visit revision REV of the current file in another window. |
| 2010 | If the current file is named `F', the version is named `F.~REV~'. | 2010 | If the current file is named `F', the revision is named `F.~REV~'. |
| 2011 | If `F.~REV~' already exists, use it instead of checking it out again." | 2011 | If `F.~REV~' already exists, use it instead of checking it out again." |
| 2012 | (interactive | 2012 | (interactive |
| 2013 | (save-current-buffer | 2013 | (save-current-buffer |
| 2014 | (vc-ensure-vc-buffer) | 2014 | (vc-ensure-vc-buffer) |
| 2015 | (let ((completion-table | 2015 | (let ((completion-table |
| 2016 | (vc-call revision-completion-table buffer-file-name)) | 2016 | (vc-call revision-completion-table buffer-file-name)) |
| 2017 | (prompt "Version to visit (default is focus version): ")) | 2017 | (prompt "Revision to visit (default is working revision): ")) |
| 2018 | (list | 2018 | (list |
| 2019 | (if completion-table | 2019 | (if completion-table |
| 2020 | (completing-read prompt completion-table) | 2020 | (completing-read prompt completion-table) |
| 2021 | (read-string prompt)))))) | 2021 | (read-string prompt)))))) |
| 2022 | (vc-ensure-vc-buffer) | 2022 | (vc-ensure-vc-buffer) |
| 2023 | (let* ((file buffer-file-name) | 2023 | (let* ((file buffer-file-name) |
| 2024 | (version (if (string-equal rev "") | 2024 | (revision (if (string-equal rev "") |
| 2025 | (vc-workfile-version file) | 2025 | (vc-working-revision file) |
| 2026 | rev))) | 2026 | rev))) |
| 2027 | (switch-to-buffer-other-window (vc-find-version file version)))) | 2027 | (switch-to-buffer-other-window (vc-find-revision file revision)))) |
| 2028 | 2028 | ||
| 2029 | (defun vc-find-version (file version) | 2029 | (defun vc-find-revision (file revision) |
| 2030 | "Read VERSION of FILE into a buffer and return the buffer." | 2030 | "Read REVISION of FILE into a buffer and return the buffer." |
| 2031 | (let ((automatic-backup (vc-version-backup-file-name file version)) | 2031 | (let ((automatic-backup (vc-version-backup-file-name file revision)) |
| 2032 | (filebuf (or (get-file-buffer file) (current-buffer))) | 2032 | (filebuf (or (get-file-buffer file) (current-buffer))) |
| 2033 | (filename (vc-version-backup-file-name file version 'manual))) | 2033 | (filename (vc-version-backup-file-name file revision 'manual))) |
| 2034 | (unless (file-exists-p filename) | 2034 | (unless (file-exists-p filename) |
| 2035 | (if (file-exists-p automatic-backup) | 2035 | (if (file-exists-p automatic-backup) |
| 2036 | (rename-file automatic-backup filename nil) | 2036 | (rename-file automatic-backup filename nil) |
| @@ -2045,7 +2045,7 @@ If `F.~REV~' already exists, use it instead of checking it out again." | |||
| 2045 | ;; Change buffer to get local value of | 2045 | ;; Change buffer to get local value of |
| 2046 | ;; vc-checkout-switches. | 2046 | ;; vc-checkout-switches. |
| 2047 | (with-current-buffer filebuf | 2047 | (with-current-buffer filebuf |
| 2048 | (vc-call find-version file version outbuf)))) | 2048 | (vc-call find-revision file revision outbuf)))) |
| 2049 | (setq failed nil)) | 2049 | (setq failed nil)) |
| 2050 | (if (and failed (file-exists-p filename)) | 2050 | (if (and failed (file-exists-p filename)) |
| 2051 | (delete-file filename)))) | 2051 | (delete-file filename)))) |
| @@ -2102,10 +2102,10 @@ The headers are reset to their non-expanded form." | |||
| 2102 | 2102 | ||
| 2103 | ;;;###autoload | 2103 | ;;;###autoload |
| 2104 | (defun vc-merge () | 2104 | (defun vc-merge () |
| 2105 | "Merge changes between two versions into the current buffer's file. | 2105 | "Merge changes between two revisions into the current buffer's file. |
| 2106 | This asks for two versions to merge from in the minibuffer. If the | 2106 | This asks for two revisions to merge from in the minibuffer. If the |
| 2107 | first version is a branch number, then merge all changes from that | 2107 | first revision is a branch number, then merge all changes from that |
| 2108 | branch. If the first version is empty, merge news, i.e. recent changes | 2108 | branch. If the first revision is empty, merge news, i.e. recent changes |
| 2109 | from the current branch. | 2109 | from the current branch. |
| 2110 | 2110 | ||
| 2111 | See Info node `Merging'." | 2111 | See Info node `Merging'." |
| @@ -2115,7 +2115,7 @@ See Info node `Merging'." | |||
| 2115 | (let* ((file buffer-file-name) | 2115 | (let* ((file buffer-file-name) |
| 2116 | (backend (vc-backend file)) | 2116 | (backend (vc-backend file)) |
| 2117 | (state (vc-state file)) | 2117 | (state (vc-state file)) |
| 2118 | first-version second-version status) | 2118 | first-revision second-revision status) |
| 2119 | (cond | 2119 | (cond |
| 2120 | ((stringp state) ;; Locking VCses only | 2120 | ((stringp state) ;; Locking VCses only |
| 2121 | (error "File is locked by %s" state)) | 2121 | (error "File is locked by %s" state)) |
| @@ -2124,25 +2124,25 @@ See Info node `Merging'." | |||
| 2124 | "File must be checked out for merging. Check out now? ") | 2124 | "File must be checked out for merging. Check out now? ") |
| 2125 | (vc-checkout file t) | 2125 | (vc-checkout file t) |
| 2126 | (error "Merge aborted")))) | 2126 | (error "Merge aborted")))) |
| 2127 | (setq first-version | 2127 | (setq first-revision |
| 2128 | (read-string (concat "Branch or version to merge from " | 2128 | (read-string (concat "Branch or revision to merge from " |
| 2129 | "(default news on current branch): "))) | 2129 | "(default news on current branch): "))) |
| 2130 | (if (string= first-version "") | 2130 | (if (string= first-revision "") |
| 2131 | (if (not (vc-find-backend-function backend 'merge-news)) | 2131 | (if (not (vc-find-backend-function backend 'merge-news)) |
| 2132 | (error "Sorry, merging news is not implemented for %s" backend) | 2132 | (error "Sorry, merging news is not implemented for %s" backend) |
| 2133 | (setq status (vc-call merge-news file))) | 2133 | (setq status (vc-call merge-news file))) |
| 2134 | (if (not (vc-find-backend-function backend 'merge)) | 2134 | (if (not (vc-find-backend-function backend 'merge)) |
| 2135 | (error "Sorry, merging is not implemented for %s" backend) | 2135 | (error "Sorry, merging is not implemented for %s" backend) |
| 2136 | (if (not (vc-branch-p first-version)) | 2136 | (if (not (vc-branch-p first-revision)) |
| 2137 | (setq second-version | 2137 | (setq second-revision |
| 2138 | (read-string "Second version: " | 2138 | (read-string "Second revision: " |
| 2139 | (concat (vc-branch-part first-version) "."))) | 2139 | (concat (vc-branch-part first-revision) "."))) |
| 2140 | ;; We want to merge an entire branch. Set versions | 2140 | ;; We want to merge an entire branch. Set revisions |
| 2141 | ;; accordingly, so that vc-BACKEND-merge understands us. | 2141 | ;; accordingly, so that vc-BACKEND-merge understands us. |
| 2142 | (setq second-version first-version) | 2142 | (setq second-revision first-revision) |
| 2143 | ;; first-version must be the starting point of the branch | 2143 | ;; first-revision must be the starting point of the branch |
| 2144 | (setq first-version (vc-branch-part first-version))) | 2144 | (setq first-revision (vc-branch-part first-revision))) |
| 2145 | (setq status (vc-call merge file first-version second-version)))) | 2145 | (setq status (vc-call merge file first-revision second-revision)))) |
| 2146 | (vc-maybe-resolve-conflicts file status "WORKFILE" "MERGE SOURCE"))) | 2146 | (vc-maybe-resolve-conflicts file status "WORKFILE" "MERGE SOURCE"))) |
| 2147 | 2147 | ||
| 2148 | (defun vc-maybe-resolve-conflicts (file status &optional name-A name-B) | 2148 | (defun vc-maybe-resolve-conflicts (file status &optional name-A name-B) |
| @@ -2424,10 +2424,10 @@ Otherwise, return nil." | |||
| 2424 | ;;;###autoload | 2424 | ;;;###autoload |
| 2425 | (defun vc-create-snapshot (dir name branchp) | 2425 | (defun vc-create-snapshot (dir name branchp) |
| 2426 | "Descending recursively from DIR, make a snapshot called NAME. | 2426 | "Descending recursively from DIR, make a snapshot called NAME. |
| 2427 | For each registered file, the version level of its latest version | 2427 | For each registered file, the working revision becomes part of |
| 2428 | becomes part of the named configuration. If the prefix argument | 2428 | the named configuration. If the prefix argument BRANCHP is |
| 2429 | BRANCHP is given, the snapshot is made as a new branch and the files | 2429 | given, the snapshot is made as a new branch and the files are |
| 2430 | are checked out in that new branch." | 2430 | checked out in that new branch." |
| 2431 | (interactive | 2431 | (interactive |
| 2432 | (list (read-file-name "Directory: " default-directory default-directory t) | 2432 | (list (read-file-name "Directory: " default-directory default-directory t) |
| 2433 | (read-string "New snapshot name: ") | 2433 | (read-string "New snapshot name: ") |
| @@ -2441,13 +2441,13 @@ are checked out in that new branch." | |||
| 2441 | ;;;###autoload | 2441 | ;;;###autoload |
| 2442 | (defun vc-retrieve-snapshot (dir name) | 2442 | (defun vc-retrieve-snapshot (dir name) |
| 2443 | "Descending recursively from DIR, retrieve the snapshot called NAME. | 2443 | "Descending recursively from DIR, retrieve the snapshot called NAME. |
| 2444 | If NAME is empty, it refers to the latest versions. | 2444 | If NAME is empty, it refers to the latest revisions. |
| 2445 | If locking is used for the files in DIR, then there must not be any | 2445 | If locking is used for the files in DIR, then there must not be any |
| 2446 | locked files at or below DIR (but if NAME is empty, locked files are | 2446 | locked files at or below DIR (but if NAME is empty, locked files are |
| 2447 | allowed and simply skipped)." | 2447 | allowed and simply skipped)." |
| 2448 | (interactive | 2448 | (interactive |
| 2449 | (list (read-file-name "Directory: " default-directory default-directory t) | 2449 | (list (read-file-name "Directory: " default-directory default-directory t) |
| 2450 | (read-string "Snapshot name to retrieve (default latest versions): "))) | 2450 | (read-string "Snapshot name to retrieve (default latest revisions): "))) |
| 2451 | (let ((update (yes-or-no-p "Update any affected buffers? ")) | 2451 | (let ((update (yes-or-no-p "Update any affected buffers? ")) |
| 2452 | (msg (if (or (not name) (string= name "")) | 2452 | (msg (if (or (not name) (string= name "")) |
| 2453 | (format "Updating %s... " (abbreviate-file-name dir)) | 2453 | (format "Updating %s... " (abbreviate-file-name dir)) |
| @@ -2461,13 +2461,13 @@ allowed and simply skipped)." | |||
| 2461 | ;; Miscellaneous other entry points | 2461 | ;; Miscellaneous other entry points |
| 2462 | 2462 | ||
| 2463 | ;;;###autoload | 2463 | ;;;###autoload |
| 2464 | (defun vc-print-log (&optional focus-rev) | 2464 | (defun vc-print-log (&optional working-revision) |
| 2465 | "List the change log of the current fileset in a window. | 2465 | "List the change log of the current fileset in a window. |
| 2466 | If FOCUS-REV is non-nil, leave the point at that revision." | 2466 | If WORKING-REVISION is non-nil, leave the point at that revision." |
| 2467 | (interactive) | 2467 | (interactive) |
| 2468 | (let* ((files (vc-deduce-fileset)) | 2468 | (let* ((files (vc-deduce-fileset)) |
| 2469 | (backend (vc-backend (car files))) | 2469 | (backend (vc-backend (car files))) |
| 2470 | (focus-rev (or focus-rev (vc-workfile-version (car files))))) | 2470 | (working-revision (or working-revision (vc-working-revision (car files))))) |
| 2471 | ;; Don't switch to the output buffer before running the command, | 2471 | ;; Don't switch to the output buffer before running the command, |
| 2472 | ;; so that any buffer-local settings in the vc-controlled | 2472 | ;; so that any buffer-local settings in the vc-controlled |
| 2473 | ;; buffer can be accessed by the command. | 2473 | ;; buffer can be accessed by the command. |
| @@ -2484,8 +2484,8 @@ If FOCUS-REV is non-nil, leave the point at that revision." | |||
| 2484 | (if (looking-at "[\b\t\n\v\f\r ]+") | 2484 | (if (looking-at "[\b\t\n\v\f\r ]+") |
| 2485 | (delete-char (- (match-end 0) (match-beginning 0)))) | 2485 | (delete-char (- (match-end 0) (match-beginning 0)))) |
| 2486 | (shrink-window-if-larger-than-buffer) | 2486 | (shrink-window-if-larger-than-buffer) |
| 2487 | ;; move point to the log entry for the focus revision | 2487 | ;; move point to the log entry for the working revision |
| 2488 | (vc-call-backend ',backend 'show-log-entry ',focus-rev) | 2488 | (vc-call-backend ',backend 'show-log-entry ',working-revision) |
| 2489 | (setq vc-sentinel-movepoint (point)) | 2489 | (setq vc-sentinel-movepoint (point)) |
| 2490 | (set-buffer-modified-p nil))))) | 2490 | (set-buffer-modified-p nil))))) |
| 2491 | 2491 | ||
| @@ -2493,7 +2493,7 @@ If FOCUS-REV is non-nil, leave the point at that revision." | |||
| 2493 | (defun vc-revert () | 2493 | (defun vc-revert () |
| 2494 | "Revert working copies of the selected fileset to their repository contents. | 2494 | "Revert working copies of the selected fileset to their repository contents. |
| 2495 | This asks for confirmation if the buffer contents are not identical | 2495 | This asks for confirmation if the buffer contents are not identical |
| 2496 | to the repository version (except for keyword expansion)." | 2496 | to the working revision (except for keyword expansion)." |
| 2497 | (interactive) | 2497 | (interactive) |
| 2498 | (let* ((files (vc-deduce-fileset)) | 2498 | (let* ((files (vc-deduce-fileset)) |
| 2499 | (backend (vc-backend (car files)))) | 2499 | (backend (vc-backend (car files)))) |
| @@ -2552,8 +2552,8 @@ depending on the underlying version-control system." | |||
| 2552 | (vc-setup-buffer "*vc-diff*") | 2552 | (vc-setup-buffer "*vc-diff*") |
| 2553 | (not-modified) | 2553 | (not-modified) |
| 2554 | (message "Finding changes...") | 2554 | (message "Finding changes...") |
| 2555 | (let* ((tip (vc-workfile-version (car files))) | 2555 | (let* ((tip (vc-working-revision (car files))) |
| 2556 | (previous (vc-call previous-version (car files) tip))) | 2556 | (previous (vc-call previous-revision (car files) tip))) |
| 2557 | (vc-diff-internal backend nil files previous tip)) | 2557 | (vc-diff-internal backend nil files previous tip)) |
| 2558 | ;; Display changes | 2558 | ;; Display changes |
| 2559 | (unless (yes-or-no-p "Discard these revisions? ") | 2559 | (unless (yes-or-no-p "Discard these revisions? ") |
| @@ -2567,7 +2567,7 @@ depending on the underlying version-control system." | |||
| 2567 | (vc-call-backend backend 'rollback files) | 2567 | (vc-call-backend backend 'rollback files) |
| 2568 | `((vc-state . ,'up-to-date) | 2568 | `((vc-state . ,'up-to-date) |
| 2569 | (vc-checkout-time . , (nth 5 (file-attributes file))) | 2569 | (vc-checkout-time . , (nth 5 (file-attributes file))) |
| 2570 | (vc-workfile-version . nil))) | 2570 | (vc-working-revision . nil))) |
| 2571 | (mapc (lambda (f) (vc-resynch-buffer f t t)) files) | 2571 | (mapc (lambda (f) (vc-resynch-buffer f t t)) files) |
| 2572 | (message "Rolling back %s...done" (vc-delistify files)))) | 2572 | (message "Rolling back %s...done" (vc-delistify files)))) |
| 2573 | 2573 | ||
| @@ -2576,9 +2576,9 @@ depending on the underlying version-control system." | |||
| 2576 | 2576 | ||
| 2577 | ;;;###autoload | 2577 | ;;;###autoload |
| 2578 | (defun vc-update () | 2578 | (defun vc-update () |
| 2579 | "Update the current fileset's files to their tip versions. | 2579 | "Update the current fileset's files to their tip revisions. |
| 2580 | For each one that contains no changes, and is not locked, then this simply | 2580 | For each one that contains no changes, and is not locked, then this simply |
| 2581 | replaces the work file with the latest version on its branch. If the file | 2581 | replaces the work file with the latest revision on its branch. If the file |
| 2582 | contains changes, and the backend supports merging news, then any recent | 2582 | contains changes, and the backend supports merging news, then any recent |
| 2583 | changes from the current branch are merged into the working file." | 2583 | changes from the current branch are merged into the working file." |
| 2584 | (interactive) | 2584 | (interactive) |
| @@ -2605,7 +2605,7 @@ changes from the current branch are merged into the working file." | |||
| 2605 | (defun vc-version-backup-file (file &optional rev) | 2605 | (defun vc-version-backup-file (file &optional rev) |
| 2606 | "Return name of backup file for revision REV of FILE. | 2606 | "Return name of backup file for revision REV of FILE. |
| 2607 | If version backups should be used for FILE, and there exists | 2607 | If version backups should be used for FILE, and there exists |
| 2608 | such a backup for REV or the focus version of file, return | 2608 | such a backup for REV or the working revision of file, return |
| 2609 | its name; otherwise return nil." | 2609 | its name; otherwise return nil." |
| 2610 | (when (vc-call make-version-backups-p file) | 2610 | (when (vc-call make-version-backups-p file) |
| 2611 | (let ((backup-file (vc-version-backup-file-name file rev))) | 2611 | (let ((backup-file (vc-version-backup-file-name file rev))) |
| @@ -2617,7 +2617,7 @@ its name; otherwise return nil." | |||
| 2617 | backup-file))))) | 2617 | backup-file))))) |
| 2618 | 2618 | ||
| 2619 | (defun vc-revert-file (file) | 2619 | (defun vc-revert-file (file) |
| 2620 | "Revert FILE back to the repository version it was based on." | 2620 | "Revert FILE back to the repository working revision it was based on." |
| 2621 | (with-vc-properties | 2621 | (with-vc-properties |
| 2622 | (list file) | 2622 | (list file) |
| 2623 | (let ((backup-file (vc-version-backup-file file))) | 2623 | (let ((backup-file (vc-version-backup-file file))) |
| @@ -2676,7 +2676,7 @@ To get a prompt, use a prefix argument." | |||
| 2676 | "Transfer FILE to another version control system NEW-BACKEND. | 2676 | "Transfer FILE to another version control system NEW-BACKEND. |
| 2677 | If NEW-BACKEND has a higher precedence than FILE's current backend | 2677 | If NEW-BACKEND has a higher precedence than FILE's current backend |
| 2678 | \(i.e. it comes earlier in `vc-handled-backends'), then register FILE in | 2678 | \(i.e. it comes earlier in `vc-handled-backends'), then register FILE in |
| 2679 | NEW-BACKEND, using the version number from the current backend as the | 2679 | NEW-BACKEND, using the revision number from the current backend as the |
| 2680 | base level. If NEW-BACKEND has a lower precedence than the current | 2680 | base level. If NEW-BACKEND has a lower precedence than the current |
| 2681 | backend, then commit all changes that were made under the current | 2681 | backend, then commit all changes that were made under the current |
| 2682 | backend to NEW-BACKEND, and unregister FILE from the current backend. | 2682 | 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. | |||
| 2696 | (set-file-modes file (logior (file-modes file) 128)) | 2696 | (set-file-modes file (logior (file-modes file) 128)) |
| 2697 | ;; `registered' might have switched under us. | 2697 | ;; `registered' might have switched under us. |
| 2698 | (vc-switch-backend file old-backend) | 2698 | (vc-switch-backend file old-backend) |
| 2699 | (let* ((rev (vc-workfile-version file)) | 2699 | (let* ((rev (vc-working-revision file)) |
| 2700 | (modified-file (and edited (make-temp-file file))) | 2700 | (modified-file (and edited (make-temp-file file))) |
| 2701 | (unmodified-file (and modified-file (vc-version-backup-file file)))) | 2701 | (unmodified-file (and modified-file (vc-version-backup-file file)))) |
| 2702 | ;; Go back to the base unmodified file. | 2702 | ;; Go back to the base unmodified file. |
| @@ -2710,7 +2710,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. | |||
| 2710 | (if unmodified-file | 2710 | (if unmodified-file |
| 2711 | (copy-file unmodified-file file | 2711 | (copy-file unmodified-file file |
| 2712 | 'ok-if-already-exists 'keep-date) | 2712 | 'ok-if-already-exists 'keep-date) |
| 2713 | (if (y-or-n-p "Get base version from master? ") | 2713 | (if (y-or-n-p "Get base revision from master? ") |
| 2714 | (vc-revert-file file)))) | 2714 | (vc-revert-file file)))) |
| 2715 | (vc-call-backend new-backend 'receive-file file rev)) | 2715 | (vc-call-backend new-backend 'receive-file file rev)) |
| 2716 | (when modified-file | 2716 | (when modified-file |
| @@ -2800,7 +2800,7 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. | |||
| 2800 | (if (file-exists-p old) (rename-file old new)) | 2800 | (if (file-exists-p old) (rename-file old new)) |
| 2801 | ;; ?? Renaming a file might change its contents due to keyword expansion. | 2801 | ;; ?? Renaming a file might change its contents due to keyword expansion. |
| 2802 | ;; We should really check out a new copy if the old copy was precisely equal | 2802 | ;; We should really check out a new copy if the old copy was precisely equal |
| 2803 | ;; to some checked in version. However, testing for this is tricky.... | 2803 | ;; to some checked-in revision. However, testing for this is tricky.... |
| 2804 | (if oldbuf | 2804 | (if oldbuf |
| 2805 | (with-current-buffer oldbuf | 2805 | (with-current-buffer oldbuf |
| 2806 | (let ((buffer-read-only buffer-read-only)) | 2806 | (let ((buffer-read-only buffer-read-only)) |
| @@ -2847,7 +2847,7 @@ log entries should be gathered." | |||
| 2847 | (vc-call-backend (vc-responsible-backend default-directory) | 2847 | (vc-call-backend (vc-responsible-backend default-directory) |
| 2848 | 'update-changelog args)) | 2848 | 'update-changelog args)) |
| 2849 | 2849 | ||
| 2850 | ;;; The default back end. Assumes RCS-like version numbering. | 2850 | ;;; The default back end. Assumes RCS-like revision numbering. |
| 2851 | 2851 | ||
| 2852 | (defun vc-default-revision-granularity () | 2852 | (defun vc-default-revision-granularity () |
| 2853 | (error "Your backend will not work with this version of VC mode.")) | 2853 | (error "Your backend will not work with this version of VC mode.")) |
| @@ -2872,35 +2872,35 @@ log entries should be gathered." | |||
| 2872 | (substring rev 0 index)))) | 2872 | (substring rev 0 index)))) |
| 2873 | 2873 | ||
| 2874 | (defun vc-minor-part (rev) | 2874 | (defun vc-minor-part (rev) |
| 2875 | "Return the minor version number of a revision number REV." | 2875 | "Return the minor revision number of a revision number REV." |
| 2876 | (string-match "[0-9]+\\'" rev) | 2876 | (string-match "[0-9]+\\'" rev) |
| 2877 | (substring rev (match-beginning 0) (match-end 0))) | 2877 | (substring rev (match-beginning 0) (match-end 0))) |
| 2878 | 2878 | ||
| 2879 | (defun vc-default-previous-version (backend file rev) | 2879 | (defun vc-default-previous-revision (backend file rev) |
| 2880 | "Return the version number immediately preceding REV for FILE, | 2880 | "Return the revision number immediately preceding REV for FILE, |
| 2881 | or nil if there is no previous version. This default | 2881 | or nil if there is no previous revision. This default |
| 2882 | implementation works for MAJOR.MINOR-style version numbers as | 2882 | implementation works for MAJOR.MINOR-style revision numbers as |
| 2883 | used by RCS and CVS." | 2883 | used by RCS and CVS." |
| 2884 | (let ((branch (vc-branch-part rev)) | 2884 | (let ((branch (vc-branch-part rev)) |
| 2885 | (minor-num (string-to-number (vc-minor-part rev)))) | 2885 | (minor-num (string-to-number (vc-minor-part rev)))) |
| 2886 | (when branch | 2886 | (when branch |
| 2887 | (if (> minor-num 1) | 2887 | (if (> minor-num 1) |
| 2888 | ;; version does probably not start a branch or release | 2888 | ;; revision does probably not start a branch or release |
| 2889 | (concat branch "." (number-to-string (1- minor-num))) | 2889 | (concat branch "." (number-to-string (1- minor-num))) |
| 2890 | (if (vc-trunk-p rev) | 2890 | (if (vc-trunk-p rev) |
| 2891 | ;; we are at the beginning of the trunk -- | 2891 | ;; we are at the beginning of the trunk -- |
| 2892 | ;; don't know anything to return here | 2892 | ;; don't know anything to return here |
| 2893 | nil | 2893 | nil |
| 2894 | ;; we are at the beginning of a branch -- | 2894 | ;; we are at the beginning of a branch -- |
| 2895 | ;; return version of starting point | 2895 | ;; return revision of starting point |
| 2896 | (vc-branch-part branch)))))) | 2896 | (vc-branch-part branch)))))) |
| 2897 | 2897 | ||
| 2898 | (defun vc-default-next-version (backend file rev) | 2898 | (defun vc-default-next-revision (backend file rev) |
| 2899 | "Return the version number immediately following REV for FILE, | 2899 | "Return the revision number immediately following REV for FILE, |
| 2900 | or nil if there is no next version. This default implementation | 2900 | or nil if there is no next revision. This default implementation |
| 2901 | works for MAJOR.MINOR-style version numbers as used by RCS | 2901 | works for MAJOR.MINOR-style revision numbers as used by RCS |
| 2902 | and CVS." | 2902 | and CVS." |
| 2903 | (when (not (string= rev (vc-workfile-version file))) | 2903 | (when (not (string= rev (vc-working-revision file))) |
| 2904 | (let ((branch (vc-branch-part rev)) | 2904 | (let ((branch (vc-branch-part rev)) |
| 2905 | (minor-num (string-to-number (vc-minor-part rev)))) | 2905 | (minor-num (string-to-number (vc-minor-part rev)))) |
| 2906 | (concat branch "." (number-to-string (1+ minor-num)))))) | 2906 | (concat branch "." (number-to-string (1+ minor-num)))))) |
| @@ -2918,10 +2918,10 @@ The default implementation returns t for all files." | |||
| 2918 | (defun vc-default-latest-on-branch-p (backend file) | 2918 | (defun vc-default-latest-on-branch-p (backend file) |
| 2919 | "Return non-nil if FILE is the latest on its branch. | 2919 | "Return non-nil if FILE is the latest on its branch. |
| 2920 | This default implementation always returns non-nil, which means that | 2920 | This default implementation always returns non-nil, which means that |
| 2921 | editing non-current versions is not supported by default." | 2921 | editing non-current revisions is not supported by default." |
| 2922 | t) | 2922 | t) |
| 2923 | 2923 | ||
| 2924 | (defun vc-default-init-version (backend) vc-default-init-version) | 2924 | (defun vc-default-init-revision (backend) vc-default-init-revision) |
| 2925 | 2925 | ||
| 2926 | (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) | 2926 | (defalias 'vc-cvs-update-changelog 'vc-update-changelog-rcs2log) |
| 2927 | (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) | 2927 | (defalias 'vc-rcs-update-changelog 'vc-update-changelog-rcs2log) |
| @@ -2978,10 +2978,10 @@ Uses `rcs2log' which only works for RCS and CVS." | |||
| 2978 | (setq default-directory (file-name-directory changelog)) | 2978 | (setq default-directory (file-name-directory changelog)) |
| 2979 | (delete-file tempfile))))) | 2979 | (delete-file tempfile))))) |
| 2980 | 2980 | ||
| 2981 | (defun vc-default-find-version (backend file rev buffer) | 2981 | (defun vc-default-find-revision (backend file rev buffer) |
| 2982 | "Provide the new `find-version' op based on the old `checkout' op. | 2982 | "Provide the new `find-revision' op based on the old `checkout' op. |
| 2983 | This is only for compatibility with old backends. They should be updated | 2983 | This is only for compatibility with old backends. They should be updated |
| 2984 | to provide the `find-version' operation instead." | 2984 | to provide the `find-revision' operation instead." |
| 2985 | (let ((tmpfile (make-temp-file (expand-file-name file)))) | 2985 | (let ((tmpfile (make-temp-file (expand-file-name file)))) |
| 2986 | (unwind-protect | 2986 | (unwind-protect |
| 2987 | (progn | 2987 | (progn |
| @@ -3074,7 +3074,7 @@ to provide the `find-version' operation instead." | |||
| 3074 | 3074 | ||
| 3075 | (defun vc-default-revert (backend file contents-done) | 3075 | (defun vc-default-revert (backend file contents-done) |
| 3076 | (unless contents-done | 3076 | (unless contents-done |
| 3077 | (let ((rev (vc-workfile-version file)) | 3077 | (let ((rev (vc-working-revision file)) |
| 3078 | (file-buffer (or (get-file-buffer file) (current-buffer)))) | 3078 | (file-buffer (or (get-file-buffer file) (current-buffer)))) |
| 3079 | (message "Checking out %s..." file) | 3079 | (message "Checking out %s..." file) |
| 3080 | (let ((failed t) | 3080 | (let ((failed t) |
| @@ -3091,7 +3091,7 @@ to provide the `find-version' operation instead." | |||
| 3091 | ;; Change buffer to get local value of vc-checkout-switches. | 3091 | ;; Change buffer to get local value of vc-checkout-switches. |
| 3092 | (with-current-buffer file-buffer | 3092 | (with-current-buffer file-buffer |
| 3093 | (let ((default-directory (file-name-directory file))) | 3093 | (let ((default-directory (file-name-directory file))) |
| 3094 | (vc-call find-version file rev outbuf))))) | 3094 | (vc-call find-revision file rev outbuf))))) |
| 3095 | (setq failed nil)) | 3095 | (setq failed nil)) |
| 3096 | (when backup-name | 3096 | (when backup-name |
| 3097 | (if failed | 3097 | (if failed |
| @@ -3213,11 +3213,11 @@ cover the range from the oldest annotation to the newest." | |||
| 3213 | :style toggle :selected | 3213 | :style toggle :selected |
| 3214 | (eq vc-annotate-display-mode 'fullscale)] | 3214 | (eq vc-annotate-display-mode 'fullscale)] |
| 3215 | "--" | 3215 | "--" |
| 3216 | ["Annotate previous revision" vc-annotate-prev-version] | 3216 | ["Annotate previous revision" vc-annotate-prev-revision] |
| 3217 | ["Annotate next revision" vc-annotate-next-version] | 3217 | ["Annotate next revision" vc-annotate-next-revision] |
| 3218 | ["Annotate revision at line" vc-annotate-revision-at-line] | 3218 | ["Annotate revision at line" vc-annotate-revision-at-line] |
| 3219 | ["Annotate revision previous to line" vc-annotate-revision-previous-to-line] | 3219 | ["Annotate revision previous to line" vc-annotate-revision-previous-to-line] |
| 3220 | ["Annotate latest revision" vc-annotate-focus-version] | 3220 | ["Annotate latest revision" vc-annotate-working-revision] |
| 3221 | ["Show log of revision at line" vc-annotate-show-log-revision-at-line] | 3221 | ["Show log of revision at line" vc-annotate-show-log-revision-at-line] |
| 3222 | ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line])) | 3222 | ["Show diff of revision at line" vc-annotate-show-diff-revision-at-line])) |
| 3223 | 3223 | ||
| @@ -3257,8 +3257,8 @@ default, the time scale stretches back one year into the past; | |||
| 3257 | everything that is older than that is shown in blue. | 3257 | everything that is older than that is shown in blue. |
| 3258 | 3258 | ||
| 3259 | With a prefix argument, this command asks two questions in the | 3259 | With a prefix argument, this command asks two questions in the |
| 3260 | minibuffer. First, you may enter a version number; then the buffer | 3260 | minibuffer. First, you may enter a revision number; then the buffer |
| 3261 | displays and annotates that version instead of the current version | 3261 | displays and annotates that revision instead of the working revision |
| 3262 | \(type RET in the minibuffer to leave that default unchanged). Then, | 3262 | \(type RET in the minibuffer to leave that default unchanged). Then, |
| 3263 | you are prompted for the time span in days which the color range | 3263 | you are prompted for the time span in days which the color range |
| 3264 | should cover. For example, a time span of 20 days means that changes | 3264 | 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." | |||
| 3275 | (save-current-buffer | 3275 | (save-current-buffer |
| 3276 | (vc-ensure-vc-buffer) | 3276 | (vc-ensure-vc-buffer) |
| 3277 | (list buffer-file-name | 3277 | (list buffer-file-name |
| 3278 | (let ((def (vc-workfile-version buffer-file-name))) | 3278 | (let ((def (vc-working-revision buffer-file-name))) |
| 3279 | (if (null current-prefix-arg) def | 3279 | (if (null current-prefix-arg) def |
| 3280 | (read-string | 3280 | (read-string |
| 3281 | (format "Annotate from version (default %s): " def) | 3281 | (format "Annotate from revision (default %s): " def) |
| 3282 | nil nil def))) | 3282 | nil nil def))) |
| 3283 | (if (null current-prefix-arg) | 3283 | (if (null current-prefix-arg) |
| 3284 | vc-annotate-display-mode | 3284 | vc-annotate-display-mode |
| @@ -3327,31 +3327,31 @@ colors. `vc-annotate-background' specifies the background color." | |||
| 3327 | (unless (active-minibuffer-window) | 3327 | (unless (active-minibuffer-window) |
| 3328 | (message "Annotating... done"))))))) | 3328 | (message "Annotating... done"))))))) |
| 3329 | 3329 | ||
| 3330 | (defun vc-annotate-prev-version (prefix) | 3330 | (defun vc-annotate-prev-revision (prefix) |
| 3331 | "Visit the annotation of the version previous to this one. | 3331 | "Visit the annotation of the revision previous to this one. |
| 3332 | 3332 | ||
| 3333 | With a numeric prefix argument, annotate the version that many | 3333 | With a numeric prefix argument, annotate the revision that many |
| 3334 | versions previous." | 3334 | revisions previous." |
| 3335 | (interactive "p") | 3335 | (interactive "p") |
| 3336 | (vc-annotate-warp-version (- 0 prefix))) | 3336 | (vc-annotate-warp-revision (- 0 prefix))) |
| 3337 | 3337 | ||
| 3338 | (defun vc-annotate-next-version (prefix) | 3338 | (defun vc-annotate-next-revision (prefix) |
| 3339 | "Visit the annotation of the version after this one. | 3339 | "Visit the annotation of the revision after this one. |
| 3340 | 3340 | ||
| 3341 | With a numeric prefix argument, annotate the version that many | 3341 | With a numeric prefix argument, annotate the revision that many |
| 3342 | versions after." | 3342 | revisions after." |
| 3343 | (interactive "p") | 3343 | (interactive "p") |
| 3344 | (vc-annotate-warp-version prefix)) | 3344 | (vc-annotate-warp-revision prefix)) |
| 3345 | 3345 | ||
| 3346 | (defun vc-annotate-focus-version () | 3346 | (defun vc-annotate-working-revision () |
| 3347 | "Visit the annotation of the focus version of this file." | 3347 | "Visit the annotation of the working revision of this file." |
| 3348 | (interactive) | 3348 | (interactive) |
| 3349 | (if (not (equal major-mode 'vc-annotate-mode)) | 3349 | (if (not (equal major-mode 'vc-annotate-mode)) |
| 3350 | (message "Cannot be invoked outside of a vc annotate buffer") | 3350 | (message "Cannot be invoked outside of a vc annotate buffer") |
| 3351 | (let ((warp-rev (vc-workfile-version vc-annotate-parent-file))) | 3351 | (let ((warp-rev (vc-working-revision vc-annotate-parent-file))) |
| 3352 | (if (equal warp-rev vc-annotate-parent-rev) | 3352 | (if (equal warp-rev vc-annotate-parent-rev) |
| 3353 | (message "Already at version %s" warp-rev) | 3353 | (message "Already at revision %s" warp-rev) |
| 3354 | (vc-annotate-warp-version warp-rev))))) | 3354 | (vc-annotate-warp-revision warp-rev))))) |
| 3355 | 3355 | ||
| 3356 | (defun vc-annotate-extract-revision-at-line () | 3356 | (defun vc-annotate-extract-revision-at-line () |
| 3357 | "Extract the revision number of the current line." | 3357 | "Extract the revision number of the current line." |
| @@ -3359,7 +3359,7 @@ versions after." | |||
| 3359 | (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line)) | 3359 | (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line)) |
| 3360 | 3360 | ||
| 3361 | (defun vc-annotate-revision-at-line () | 3361 | (defun vc-annotate-revision-at-line () |
| 3362 | "Visit the annotation of the version identified in the current line." | 3362 | "Visit the annotation of the revision identified in the current line." |
| 3363 | (interactive) | 3363 | (interactive) |
| 3364 | (if (not (equal major-mode 'vc-annotate-mode)) | 3364 | (if (not (equal major-mode 'vc-annotate-mode)) |
| 3365 | (message "Cannot be invoked outside of a vc annotate buffer") | 3365 | (message "Cannot be invoked outside of a vc annotate buffer") |
| @@ -3367,11 +3367,11 @@ versions after." | |||
| 3367 | (if (not rev-at-line) | 3367 | (if (not rev-at-line) |
| 3368 | (message "Cannot extract revision number from the current line") | 3368 | (message "Cannot extract revision number from the current line") |
| 3369 | (if (equal rev-at-line vc-annotate-parent-rev) | 3369 | (if (equal rev-at-line vc-annotate-parent-rev) |
| 3370 | (message "Already at version %s" rev-at-line) | 3370 | (message "Already at revision %s" rev-at-line) |
| 3371 | (vc-annotate-warp-version rev-at-line)))))) | 3371 | (vc-annotate-warp-revision rev-at-line)))))) |
| 3372 | 3372 | ||
| 3373 | (defun vc-annotate-revision-previous-to-line () | 3373 | (defun vc-annotate-revision-previous-to-line () |
| 3374 | "Visit the annotation of the version before the version at line." | 3374 | "Visit the annotation of the revision before the revision at line." |
| 3375 | (interactive) | 3375 | (interactive) |
| 3376 | (if (not (equal major-mode 'vc-annotate-mode)) | 3376 | (if (not (equal major-mode 'vc-annotate-mode)) |
| 3377 | (message "Cannot be invoked outside of a vc annotate buffer") | 3377 | (message "Cannot be invoked outside of a vc annotate buffer") |
| @@ -3380,11 +3380,11 @@ versions after." | |||
| 3380 | (if (not rev-at-line) | 3380 | (if (not rev-at-line) |
| 3381 | (message "Cannot extract revision number from the current line") | 3381 | (message "Cannot extract revision number from the current line") |
| 3382 | (setq prev-rev | 3382 | (setq prev-rev |
| 3383 | (vc-call previous-version vc-annotate-parent-file rev-at-line)) | 3383 | (vc-call previous-revision vc-annotate-parent-file rev-at-line)) |
| 3384 | (vc-annotate-warp-version prev-rev))))) | 3384 | (vc-annotate-warp-revision prev-rev))))) |
| 3385 | 3385 | ||
| 3386 | (defun vc-annotate-show-log-revision-at-line () | 3386 | (defun vc-annotate-show-log-revision-at-line () |
| 3387 | "Visit the log of the version at line." | 3387 | "Visit the log of the revision at line." |
| 3388 | (interactive) | 3388 | (interactive) |
| 3389 | (if (not (equal major-mode 'vc-annotate-mode)) | 3389 | (if (not (equal major-mode 'vc-annotate-mode)) |
| 3390 | (message "Cannot be invoked outside of a vc annotate buffer") | 3390 | (message "Cannot be invoked outside of a vc annotate buffer") |
| @@ -3394,7 +3394,7 @@ versions after." | |||
| 3394 | (vc-print-log rev-at-line))))) | 3394 | (vc-print-log rev-at-line))))) |
| 3395 | 3395 | ||
| 3396 | (defun vc-annotate-show-diff-revision-at-line () | 3396 | (defun vc-annotate-show-diff-revision-at-line () |
| 3397 | "Visit the diff of the version at line from its previous version." | 3397 | "Visit the diff of the revision at line from its previous revision." |
| 3398 | (interactive) | 3398 | (interactive) |
| 3399 | (if (not (equal major-mode 'vc-annotate-mode)) | 3399 | (if (not (equal major-mode 'vc-annotate-mode)) |
| 3400 | (message "Cannot be invoked outside of a vc annotate buffer") | 3400 | (message "Cannot be invoked outside of a vc annotate buffer") |
| @@ -3403,9 +3403,9 @@ versions after." | |||
| 3403 | (if (not rev-at-line) | 3403 | (if (not rev-at-line) |
| 3404 | (message "Cannot extract revision number from the current line") | 3404 | (message "Cannot extract revision number from the current line") |
| 3405 | (setq prev-rev | 3405 | (setq prev-rev |
| 3406 | (vc-call previous-version vc-annotate-parent-file rev-at-line)) | 3406 | (vc-call previous-revision vc-annotate-parent-file rev-at-line)) |
| 3407 | (if (not prev-rev) | 3407 | (if (not prev-rev) |
| 3408 | (message "Cannot diff from any version prior to %s" rev-at-line) | 3408 | (message "Cannot diff from any revision prior to %s" rev-at-line) |
| 3409 | (save-window-excursion | 3409 | (save-window-excursion |
| 3410 | (vc-diff-internal | 3410 | (vc-diff-internal |
| 3411 | (vc-backend vc-annotate-parent-file) | 3411 | (vc-backend vc-annotate-parent-file) |
| @@ -3414,12 +3414,12 @@ versions after." | |||
| 3414 | prev-rev rev-at-line)) | 3414 | prev-rev rev-at-line)) |
| 3415 | (switch-to-buffer "*vc-diff*")))))) | 3415 | (switch-to-buffer "*vc-diff*")))))) |
| 3416 | 3416 | ||
| 3417 | (defun vc-annotate-warp-version (revspec) | 3417 | (defun vc-annotate-warp-revision (revspec) |
| 3418 | "Annotate the version described by REVSPEC. | 3418 | "Annotate the revision described by REVSPEC. |
| 3419 | 3419 | ||
| 3420 | If REVSPEC is a positive integer, warp that many versions | 3420 | If REVSPEC is a positive integer, warp that many revisions |
| 3421 | forward, if possible, otherwise echo a warning message. If | 3421 | forward, if possible, otherwise echo a warning message. If |
| 3422 | REVSPEC is a negative integer, warp that many versions backward, | 3422 | REVSPEC is a negative integer, warp that many revisions backward, |
| 3423 | if possible, otherwise echo a warning message. If REVSPEC is a | 3423 | if possible, otherwise echo a warning message. If REVSPEC is a |
| 3424 | string, then it describes a revision number, so warp to that | 3424 | string, then it describes a revision number, so warp to that |
| 3425 | revision." | 3425 | revision." |
| @@ -3433,23 +3433,23 @@ revision." | |||
| 3433 | ((and (integerp revspec) (> revspec 0)) | 3433 | ((and (integerp revspec) (> revspec 0)) |
| 3434 | (setq newrev vc-annotate-parent-rev) | 3434 | (setq newrev vc-annotate-parent-rev) |
| 3435 | (while (and (> revspec 0) newrev) | 3435 | (while (and (> revspec 0) newrev) |
| 3436 | (setq newrev (vc-call next-version | 3436 | (setq newrev (vc-call next-revision |
| 3437 | vc-annotate-parent-file newrev)) | 3437 | vc-annotate-parent-file newrev)) |
| 3438 | (setq revspec (1- revspec))) | 3438 | (setq revspec (1- revspec))) |
| 3439 | (if (not newrev) | 3439 | (if (not newrev) |
| 3440 | (message "Cannot increment %d versions from version %s" | 3440 | (message "Cannot increment %d revisions from revision %s" |
| 3441 | revspeccopy vc-annotate-parent-rev))) | 3441 | revspeccopy vc-annotate-parent-rev))) |
| 3442 | ((and (integerp revspec) (< revspec 0)) | 3442 | ((and (integerp revspec) (< revspec 0)) |
| 3443 | (setq newrev vc-annotate-parent-rev) | 3443 | (setq newrev vc-annotate-parent-rev) |
| 3444 | (while (and (< revspec 0) newrev) | 3444 | (while (and (< revspec 0) newrev) |
| 3445 | (setq newrev (vc-call previous-version | 3445 | (setq newrev (vc-call previous-revision |
| 3446 | vc-annotate-parent-file newrev)) | 3446 | vc-annotate-parent-file newrev)) |
| 3447 | (setq revspec (1+ revspec))) | 3447 | (setq revspec (1+ revspec))) |
| 3448 | (if (not newrev) | 3448 | (if (not newrev) |
| 3449 | (message "Cannot decrement %d versions from version %s" | 3449 | (message "Cannot decrement %d revisions from revision %s" |
| 3450 | (- 0 revspeccopy) vc-annotate-parent-rev))) | 3450 | (- 0 revspeccopy) vc-annotate-parent-rev))) |
| 3451 | ((stringp revspec) (setq newrev revspec)) | 3451 | ((stringp revspec) (setq newrev revspec)) |
| 3452 | (t (error "Invalid argument to vc-annotate-warp-version"))) | 3452 | (t (error "Invalid argument to vc-annotate-warp-revision"))) |
| 3453 | (when newrev | 3453 | (when newrev |
| 3454 | (vc-annotate vc-annotate-parent-file newrev | 3454 | (vc-annotate vc-annotate-parent-file newrev |
| 3455 | vc-annotate-parent-display-mode | 3455 | vc-annotate-parent-display-mode |
| @@ -3538,7 +3538,7 @@ The annotations are relative to the current time, unless overridden by OFFSET." | |||
| 3538 | (with-current-buffer vc-parent-buffer default-directory)) | 3538 | (with-current-buffer vc-parent-buffer default-directory)) |
| 3539 | (log-edit 'vc-finish-logentry nil `(lambda () ',fileset)) | 3539 | (log-edit 'vc-finish-logentry nil `(lambda () ',fileset)) |
| 3540 | (set (make-local-variable 'vc-log-fileset) fileset) | 3540 | (set (make-local-variable 'vc-log-fileset) fileset) |
| 3541 | (make-local-variable 'vc-log-version) | 3541 | (make-local-variable 'vc-log-revision) |
| 3542 | (set-buffer-modified-p nil) | 3542 | (set-buffer-modified-p nil) |
| 3543 | (setq buffer-file-name nil)) | 3543 | (setq buffer-file-name nil)) |
| 3544 | 3544 | ||