diff options
| author | Eric S. Raymond | 2007-10-06 10:09:19 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-10-06 10:09:19 +0000 |
| commit | ca7442e8459befc944ff810e5b8e366bd75994fd (patch) | |
| tree | a756016455b2d7c7c6893eb9edccc484d64bce7d | |
| parent | b981e2c6cdb29e56c534527a507fbd61966952d9 (diff) | |
| download | emacs-ca7442e8459befc944ff810e5b8e366bd75994fd.tar.gz emacs-ca7442e8459befc944ff810e5b8e366bd75994fd.zip | |
More manual updates and additions bringing it current with modern
VCSes. This includes the workfile version -> focus version
terminology change, but not the UI changes for new VC.
| -rw-r--r-- | doc/emacs/files.texi | 71 |
1 files changed, 44 insertions, 27 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 14d6f3d83e5..2e7f1baaa1a 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1557,8 +1557,10 @@ Perform the next logical version control operation on this file. | |||
| 1557 | @findex vc-next-action | 1557 | @findex vc-next-action |
| 1558 | @kindex C-x v v | 1558 | @kindex C-x v v |
| 1559 | The precise action of this command depends on the state of the file, | 1559 | The precise action of this command depends on the state of the file, |
| 1560 | and whether the version control system uses locking or not. SCCS and | 1560 | and whether the version control system uses locking or merging. SCCS and |
| 1561 | RCS normally use locking; CVS normally does not use locking. | 1561 | RCS normally use locking; CVS and Subversion normally use |
| 1562 | merging but can be configured to do locking. Later systems such as | ||
| 1563 | GNU Arch and Mercurial always use merging. | ||
| 1562 | 1564 | ||
| 1563 | @findex vc-toggle-read-only | 1565 | @findex vc-toggle-read-only |
| 1564 | @kindex C-x C-q @r{(Version Control)} | 1566 | @kindex C-x C-q @r{(Version Control)} |
| @@ -1610,25 +1612,27 @@ that there is no such thing as stealing a lock. | |||
| 1610 | @node Without Locking | 1612 | @node Without Locking |
| 1611 | @subsubsection Basic Version Control without Locking | 1613 | @subsubsection Basic Version Control without Locking |
| 1612 | 1614 | ||
| 1613 | When there is no locking---the default for CVS---work files are always | 1615 | When your version-control system is merging-based rather than |
| 1614 | writable; you do not need to do anything before you begin to edit a | 1616 | locking-based---the default for CVS and Subversion, and the way GNU |
| 1615 | file. The status indicator on the mode line is @samp{-} if the file is | 1617 | Arch always works---work files are always writable; you do not need to |
| 1616 | unmodified; it flips to @samp{:} as soon as you save any changes in the | 1618 | do anything before you begin to edit a file. The status indicator on |
| 1617 | work file. | 1619 | the mode line is @samp{-} if the file is unmodified; it flips to |
| 1620 | @samp{:} as soon as you save any changes in the work file. | ||
| 1618 | 1621 | ||
| 1619 | Here is what @kbd{C-x v v} does when using CVS: | 1622 | Here is what @kbd{C-x v v} does when using a merging-based system |
| 1623 | (such as CVS or Subversion in their defaiult merging mode): | ||
| 1620 | 1624 | ||
| 1621 | @itemize @bullet | 1625 | @itemize @bullet |
| 1622 | @item | 1626 | @item |
| 1623 | If some other user has checked in changes into the master file, Emacs | 1627 | If some other user has checked in changes into the repository, Emacs |
| 1624 | asks you whether you want to merge those changes into your own work | 1628 | asks you whether you want to merge those changes into your own work |
| 1625 | file. You must do this before you can check in your own changes. (To | 1629 | file. You must do this before you can check in your own changes. (To |
| 1626 | pick up any recent changes from the master file @emph{without} trying | 1630 | pick up any recent changes from the repository @emph{without} trying |
| 1627 | to commit your own changes, type @kbd{C-x v m @key{RET}}.) | 1631 | to commit your own changes, type @kbd{C-x v m @key{RET}}.) |
| 1628 | @xref{Merging}. | 1632 | @xref{Merging}. |
| 1629 | 1633 | ||
| 1630 | @item | 1634 | @item |
| 1631 | If there are no new changes in the master file, but you have made | 1635 | If there are no new changes in the repository, but you have made |
| 1632 | modifications in your work file, @kbd{C-x v v} checks in your changes. | 1636 | modifications in your work file, @kbd{C-x v v} checks in your changes. |
| 1633 | In order to do this, it first reads the log entry for the new version. | 1637 | In order to do this, it first reads the log entry for the new version. |
| 1634 | @xref{Log Buffer}. | 1638 | @xref{Log Buffer}. |
| @@ -1639,19 +1643,21 @@ If the file is not modified, the @kbd{C-x v v} does nothing. | |||
| 1639 | 1643 | ||
| 1640 | These rules also apply when you use RCS in the mode that does not | 1644 | These rules also apply when you use RCS in the mode that does not |
| 1641 | require locking, except that automatic merging of changes from the | 1645 | require locking, except that automatic merging of changes from the |
| 1642 | master file is not implemented. Unfortunately, this means that nothing | 1646 | repository is not implemented. Unfortunately, this means that nothing |
| 1643 | informs you if another user has checked in changes in the same file | 1647 | informs you if another user has checked in changes in the same file |
| 1644 | since you began editing it, and when this happens, his changes will be | 1648 | since you began editing it, and when this happens, his changes will be |
| 1645 | effectively removed when you check in your version (though they will | 1649 | effectively removed when you check in your version (though they will |
| 1646 | remain in the master file, so they will not be entirely lost). You must | 1650 | remain in the repository, so they will not be entirely lost). You must |
| 1647 | therefore verify that the current version is unchanged, before you | 1651 | therefore verify that the current version is unchanged, before you |
| 1648 | check in your changes. We hope to eliminate this risk and provide | 1652 | check in your changes. |
| 1649 | automatic merging with RCS in a future Emacs version. | ||
| 1650 | 1653 | ||
| 1651 | In addition, locking is possible with RCS even in this mode, although | 1654 | In addition, locking is possible with RCS even in this mode, although |
| 1652 | it is not required; @kbd{C-x v v} with an unmodified file locks the | 1655 | it is not required; @kbd{C-x v v} with an unmodified file locks the |
| 1653 | file, just as it does with RCS in its normal (locking) mode. | 1656 | file, just as it does with RCS in its normal (locking) mode. |
| 1654 | 1657 | ||
| 1658 | Later systems like CVS, Subversion and Arch will notice conflicting | ||
| 1659 | changes in the repository automatically and notify you when they occur. | ||
| 1660 | |||
| 1655 | @node Advanced C-x v v | 1661 | @node Advanced C-x v v |
| 1656 | @subsubsection Advanced Control in @kbd{C-x v v} | 1662 | @subsubsection Advanced Control in @kbd{C-x v v} |
| 1657 | 1663 | ||
| @@ -1721,7 +1727,7 @@ the revision control log. | |||
| 1721 | In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x | 1727 | In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x |
| 1722 | log-edit-show-files}) shows the list of files to be committed in case | 1728 | log-edit-show-files}) shows the list of files to be committed in case |
| 1723 | you need to check that. (This can be a list of more than one file if | 1729 | you need to check that. (This can be a list of more than one file if |
| 1724 | you use VC Dired mode or PCL-CVS. | 1730 | you use VC Dired mode or PCL-CVS.) |
| 1725 | @iftex | 1731 | @iftex |
| 1726 | @xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}, | 1732 | @xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}, |
| 1727 | @end iftex | 1733 | @end iftex |
| @@ -1747,8 +1753,15 @@ this, use the history of previous log entries. The commands @kbd{M-n}, | |||
| 1747 | minibuffer history commands (except that these versions are used outside | 1753 | minibuffer history commands (except that these versions are used outside |
| 1748 | the minibuffer). | 1754 | the minibuffer). |
| 1749 | 1755 | ||
| 1756 | However, you can also browse the history of previous log entries to | ||
| 1757 | duplicate a checkin comment. This can be useful when you want several | ||
| 1758 | files to have checkin comments that vary only slightly from each | ||
| 1759 | other. The commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for | ||
| 1760 | doing this work just like the minibuffer history commands (except that | ||
| 1761 | these versions are used outside the minibuffer). | ||
| 1762 | |||
| 1750 | @vindex vc-log-mode-hook | 1763 | @vindex vc-log-mode-hook |
| 1751 | Each time you check in a file, the log entry buffer is put into VC Log | 1764 | Each time you check in a change, the log entry buffer is put into VC Log |
| 1752 | mode, which involves running two hooks: @code{text-mode-hook} and | 1765 | mode, which involves running two hooks: @code{text-mode-hook} and |
| 1753 | @code{vc-log-mode-hook}. @xref{Hooks}. | 1766 | @code{vc-log-mode-hook}. @xref{Hooks}. |
| 1754 | 1767 | ||
| @@ -1764,7 +1777,7 @@ Examine version @var{version} of the visited file, in a buffer of its | |||
| 1764 | own. | 1777 | own. |
| 1765 | 1778 | ||
| 1766 | @item C-x v = | 1779 | @item C-x v = |
| 1767 | Compare the current buffer contents with the master version from which | 1780 | Compare the current buffer contents with the focus version from which |
| 1768 | you started editing. | 1781 | you started editing. |
| 1769 | 1782 | ||
| 1770 | @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} | 1783 | @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} |
| @@ -1877,7 +1890,7 @@ the author's description of the changes in the revision on the current | |||
| 1877 | line. | 1890 | line. |
| 1878 | 1891 | ||
| 1879 | @item W | 1892 | @item W |
| 1880 | Annotate the workfile version--the one you are editing. If you used | 1893 | Annotate the focus version--the one you are editing. If you used |
| 1881 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to | 1894 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to |
| 1882 | return to your current version. | 1895 | return to your current version. |
| 1883 | @end table | 1896 | @end table |
| @@ -2123,10 +2136,10 @@ example above have branch numbers 1.2.1 and 1.2.2. | |||
| 2123 | @subsubsection Switching between Branches | 2136 | @subsubsection Switching between Branches |
| 2124 | 2137 | ||
| 2125 | To switch between branches, type @kbd{C-u C-x v v} and specify the | 2138 | To switch between branches, type @kbd{C-u C-x v v} and specify the |
| 2126 | version number you want to select. This version is then visited | 2139 | version number you want to select. On a locking-based system, this |
| 2127 | @emph{unlocked} (write-protected), so you can examine it before locking | 2140 | version is then visited @emph{unlocked} (write-protected), so you can |
| 2128 | it. Switching branches in this way is allowed only when the file is not | 2141 | examine it before locking it. Switching branches in this way is allowed |
| 2129 | locked. | 2142 | only when the file is not locked. |
| 2130 | 2143 | ||
| 2131 | You can omit the minor version number, thus giving only the branch | 2144 | You can omit the minor version number, thus giving only the branch |
| 2132 | number; this takes you to the head version on the chosen branch. If you | 2145 | number; this takes you to the head version on the chosen branch. If you |
| @@ -2151,10 +2164,14 @@ that point. | |||
| 2151 | 2164 | ||
| 2152 | To create a new branch at an older version (one that is no longer the | 2165 | To create a new branch at an older version (one that is no longer the |
| 2153 | head of a branch), first select that version (@pxref{Switching | 2166 | head of a branch), first select that version (@pxref{Switching |
| 2154 | Branches}), then lock it with @kbd{C-x v v}. You'll be asked to | 2167 | Branches}). Your procedure will then differ depending on whether you |
| 2155 | confirm, when you lock the old version, that you really mean to create a | 2168 | are using a locking or merging-based VCS. |
| 2156 | new branch---if you say no, you'll be offered a chance to lock the | 2169 | |
| 2157 | latest version instead. | 2170 | On a locking VCS, you will need to lock the old version branch with |
| 2171 | @kbd{C-x v v}. You'll be asked to confirm, when you lock the old | ||
| 2172 | version, that you really mean to create a new branch---if you say no, | ||
| 2173 | you'll be offered a chance to lock the latest version instead. On | ||
| 2174 | a merging-based VCS you will skip this step. | ||
| 2158 | 2175 | ||
| 2159 | Then make your changes and type @kbd{C-x v v} again to check in a new | 2176 | Then make your changes and type @kbd{C-x v v} again to check in a new |
| 2160 | version. This automatically creates a new branch starting from the | 2177 | version. This automatically creates a new branch starting from the |