diff options
| author | Eric S. Raymond | 2007-10-10 13:24:29 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-10-10 13:24:29 +0000 |
| commit | da1080a25c39c8f8fd1f73edcffed10d409a934f (patch) | |
| tree | 0a48c4f9ce53c7f1a87b48995565d043c1942f1f | |
| parent | d7b60083ce07eb9d4af2bdb97c1062e42445f395 (diff) | |
| download | emacs-da1080a25c39c8f8fd1f73edcffed10d409a934f.tar.gz emacs-da1080a25c39c8f8fd1f73edcffed10d409a934f.zip | |
New VC command docs for the Emacs manual.
| -rw-r--r-- | doc/emacs/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 143 |
2 files changed, 94 insertions, 56 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 41decab74bf..67f85861e2d 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2007-10-10 Eric S. Raymond <esr@snark.thyrsus.com> | ||
| 2 | |||
| 3 | * files.texi (Version Systems): Merge in changes for new VC | ||
| 4 | with fileset-orienrted operations. | ||
| 5 | |||
| 1 | 2007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> | 6 | 2007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 7 | ||
| 3 | * files.texi (Version Systems): Describe newerte VCses. | 8 | * files.texi (Version Systems): Describe newer VCses. |
| 4 | Reorder the descriptions to be chronological. | 9 | Reorder the descriptions to be chronological. |
| 5 | 10 | ||
| 6 | 2007-10-04 Nick Roberts <nickrob@snap.net.nz> | 11 | 2007-10-04 Nick Roberts <nickrob@snap.net.nz> |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 6e90cff5776..92bd9c1bd49 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1465,6 +1465,15 @@ figure that out, and while file-based systems are passing out of use | |||
| 1465 | there are lots of legacy repositories still to be dealt with at time of | 1465 | there are lots of legacy repositories still to be dealt with at time of |
| 1466 | writing in 2007. | 1466 | writing in 2007. |
| 1467 | 1467 | ||
| 1468 | In fact, older versions of VC mode supported only file-based systems, | ||
| 1469 | leading to some unhappy results when it was used to drive | ||
| 1470 | changeset-based ones--the Subversion support, for example, used to break | ||
| 1471 | up changesets into multiple per-file commits. This has been fixed, but | ||
| 1472 | it has left a legacy in VC-mode's terminology. The terms ``checkin'' | ||
| 1473 | and ``checkout'' are associated with file-based and locking-based | ||
| 1474 | systems and a bit archaic; nowadays those operations are usually called | ||
| 1475 | ``commit'' and ``update''. | ||
| 1476 | |||
| 1468 | @cindex centralized vs. decentralized | 1477 | @cindex centralized vs. decentralized |
| 1469 | 1478 | ||
| 1470 | Early version-control systems were designed around a @dfn{centralized} | 1479 | Early version-control systems were designed around a @dfn{centralized} |
| @@ -1575,8 +1584,46 @@ system, but is usually not excessive. | |||
| 1575 | @node Basic VC Editing | 1584 | @node Basic VC Editing |
| 1576 | @subsection Basic Editing under Version Control | 1585 | @subsection Basic Editing under Version Control |
| 1577 | 1586 | ||
| 1587 | @node Selecting a fileset | ||
| 1588 | @subsubsection Choosing the scope of your command | ||
| 1589 | |||
| 1590 | @cindex filesets | ||
| 1591 | Most VC commands operate on @dfn{filesets}. A fileset is a | ||
| 1592 | group of files that you have chosen to treat as a unit at the | ||
| 1593 | time you perform the command. Filesets are the way that VC | ||
| 1594 | mode bridges the gap between file-based and changeset-based | ||
| 1595 | version-control systems. | ||
| 1596 | |||
| 1597 | If you are visiting a version-controlled file in the current buffer, | ||
| 1598 | the default fileset for any command is simply that one file. If you | ||
| 1599 | are visiting a VC Dired buffer, and some files in it are marked, | ||
| 1600 | your fileset is the marked files only. | ||
| 1601 | |||
| 1602 | All files in a fileset must be under the same version-control system. | ||
| 1603 | If they are not, VC mode wil throw an error when you attempt to execute | ||
| 1604 | a command on the fileset. | ||
| 1605 | |||
| 1606 | Filesets, are, essentially, a way to pass multiple file arguments as | ||
| 1607 | a group to underlying version-control commands. For example, on | ||
| 1608 | Subversion a checkin with more than one file in its fileset will become a | ||
| 1609 | joint commit, as though you had typed @command{svn | ||
| 1610 | commit} with those file arguments at the shell command line in the | ||
| 1611 | directory of the selected buffer. | ||
| 1612 | |||
| 1613 | If you are used to earlier versions of VC, the change in behavior you | ||
| 1614 | will notice is in VC-Dired mode. Other than @kbd{C-x v v}, most VC-mode | ||
| 1615 | commands used to operate on only one file selected by the line the | ||
| 1616 | cursor is on. The change in the behavior of @kbd{C-x v v} is more | ||
| 1617 | subtle. Formerly it operated in parallel on all marked files, but did | ||
| 1618 | not pass them to the version-control backends as a group. Now it does, | ||
| 1619 | which enables VC to drive changeset-based version-control systems. | ||
| 1620 | |||
| 1621 | @node Doing the next logical thing | ||
| 1622 | @subsubsection Performing the next operation in the development cycle | ||
| 1623 | |||
| 1578 | The principal VC command is an all-purpose command that performs | 1624 | The principal VC command is an all-purpose command that performs |
| 1579 | either locking or check-in, depending on the situation. | 1625 | either locking or check-in on your current fileset, depending on |
| 1626 | the situation. | ||
| 1580 | 1627 | ||
| 1581 | @table @kbd | 1628 | @table @kbd |
| 1582 | @itemx C-x v v | 1629 | @itemx C-x v v |
| @@ -1776,11 +1823,13 @@ in the @samp{*VC-Log*} buffer, and you can go back to that buffer at any | |||
| 1776 | time to complete the check-in. | 1823 | time to complete the check-in. |
| 1777 | 1824 | ||
| 1778 | If you change several source files for the same reason, it is often | 1825 | If you change several source files for the same reason, it is often |
| 1779 | convenient to specify the same log entry for many of the files. To do | 1826 | convenient to specify the same log entry for many of the files. (This |
| 1780 | this, use the history of previous log entries. The commands @kbd{M-n}, | 1827 | is the normal way to do things on a changeset-oriented system, where |
| 1781 | @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this work just like the | 1828 | comments are attached to changesets rather than the history of |
| 1782 | minibuffer history commands (except that these versions are used outside | 1829 | individual files.) The most convenient way to do this is to mark all the |
| 1783 | the minibuffer). | 1830 | files in VC-Dired mode and check in from there; the log buffer will |
| 1831 | carry the fileset information with it and do a group commit when you | ||
| 1832 | confirm it with @kbd{C-c C-c}. | ||
| 1784 | 1833 | ||
| 1785 | However, you can also browse the history of previous log entries to | 1834 | However, you can also browse the history of previous log entries to |
| 1786 | duplicate a checkin comment. This can be useful when you want several | 1835 | duplicate a checkin comment. This can be useful when you want several |
| @@ -1806,11 +1855,11 @@ Examine version @var{version} of the visited file, in a buffer of its | |||
| 1806 | own. | 1855 | own. |
| 1807 | 1856 | ||
| 1808 | @item C-x v = | 1857 | @item C-x v = |
| 1809 | Compare the current buffer contents with the focus version from which | 1858 | Compare the buffer contents of the current |
| 1810 | you started editing. | 1859 | fileset with the focus version from which you started editing. |
| 1811 | 1860 | ||
| 1812 | @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} | 1861 | @item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} |
| 1813 | Compare the specified two versions of @var{file}. | 1862 | Compare the specified two repository versions of the current fileset. |
| 1814 | 1863 | ||
| 1815 | @item C-x v g | 1864 | @item C-x v g |
| 1816 | Display the file with per-line version information and using colors. | 1865 | Display the file with per-line version information and using colors. |
| @@ -1827,14 +1876,18 @@ and create a branch from it. @xref{Branches}.) | |||
| 1827 | 1876 | ||
| 1828 | @findex vc-diff | 1877 | @findex vc-diff |
| 1829 | @kindex C-x v = | 1878 | @kindex C-x v = |
| 1830 | It is usually more convenient to compare two versions of the file, | 1879 | @kbd{C-x v =} compares the current buffer contents of each file in the |
| 1831 | with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} | 1880 | current fileset (saving them in the file if necessary) with the |
| 1832 | compares the current buffer contents (saving them in the file if | 1881 | repository version from which you started editing each file (this is not |
| 1833 | necessary) with the master version from which you started editing the | 1882 | necessarily the latest version of the file). The diff will be displayed |
| 1834 | file (this is not necessarily the latest version of the file). | 1883 | in a special buffer in another window. |
| 1835 | @kbd{C-u C-x v =}, with a numeric argument, reads a file name and two | 1884 | |
| 1836 | version numbers, then compares those versions of the specified file. | 1885 | @findex vc-diff |
| 1837 | Both forms display the output in a special buffer in another window. | 1886 | @kindex C-u C-x v = |
| 1887 | You can compare two repository versions of the current fileset with | ||
| 1888 | the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads | ||
| 1889 | two version numbers or tags. The diff will be displayed in a special | ||
| 1890 | buffer in another window. | ||
| 1838 | 1891 | ||
| 1839 | You can specify a checked-in version by its number; an empty input | 1892 | You can specify a checked-in version by its number; an empty input |
| 1840 | specifies the current contents of the work file (which may be different | 1893 | specifies the current contents of the work file (which may be different |
| @@ -1847,9 +1900,16 @@ from all the checked-in versions). You can also specify a snapshot name | |||
| 1847 | @end ifnottex | 1900 | @end ifnottex |
| 1848 | instead of one or both version numbers. | 1901 | instead of one or both version numbers. |
| 1849 | 1902 | ||
| 1850 | If you supply a directory name instead of the name of a registered | 1903 | Note that if your version-control system is file-oriented (SCCS, RCS, |
| 1851 | file, this command compares the two specified versions of all registered | 1904 | CVS) rather than fileset-oriented (CVS, Subversion, GNU Arch) specifying |
| 1852 | files in that directory and its subdirectories. | 1905 | a version of a multiple-file fileset by number (as opposed to a snapshot |
| 1906 | name or RSCCS/RCS tag) is unlikely to return diffs that are connected in | ||
| 1907 | any meaningful way. | ||
| 1908 | |||
| 1909 | If you invoke @kbd{C-u C-x v =} or @kbd{C-u C-x v =} from a buffer | ||
| 1910 | that is neither visiting a version-controlled file nor a VC Dired | ||
| 1911 | buffer, these commands will generate a diff of all registered files in | ||
| 1912 | the current directory and its subdirectories. | ||
| 1853 | 1913 | ||
| 1854 | @vindex vc-diff-switches | 1914 | @vindex vc-diff-switches |
| 1855 | @vindex vc-rcs-diff-switches | 1915 | @vindex vc-rcs-diff-switches |
| @@ -2083,41 +2143,14 @@ haven't made any changes with respect to the master version. | |||
| 2083 | then decide not to change it. | 2143 | then decide not to change it. |
| 2084 | 2144 | ||
| 2085 | @kindex C-x v c | 2145 | @kindex C-x v c |
| 2086 | @findex vc-cancel-version | 2146 | @findex vc-rollback |
| 2087 | To cancel a change that you already checked in, use @kbd{C-x v c} | 2147 | To cancel a change that you already checked in, use @kbd{C-x v c} |
| 2088 | (@code{vc-cancel-version}). This command discards all record of the | 2148 | (@code{vc-rollback}). This command discards all record of the most |
| 2089 | most recent checked-in version, but only if your work file corresponds | 2149 | recent checked-in version, but only if your work file corresponds to |
| 2090 | to that version---you cannot use @kbd{C-x v c} to cancel a version | 2150 | that version---you cannot use @kbd{C-x v c} to cancel a version that is |
| 2091 | that is not the latest on its branch. @kbd{C-x v c} also offers to | 2151 | not the latest on its branch. Note that many version-control systems do |
| 2092 | revert your work file and buffer to the previous version (the one that | 2152 | not support rollback at all; this command is something of a historical |
| 2093 | precedes the version that is deleted). | 2153 | relic. |
| 2094 | |||
| 2095 | If you answer @kbd{no}, VC keeps your changes in the buffer, and locks | ||
| 2096 | the file. The no-revert option is useful when you have checked in a | ||
| 2097 | change and then discover a trivial error in it; you can cancel the | ||
| 2098 | erroneous check-in, fix the error, and check the file in again. | ||
| 2099 | |||
| 2100 | When @kbd{C-x v c} does not revert the buffer, it unexpands all | ||
| 2101 | version control headers in the buffer instead | ||
| 2102 | @iftex | ||
| 2103 | (@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}). | ||
| 2104 | @end iftex | ||
| 2105 | @ifnottex | ||
| 2106 | (@pxref{Version Headers}). | ||
| 2107 | @end ifnottex | ||
| 2108 | This is because the buffer no longer corresponds to any existing | ||
| 2109 | version. If you check it in again, the check-in process will expand | ||
| 2110 | the headers properly for the new version number. | ||
| 2111 | |||
| 2112 | However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header | ||
| 2113 | automatically. If you use that header feature, you have to unexpand it | ||
| 2114 | by hand---by deleting the entry for the version that you just canceled. | ||
| 2115 | |||
| 2116 | Be careful when invoking @kbd{C-x v c}, as it is easy to lose a lot of | ||
| 2117 | work with it. To help you be careful, this command always requires | ||
| 2118 | confirmation with @kbd{yes}. Note also that this command is disabled | ||
| 2119 | under CVS, because canceling versions is very dangerous and discouraged | ||
| 2120 | with CVS. | ||
| 2121 | 2154 | ||
| 2122 | @ifnottex | 2155 | @ifnottex |
| 2123 | @c vc1-xtra.texi needs extra level of lowering. | 2156 | @c vc1-xtra.texi needs extra level of lowering. |