aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEric S. Raymond2007-10-06 09:21:53 +0000
committerEric S. Raymond2007-10-06 09:21:53 +0000
commitb981e2c6cdb29e56c534527a507fbd61966952d9 (patch)
treefc1841ba3c69621d0bd94a67aceac957d70f323b /doc
parent0d0e935627c816569b76b1258ea7bf70360cff09 (diff)
downloademacs-b981e2c6cdb29e56c534527a507fbd61966952d9.tar.gz
emacs-b981e2c6cdb29e56c534527a507fbd61966952d9.zip
Update manual for 2007 conditions. None of these changes are
specific to new VC, that wil come later.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog6
-rw-r--r--doc/emacs/files.texi131
2 files changed, 75 insertions, 62 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 41eb621e510..5f58136745b 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,9 @@
12007-10-06 Eric S. Raymond <esr@snark.thyrsus.com>
2
3 * files.texi: Update the section on version control for 2007
4 conditions. None of these changes are new-VC-specific; that
5 will come later.
6
12007-09-15 Glenn Morris <rgm@gnu.org> 72007-09-15 Glenn Morris <rgm@gnu.org>
2 8
3 * calendar.texi (Holidays): Change all instances of `holiday-list' back 9 * calendar.texi (Holidays): Change all instances of `holiday-list' back
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 7ba36916684..14d6f3d83e5 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1248,9 +1248,12 @@ customizable variable @code{vc-handled-backends} to @code{nil}
1248@subsection Introduction to Version Control 1248@subsection Introduction to Version Control
1249 1249
1250 VC allows you to use a version control system from within Emacs, 1250 VC allows you to use a version control system from within Emacs,
1251integrating the version control operations smoothly with editing. VC 1251integrating the version control operations smoothly with editing.
1252provides a uniform interface to version control, so that regardless of 1252Though VC cannot completely bridge the gaps between version-control
1253which version control system is in use, you can use it the same way. 1253systems with widely differing capabilities, it does provide
1254a uniform interface to many version control operations. Regardless of
1255which version control system is in use, you will be able to do basic
1256operations in much the same way.
1254 1257
1255 This section provides a general overview of version control, and 1258 This section provides a general overview of version control, and
1256describes the version control systems that VC supports. You can skip 1259describes the version control systems that VC supports. You can skip
@@ -1268,7 +1271,7 @@ you want to use.
1268@subsubsection Understanding the problems it addresses 1271@subsubsection Understanding the problems it addresses
1269 1272
1270 Version control systems provide you with three important capabilities: 1273 Version control systems provide you with three important capabilities:
1271reversibility, concurrency, and history. 1274@dfn{reversibility}. @dfn{concurrency}, and @dfn{history}.
1272 1275
1273 The most basic capability you get from a version-control system is 1276 The most basic capability you get from a version-control system is
1274reversibility, the ability to back up to a saved, known-good state when 1277reversibility, the ability to back up to a saved, known-good state when
@@ -1292,15 +1295,16 @@ become a vitally important form of communication among developers.
1292``back ends'': CVS, GNU Arch, RCS, Meta-CVS, Subversion, and SCCS. 1295``back ends'': CVS, GNU Arch, RCS, Meta-CVS, Subversion, and SCCS.
1293 1296
1294@cindex CVS 1297@cindex CVS
1295 CVS is a free version control system that is used for the majority 1298 CVS is the free version control system that was until recently (as of
1296of free software projects today. It allows concurrent multi-user 12992007) used for the majority of free software projects, though it is now
1297development either locally or over the network. Some of its 1300being superseded by other systems. It allows concurrent
1298shortcomings, corrected by newer systems such as GNU Arch, are that it 1301multi-user development either locally or over the network. Some of its
1299lacks atomic commits or support for renaming files. VC supports all 1302shortcomings, corrected by newer systems such as Subversion or GNU Arch,
1300basic editing operations under CVS, but for some less common tasks you 1303are that it lacks atomic commits or support for renaming files. VC
1301still need to call CVS from the command line. Note also that before 1304supports all basic editing operations under CVS, but for some less
1302using CVS you must set up a repository, which is a subject too complex 1305common tasks you still need to call CVS from the command line. Note
1303to treat here. 1306also that before using CVS you must set up a repository, which is a
1307subject too complex to treat here.
1304 1308
1305@cindex GNU Arch 1309@cindex GNU Arch
1306@cindex Arch 1310@cindex Arch
@@ -1315,62 +1319,50 @@ the command line, or use a specialized module.
1315 1319
1316@cindex RCS 1320@cindex RCS
1317 RCS is the free version control system around which VC was initially 1321 RCS is the free version control system around which VC was initially
1318built. The VC commands are therefore conceptually closest to RCS. 1322built. Almost everything you can do with RCS can be done through VC. You
1319Almost everything you can do with RCS can be done through VC. You 1323cannot use RCS over the network, though, and it only works at the level
1320cannot use RCS over the network though, and it only works at the level
1321of individual files, rather than projects. You should use it if you 1324of individual files, rather than projects. You should use it if you
1322want a simple, yet reliable tool for handling individual files. 1325want a simple, yet reliable tool for handling individual files.
1323 1326
1324@cindex SVN 1327@cindex SVN
1325@cindex Subversion 1328@cindex Subversion
1326 Subversion is a free version control system designed to be similar 1329 Subversion is a free version control system designed to be similar to
1327to CVS but without CVS's problems. Subversion supports atomic commits, 1330CVS but without CVS's problems, and is now (2007) rapidly superseding
1328and versions directories, symbolic links, meta-data, renames, copies, 1331CVS. Subversion supports atomic commits, and versions directories,
1329and deletes. It can be used via http or via its own protocol. 1332symbolic links, meta-data, renames, copies, and deletes. It can be used
1330 1333via http or via its own protocol.
1331@cindex MCVS
1332@cindex Meta-CVS
1333 Meta-CVS is another attempt to solve problems arising in CVS. It
1334supports directory structure versioning, improved branching and
1335merging, and use of symbolic links and meta-data in repositories.
1336 1334
1337@cindex SCCS 1335@cindex SCCS
1338 SCCS is a proprietary but widely used version control system. In 1336 SCCS was the first version-control system ever built, and was long ago
1339terms of capabilities, it is the weakest of the six that VC supports. 1337superseded by later and more advanced ones; Emacs supports it only for
1340VC compensates for certain features missing in SCCS (snapshots, for 1338backward compatibility and historical reasons. VC compensates for
1341example) by implementing them itself, but some other VC features, such 1339certain features missing in SCCS (snapshots, for example) by
1342as multiple branches, are not available with SCCS. Since SCCS is 1340implementing them itself, but some other VC features, such as multiple
1343non-free, not respecting its users freedom, you should not use it; 1341branches, are not available with SCCS. Since SCCS is non-free you
1344use its free replacement CSSC instead. But you should use CSSC only 1342should not use it; use its free replacement CSSC instead. But you
1345if for some reason you cannot use RCS, or one of the higher-level 1343should use CSSC only if for some reason you cannot use a more
1346systems such as CVS or GNU Arch. 1344recent and better-designed version-control system.
1347
1348In the following, we discuss mainly RCS, SCCS and CVS. Nearly
1349everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
1350as well.
1351 1345
1352@node VC Concepts 1346@node VC Concepts
1353@subsubsection Concepts of Version Control 1347@subsubsection Concepts of Version Control
1354 1348
1355@cindex master file 1349@cindex repository
1356@cindex registered file 1350@cindex registered file
1357 When a file is under version control, we also say that it is 1351 When a file is under version control, we also say that it is
1358@dfn{registered} in the version control system. Each registered file 1352@dfn{registered} in the version control system. The system has a
1359has a corresponding @dfn{master file} which represents the file's 1353@dfn{repository} which stores both the file's present state plus its
1360present state plus its change history---enough to reconstruct the 1354change history---enough to reconstruct the current version or any
1361current version or any earlier version. Usually the master file also 1355earlier version. The repository will also contain a @dfn{log entry} for
1362records a @dfn{log entry} for each version, describing in words what was 1356each change to the file, describing in words what was modified in that
1363changed in that version. 1357revision.
1364 1358
1365@cindex work file 1359@cindex work file
1366@cindex checking out files 1360@cindex checking out files
1367 The file that is maintained under version control is sometimes called 1361 A file checked out of a version-control repository is sometimes called
1368the @dfn{work file} corresponding to its master file. You edit the work 1362the @dfn{work file}. You edit the work file and make changes in it, as
1369file and make changes in it, as you would with an ordinary file. (With 1363you would with an ordinary file. After you are done with a set of
1370SCCS and RCS, you must @dfn{lock} the file before you start to edit it.) 1364changes, you @dfn{check the file in}, which records the changes in the
1371After you are done with a set of changes, you @dfn{check the file in}, 1365repository, along with a log entry for them.
1372which records the changes in the master file, along with a log entry for
1373them.
1374 1366
1375 To go beyond these basic concepts, you will need to understand three 1367 To go beyond these basic concepts, you will need to understand three
1376ways in which version-control systems can differ from each other. They 1368ways in which version-control systems can differ from each other. They
@@ -1427,7 +1419,7 @@ both locking and merging version control and tries to hide the differences
1427between them as much as possible. 1419between them as much as possible.
1428 1420
1429@cindex files versus changesets. 1421@cindex files versus changesets.
1430 On SCCS, RCS, CVS, and other early version-control systems, checkins 1422 On SCCS. RCS, CVS, and other early version-control systems, checkins
1431and other operations are @dfn{file-based}; each file has its own 1423and other operations are @dfn{file-based}; each file has its own
1432@dfn{master file} with its own comment- and revision history separate 1424@dfn{master file} with its own comment- and revision history separate
1433from that of all other files in the system. Later systems, beginning 1425from that of all other files in the system. Later systems, beginning
@@ -1439,14 +1431,18 @@ one file, but is attached to the changeset itself.
1439 Changeset-based version control is in general both more flexible and 1431 Changeset-based version control is in general both more flexible and
1440more powerful than file-based version control; usually, when a change to 1432more powerful than file-based version control; usually, when a change to
1441multiple files has to be backed out, it's good to be able to easily 1433multiple files has to be backed out, it's good to be able to easily
1442identify and remove all of it. 1434identify and remove all of it. But it took some years for designers to
1435figure that out, and while file-based systems are passing out of use
1436there are lots of legacy repositories still to be dealt with at time of
1437writing in 2007.
1443 1438
1444@cindex centralized vs. decentralized 1439@cindex centralized vs. decentralized
1440
1445 Early version-control systems were designed around a @dfn{centralized} 1441 Early version-control systems were designed around a @dfn{centralized}
1446model in which each project has only one repository used by all 1442model in which each project has only one repository used by all
1447developers. SCCS, RCS, CVS, and Subversion share this kind of model. 1443developers. SCCS, RCS, CVS, and Subversion share this kind of model.
1448It has two important problems. One is that a single repository is a 1444It has two important problems. One is that a single repository is a
1449single point of failure---if the repository server is down all work 1445single point of failure--if the repository server is down all work
1450stops. The other is that you need to be connected live to the server to 1446stops. The other is that you need to be connected live to the server to
1451do checkins and checkouts; if you're offline, you can't work. 1447do checkins and checkouts; if you're offline, you can't work.
1452 1448
@@ -1478,7 +1474,7 @@ version-control system is invisible to VC mode.
1478@cindex version control log 1474@cindex version control log
1479 1475
1480 Projects that use a revision control system can have @emph{two} 1476 Projects that use a revision control system can have @emph{two}
1481types of log for changes. One is the per-file log maintained by the 1477types of log for changes. One is the log maintained by the
1482revision control system: each time you check in a change, you must 1478revision control system: each time you check in a change, you must
1483fill out a @dfn{log entry} for the change (@pxref{Log Buffer}). This 1479fill out a @dfn{log entry} for the change (@pxref{Log Buffer}). This
1484kind of log is called the @dfn{version control log}, also the 1480kind of log is called the @dfn{version control log}, also the
@@ -1491,10 +1487,22 @@ A small program would use one @file{ChangeLog} file; a large program
1491may well merit a @file{ChangeLog} file in each major directory. 1487may well merit a @file{ChangeLog} file in each major directory.
1492@xref{Change Log}. 1488@xref{Change Log}.
1493 1489
1494 A project maintained with version control can use just the per-file 1490 Actually, the fact that both kinds of log exist is partly a legacy from
1495log, or it can use both kinds of logs. It can handle some files one 1491file-based version control. Changelogs are a GNU convention, later
1496way and some files the other way. Each project has its policy, which 1492more widely adopted, that help developers to get a changeset-based
1497you should follow. 1493view of a project even when its version-control system has that
1494information split up in multiple file-based logs.
1495
1496 Changeset-based version systems, on the other hand, often maintain
1497a changeset-based modification log for the entire system that makes
1498ChangeLogs mostly redundant. The only advantage ChangeLogs retain is that
1499it may be useful to be able to view the transaction history of a
1500single directory separately from those of other directories.
1501
1502 A project maintained with version control can use just the
1503version-control log, or it can use both kinds of logs. It can
1504handle some files one way and some files the other way. Each project
1505has its policy, which you should follow.
1498 1506
1499 When the policy is to use both, you typically want to write an entry 1507 When the policy is to use both, you typically want to write an entry
1500for each change just once, then put it into both logs. You can write 1508for each change just once, then put it into both logs. You can write
@@ -1509,7 +1517,6 @@ to copy it to @file{ChangeLog}
1509(@pxref{Change Logs and VC}). 1517(@pxref{Change Logs and VC}).
1510@end ifnottex 1518@end ifnottex
1511 1519
1512
1513@node VC Mode Line 1520@node VC Mode Line
1514@subsection Version Control and the Mode Line 1521@subsection Version Control and the Mode Line
1515 1522