aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMiles Bader2007-10-13 05:53:03 +0000
committerMiles Bader2007-10-13 05:53:03 +0000
commit2b42d458a45eaf9767da327f76a40a1cf9c77c23 (patch)
treef896828e65199d043ea7ab366fffea8bd315a986 /doc
parent3e88ae627ef8d827b3f79e4e6f14aaad7adfe322 (diff)
parente2cfa9afa691fb8b7a554cb685c16ff3d4e1ff2b (diff)
downloademacs-2b42d458a45eaf9767da327f76a40a1cf9c77c23.tar.gz
emacs-2b42d458a45eaf9767da327f76a40a1cf9c77c23.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 880-885) - Remove RCS keywords from doc/misc/cc-mode.texi - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-264
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog22
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/emacs/files.texi491
-rw-r--r--doc/emacs/misc.texi9
-rw-r--r--doc/emacs/vc-xtra.texi2
-rw-r--r--doc/emacs/vc1-xtra.texi30
-rw-r--r--doc/emacs/vc2-xtra.texi37
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--doc/misc/cc-mode.texi4
-rw-r--r--doc/misc/trampver.texi4
10 files changed, 355 insertions, 252 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 41decab74bf..279a9a47ec3 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,6 +1,26 @@
12007-10-13 Glenn Morris <rgm@gnu.org>
2
3 * misc.texi (Interactive Shell): Correct INSIDE_EMACS reference.
4
52007-10-11 Eric S. Raymond <esr@snark.thyrsus.com>
6
7 * emacs.texi:
8 * files.texi (Version Systems): Minor fixes to version-control material
9 suggseted by RMS and Robert J. Chassell.
10
112007-10-10 Eric S. Raymond <esr@snark.thyrsus.com>
12
13 * files.texi (Version Systems):
14 * vc-xtra.texi:
15 * vc1-xtra.texi:
16 * vc2-xtra.texi: Merge in changes for new VC with fileset-oriented
17 operations. Change of terminology from 'version' to `revision'.
18 Revise text for adequate description of VCSes with monotonic IDs.
19 * emacs.texi: Change of terminology from 'version' to `revision'.
20
12007-10-09 Eric S. Raymond <esr@snark.thyrsus.com> 212007-10-09 Eric S. Raymond <esr@snark.thyrsus.com>
2 22
3 * files.texi (Version Systems): Describe newerte VCses. 23 * files.texi (Version Systems): Describe newer VCses.
4 Reorder the descriptions to be chronological. 24 Reorder the descriptions to be chronological.
5 25
62007-10-04 Nick Roberts <nickrob@snap.net.nz> 262007-10-04 Nick Roberts <nickrob@snap.net.nz>
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 96cf365497d..119e2ea80d1 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -460,7 +460,7 @@ Version Control
460* Introduction to VC:: How version control works in general. 460* Introduction to VC:: How version control works in general.
461* VC Mode Line:: How the mode line shows version control status. 461* VC Mode Line:: How the mode line shows version control status.
462* Basic VC Editing:: How to edit a file under version control. 462* Basic VC Editing:: How to edit a file under version control.
463* Old Versions:: Examining and comparing old versions. 463* Old Revisions:: Examining and comparing old revisions of files.
464* Secondary VC Commands:: The commands used a little less frequently. 464* Secondary VC Commands:: The commands used a little less frequently.
465* Branches:: Multiple lines of development. 465* Branches:: Multiple lines of development.
466* Remote Repositories:: Efficient access to remote CVS servers. 466* Remote Repositories:: Efficient access to remote CVS servers.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 6e90cff5776..78c72dac330 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1213,11 +1213,10 @@ description of what was changed in that version.
1213 The Emacs version control interface is called VC. Its commands work 1213 The Emacs version control interface is called VC. Its commands work
1214with different version control systems---currently, it supports CVS, 1214with different version control systems---currently, it supports CVS,
1215GNU Arch, RCS, Meta-CVS, Subversion, and SCCS. Of these, the GNU 1215GNU Arch, RCS, Meta-CVS, Subversion, and SCCS. Of these, the GNU
1216project distributes CVS, GNU Arch, and RCS; we recommend that you use 1216project distributes CVS, GNU Arch, and RCS. We also have free
1217either CVS or GNU Arch for your projects, and RCS for individual 1217software to replace SCCS, known as CSSC; if you are using SCCS and
1218files. We also have free software to replace SCCS, known as CSSC; if 1218don't want to make the incompatible change to RCS or CVS, you can
1219you are using SCCS and don't want to make the incompatible change to 1219switch to CSSC.
1220RCS or CVS, you can switch to CSSC.
1221 1220
1222 VC is enabled by default in Emacs. To disable it, set the 1221 VC is enabled by default in Emacs. To disable it, set the
1223customizable variable @code{vc-handled-backends} to @code{nil} 1222customizable variable @code{vc-handled-backends} to @code{nil}
@@ -1233,7 +1232,7 @@ customizable variable @code{vc-handled-backends} to @code{nil}
1233* Introduction to VC:: How version control works in general. 1232* Introduction to VC:: How version control works in general.
1234* VC Mode Line:: How the mode line shows version control status. 1233* VC Mode Line:: How the mode line shows version control status.
1235* Basic VC Editing:: How to edit a file under version control. 1234* Basic VC Editing:: How to edit a file under version control.
1236* Old Versions:: Examining and comparing old versions. 1235* Old Revisions:: Examining and comparing old versions.
1237* Secondary VC Commands:: The commands used a little less frequently. 1236* Secondary VC Commands:: The commands used a little less frequently.
1238* Branches:: Multiple lines of development. 1237* Branches:: Multiple lines of development.
1239@ifnottex 1238@ifnottex
@@ -1250,7 +1249,7 @@ customizable variable @code{vc-handled-backends} to @code{nil}
1250 VC allows you to use a version control system from within Emacs, 1249 VC allows you to use a version control system from within Emacs,
1251integrating the version control operations smoothly with editing. 1250integrating the version control operations smoothly with editing.
1252Though VC cannot completely bridge the gaps between version-control 1251Though VC cannot completely bridge the gaps between version-control
1253systems with widely differing capabilities, it does provide 1252systems with widely differing capabilities, it does provide
1254a uniform interface to many version control operations. Regardless of 1253a uniform interface to many version control operations. Regardless of
1255which version control system is in use, you will be able to do basic 1254which version control system is in use, you will be able to do basic
1256operations in much the same way. 1255operations in much the same way.
@@ -1261,10 +1260,10 @@ this section if you are already familiar with the version control system
1261you want to use. 1260you want to use.
1262 1261
1263@menu 1262@menu
1264* Why Version Control?:: Understanding the problems it addresses 1263* Why Version Control?:: Understanding the problems it addresses
1265* Version Systems:: Supported version control back-end systems. 1264* Version Control Systems:: Supported version control back-end systems.
1266* VC Concepts:: Words and concepts related to version control. 1265* VCS Concepts:: Words and concepts related to version control.
1267* Types of Log File:: The per-file VC log in contrast to the ChangeLog. 1266* Types of Log File:: The VCS log in contrast to the ChangeLog.
1268@end menu 1267@end menu
1269 1268
1270@node Why Version Control? 1269@node Why Version Control?
@@ -1287,7 +1286,7 @@ change to it. Even for a programmer working solo change histories
1287are an important aid to memory; for a multi-person project they 1286are an important aid to memory; for a multi-person project they
1288become a vitally important form of communication among developers. 1287become a vitally important form of communication among developers.
1289 1288
1290@node Version Systems 1289@node Version Control Systems
1291@subsubsection Supported Version Control Systems 1290@subsubsection Supported Version Control Systems
1292 1291
1293@cindex back end (version control) 1292@cindex back end (version control)
@@ -1368,11 +1367,11 @@ be done from the command line.
1368@cindex Mercurial 1367@cindex Mercurial
1369 Mercurial is a distributed version-control systems broadly 1368 Mercurial is a distributed version-control systems broadly
1370resembling GNU Arch and git, with atomic fileset commits and 1369resembling GNU Arch and git, with atomic fileset commits and
1371rename/move histories. Like git it is fully decventralized. 1370rename/move histories. Like git it is fully decentralized.
1372VC fully supports Mercurial, except for repository sync operations 1371VC fully supports Mercurial, except for repository sync operations
1373which still need to be done from the command line. 1372which still need to be done from the command line.
1374 1373
1375@node VC Concepts 1374@node VCS Concepts
1376@subsubsection Concepts of Version Control 1375@subsubsection Concepts of Version Control
1377 1376
1378@cindex repository 1377@cindex repository
@@ -1387,11 +1386,22 @@ revision.
1387 1386
1388@cindex work file 1387@cindex work file
1389@cindex checking out files 1388@cindex checking out files
1390 A file checked out of a version-control repository is sometimes called 1389 A file checked out of a version-control repository is sometimes
1391the @dfn{work file}. You edit the work file and make changes in it, as 1390called the @dfn{work file}. You edit the work file and make changes
1392you would with an ordinary file. After you are done with a set of 1391in it, as you would with an ordinary file. After you are done with a
1393changes, you @dfn{check the file in}, which records the changes in the 1392set of changes, you @dfn{check in} or @dfn{commit} the file, which
1394repository, along with a log entry for them. 1393records the changes in the repository, along with a log entry for
1394them.
1395
1396@cindex revision
1397@cindex revision ID
1398 A copy of a file stored in a repository is called a @dfn{revision}.
1399The history of a file is a sequence of revisions. Each revisions is
1400named by a @dfn{revision ID}. In older VCSes (such as SCCS and RCS),
1401the simplest kind of revision ID consisted of a @dfn{dot-pair};
1402integers (the @dfn{major} and @dfn{minor} revisions) separated by a
1403dot. Newer VCSes tend to use @dfn{monotonic} revision IDs that are
1404simple integers counting from 1.
1395 1405
1396 To go beyond these basic concepts, you will need to understand three 1406 To go beyond these basic concepts, you will need to understand three
1397ways in which version-control systems can differ from each other. They 1407ways in which version-control systems can differ from each other. They
@@ -1417,7 +1427,7 @@ the file, making the work file read-only again. This allows other users
1417to lock the file to make further changes. 1427to lock the file to make further changes.
1418 1428
1419 By contrast, a merging system lets each user check out and modify a 1429 By contrast, a merging system lets each user check out and modify a
1420work file at any time. When you check in a a file, the system will 1430work file at any time. When you check in a file, the system will
1421attempt to merge your changes with any others checked into the 1431attempt to merge your changes with any others checked into the
1422repository since you checked out the file. 1432repository since you checked out the file.
1423 1433
@@ -1429,14 +1439,15 @@ happen when you check in a change to a file that conflicts with a change
1429checked in by someone else after your checkout. Both kinds of conflict 1439checked in by someone else after your checkout. Both kinds of conflict
1430have to be resolved by human judgment and communication. 1440have to be resolved by human judgment and communication.
1431 1441
1432 SCCS always uses locking. RCS is lock-based by default but can be told 1442 SCCS always uses locking. RCS is lock-based by default but can be
1433to operate in a merging style. CVS is merge-based by default but can 1443told to operate in a merging style. CVS and Subversion are
1434be told to operate in a locking mode. Most later version-control 1444merge-based by default but can be told to operate in a locking mode.
1435systems, such as Subversion and GNU Arch, have been fundamentally 1445Most later version-control systems, such as GNU Arch, git, and
1436merging-based rather than locking-based. This is because experience 1446Mercurial, have been based exclusively on merging rather than locking.
1437has shown that the merging-based approach is generally superior to 1447This is because experience has shown that the merging-based approach
1438the locking one, both in convenience to developers and in minimizing 1448is generally superior to the locking one, both in convenience to
1439the number and severity of conflicts that actually occur. 1449developers and in minimizing the number and severity of conflicts that
1450actually occur.
1440 1451
1441 While it is rather unlikely that anyone will ever again build a 1452 While it is rather unlikely that anyone will ever again build a
1442fundamentally locking-based rather than merging-based version-control 1453fundamentally locking-based rather than merging-based version-control
@@ -1448,14 +1459,14 @@ both locking and merging version control and tries to hide the differences
1448between them as much as possible. 1459between them as much as possible.
1449 1460
1450@cindex files versus changesets. 1461@cindex files versus changesets.
1451 On SCCS. RCS, CVS, and other early version-control systems, checkins 1462 On SCCS, RCS, CVS, and other early version-control systems, checkins
1452and other operations are @dfn{file-based}; each file has its own 1463and other operations are @dfn{file-based}; each file has its own
1453@dfn{master file} with its own comment- and revision history separate 1464@dfn{master file} with its own comment and revision history separate
1454from that of all other files in the system. Later systems, beginning 1465from that of all other files in the system. Later systems, beginning
1455with Subversion, are @dfn{changeset-based}; a checkin may include 1466with Subversion, became @dfn{changeset-based}; a checkin under these
1456changes to several files and that change set is treated as a unit by the 1467may include changes to several files and that change set is treated as
1457system. Any comment associated with the change doesn't belong to any 1468a unit by the system. Any comment associated with the change belongs
1458one file, but is attached to the changeset itself. 1469to no single file, but is attached to the changeset itself.
1459 1470
1460 Changeset-based version control is in general both more flexible and 1471 Changeset-based version control is in general both more flexible and
1461more powerful than file-based version control; usually, when a change to 1472more powerful than file-based version control; usually, when a change to
@@ -1465,22 +1476,30 @@ 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 1476there are lots of legacy repositories still to be dealt with at time of
1466writing in 2007. 1477writing in 2007.
1467 1478
1468@cindex centralized vs. decentralized 1479 In fact, older versions of VC mode supported only file-based systems,
1480leading to some unhappy results when it was used to drive
1481changeset-based ones---the Subversion support, for example, used to break
1482up changesets into multiple per-file commits. This has been fixed, but
1483it has left a legacy in VC-mode's terminology. The terms ``checkin''
1484and ``checkout'' are associated with file-based and locking-based
1485systems and a bit archaic; nowadays those operations are usually called
1486``commit'' and ``update''.
1469 1487
1488@cindex centralized vs. decentralized
1470 Early version-control systems were designed around a @dfn{centralized} 1489 Early version-control systems were designed around a @dfn{centralized}
1471model in which each project has only one repository used by all 1490model in which each project has only one repository used by all
1472developers. SCCS, RCS, CVS, and Subversion share this kind of model. 1491developers. SCCS, RCS, CVS, and Subversion share this kind of model.
1473It has two important problems. One is that a single repository is a 1492It has two important problems. One is that a single repository is a
1474single point of failure--if the repository server is down all work 1493single point of failure---if the repository server is down all work
1475stops. The other is that you need to be connected live to the server to 1494stops. The other is that you need to be connected live to the server to
1476do checkins and checkouts; if you're offline, you can't work. 1495do checkins and checkouts; if you're offline, you can't work.
1477 1496
1478 Newer version-control systems like GNU Arch are @dfn{decentralized}. 1497 Newer version-control systems like GNU Arch, git, Mercurial, and Bzr
1479A project may have several different repositories, and these systems 1498are @dfn{decentralized}. A project may have several different
1480support a sort of super-merge between repositories that tries to 1499repositories, and these systems support a sort of super-merge between
1481reconcile their change histories. At the limit, each developer has 1500repositories that tries to reconcile their change histories. At the
1482his/her own repository, and repository merges replace checkin/commit 1501limit, each developer has his/her own repository, and repository
1483operations. 1502merges replace checkin/commit operations.
1484 1503
1485 VC's job is to help you manage the traffic between your personal 1504 VC's job is to help you manage the traffic between your personal
1486workfiles and a repository. Whether that repository is a single master 1505workfiles and a repository. Whether that repository is a single master
@@ -1553,7 +1572,7 @@ to copy it to @file{ChangeLog}
1553this on the mode line. For example, @samp{RCS-1.3} says that RCS is 1572this on the mode line. For example, @samp{RCS-1.3} says that RCS is
1554used for that file, and the current version is 1.3. 1573used for that file, and the current version is 1.3.
1555 1574
1556 The character between the back-end name and the version number 1575 The character between the back-end name and the revision ID
1557indicates the version control status of the file. @samp{-} means that 1576indicates the version control status of the file. @samp{-} means that
1558the work file is not locked (if locking is in use), or not modified (if 1577the work file is not locked (if locking is in use), or not modified (if
1559locking is not in use). @samp{:} indicates that the file is locked, or 1578locking is not in use). @samp{:} indicates that the file is locked, or
@@ -1575,8 +1594,56 @@ system, but is usually not excessive.
1575@node Basic VC Editing 1594@node Basic VC Editing
1576@subsection Basic Editing under Version Control 1595@subsection Basic Editing under Version Control
1577 1596
1597@menu
1598* Selecting a fileset:: Choosing a set of files to operate on
1599* Doing the next logical thing:: Stepping forward in the development cycle
1600* VC with a locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
1601* VC with a merging VCS:: Without locking: default mode for CVS.
1602* Advanced C-x v v:: Advanced features available with a prefix argument.
1603* Log Buffer:: Features available in log entry buffers.
1604@end menu
1605
1606@node Selecting a fileset
1607@subsubsection Choosing the scope of your command
1608
1609@cindex filesets
1610 Most VC commands operate on @dfn{filesets}. A fileset is a
1611group of files that you have chosen to treat as a unit at the
1612time you perform the command. Filesets are the way that VC
1613mode bridges the gap between file-based and changeset-based
1614version-control systems.
1615
1616 If you are visiting a version-controlled file in the current buffer,
1617the default fileset for any command is simply that one file. If you
1618are visiting a VC Dired buffer, and some files in it are marked,
1619your fileset is the marked files only.
1620
1621 All files in a fileset must be under the same version-control system.
1622If they are not, VC mode will fail when you attempt to execute
1623a command on the fileset.
1624
1625 In VC, filesets, are, essentially, a way to pass multiple file
1626arguments as a group to underlying version-control commands. For
1627example, on Subversion a checkin with more than one file in its
1628fileset will become a joint commit, as though you had typed
1629@command{svn commit} with those file arguments at the shell command
1630line in the directory of the selected buffer.
1631
1632 If you are accustomed to earlier versions of VC, the change in behavior
1633you will notice is in VC-Dired mode. Other than @kbd{C-x v v}, most
1634VC-mode commands once operated on only one file selected by the line
1635the cursor is on. The change in the behavior of @kbd{C-x v v} outside
1636VC-Dired mode is more subtle. Formerly it operated in parallel on all
1637marked files, but did not pass them to the version-control backends as
1638a group. Now it does, which enables VC to drive changeset-based
1639version-control systems.
1640
1641@node Doing the next logical thing
1642@subsubsection Performing the next operation in the development cycle
1643
1578 The principal VC command is an all-purpose command that performs 1644 The principal VC command is an all-purpose command that performs
1579either locking or check-in, depending on the situation. 1645either locking or check-in on your current fileset, depending on
1646the situation.
1580 1647
1581@table @kbd 1648@table @kbd
1582@itemx C-x v v 1649@itemx C-x v v
@@ -1600,14 +1667,7 @@ accidentally edit a file without properly checking it out first. To
1600achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only} 1667achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only}
1601in your @file{~/.emacs} file. (@xref{Init Rebinding}.) 1668in your @file{~/.emacs} file. (@xref{Init Rebinding}.)
1602 1669
1603@menu 1670@node VC with a locking VCS
1604* VC with Locking:: RCS in its default mode, SCCS, and optionally CVS.
1605* Without Locking:: Without locking: default mode for CVS.
1606* Advanced C-x v v:: Advanced features available with a prefix argument.
1607* Log Buffer:: Features available in log entry buffers.
1608@end menu
1609
1610@node VC with Locking
1611@subsubsection Basic Version Control with Locking 1671@subsubsection Basic Version Control with Locking
1612 1672
1613 If locking is used for the file (as with SCCS, and RCS in its default 1673 If locking is used for the file (as with SCCS, and RCS in its default
@@ -1621,7 +1681,7 @@ makes it writable so that you can change it.
1621@item 1681@item
1622If the file is locked by you, and contains changes, @kbd{C-x v v} checks 1682If the file is locked by you, and contains changes, @kbd{C-x v v} checks
1623in the changes. In order to do this, it first reads the log entry 1683in the changes. In order to do this, it first reads the log entry
1624for the new version. @xref{Log Buffer}. 1684for the new revision. @xref{Log Buffer}.
1625 1685
1626@item 1686@item
1627If the file is locked by you, but you have not changed it since you 1687If the file is locked by you, but you have not changed it since you
@@ -1638,18 +1698,19 @@ formerly locked the file, to inform him of what has happened.
1638 These rules also apply when you use CVS in locking mode, except 1698 These rules also apply when you use CVS in locking mode, except
1639that there is no such thing as stealing a lock. 1699that there is no such thing as stealing a lock.
1640 1700
1641@node Without Locking 1701@node VC with a merging VCS
1642@subsubsection Basic Version Control without Locking 1702@subsubsection Basic Version Control with Merging
1643 1703
1644 When your version-control system is merging-based rather than 1704 When your version-control system is merging-based rather than
1645locking-based---the default for CVS and Subversion, and the way GNU 1705locking-based---the default for CVS and Subversion, and the way GNU
1646Arch always works---work files are always writable; you do not need to 1706Arch and more modern systems always work---work files are always
1647do anything before you begin to edit a file. The status indicator on 1707writable; you do not need to do anything before you begin to edit a
1648the mode line is @samp{-} if the file is unmodified; it flips to 1708file. The status indicator on the mode line is @samp{-} if the file
1649@samp{:} as soon as you save any changes in the work file. 1709is unmodified; it flips to @samp{:} as soon as you save any changes in
1710the work file.
1650 1711
1651 Here is what @kbd{C-x v v} does when using a merging-based system 1712 Here is what @kbd{C-x v v} does when using a merging-based system
1652(such as CVS or Subversion in their defaiult merging mode): 1713(such as CVS or Subversion in their default merging mode):
1653 1714
1654@itemize @bullet 1715@itemize @bullet
1655@item 1716@item
@@ -1663,7 +1724,7 @@ to commit your own changes, type @kbd{C-x v m @key{RET}}.)
1663@item 1724@item
1664If there are no new changes in the repository, but you have made 1725If there are no new changes in the repository, but you have made
1665modifications in your work file, @kbd{C-x v v} checks in your changes. 1726modifications in your work file, @kbd{C-x v v} checks in your changes.
1666In order to do this, it first reads the log entry for the new version. 1727In order to do this, it first reads the log entry for the new revision.
1667@xref{Log Buffer}. 1728@xref{Log Buffer}.
1668 1729
1669@item 1730@item
@@ -1675,9 +1736,9 @@ require locking, except that automatic merging of changes from the
1675repository is not implemented. Unfortunately, this means that nothing 1736repository is not implemented. Unfortunately, this means that nothing
1676informs you if another user has checked in changes in the same file 1737informs you if another user has checked in changes in the same file
1677since you began editing it, and when this happens, his changes will be 1738since you began editing it, and when this happens, his changes will be
1678effectively removed when you check in your version (though they will 1739effectively removed when you check in your revision (though they will
1679remain in the repository, so they will not be entirely lost). You must 1740remain in the repository, so they will not be entirely lost). You must
1680therefore verify that the current version is unchanged, before you 1741therefore verify that the current revision is unchanged, before you
1681check in your changes. 1742check in your changes.
1682 1743
1683 In addition, locking is possible with RCS even in this mode, although 1744 In addition, locking is possible with RCS even in this mode, although
@@ -1690,7 +1751,7 @@ changes in the repository automatically and notify you when they occur.
1690@node Advanced C-x v v 1751@node Advanced C-x v v
1691@subsubsection Advanced Control in @kbd{C-x v v} 1752@subsubsection Advanced Control in @kbd{C-x v v}
1692 1753
1693@cindex version number to check in/out 1754@cindex revision ID to check in/out
1694 When you give a prefix argument to @code{vc-next-action} (@kbd{C-u 1755 When you give a prefix argument to @code{vc-next-action} (@kbd{C-u
1695C-x v v}), it still performs the next logical version control 1756C-x v v}), it still performs the next logical version control
1696operation, but accepts additional arguments to specify precisely how 1757operation, but accepts additional arguments to specify precisely how
@@ -1698,21 +1759,21 @@ to do the operation.
1698 1759
1699@itemize @bullet 1760@itemize @bullet
1700@item 1761@item
1701If the file is modified (or locked), you can specify the version 1762If the file is modified (or locked), you can specify the revision ID
1702number to use for the new version that you check in. This is one way 1763to use for the new version that you check in. This is one way
1703to create a new branch (@pxref{Branches}). 1764to create a new branch (@pxref{Branches}).
1704 1765
1705@item 1766@item
1706If the file is not modified (and unlocked), you can specify the 1767If the file is not modified (and unlocked), you can specify the
1707version to select; this lets you start working from an older version, 1768revision to select; this lets you start working from an older
1708or on another branch. If you do not enter any version, that takes you 1769revision, or on another branch. If you do not enter any revision,
1709to the highest version on the current branch; therefore @kbd{C-u C-x 1770that takes you to the highest (``head'') revision on the current
1710v v @key{RET}} is a convenient way to get the latest version of a file from 1771branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to
1711the repository. 1772get the latest version of a file from the repository.
1712 1773
1713@item 1774@item
1714@cindex specific version control system 1775@cindex specific version control system
1715Instead of the version number, you can also specify the name of a 1776Instead of the revision ID, you can also specify the name of a
1716version control system. This is useful when one file is being managed 1777version control system. This is useful when one file is being managed
1717with two version control systems at the same time 1778with two version control systems at the same time
1718@iftex 1779@iftex
@@ -1776,11 +1837,13 @@ in the @samp{*VC-Log*} buffer, and you can go back to that buffer at any
1776time to complete the check-in. 1837time to complete the check-in.
1777 1838
1778 If you change several source files for the same reason, it is often 1839 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 1840convenient 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}, 1841is 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 1842comments are attached to changesets rather than the history of
1782minibuffer history commands (except that these versions are used outside 1843individual files.) The most convenient way to do this is to mark all the
1783the minibuffer). 1844files in VC-Dired mode and check in from there; the log buffer will
1845carry the fileset information with it and do a group commit when you
1846confirm it with @kbd{C-c C-c}.
1784 1847
1785 However, you can also browse the history of previous log entries to 1848 However, you can also browse the history of previous log entries to
1786duplicate a checkin comment. This can be useful when you want several 1849duplicate a checkin comment. This can be useful when you want several
@@ -1794,62 +1857,73 @@ these versions are used outside the minibuffer).
1794mode, which involves running two hooks: @code{text-mode-hook} and 1857mode, which involves running two hooks: @code{text-mode-hook} and
1795@code{vc-log-mode-hook}. @xref{Hooks}. 1858@code{vc-log-mode-hook}. @xref{Hooks}.
1796 1859
1797@node Old Versions 1860@node Old Revisions
1798@subsection Examining And Comparing Old Versions 1861@subsection Examining And Comparing Old Revisions
1799 1862
1800 One of the convenient features of version control is the ability 1863 One of the convenient features of version control is the ability
1801to examine any version of a file, or compare two versions. 1864to examine any revision of a file, or compare two revisions.
1802 1865
1803@table @kbd 1866@table @kbd
1804@item C-x v ~ @var{version} @key{RET} 1867@item C-x v ~ @var{revision} @key{RET}
1805Examine version @var{version} of the visited file, in a buffer of its 1868Examine revision @var{revision} of the visited file, in a buffer of its
1806own. 1869own.
1807 1870
1808@item C-x v = 1871@item C-x v =
1809Compare the current buffer contents with the focus version from which 1872Compare the buffer contents associated with the current
1810you started editing. 1873fileset with the working revision(s) from which you started editing.
1811 1874
1812@item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} 1875@item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
1813Compare the specified two versions of @var{file}. 1876Compare the specified two repository revisions of the current fileset.
1814 1877
1815@item C-x v g 1878@item C-x v g
1816Display the file with per-line version information and using colors. 1879Display the file with per-line revision information and using colors.
1817@end table 1880@end table
1818 1881
1819@findex vc-version-other-window 1882@findex vc-revision-other-window
1820@kindex C-x v ~ 1883@kindex C-x v ~
1821 To examine an old version in its entirety, visit the file and then type 1884 To examine an old revision in its entirety, visit the file and then type
1822@kbd{C-x v ~ @var{version} @key{RET}} (@code{vc-version-other-window}). 1885@kbd{C-x v ~ @var{revision} @key{RET}} (@code{vc-revision-other-window}).
1823This puts the text of version @var{version} in a file named 1886This puts the text of revision @var{revision} in a file named
1824@file{@var{filename}.~@var{version}~}, and visits it in its own buffer 1887@file{@var{filename}.~@var{revision}~}, and visits it in its own buffer
1825in a separate window. (In RCS, you can also select an old version 1888in a separate window. (In RCS, you can also select an old revision
1826and create a branch from it. @xref{Branches}.) 1889and create a branch from it. @xref{Branches}.)
1827 1890
1828@findex vc-diff 1891@findex vc-diff
1829@kindex C-x v = 1892@kindex C-x v =
1830 It is usually more convenient to compare two versions of the file, 1893@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 =} 1894current fileset (saving them in the file if necessary) with the
1832compares the current buffer contents (saving them in the file if 1895repository revision from which you started editing each file (this is not
1833necessary) with the master version from which you started editing the 1896necessarily the latest revision of the file). The diff will be displayed
1834file (this is not necessarily the latest version of the file). 1897in a special buffer in another window.
1835@kbd{C-u C-x v =}, with a numeric argument, reads a file name and two 1898
1836version numbers, then compares those versions of the specified file. 1899@findex vc-diff
1837Both forms display the output in a special buffer in another window. 1900@kindex C-u C-x v =
1838 1901 You can compare two repository revisions of the current fileset with
1839 You can specify a checked-in version by its number; an empty input 1902the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads
1903two revision ID or tags. The diff will be displayed in a special
1904buffer in another window.
1905
1906 You can specify a checked-in revision by its ID; an empty input
1840specifies the current contents of the work file (which may be different 1907specifies the current contents of the work file (which may be different
1841from all the checked-in versions). You can also specify a snapshot name 1908from all the checked-in revisions). You can also specify a snapshot name
1842@iftex 1909@iftex
1843(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) 1910(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features})
1844@end iftex 1911@end iftex
1845@ifnottex 1912@ifnottex
1846(@pxref{Snapshots}) 1913(@pxref{Snapshots})
1847@end ifnottex 1914@end ifnottex
1848instead of one or both version numbers. 1915instead of one or both revision ID.
1849 1916
1850 If you supply a directory name instead of the name of a registered 1917 Note that if your version-control system is file-oriented (SCCS,
1851file, this command compares the two specified versions of all registered 1918RCS, CVS) rather than fileset-oriented (Subversion, GNU Arch, git,
1852files in that directory and its subdirectories. 1919Mercurial) specifying a revision of a multiple-file fileset by
1920revision ID (as opposed to a snapshot name or RSCCS/RCS tag) is
1921unlikely to return diffs that are connected in any meaningful way.
1922
1923 If you invoke @kbd{C-u C-x v =} or @kbd{C-u C-x v =} from a buffer
1924that is neither visiting a version-controlled file nor a VC Dired
1925buffer, these commands will generate a diff of all registered files in
1926the current directory and its subdirectories.
1853 1927
1854@vindex vc-diff-switches 1928@vindex vc-diff-switches
1855@vindex vc-rcs-diff-switches 1929@vindex vc-rcs-diff-switches
@@ -1867,12 +1941,12 @@ the options in @code{vc-rcs-diff-switches}. The
1867Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and 1941Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and
1868@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always 1942@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always
1869find the corresponding locations in the current work file. (Older 1943find the corresponding locations in the current work file. (Older
1870versions are not, in general, present as files on your disk.) 1944revisions are not, in general, present as files on your disk.)
1871 1945
1872@findex vc-annotate 1946@findex vc-annotate
1873@kindex C-x v g 1947@kindex C-x v g
1874 For some back ends, you can display the file @dfn{annotated} with 1948 For some back ends, you can display the file @dfn{annotated} with
1875per-line version information and using colors to enhance the visual 1949per-line revision information and using colors to enhance the visual
1876appearance, with the command @kbd{M-x vc-annotate}. It creates a new 1950appearance, with the command @kbd{M-x vc-annotate}. It creates a new
1877buffer (the ``annotate buffer'') displaying the file's text, with each 1951buffer (the ``annotate buffer'') displaying the file's text, with each
1878part colored to show how old it is. Text colored red is new, blue means 1952part colored to show how old it is. Text colored red is new, blue means
@@ -1881,7 +1955,7 @@ the color is scaled over the full range of ages, such that the oldest
1881changes are blue, and the newest changes are red. 1955changes are blue, and the newest changes are red.
1882 1956
1883 When you give a prefix argument to this command, it uses the 1957 When you give a prefix argument to this command, it uses the
1884minibuffer to read two arguments: which version number to display and 1958minibuffer to read two arguments: the ID of which revision to display and
1885annotate (instead of the current file contents), and the time span in 1959annotate (instead of the current file contents), and the time span in
1886days the color range should cover. 1960days the color range should cover.
1887 1961
@@ -1919,9 +1993,9 @@ the author's description of the changes in the revision on the current
1919line. 1993line.
1920 1994
1921@item W 1995@item W
1922Annotate the focus version--the one you are editing. If you used 1996Annotate the working revision--the one you are editing. If you used
1923@kbd{P} and @kbd{N} to browse to other revisions, use this key to 1997@kbd{P} and @kbd{N} to browse to other revisions, use this key to
1924return to your current version. 1998return to your working revision.
1925@end table 1999@end table
1926 2000
1927@node Secondary VC Commands 2001@node Secondary VC Commands
@@ -1974,16 +2048,18 @@ situation.
1974 If locking is in use, @kbd{C-x v i} leaves the file unlocked and 2048 If locking is in use, @kbd{C-x v i} leaves the file unlocked and
1975read-only. Type @kbd{C-x v v} if you wish to start editing it. After 2049read-only. Type @kbd{C-x v v} if you wish to start editing it. After
1976registering a file with CVS, you must subsequently commit the initial 2050registering a file with CVS, you must subsequently commit the initial
1977version by typing @kbd{C-x v v}. Until you do that, the version 2051revision by typing @kbd{C-x v v}. Until you do that, the revision ID
1978appears as @samp{@@@@} in the mode line. 2052appears as @samp{@@@@} in the mode line.
1979 2053
1980@vindex vc-default-init-version 2054@vindex vc-default-init-revision
1981@cindex initial version number to register 2055@cindex initial revision ID to register
1982 The initial version number for a newly registered file is 1.1, by 2056 The default initial revision ID for a newly registered file
1983default. You can specify a different default by setting the variable 2057varies by what VCS you are using; normally it will be 1.1 on VCSes
1984@code{vc-default-init-version}, or you can give @kbd{C-x v i} a numeric 2058that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
1985argument; then it reads the initial version number for this particular 2059You can specify a different default by setting the variable
1986file using the minibuffer. 2060@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a
2061numeric argument; then it reads the initial revision ID for this
2062particular file using the minibuffer.
1987 2063
1988@vindex vc-initial-comment 2064@vindex vc-initial-comment
1989 If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an 2065 If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an
@@ -1995,12 +2071,12 @@ the initial comment works like reading a log entry (@pxref{Log Buffer}).
1995 2071
1996@table @kbd 2072@table @kbd
1997@item C-x v l 2073@item C-x v l
1998Display version control state and change history. 2074Display revision control state and change history.
1999@end table 2075@end table
2000 2076
2001@kindex C-x v l 2077@kindex C-x v l
2002@findex vc-print-log 2078@findex vc-print-log
2003 To view the detailed version control status and history of a file, 2079 To view the detailed revision control status and history of a file,
2004type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of 2080type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of
2005changes to the current file, including the text of the log entries. The 2081changes to the current file, including the text of the log entries. The
2006output appears in a separate window. The point is centered at the 2082output appears in a separate window. The point is centered at the
@@ -2048,7 +2124,7 @@ It also takes a numeric prefix argument as a repeat count.
2048 2124
2049@item f 2125@item f
2050Visit the revision indicated at the current line, like typing @kbd{C-x 2126Visit the revision indicated at the current line, like typing @kbd{C-x
2051v ~} and specifying this revision's number (@pxref{Old Versions}). 2127v ~} and specifying this revision's ID (@pxref{Old Revisions}).
2052 2128
2053@item d 2129@item d
2054Display the diff (@pxref{Comparing Files}) between the revision 2130Display the diff (@pxref{Comparing Files}) between the revision
@@ -2062,7 +2138,7 @@ current line was committed.
2062 2138
2063@table @kbd 2139@table @kbd
2064@item C-x v u 2140@item C-x v u
2065Revert the buffer and the file to the version from which you started 2141Revert the buffer and the file to the working revision from which you started
2066editing the file. 2142editing the file.
2067 2143
2068@item C-x v c 2144@item C-x v c
@@ -2073,51 +2149,25 @@ This undoes your last check-in.
2073@kindex C-x v u 2149@kindex C-x v u
2074@findex vc-revert-buffer 2150@findex vc-revert-buffer
2075 If you want to discard your current set of changes and revert to the 2151 If you want to discard your current set of changes and revert to the
2076version from which you started editing the file, use @kbd{C-x v u} 2152working revision from which you started editing the file, use @kbd{C-x v u}
2077(@code{vc-revert-buffer}). This leaves the file unlocked; if locking 2153(@code{vc-revert-buffer}). This leaves the file unlocked; if locking
2078is in use, you must first lock the file again before you change it 2154is in use, you must first lock the file again before you change it
2079again. @kbd{C-x v u} requires confirmation, unless it sees that you 2155again. @kbd{C-x v u} requires confirmation, unless it sees that you
2080haven't made any changes with respect to the master version. 2156haven't made any changes with respect to the master copy of the
2157working revision.
2081 2158
2082 @kbd{C-x v u} is also the command to unlock a file if you lock it and 2159 @kbd{C-x v u} is also the command to unlock a file if you lock it and
2083then decide not to change it. 2160then decide not to change it.
2084 2161
2085@kindex C-x v c 2162@kindex C-x v c
2086@findex vc-cancel-version 2163@findex vc-rollback
2087 To cancel a change that you already checked in, use @kbd{C-x v c} 2164 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 2165(@code{vc-rollback}). This command discards all record of the most
2089most recent checked-in version, but only if your work file corresponds 2166recent checked-in revision, but only if your work file corresponds to
2090to that version---you cannot use @kbd{C-x v c} to cancel a version 2167that revision---you cannot use @kbd{C-x v c} to cancel a revision that is
2091that is not the latest on its branch. @kbd{C-x v c} also offers to 2168not 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 2169not support rollback at all; this command is something of a historical
2093precedes the version that is deleted). 2170relic.
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 2171
2122@ifnottex 2172@ifnottex
2123@c vc1-xtra.texi needs extra level of lowering. 2173@c vc1-xtra.texi needs extra level of lowering.
@@ -2132,7 +2182,7 @@ with CVS.
2132@cindex trunk (version control) 2182@cindex trunk (version control)
2133 2183
2134 One use of version control is to maintain multiple ``current'' 2184 One use of version control is to maintain multiple ``current''
2135versions of a file. For example, you might have different versions of a 2185revisions of a file. For example, you might have different revisions of a
2136program in which you are gradually adding various unfinished new 2186program in which you are gradually adding various unfinished new
2137features. Each such independent line of development is called a 2187features. Each such independent line of development is called a
2138@dfn{branch}. VC allows you to create branches, switch between 2188@dfn{branch}. VC allows you to create branches, switch between
@@ -2140,18 +2190,30 @@ different branches, and merge changes from one branch to another.
2140Please note, however, that branches are not supported for SCCS. 2190Please note, however, that branches are not supported for SCCS.
2141 2191
2142 A file's main line of development is usually called the @dfn{trunk}. 2192 A file's main line of development is usually called the @dfn{trunk}.
2143The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At 2193You can create multiple branches from the trunk. How the difference
2144any such version, you can start an independent branch. A branch 2194between trunk and branch is made visible is dependent on whether the
2145starting at version 1.2 would have version number 1.2.1.1, and consecutive 2195VCS uses dot-pair or monotonic version IDs.
2146versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, 2196
2147and so on. If there is a second branch also starting at version 1.2, it 2197 In VCSes with dot-pair revision IDs, the revisions on the trunk are
2148would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. 2198normally IDed 1.1, 1.2, 1.3, etc. At any such revision, you can
2149 2199start an independent branch. A branch starting at revision 1.2 would
2150@cindex head version 2200have revision ID 1.2.1.1, and consecutive revisions on this branch
2151 If you omit the final component of a version number, that is called a 2201would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is
2152@dfn{branch number}. It refers to the highest existing version on that 2202a second branch also starting at revision 1.2, it would consist of
2153branch---the @dfn{head version} of that branch. The branches in the 2203revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc.
2154example above have branch numbers 1.2.1 and 1.2.2. 2204
2205 In VCSes with monotonic revision IDs, trunk revisions are IDed as
22061, 2, 3, etc. A branch from (say) revision 2 might start with 2.1 and
2207continue through 2.2, 2.3, etc. But naming conventions for branches
2208and subbranches vary widely on these systems, and some (like
2209Mercurial) never depart from the monotonic integer sequence at all.
2210Consult the documentation of the VCS you are using.
2211
2212@cindex head revision
2213 If you omit the final component of a dot-pair revision ID, that is called a
2214@dfn{branch ID}. It refers to the highest existing revision on that
2215branch---the @dfn{head revision} of that branch. The branches in the
2216dot-pair example above have branch IDs 1.2.1 and 1.2.2.
2155 2217
2156@menu 2218@menu
2157* Switching Branches:: How to get to another existing branch. 2219* Switching Branches:: How to get to another existing branch.
@@ -2165,14 +2227,15 @@ example above have branch numbers 1.2.1 and 1.2.2.
2165@subsubsection Switching between Branches 2227@subsubsection Switching between Branches
2166 2228
2167 To switch between branches, type @kbd{C-u C-x v v} and specify the 2229 To switch between branches, type @kbd{C-u C-x v v} and specify the
2168version number you want to select. On a locking-based system, this 2230revision ID you want to select. On a locking-based system, this
2169version is then visited @emph{unlocked} (write-protected), so you can 2231version is then visited @emph{unlocked} (write-protected), so you can
2170examine it before locking it. Switching branches in this way is allowed 2232examine it before locking it. Switching branches in this way is allowed
2171only when the file is not locked. 2233only when the file is not locked.
2172 2234
2173 You can omit the minor version number, thus giving only the branch 2235 On a VCS with dot-pair IDs, you can omit the minor part, thus giving
2174number; this takes you to the head version on the chosen branch. If you 2236only the branch ID; this takes you to the head version on the
2175only type @key{RET}, Emacs goes to the highest version on the trunk. 2237chosen branch. If you only type @key{RET}, Emacs goes to the highest
2238version on the trunk.
2176 2239
2177 After you have switched to any branch (including the main branch), you 2240 After you have switched to any branch (including the main branch), you
2178stay on it for subsequent VC commands, until you explicitly select some 2241stay on it for subsequent VC commands, until you explicitly select some
@@ -2181,36 +2244,36 @@ other branch.
2181@node Creating Branches 2244@node Creating Branches
2182@subsubsection Creating New Branches 2245@subsubsection Creating New Branches
2183 2246
2184 To create a new branch from a head version (one that is the latest in 2247 To create a new branch from a head revision (one that is the latest in
2185the branch that contains it), first select that version if necessary, 2248the branch that contains it), first select that revision if necessary,
2186lock it with @kbd{C-x v v}, and make whatever changes you want. Then, 2249lock it with @kbd{C-x v v}, and make whatever changes you want. Then,
2187when you check in the changes, use @kbd{C-u C-x v v}. This lets you 2250when you check in the changes, use @kbd{C-u C-x v v}. This lets you
2188specify the version number for the new version. You should specify a 2251specify the revision ID for the new revision. You should specify a
2189suitable branch number for a branch starting at the current version. 2252suitable branch ID for a branch starting at the current revision.
2190For example, if the current version is 2.5, the branch number should be 2253For example, if the current revision is 2.5, the branch ID should be
21912.5.1, 2.5.2, and so on, depending on the number of existing branches at 22542.5.1, 2.5.2, and so on, depending on the number of existing branches at
2192that point. 2255that point.
2193 2256
2194 To create a new branch at an older version (one that is no longer the 2257 To create a new branch at an older revision (one that is no longer the
2195head of a branch), first select that version (@pxref{Switching 2258head of a branch), first select that revision (@pxref{Switching
2196Branches}). Your procedure will then differ depending on whether you 2259Branches}). Your procedure will then differ depending on whether you
2197are using a locking or merging-based VCS. 2260are using a locking or merging-based VCS.
2198 2261
2199 On a locking VCS, you will need to lock the old version branch with 2262 On a locking VCS, you will need to lock the old revision branch with
2200@kbd{C-x v v}. You'll be asked to confirm, when you lock the old 2263@kbd{C-x v v}. You'll be asked to confirm, when you lock the old
2201version, that you really mean to create a new branch---if you say no, 2264revision, that you really mean to create a new branch---if you say no,
2202you'll be offered a chance to lock the latest version instead. On 2265you'll be offered a chance to lock the latest revision instead. On
2203a merging-based VCS you will skip this step. 2266a merging-based VCS you will skip this step.
2204 2267
2205 Then make your changes and type @kbd{C-x v v} again to check in a new 2268 Then make your changes and type @kbd{C-x v v} again to check in a new
2206version. This automatically creates a new branch starting from the 2269revision. This automatically creates a new branch starting from the
2207selected version. You need not specially request a new branch, because 2270selected revision. You need not specially request a new branch, because
2208that's the only way to add a new version at a point that is not the head 2271that's the only way to add a new revision at a point that is not the head
2209of a branch. 2272of a branch.
2210 2273
2211 After the branch is created, you ``stay'' on it. That means that 2274 After the branch is created, you ``stay'' on it. That means that
2212subsequent check-ins create new versions on that branch. To leave the 2275subsequent check-ins create new revisions on that branch. To leave the
2213branch, you must explicitly select a different version with @kbd{C-u C-x 2276branch, you must explicitly select a different revision with @kbd{C-u C-x
2214v v}. To transfer changes from one branch to another, use the merge 2277v v}. To transfer changes from one branch to another, use the merge
2215command, described in the next section. 2278command, described in the next section.
2216 2279
@@ -2240,26 +2303,26 @@ since you checked the file out (we call this @dfn{merging the news}).
2240This is the common way to pick up recent changes from the repository, 2303This is the common way to pick up recent changes from the repository,
2241regardless of whether you have already changed the file yourself. 2304regardless of whether you have already changed the file yourself.
2242 2305
2243 You can also enter a branch number or a pair of version numbers in 2306 You can also enter a branch ID or a pair of revision IDs in
2244the minibuffer. Then @kbd{C-x v m} finds the changes from that 2307the minibuffer. Then @kbd{C-x v m} finds the changes from that
2245branch, or the differences between the two versions you specified, and 2308branch, or the differences between the two revisions you specified, and
2246merges them into the current version of the current file. 2309merges them into the current revision of the current file.
2247 2310
2248 As an example, suppose that you have finished a certain feature on 2311 As an example, suppose that you have finished a certain feature on
2249branch 1.3.1. In the meantime, development on the trunk has proceeded 2312branch 1.3.1. In the meantime, development on the trunk has proceeded
2250to version 1.5. To merge the changes from the branch to the trunk, 2313to revision 1.5. To merge the changes from the branch to the trunk,
2251first go to the head version of the trunk, by typing @kbd{C-u C-x v v 2314first go to the head revision of the trunk, by typing @kbd{C-u C-x v v
2252@key{RET}}. Version 1.5 is now current. If locking is used for the file, 2315@key{RET}}. Revision 1.5 is now current. If locking is used for the file,
2253type @kbd{C-x v v} to lock version 1.5 so that you can change it. Next, 2316type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next,
2254type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on 2317type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on
2255branch 1.3.1 (relative to version 1.3, where the branch started, up to 2318branch 1.3.1 (relative to revision 1.3, where the branch started, up to
2256the last version on the branch) and merges it into the current version 2319the last revision on the branch) and merges it into the current revision
2257of the work file. You can now check in the changed file, thus creating 2320of the work file. You can now check in the changed file, thus creating
2258version 1.6 containing the changes from the branch. 2321revision 1.6 containing the changes from the branch.
2259 2322
2260 It is possible to do further editing after merging the branch, before 2323 It is possible to do further editing after merging the branch, before
2261the next check-in. But it is usually wiser to check in the merged 2324the next check-in. But it is usually wiser to check in the merged
2262version, then lock it and make the further changes. This will keep 2325revision, then lock it and make the further changes. This will keep
2263a better record of the history of changes. 2326a better record of the history of changes.
2264 2327
2265@cindex conflicts 2328@cindex conflicts
@@ -2277,7 +2340,7 @@ Ediff, Ediff, ediff, The Ediff Manual}).
2277 If you say no, the conflicting changes are both inserted into the 2340 If you say no, the conflicting changes are both inserted into the
2278file, surrounded by @dfn{conflict markers}. The example below shows how 2341file, surrounded by @dfn{conflict markers}. The example below shows how
2279a conflict region looks; the file is called @samp{name} and the current 2342a conflict region looks; the file is called @samp{name} and the current
2280master file version with user B's changes in it is 1.11. 2343master file revision with user B's changes in it is 1.11.
2281 2344
2282@c @w here is so CVS won't think this is a conflict. 2345@c @w here is so CVS won't think this is a conflict.
2283@smallexample 2346@smallexample
@@ -2300,12 +2363,12 @@ check in the merged version afterwards.
2300@subsubsection Multi-User Branching 2363@subsubsection Multi-User Branching
2301 2364
2302 It is often useful for multiple developers to work simultaneously on 2365 It is often useful for multiple developers to work simultaneously on
2303different branches of a file. CVS allows this by default; for RCS, it 2366different branches of a file. CVS and later systems allow this by
2304is possible if you create multiple source directories. Each source 2367default; for RCS, it is possible if you create multiple source
2305directory should have a link named @file{RCS} which points to a common 2368directories. Each source directory should have a link named
2306directory of RCS master files. Then each source directory can have its 2369@file{RCS} which points to a common directory of RCS master files.
2307own choice of selected versions, but all share the same common RCS 2370Then each source directory can have its own choice of selected
2308records. 2371revisions, but all share the same common RCS records.
2309 2372
2310 This technique works reliably and automatically, provided that the 2373 This technique works reliably and automatically, provided that the
2311source files contain RCS version headers 2374source files contain RCS version headers
@@ -2315,13 +2378,13 @@ source files contain RCS version headers
2315@ifnottex 2378@ifnottex
2316(@pxref{Version Headers}). 2379(@pxref{Version Headers}).
2317@end ifnottex 2380@end ifnottex
2318The headers enable Emacs to be sure, at all times, which version 2381The headers enable Emacs to be sure, at all times, which revision
2319number is present in the work file. 2382ID is present in the work file.
2320 2383
2321 If the files do not have version headers, you must instead tell Emacs 2384 If the files do not have version headers, you must instead tell Emacs
2322explicitly in each session which branch you are working on. To do this, 2385explicitly in each session which branch you are working on. To do this,
2323first find the file, then type @kbd{C-u C-x v v} and specify the correct 2386first find the file, then type @kbd{C-u C-x v v} and specify the correct
2324branch number. This ensures that Emacs knows which branch it is using 2387branch ID. This ensures that Emacs knows which branch it is using
2325during this particular editing session. 2388during this particular editing session.
2326 2389
2327@ifnottex 2390@ifnottex
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index c4cdea4359d..83fc1617066 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -488,12 +488,13 @@ also change the coding system for a running subshell by typing
488Coding}. 488Coding}.
489 489
490@cindex @env{INSIDE_EMACS} environment variable 490@cindex @env{INSIDE_EMACS} environment variable
491 Emacs sets the envitonment variable @env{INSIDE_EMACS} to @code{t} 491 Emacs sets the environment variable @env{INSIDE_EMACS} (to a
492in the subshell. Programs can check this variable to determine 492comma-separated list including the Emacs version) in the subshell.
493whether they are running inside an Emacs subshell. 493Programs can check this variable to determine whether they are running
494inside an Emacs subshell.
494 495
495@cindex @env{EMACS} environment variable 496@cindex @env{EMACS} environment variable
496 Emacs also sets the @env{EMACS} environment variable to @code{t} if 497 Emacs also sets the @env{EMACS} environment variable (to @code{t}) if
497it is not already defined. @strong{Warning:} This environment 498it is not already defined. @strong{Warning:} This environment
498variable is deprecated. Programs that check this variable should be 499variable is deprecated. Programs that check this variable should be
499changed to check @env{INSIDE_EMACS} instead. 500changed to check @env{INSIDE_EMACS} instead.
diff --git a/doc/emacs/vc-xtra.texi b/doc/emacs/vc-xtra.texi
index 6ec69d60896..5b4e374a6ea 100644
--- a/doc/emacs/vc-xtra.texi
+++ b/doc/emacs/vc-xtra.texi
@@ -15,7 +15,7 @@ the Emacs Manual}). This chapter describes more advanced VC usage.
15@menu 15@menu
16* VC Dired Mode:: Listing files managed by version control. 16* VC Dired Mode:: Listing files managed by version control.
17* VC Dired Commands:: Commands to use in a VC Dired buffer. 17* VC Dired Commands:: Commands to use in a VC Dired buffer.
18* Remote Repositories:: Efficient access to remote CVS servers. 18* Remote Repositories:: Efficient access to remote VCS servers.
19* Snapshots:: Sets of file versions treated as a unit. 19* Snapshots:: Sets of file versions treated as a unit.
20* Miscellaneous VC:: Various other commands and features of VC. 20* Miscellaneous VC:: Various other commands and features of VC.
21* Customizing VC:: Variables that change VC's behavior. 21* Customizing VC:: Variables that change VC's behavior.
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 6d5df78848c..ebdd1d5951f 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -120,21 +120,27 @@ ordinary Dired, that allows you to specify additional switches for the
120 All the usual Dired commands work normally in VC Dired mode, except 120 All the usual Dired commands work normally in VC Dired mode, except
121for @kbd{v}, which is redefined as the version control prefix. You can 121for @kbd{v}, which is redefined as the version control prefix. You can
122invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by 122invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by
123typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply 123typing @kbd{v =}, or @kbd{v l}, and so on. These commands will apply
124to the file name on the current line. 124to the set of files you have marked for operation in the VC-Dired
125buffer.
125 126
126 The command @kbd{v v} (@code{vc-next-action}) operates on all the 127 The command @kbd{v v} (@code{vc-next-action}) operates on all the
127marked files, so that you can lock or check in several files at once. 128marked files, so that you can lock or check in several files at once.
128If it operates on more than one file, it handles each file according to 129If the underlying VC supports atomic commits of multiple-file
129its current state; thus, it might lock one file, but check in another 130changesets @kbd{v v} with a selected set of modified but not committed
130file. This could be confusing; it is up to you to avoid confusing 131files wuill commit all of them at once as a single changeset.
131behavior by marking a set of files that are in a similar state. If no 132
132files are marked, @kbd{v v} operates on the file in the current line. 133 When @kbd{v v} (@code{vc-next-action}) operates on a set of files,
133 134it requires that all of those files must be in the same state;
134 If any files call for check-in, @kbd{v v} reads a single log entry, 135otherwise it will throw an error. Note that this differs from the
135then uses it for all the files being checked in. This is convenient for 136behavior of older versions of VC, which did not have fileset
136registering or checking in several files at once, as part of the same 137operations and simply did @code{vc-next-action} on each file
137change. 138individually.
139
140 If any files are in a state that calls for commit, @kbd{v v} reads a
141single log entry and uses it for the changeset as a whole. If the
142underling VCS is file- rather than changeset-oriented, the log entry
143will be replicated into the history of each file.
138 144
139@findex vc-dired-toggle-terse-mode 145@findex vc-dired-toggle-terse-mode
140@findex vc-dired-mark-locked 146@findex vc-dired-mark-locked
diff --git a/doc/emacs/vc2-xtra.texi b/doc/emacs/vc2-xtra.texi
index 83f28088726..da7ef76025a 100644
--- a/doc/emacs/vc2-xtra.texi
+++ b/doc/emacs/vc2-xtra.texi
@@ -6,17 +6,24 @@
6@c printed version) or in the main Emacs manual (for the on-line version). 6@c printed version) or in the main Emacs manual (for the on-line version).
7@node Remote Repositories 7@node Remote Repositories
8@subsection Remote Repositories 8@subsection Remote Repositories
9@cindex remote repositories (CVS) 9@cindex remote repositories
10
11 A common way of using CVS and other more advanced VCSes is to set up
12a central repository on some Internet host, then have each
13developer check out a personal working copy of the files on his local
14machine. Committing changes to the repository, and picking up changes
15from other users into one's own working area, then works by direct
16interactions with the repository server.
10 17
11 A common way of using CVS is to set up a central CVS repository on 18 One difficulty is that access to a repository server is often slow,
12some Internet host, then have each developer check out a personal 19and that developers might need to work off-line as well. While only
13working copy of the files on his local machine. Committing changes to 20third-generation decentralized VCses such as GNU Arch or Mercurial
14the repository, and picking up changes from other users into one's own 21really solve this problem, VC is designed to reduce the amount of
15working area, then works by direct interactions with the CVS server. 22network interaction necessary.
16 23
17 One difficulty is that access to the CVS server is often slow, and 24 If you are using a truly decentralized VCS you can skip the rest of
18that developers might need to work off-line as well. VC is designed 25this section. It describes backup and local-repository techniques
19to reduce the amount of network interaction necessary. 26that are only useful for Subversion and earlier VCSes.
20 27
21@menu 28@menu
22* Version Backups:: Keeping local copies of repository versions. 29* Version Backups:: Keeping local copies of repository versions.
@@ -28,7 +35,7 @@ to reduce the amount of network interaction necessary.
28@cindex version backups 35@cindex version backups
29 36
30@cindex automatic version backups 37@cindex automatic version backups
31 When VC sees that the CVS repository for a file is on a remote 38 When VC sees that the repository for a file is on a remote
32machine, it automatically makes local backups of unmodified versions 39machine, it automatically makes local backups of unmodified versions
33of the file---@dfn{automatic version backups}. This means that you 40of the file---@dfn{automatic version backups}. This means that you
34can compare the file to the repository version (@kbd{C-x v =}), or 41can compare the file to the repository version (@kbd{C-x v =}), or
@@ -47,7 +54,7 @@ as ordinary Emacs backup files
47@end ifnottex 54@end ifnottex
48But they follow a similar naming convention. 55But they follow a similar naming convention.
49 56
50 For a file that comes from a remote CVS repository, VC makes a 57 For a file that comes from a remote repository, VC makes a
51version backup whenever you save the first changes to the file, and 58version backup whenever you save the first changes to the file, and
52removes it after you have committed your modified version to the 59removes it after you have committed your modified version to the
53repository. You can disable the making of automatic version backups by 60repository. You can disable the making of automatic version backups by
@@ -58,10 +65,10 @@ setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
58of file @var{file} is @code{@var{file}.~@var{version}.~}. This is 65of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
59almost the same as the name used by @kbd{C-x v ~} 66almost the same as the name used by @kbd{C-x v ~}
60@iftex 67@iftex
61(@pxref{Old Versions,,,emacs, the Emacs Manual}), 68(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
62@end iftex 69@end iftex
63@ifnottex 70@ifnottex
64(@pxref{Old Versions}), 71(@pxref{Old Revisions}),
65@end ifnottex 72@end ifnottex
66the only difference being the additional dot (@samp{.}) after the 73the only difference being the additional dot (@samp{.}) after the
67version number. This similarity is intentional, because both kinds of 74version number. This similarity is intentional, because both kinds of
@@ -244,10 +251,10 @@ you need not hesitate to create snapshots whenever they are useful.
244 You can give a snapshot name as an argument to @kbd{C-x v =} or 251 You can give a snapshot name as an argument to @kbd{C-x v =} or
245@kbd{C-x v ~} 252@kbd{C-x v ~}
246@iftex 253@iftex
247(@pxref{Old Versions,,,emacs, the Emacs Manual}). 254(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
248@end iftex 255@end iftex
249@ifnottex 256@ifnottex
250(@pxref{Old Versions}). 257(@pxref{Old Revisions}).
251@end ifnottex 258@end ifnottex
252Thus, you can use it to compare a snapshot against the current files, 259Thus, you can use it to compare a snapshot against the current files,
253or two snapshots against each other, or a snapshot against a named 260or two snapshots against each other, or a snapshot against a named
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 056ad379127..364b2796ac0 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
12007-10-10 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.1.11.
4
5 * trampver.texi: Update release number.
6
12007-10-06 Michael Albinus <michael.albinus@gmx.de> 72007-10-06 Michael Albinus <michael.albinus@gmx.de>
2 8
3 * tramp.texi (External packages): New section. 9 * tramp.texi (External packages): New section.
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index eb69733b61c..f4d65ed07aa 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -208,8 +208,8 @@ license to the document, as described in section 6 of the license.
208@vskip 0pt plus 1filll 208@vskip 0pt plus 1filll
209@insertcopying 209@insertcopying
210 210
211This manual was generated from $Revision: 1.2 $ of $RCSfile: cc-mode.texi,v $, which can be 211This manual was generated from cc-mode.texi, which can be downloaded
212downloaded from 212from
213@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/doc/misc/cc-mode.texi}. 213@url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/doc/misc/cc-mode.texi}.
214@end titlepage 214@end titlepage
215 215
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 4ed196a80f0..179af979c06 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -4,12 +4,12 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.1.11-pre 7@set trampver 2.1.11
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set instprefix /usr/local 10@set instprefix /usr/local
11@set lispdir /usr/local/share/emacs/site-lisp 11@set lispdir /usr/local/share/emacs/site-lisp
12@set infodir /usr/local/info 12@set infodir /usr/local/share/info
13 13
14@c Formatting of the tramp program name consistent. 14@c Formatting of the tramp program name consistent.
15@set tramp @sc{tramp} 15@set tramp @sc{tramp}