Mercurial > emacs
comparison man/files.texi @ 83494:b901f4f12f33
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-160
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-161
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-162
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-163
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-164
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-165
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-166
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-167
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-168
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-169
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-170
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-171
Update from CVS: man/mh-e.texi (Folders): Various edits.
* emacs@sv.gnu.org/emacs--devo--0--patch-172
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-58
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-59
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-60
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-61
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-62
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-63
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-64
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-534
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 22 Mar 2006 15:16:06 +0000 |
parents | e936b3347c3c |
children | 554f72770ff7 |
comparison
equal
deleted
inserted
replaced
83493:1bf2ca323037 | 83494:b901f4f12f33 |
---|---|
1288 SCCS is a proprietary but widely used version control system. In | 1288 SCCS is a proprietary but widely used version control system. In |
1289 terms of capabilities, it is the weakest of the six that VC supports. | 1289 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. |
1297 | 1297 |
1298 In the following, we discuss mainly RCS, SCCS and CVS. Nearly | 1298 In the following, we discuss mainly RCS, SCCS and CVS. Nearly |
1609 @item C-x v ~ @var{version} @key{RET} | 1609 @item C-x v ~ @var{version} @key{RET} |
1610 Examine version @var{version} of the visited file, in a buffer of its | 1610 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}. |
1619 | 1619 |
1620 @item C-x v g | 1620 @item C-x v g |
1633 @findex vc-diff | 1633 @findex vc-diff |
1634 @kindex C-x v = | 1634 @kindex C-x v = |
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 |
1645 from all the checked-in versions). You can also specify a snapshot name | 1646 from all the checked-in versions). You can also specify a snapshot name |
1646 (@pxref{Snapshots}) instead of one or both version numbers. | 1647 (@pxref{Snapshots}) instead of one or both version numbers. |
1667 find the corresponding locations in the current work file. (Older | 1668 find the corresponding locations in the current work file. (Older |
1668 versions are not, in general, present as files on your disk.) | 1669 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 |
1676 file's text, with each part colored to show how old it is. Text | 1677 file's text, with each part colored to show how old it is. Text |
1677 colored red is new, blue means old, and intermediate colors indicate | 1678 colored red is new, blue means old, and intermediate colors indicate |
1718 line. | 1719 line. |
1719 | 1720 |
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 |
1727 @subsection The Secondary Commands of VC | 1728 @subsection The Secondary Commands of VC |
1728 | 1729 |
1838 @node VC Undo | 1839 @node VC Undo |
1839 @subsubsection Undoing Version Control Actions | 1840 @subsubsection Undoing Version Control Actions |
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. |
1847 This undoes your last check-in. | 1849 This undoes your last check-in. |
1848 @end table | 1850 @end table |
1849 | 1851 |
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. |
1861 | 1863 |
1862 @kindex C-x v c | 1864 @kindex C-x v c |
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 |
1872 change and then discover a trivial error in it; you can cancel the | 1876 change and then discover a trivial error in it; you can cancel the |
1873 erroneous check-in, fix the error, and check the file in again. | 1877 erroneous check-in, fix the error, and check the file in again. |
1960 | 1964 |
1961 Here @samp{file1.c} is modified with respect to the repository, and | 1965 Here @samp{file1.c} is modified with respect to the repository, and |
1962 @samp{file2.c} is not. @samp{file3.c} is modified, but other changes | 1966 @samp{file2.c} is not. @samp{file3.c} is modified, but other changes |
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. |
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. | |
1965 | 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. |
1969 By default, this includes Version Control subdirectories such as | 1991 By default, this includes Version Control subdirectories such as |
2418 @cindex named configurations (RCS) | 2440 @cindex named configurations (RCS) |
2419 VC's snapshot facilities are modeled on RCS's named-configuration | 2441 VC's snapshot facilities are modeled on RCS's named-configuration |
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. |
2432 | 2458 |
2433 File renaming and deletion can create some difficulties with snapshots. | 2459 File renaming and deletion can create some difficulties with snapshots. |
2477 Visit the current directory's change log file and, for registered files | 2503 Visit the current directory's change log file and, for registered files |
2478 in that directory, create new entries for versions checked in since the | 2504 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. |
2488 | 2513 |
2489 @item M-1 C-x v a | 2514 @item M-1 C-x v a |
2618 accordingly. It also updates any snapshots (@pxref{Snapshots}) that | 2643 accordingly. It also updates any snapshots (@pxref{Snapshots}) that |
2619 mention the file, so that they use the new name; despite this, the | 2644 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. |
2627 | 2652 |
2628 You cannot use @code{vc-rename-file} on a file that is locked by | 2653 You cannot use @code{vc-rename-file} on a file that is locked by |
2632 @subsubsection Inserting Version Control Headers | 2657 @subsubsection Inserting Version Control Headers |
2633 | 2658 |
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. |
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. | |
2652 | 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 |
2656 insert a suitable header string. | 2685 insert a suitable header string. |
2870 make it writable. VC calls @code{cvs edit} to make the file writable, | 2899 make it writable. VC calls @code{cvs edit} to make the file writable, |
2871 and CVS takes care to notify other developers of the fact that you | 2900 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, |
2910 @code{vc-stay-local}, which enables the feature also for other back | |
2911 ends that support it, including CVS. In the following, we will talk | |
2912 only about @code{vc-cvs-stay-local}, but everything applies to | |
2913 @code{vc-stay-local} as well. | |
2914 | |
2915 If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses | |
2880 only the entry in the local CVS subdirectory to determine the file's | 2916 only the entry in the local CVS subdirectory to determine the file's |
2881 state (and possibly information returned by previous CVS commands). One | 2917 state (and possibly information returned by previous CVS commands). |
2882 consequence of this is that when you have modified a file, and somebody | 2918 One consequence of this is that when you have modified a file, and |
2883 else has already checked in other changes to the file, you are not | 2919 somebody else has already checked in other changes to the file, you |
2884 notified of it until you actually try to commit. (But you can try to | 2920 are not notified of it until you actually try to commit. (But you can |
2885 pick up any recent changes from the repository first, using @kbd{C-x v m | 2921 try to pick up any recent changes from the repository first, using |
2886 @key{RET}}, @pxref{Merging}). | 2922 @kbd{C-x v m @key{RET}}, @pxref{Merging}). |
2887 | |
2888 @vindex vc-cvs-global-switches | |
2889 The variable @code{vc-cvs-global-switches}, if non-@code{nil}, | |
2890 should be a string specifying switches to pass to CVS for all CVS | |
2891 operations. | |
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 |
2895 completely local (@pxref{Version Backups}). | 2926 completely local (@pxref{Version Backups}). |
2896 | 2927 |
2900 repositories. It also does not make any version backups. | 2931 repositories. It also does not make any version backups. |
2901 | 2932 |
2902 You can also set @code{vc-cvs-stay-local} to a regular expression | 2933 You can also set @code{vc-cvs-stay-local} to a regular expression |
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. |
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. | |
2905 | 2942 |
2906 @node Directories | 2943 @node Directories |
2907 @section File Directories | 2944 @section File Directories |
2908 | 2945 |
2909 @cindex file directory | 2946 @cindex file directory |
3035 typically the result of a failed merge from a version control system | 3072 typically the result of a failed merge from a version control system |
3036 ``update'' outside VC, due to conflicting changes to a file. Smerge | 3073 ``update'' outside VC, due to conflicting changes to a file. Smerge |
3037 mode provides commands to resolve conflicts by selecting specific | 3074 mode provides commands to resolve conflicts by selecting specific |
3038 changes. | 3075 changes. |
3039 | 3076 |
3040 See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for | 3077 @inforef{Emerge,, emacs-xtra} for the Emerge facility, which |
3041 convenient facilities for merging two similar files. | 3078 provides a powerful interface for merging files. |
3042 | 3079 |
3043 @node Misc File Ops | 3080 @node Misc File Ops |
3044 @section Miscellaneous File Operations | 3081 @section Miscellaneous File Operations |
3045 | 3082 |
3046 Emacs has commands for performing many other operations on files. | 3083 Emacs has commands for performing many other operations on files. |