diff options
| author | André Spiegel | 2006-03-21 10:34:38 +0000 |
|---|---|---|
| committer | André Spiegel | 2006-03-21 10:34:38 +0000 |
| commit | 4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c (patch) | |
| tree | d571d4b217775867ab37e6b922629338e3438b30 | |
| parent | 7704f61dc65addc307d50d739797be82a96bf4e7 (diff) | |
| download | emacs-4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c.tar.gz emacs-4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c.zip | |
Various updates and clarifications in the VC chapter.
| -rw-r--r-- | man/files.texi | 131 |
1 files changed, 84 insertions, 47 deletions
diff --git a/man/files.texi b/man/files.texi index 3d671397b34..13911ad511f 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -1290,7 +1290,7 @@ terms of capabilities, it is the weakest of the six that VC supports. | |||
| 1290 | VC compensates for certain features missing in SCCS (snapshots, for | 1290 | VC compensates for certain features missing in SCCS (snapshots, for |
| 1291 | example) by implementing them itself, but some other VC features, such | 1291 | example) by implementing them itself, but some other VC features, such |
| 1292 | as multiple branches, are not available with SCCS. Since SCCS is | 1292 | as multiple branches, are not available with SCCS. Since SCCS is |
| 1293 | non-free, not respecting its users freedom,d, you should not use it; | 1293 | non-free, not respecting its users freedom, you should not use it; |
| 1294 | use its free replacement CSSC instead. But you should use CSSC only | 1294 | use its free replacement CSSC instead. But you should use CSSC only |
| 1295 | if for some reason you cannot use RCS, or one of the higher-level | 1295 | if for some reason you cannot use RCS, or one of the higher-level |
| 1296 | systems such as CVS or GNU Arch. | 1296 | systems such as CVS or GNU Arch. |
| @@ -1611,8 +1611,8 @@ Examine version @var{version} of the visited file, in a buffer of its | |||
| 1611 | own. | 1611 | own. |
| 1612 | 1612 | ||
| 1613 | @item C-x v = | 1613 | @item C-x v = |
| 1614 | Compare the current buffer contents with the latest checked-in version | 1614 | Compare the current buffer contents with the master version from which |
| 1615 | of the file. | 1615 | you started editing. |
| 1616 | 1616 | ||
| 1617 | @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} | 1617 | @item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} |
| 1618 | Compare the specified two versions of @var{file}. | 1618 | Compare the specified two versions of @var{file}. |
| @@ -1635,10 +1635,11 @@ and create a branch from it. @xref{Branches}.) | |||
| 1635 | It is usually more convenient to compare two versions of the file, | 1635 | It is usually more convenient to compare two versions of the file, |
| 1636 | with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} | 1636 | with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} |
| 1637 | compares the current buffer contents (saving them in the file if | 1637 | compares the current buffer contents (saving them in the file if |
| 1638 | necessary) with the last checked-in version of the file. @kbd{C-u C-x | 1638 | necessary) with the master version from which you started editing the |
| 1639 | v =}, with a numeric argument, reads a file name and two version | 1639 | file (this is not necessarily the latest version of the file). |
| 1640 | numbers, then compares those versions of the specified file. Both | 1640 | @kbd{C-u C-x v =}, with a numeric argument, reads a file name and two |
| 1641 | forms display the output in a special buffer in another window. | 1641 | version numbers, then compares those versions of the specified file. |
| 1642 | Both forms display the output in a special buffer in another window. | ||
| 1642 | 1643 | ||
| 1643 | You can specify a checked-in version by its number; an empty input | 1644 | You can specify a checked-in version by its number; an empty input |
| 1644 | specifies the current contents of the work file (which may be different | 1645 | specifies the current contents of the work file (which may be different |
| @@ -1669,7 +1670,7 @@ versions are not, in general, present as files on your disk.) | |||
| 1669 | 1670 | ||
| 1670 | @findex vc-annotate | 1671 | @findex vc-annotate |
| 1671 | @kindex C-x v g | 1672 | @kindex C-x v g |
| 1672 | For some backends, you can display the file @dfn{annotated} with | 1673 | For some back ends, you can display the file @dfn{annotated} with |
| 1673 | per-line version information and using colors to enhance the visual | 1674 | per-line version information and using colors to enhance the visual |
| 1674 | appearance, with the command @kbd{M-x vc-annotate}. | 1675 | appearance, with the command @kbd{M-x vc-annotate}. |
| 1675 | It creates a new buffer (the ``annotate buffer'') displaying the | 1676 | It creates a new buffer (the ``annotate buffer'') displaying the |
| @@ -1720,7 +1721,7 @@ line. | |||
| 1720 | @item W | 1721 | @item W |
| 1721 | Annotate the workfile version--the one you are editing. If you used | 1722 | Annotate the workfile version--the one you are editing. If you used |
| 1722 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to | 1723 | @kbd{P} and @kbd{N} to browse to other revisions, use this key to |
| 1723 | return to the latest version. | 1724 | return to your current version. |
| 1724 | @end table | 1725 | @end table |
| 1725 | 1726 | ||
| 1726 | @node Secondary VC Commands | 1727 | @node Secondary VC Commands |
| @@ -1840,7 +1841,8 @@ current line was committed. | |||
| 1840 | 1841 | ||
| 1841 | @table @kbd | 1842 | @table @kbd |
| 1842 | @item C-x v u | 1843 | @item C-x v u |
| 1843 | Revert the buffer and the file to the last checked-in version. | 1844 | Revert the buffer and the file to the version from which you started |
| 1845 | editing the file. | ||
| 1844 | 1846 | ||
| 1845 | @item C-x v c | 1847 | @item C-x v c |
| 1846 | Remove the last-entered change from the master for the visited file. | 1848 | Remove the last-entered change from the master for the visited file. |
| @@ -1850,11 +1852,11 @@ This undoes your last check-in. | |||
| 1850 | @kindex C-x v u | 1852 | @kindex C-x v u |
| 1851 | @findex vc-revert-buffer | 1853 | @findex vc-revert-buffer |
| 1852 | If you want to discard your current set of changes and revert to the | 1854 | If you want to discard your current set of changes and revert to the |
| 1853 | last version checked in, use @kbd{C-x v u} (@code{vc-revert-buffer}). | 1855 | version from which you started editing the file, use @kbd{C-x v u} |
| 1854 | This leaves the file unlocked; if locking is in use, you must first lock | 1856 | (@code{vc-revert-buffer}). This leaves the file unlocked; if locking |
| 1855 | the file again before you change it again. @kbd{C-x v u} requires | 1857 | is in use, you must first lock the file again before you change it |
| 1856 | confirmation, unless it sees that you haven't made any changes since the | 1858 | again. @kbd{C-x v u} requires confirmation, unless it sees that you |
| 1857 | last checked-in version. | 1859 | haven't made any changes with respect to the master version. |
| 1858 | 1860 | ||
| 1859 | @kbd{C-x v u} is also the command to unlock a file if you lock it and | 1861 | @kbd{C-x v u} is also the command to unlock a file if you lock it and |
| 1860 | then decide not to change it. | 1862 | then decide not to change it. |
| @@ -1863,9 +1865,11 @@ then decide not to change it. | |||
| 1863 | @findex vc-cancel-version | 1865 | @findex vc-cancel-version |
| 1864 | To cancel a change that you already checked in, use @kbd{C-x v c} | 1866 | To cancel a change that you already checked in, use @kbd{C-x v c} |
| 1865 | (@code{vc-cancel-version}). This command discards all record of the | 1867 | (@code{vc-cancel-version}). This command discards all record of the |
| 1866 | most recent checked-in version. @kbd{C-x v c} also offers to revert | 1868 | most recent checked-in version, but only if your work file corresponds |
| 1867 | your work file and buffer to the previous version (the one that precedes | 1869 | to that version---you cannot use @kbd{C-x v c} to cancel a version |
| 1868 | the version that is deleted). | 1870 | that is not the latest on its branch. @kbd{C-x v c} also offers to |
| 1871 | revert your work file and buffer to the previous version (the one that | ||
| 1872 | precedes the version that is deleted). | ||
| 1869 | 1873 | ||
| 1870 | If you answer @kbd{no}, VC keeps your changes in the buffer, and locks | 1874 | If you answer @kbd{no}, VC keeps your changes in the buffer, and locks |
| 1871 | the file. The no-revert option is useful when you have checked in a | 1875 | the file. The no-revert option is useful when you have checked in a |
| @@ -1963,6 +1967,24 @@ The files @samp{file1} and @samp{file2} are under version control, | |||
| 1963 | have also been checked in to the repository---you need to merge them | 1967 | have also been checked in to the repository---you need to merge them |
| 1964 | with the work file before you can check it in. | 1968 | with the work file before you can check it in. |
| 1965 | 1969 | ||
| 1970 | @vindex{vc-stay-local} | ||
| 1971 | @vindex{vc-cvs-stay-local} | ||
| 1972 | In the above, if the repository were on a remote machine, VC would | ||
| 1973 | only contact it when the variable @code{vc-stay-local} (or | ||
| 1974 | @code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is | ||
| 1975 | because access to the repository may be slow, or you may be working | ||
| 1976 | offline and not have access to the repository at all. As a | ||
| 1977 | consequence, VC would not be able to tell you that @samp{file3.c} is | ||
| 1978 | in the ``merge'' state; you would learn that only when you try to | ||
| 1979 | check-in your modified copy of the file, or use a command such as | ||
| 1980 | @kbd{C-x v m}. | ||
| 1981 | |||
| 1982 | In practice, this is not a problem because CVS handles this case | ||
| 1983 | consistently whenever it arises. In VC, you'll simply get prompted to | ||
| 1984 | merge the remote changes into your work file first. The benefits of | ||
| 1985 | less network communication usually outweigh the disadvantage of not | ||
| 1986 | seeing remote changes immediately. | ||
| 1987 | |||
| 1966 | @vindex vc-directory-exclusion-list | 1988 | @vindex vc-directory-exclusion-list |
| 1967 | When VC Dired displays subdirectories (in the ``full'' display mode), | 1989 | When VC Dired displays subdirectories (in the ``full'' display mode), |
| 1968 | it omits some that should never contain any files under version control. | 1990 | it omits some that should never contain any files under version control. |
| @@ -2420,12 +2442,16 @@ or a snapshot against a named version. | |||
| 2420 | support. They use RCS's native facilities for this, so | 2442 | support. They use RCS's native facilities for this, so |
| 2421 | snapshots made using RCS through VC are visible even when you bypass VC. | 2443 | snapshots made using RCS through VC are visible even when you bypass VC. |
| 2422 | 2444 | ||
| 2445 | With CVS, Meta-CVS, and Subversion, VC also uses the native | ||
| 2446 | mechanism provided by that back end to make snapshots and retrieve them | ||
| 2447 | (@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion). | ||
| 2448 | |||
| 2423 | @c worded verbosely to avoid overfull hbox. | 2449 | @c worded verbosely to avoid overfull hbox. |
| 2424 | For SCCS, VC implements snapshots itself. The files it uses contain | 2450 | For SCCS, VC implements snapshots itself. The files it uses contain |
| 2425 | name/file/version-number triples. These snapshots are visible only | 2451 | name/file/version-number triples. These snapshots are visible only |
| 2426 | through VC. | 2452 | through VC. |
| 2427 | 2453 | ||
| 2428 | @c ??? What about CVS? | 2454 | There is no support for VC snapshots using GNU Arch yet. |
| 2429 | 2455 | ||
| 2430 | A snapshot is a set of checked-in versions. So make sure that all the | 2456 | A snapshot is a set of checked-in versions. So make sure that all the |
| 2431 | files are checked in and not locked when you make a snapshot. | 2457 | files are checked in and not locked when you make a snapshot. |
| @@ -2479,9 +2505,8 @@ in that directory, create new entries for versions checked in since the | |||
| 2479 | most recent entry in the change log file. | 2505 | most recent entry in the change log file. |
| 2480 | (@code{vc-update-change-log}). | 2506 | (@code{vc-update-change-log}). |
| 2481 | 2507 | ||
| 2482 | This command works with RCS or CVS only, not with SCCS. | 2508 | This command works with RCS or CVS only, not with any of the other |
| 2483 | 2509 | back ends. | |
| 2484 | @c ??? What about other back ends? | ||
| 2485 | 2510 | ||
| 2486 | @item C-u C-x v a | 2511 | @item C-u C-x v a |
| 2487 | As above, but only find entries for the current buffer's file. | 2512 | As above, but only find entries for the current buffer's file. |
| @@ -2620,7 +2645,7 @@ mention the file, so that they use the new name; despite this, the | |||
| 2620 | snapshot thus modified may not completely work (@pxref{Snapshot | 2645 | snapshot thus modified may not completely work (@pxref{Snapshot |
| 2621 | Caveats}). | 2646 | Caveats}). |
| 2622 | 2647 | ||
| 2623 | Some backends do not provide an explicit rename operation to their | 2648 | Some back ends do not provide an explicit rename operation to their |
| 2624 | repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} | 2649 | repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} |
| 2625 | on the original and renamed buffers and provide the necessary edit | 2650 | on the original and renamed buffers and provide the necessary edit |
| 2626 | log. | 2651 | log. |
| @@ -2634,22 +2659,26 @@ someone else. | |||
| 2634 | Sometimes it is convenient to put version identification strings | 2659 | Sometimes it is convenient to put version identification strings |
| 2635 | directly into working files. Certain special strings called | 2660 | directly into working files. Certain special strings called |
| 2636 | @dfn{version headers} are replaced in each successive version by the | 2661 | @dfn{version headers} are replaced in each successive version by the |
| 2637 | number of that version. | 2662 | number of that version, the name of the user who created it, and other |
| 2638 | 2663 | relevant information. All of the back ends that VC supports have such | |
| 2639 | @c ??? How does this relate to CVS? | 2664 | a mechanism, except GNU Arch. |
| 2640 | 2665 | ||
| 2641 | If you are using RCS, and version headers are present in your working | 2666 | VC does not normally use the information contained in these headers. |
| 2642 | files, Emacs can use them to determine the current version and the | 2667 | The exception is RCS---with RCS, version headers are sometimes more |
| 2643 | locking state of the files. This is more reliable than referring to the | 2668 | reliable than the master file to determine which version of the file |
| 2644 | master files, which is done when there are no version headers. Note | 2669 | you are editing. Note that in a multi-branch environment, version |
| 2645 | that in a multi-branch environment, version headers are necessary to | 2670 | headers are necessary to make VC behave correctly (@pxref{Multi-User |
| 2646 | make VC behave correctly (@pxref{Multi-User Branching}). | 2671 | Branching}). |
| 2647 | 2672 | ||
| 2648 | Searching for version headers is controlled by the variable | 2673 | Searching for RCS version headers is controlled by the variable |
| 2649 | @code{vc-consult-headers}. If it is non-@code{nil} (the default), | 2674 | @code{vc-consult-headers}. If it is non-@code{nil} (the default), |
| 2650 | Emacs searches for headers to determine the version number you are | 2675 | Emacs searches for headers to determine the version number you are |
| 2651 | editing. Setting it to @code{nil} disables this feature. | 2676 | editing. Setting it to @code{nil} disables this feature. |
| 2652 | 2677 | ||
| 2678 | Note that although CVS uses the same kind of version headers as RCS | ||
| 2679 | does, VC never searches for these headers if you are using CVS, | ||
| 2680 | regardless of the above setting. | ||
| 2681 | |||
| 2653 | @kindex C-x v h | 2682 | @kindex C-x v h |
| 2654 | @findex vc-insert-headers | 2683 | @findex vc-insert-headers |
| 2655 | You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to | 2684 | You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to |
| @@ -2872,23 +2901,25 @@ and CVS takes care to notify other developers of the fact that you | |||
| 2872 | intend to change the file. See the CVS documentation for details on | 2901 | intend to change the file. See the CVS documentation for details on |
| 2873 | using the watch feature. | 2902 | using the watch feature. |
| 2874 | 2903 | ||
| 2904 | @vindex vc-stay-local | ||
| 2875 | @vindex vc-cvs-stay-local | 2905 | @vindex vc-cvs-stay-local |
| 2876 | @cindex remote repositories (CVS) | 2906 | @cindex remote repositories (CVS) |
| 2877 | When a file's repository is on a remote machine, VC tries to keep | 2907 | When a file's repository is on a remote machine, VC tries to keep |
| 2878 | network interactions to a minimum. This is controlled by the variable | 2908 | network interactions to a minimum. This is controlled by the variable |
| 2879 | @code{vc-cvs-stay-local}. If it is @code{t} (the default), then VC uses | 2909 | @code{vc-cvs-stay-local}. There is another variable, |
| 2880 | only the entry in the local CVS subdirectory to determine the file's | 2910 | @code{vc-stay-local}, which enables the feature also for other back |
| 2881 | state (and possibly information returned by previous CVS commands). One | 2911 | ends that support it, including CVS. In the following, we will talk |
| 2882 | consequence of this is that when you have modified a file, and somebody | 2912 | only about @code{vc-cvs-stay-local}, but everything applies to |
| 2883 | else has already checked in other changes to the file, you are not | 2913 | @code{vc-stay-local} as well. |
| 2884 | notified of it until you actually try to commit. (But you can try to | ||
| 2885 | pick up any recent changes from the repository first, using @kbd{C-x v m | ||
| 2886 | @key{RET}}, @pxref{Merging}). | ||
| 2887 | 2914 | ||
| 2888 | @vindex vc-cvs-global-switches | 2915 | If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses |
| 2889 | The variable @code{vc-cvs-global-switches}, if non-@code{nil}, | 2916 | only the entry in the local CVS subdirectory to determine the file's |
| 2890 | should be a string specifying switches to pass to CVS for all CVS | 2917 | state (and possibly information returned by previous CVS commands). |
| 2891 | operations. | 2918 | One consequence of this is that when you have modified a file, and |
| 2919 | somebody else has already checked in other changes to the file, you | ||
| 2920 | are not notified of it until you actually try to commit. (But you can | ||
| 2921 | try to pick up any recent changes from the repository first, using | ||
| 2922 | @kbd{C-x v m @key{RET}}, @pxref{Merging}). | ||
| 2892 | 2923 | ||
| 2893 | When @code{vc-cvs-stay-local} is @code{t}, VC also makes local | 2924 | When @code{vc-cvs-stay-local} is @code{t}, VC also makes local |
| 2894 | version backups, so that simple diff and revert operations are | 2925 | version backups, so that simple diff and revert operations are |
| @@ -2903,6 +2934,12 @@ repositories. It also does not make any version backups. | |||
| 2903 | that is matched against the repository host name; VC then stays local | 2934 | that is matched against the repository host name; VC then stays local |
| 2904 | only for repositories from hosts that match the pattern. | 2935 | only for repositories from hosts that match the pattern. |
| 2905 | 2936 | ||
| 2937 | @vindex vc-cvs-global-switches | ||
| 2938 | You can specify additional command line options to pass to all CVS | ||
| 2939 | operations in the variable @code{vc-cvs-global-switches}. These | ||
| 2940 | switches are inserted immediately after the @code{cvs} command, before | ||
| 2941 | the name of the operation to invoke. | ||
| 2942 | |||
| 2906 | @node Directories | 2943 | @node Directories |
| 2907 | @section File Directories | 2944 | @section File Directories |
| 2908 | 2945 | ||