aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2007-10-10 13:24:29 +0000
committerEric S. Raymond2007-10-10 13:24:29 +0000
commitda1080a25c39c8f8fd1f73edcffed10d409a934f (patch)
tree0a48c4f9ce53c7f1a87b48995565d043c1942f1f
parentd7b60083ce07eb9d4af2bdb97c1062e42445f395 (diff)
downloademacs-da1080a25c39c8f8fd1f73edcffed10d409a934f.tar.gz
emacs-da1080a25c39c8f8fd1f73edcffed10d409a934f.zip
New VC command docs for the Emacs manual.
-rw-r--r--doc/emacs/ChangeLog7
-rw-r--r--doc/emacs/files.texi143
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 @@
12007-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
12007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> 62007-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
62007-10-04 Nick Roberts <nickrob@snap.net.nz> 112007-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
1465there are lots of legacy repositories still to be dealt with at time of 1465there are lots of legacy repositories still to be dealt with at time of
1466writing in 2007. 1466writing in 2007.
1467 1467
1468 In fact, older versions of VC mode supported only file-based systems,
1469leading to some unhappy results when it was used to drive
1470changeset-based ones--the Subversion support, for example, used to break
1471up changesets into multiple per-file commits. This has been fixed, but
1472it has left a legacy in VC-mode's terminology. The terms ``checkin''
1473and ``checkout'' are associated with file-based and locking-based
1474systems 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
1592group of files that you have chosen to treat as a unit at the
1593time you perform the command. Filesets are the way that VC
1594mode bridges the gap between file-based and changeset-based
1595version-control systems.
1596
1597 If you are visiting a version-controlled file in the current buffer,
1598the default fileset for any command is simply that one file. If you
1599are visiting a VC Dired buffer, and some files in it are marked,
1600your fileset is the marked files only.
1601
1602 All files in a fileset must be under the same version-control system.
1603If they are not, VC mode wil throw an error when you attempt to execute
1604a command on the fileset.
1605
1606 Filesets, are, essentially, a way to pass multiple file arguments as
1607a group to underlying version-control commands. For example, on
1608Subversion a checkin with more than one file in its fileset will become a
1609joint commit, as though you had typed @command{svn
1610commit} with those file arguments at the shell command line in the
1611directory of the selected buffer.
1612
1613 If you are used to earlier versions of VC, the change in behavior you
1614will notice is in VC-Dired mode. Other than @kbd{C-x v v}, most VC-mode
1615commands used to operate on only one file selected by the line the
1616cursor is on. The change in the behavior of @kbd{C-x v v} is more
1617subtle. Formerly it operated in parallel on all marked files, but did
1618not pass them to the version-control backends as a group. Now it does,
1619which 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
1579either locking or check-in, depending on the situation. 1625either locking or check-in on your current fileset, depending on
1626the 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
1776time to complete the check-in. 1823time 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
1779convenient to specify the same log entry for many of the files. To do 1826convenient to specify the same log entry for many of the files. (This
1780this, use the history of previous log entries. The commands @kbd{M-n}, 1827is 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 1828comments are attached to changesets rather than the history of
1782minibuffer history commands (except that these versions are used outside 1829individual files.) The most convenient way to do this is to mark all the
1783the minibuffer). 1830files in VC-Dired mode and check in from there; the log buffer will
1831carry the fileset information with it and do a group commit when you
1832confirm 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
1786duplicate a checkin comment. This can be useful when you want several 1835duplicate 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
1806own. 1855own.
1807 1856
1808@item C-x v = 1857@item C-x v =
1809Compare the current buffer contents with the focus version from which 1858Compare the buffer contents of the current
1810you started editing. 1859fileset 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}
1813Compare the specified two versions of @var{file}. 1862Compare the specified two repository versions of the current fileset.
1814 1863
1815@item C-x v g 1864@item C-x v g
1816Display the file with per-line version information and using colors. 1865Display 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
1831with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} 1880current fileset (saving them in the file if necessary) with the
1832compares the current buffer contents (saving them in the file if 1881repository version from which you started editing each file (this is not
1833necessary) with the master version from which you started editing the 1882necessarily the latest version of the file). The diff will be displayed
1834file (this is not necessarily the latest version of the file). 1883in a special buffer in another window.
1835@kbd{C-u C-x v =}, with a numeric argument, reads a file name and two 1884
1836version numbers, then compares those versions of the specified file. 1885@findex vc-diff
1837Both 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
1888the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads
1889two version numbers or tags. The diff will be displayed in a special
1890buffer 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
1840specifies the current contents of the work file (which may be different 1893specifies 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
1848instead of one or both version numbers. 1901instead 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,
1851file, this command compares the two specified versions of all registered 1904CVS) rather than fileset-oriented (CVS, Subversion, GNU Arch) specifying
1852files in that directory and its subdirectories. 1905a version of a multiple-file fileset by number (as opposed to a snapshot
1906name or RSCCS/RCS tag) is unlikely to return diffs that are connected in
1907any meaningful way.
1908
1909 If you invoke @kbd{C-u C-x v =} or @kbd{C-u C-x v =} from a buffer
1910that is neither visiting a version-controlled file nor a VC Dired
1911buffer, these commands will generate a diff of all registered files in
1912the 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.
2083then decide not to change it. 2143then 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
2089most recent checked-in version, but only if your work file corresponds 2149recent checked-in version, but only if your work file corresponds to
2090to that version---you cannot use @kbd{C-x v c} to cancel a version 2150that version---you cannot use @kbd{C-x v c} to cancel a version that is
2091that is not the latest on its branch. @kbd{C-x v c} also offers to 2151not the latest on its branch. Note that many version-control systems do
2092revert your work file and buffer to the previous version (the one that 2152not support rollback at all; this command is something of a historical
2093precedes the version that is deleted). 2153relic.
2094
2095 If you answer @kbd{no}, VC keeps your changes in the buffer, and locks
2096the file. The no-revert option is useful when you have checked in a
2097change and then discover a trivial error in it; you can cancel the
2098erroneous 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
2101version 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
2108This is because the buffer no longer corresponds to any existing
2109version. If you check it in again, the check-in process will expand
2110the headers properly for the new version number.
2111
2112 However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header
2113automatically. If you use that header feature, you have to unexpand it
2114by 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
2117work with it. To help you be careful, this command always requires
2118confirmation with @kbd{yes}. Note also that this command is disabled
2119under CVS, because canceling versions is very dangerous and discouraged
2120with 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.