aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Spiegel2006-03-21 10:34:38 +0000
committerAndré Spiegel2006-03-21 10:34:38 +0000
commit4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c (patch)
treed571d4b217775867ab37e6b922629338e3438b30
parent7704f61dc65addc307d50d739797be82a96bf4e7 (diff)
downloademacs-4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c.tar.gz
emacs-4ed53daa17bce02b5bb08bacdd6ce88b4277ed9c.zip
Various updates and clarifications in the VC chapter.
-rw-r--r--man/files.texi131
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.
1290VC compensates for certain features missing in SCCS (snapshots, for 1290VC compensates for certain features missing in SCCS (snapshots, for
1291example) by implementing them itself, but some other VC features, such 1291example) by implementing them itself, but some other VC features, such
1292as multiple branches, are not available with SCCS. Since SCCS is 1292as multiple branches, are not available with SCCS. Since SCCS is
1293non-free, not respecting its users freedom,d, you should not use it; 1293non-free, not respecting its users freedom, you should not use it;
1294use its free replacement CSSC instead. But you should use CSSC only 1294use its free replacement CSSC instead. But you should use CSSC only
1295if for some reason you cannot use RCS, or one of the higher-level 1295if for some reason you cannot use RCS, or one of the higher-level
1296systems such as CVS or GNU Arch. 1296systems such as CVS or GNU Arch.
@@ -1611,8 +1611,8 @@ Examine version @var{version} of the visited file, in a buffer of its
1611own. 1611own.
1612 1612
1613@item C-x v = 1613@item C-x v =
1614Compare the current buffer contents with the latest checked-in version 1614Compare the current buffer contents with the master version from which
1615of the file. 1615you 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}
1618Compare the specified two versions of @var{file}. 1618Compare 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,
1636with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} 1636with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =}
1637compares the current buffer contents (saving them in the file if 1637compares the current buffer contents (saving them in the file if
1638necessary) with the last checked-in version of the file. @kbd{C-u C-x 1638necessary) with the master version from which you started editing the
1639v =}, with a numeric argument, reads a file name and two version 1639file (this is not necessarily the latest version of the file).
1640numbers, 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
1641forms display the output in a special buffer in another window. 1641version numbers, then compares those versions of the specified file.
1642Both 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
1644specifies the current contents of the work file (which may be different 1645specifies 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
1673per-line version information and using colors to enhance the visual 1674per-line version information and using colors to enhance the visual
1674appearance, with the command @kbd{M-x vc-annotate}. 1675appearance, with the command @kbd{M-x vc-annotate}.
1675It creates a new buffer (the ``annotate buffer'') displaying the 1676It creates a new buffer (the ``annotate buffer'') displaying the
@@ -1720,7 +1721,7 @@ line.
1720@item W 1721@item W
1721Annotate the workfile version--the one you are editing. If you used 1722Annotate 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
1723return to the latest version. 1724return 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
1843Revert the buffer and the file to the last checked-in version. 1844Revert the buffer and the file to the version from which you started
1845editing the file.
1844 1846
1845@item C-x v c 1847@item C-x v c
1846Remove the last-entered change from the master for the visited file. 1848Remove 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
1853last version checked in, use @kbd{C-x v u} (@code{vc-revert-buffer}). 1855version from which you started editing the file, use @kbd{C-x v u}
1854This 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
1855the file again before you change it again. @kbd{C-x v u} requires 1857is in use, you must first lock the file again before you change it
1856confirmation, unless it sees that you haven't made any changes since the 1858again. @kbd{C-x v u} requires confirmation, unless it sees that you
1857last checked-in version. 1859haven'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
1860then decide not to change it. 1862then 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
1866most recent checked-in version. @kbd{C-x v c} also offers to revert 1868most recent checked-in version, but only if your work file corresponds
1867your work file and buffer to the previous version (the one that precedes 1869to that version---you cannot use @kbd{C-x v c} to cancel a version
1868the version that is deleted). 1870that is not the latest on its branch. @kbd{C-x v c} also offers to
1871revert your work file and buffer to the previous version (the one that
1872precedes 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
1871the file. The no-revert option is useful when you have checked in a 1875the 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,
1963have also been checked in to the repository---you need to merge them 1967have also been checked in to the repository---you need to merge them
1964with the work file before you can check it in. 1968with 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
1973only contact it when the variable @code{vc-stay-local} (or
1974@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
1975because access to the repository may be slow, or you may be working
1976offline and not have access to the repository at all. As a
1977consequence, VC would not be able to tell you that @samp{file3.c} is
1978in the ``merge'' state; you would learn that only when you try to
1979check-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
1983consistently whenever it arises. In VC, you'll simply get prompted to
1984merge the remote changes into your work file first. The benefits of
1985less network communication usually outweigh the disadvantage of not
1986seeing 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),
1968it omits some that should never contain any files under version control. 1990it omits some that should never contain any files under version control.
@@ -2420,12 +2442,16 @@ or a snapshot against a named version.
2420support. They use RCS's native facilities for this, so 2442support. They use RCS's native facilities for this, so
2421snapshots made using RCS through VC are visible even when you bypass VC. 2443snapshots 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
2446mechanism 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
2425name/file/version-number triples. These snapshots are visible only 2451name/file/version-number triples. These snapshots are visible only
2426through VC. 2452through 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
2431files are checked in and not locked when you make a snapshot. 2457files 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
2479most recent entry in the change log file. 2505most recent entry in the change log file.
2480(@code{vc-update-change-log}). 2506(@code{vc-update-change-log}).
2481 2507
2482This command works with RCS or CVS only, not with SCCS. 2508This command works with RCS or CVS only, not with any of the other
2483 2509back 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
2487As above, but only find entries for the current buffer's file. 2512As 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
2620snapshot thus modified may not completely work (@pxref{Snapshot 2645snapshot thus modified may not completely work (@pxref{Snapshot
2621Caveats}). 2646Caveats}).
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
2624repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} 2649repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
2625on the original and renamed buffers and provide the necessary edit 2650on the original and renamed buffers and provide the necessary edit
2626log. 2651log.
@@ -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
2635directly into working files. Certain special strings called 2660directly 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
2637number of that version. 2662number of that version, the name of the user who created it, and other
2638 2663relevant information. All of the back ends that VC supports have such
2639@c ??? How does this relate to CVS? 2664a 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.
2642files, Emacs can use them to determine the current version and the 2667The exception is RCS---with RCS, version headers are sometimes more
2643locking state of the files. This is more reliable than referring to the 2668reliable than the master file to determine which version of the file
2644master files, which is done when there are no version headers. Note 2669you are editing. Note that in a multi-branch environment, version
2645that in a multi-branch environment, version headers are necessary to 2670headers are necessary to make VC behave correctly (@pxref{Multi-User
2646make VC behave correctly (@pxref{Multi-User Branching}). 2671Branching}).
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),
2650Emacs searches for headers to determine the version number you are 2675Emacs searches for headers to determine the version number you are
2651editing. Setting it to @code{nil} disables this feature. 2676editing. Setting it to @code{nil} disables this feature.
2652 2677
2678 Note that although CVS uses the same kind of version headers as RCS
2679does, VC never searches for these headers if you are using CVS,
2680regardless 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
2872intend to change the file. See the CVS documentation for details on 2901intend to change the file. See the CVS documentation for details on
2873using the watch feature. 2902using 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
2878network interactions to a minimum. This is controlled by the variable 2908network 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,
2880only 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
2881state (and possibly information returned by previous CVS commands). One 2911ends that support it, including CVS. In the following, we will talk
2882consequence of this is that when you have modified a file, and somebody 2912only about @code{vc-cvs-stay-local}, but everything applies to
2883else has already checked in other changes to the file, you are not 2913@code{vc-stay-local} as well.
2884notified of it until you actually try to commit. (But you can try to
2885pick 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 2915If @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}, 2916only the entry in the local CVS subdirectory to determine the file's
2890should be a string specifying switches to pass to CVS for all CVS 2917state (and possibly information returned by previous CVS commands).
2891operations. 2918One consequence of this is that when you have modified a file, and
2919somebody else has already checked in other changes to the file, you
2920are not notified of it until you actually try to commit. (But you can
2921try 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
2894version backups, so that simple diff and revert operations are 2925version backups, so that simple diff and revert operations are
@@ -2903,6 +2934,12 @@ repositories. It also does not make any version backups.
2903that is matched against the repository host name; VC then stays local 2934that is matched against the repository host name; VC then stays local
2904only for repositories from hosts that match the pattern. 2935only 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
2939operations in the variable @code{vc-cvs-global-switches}. These
2940switches are inserted immediately after the @code{cvs} command, before
2941the name of the operation to invoke.
2942
2906@node Directories 2943@node Directories
2907@section File Directories 2944@section File Directories
2908 2945