diff options
| author | Eric S. Raymond | 2007-10-06 09:21:53 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-10-06 09:21:53 +0000 |
| commit | b981e2c6cdb29e56c534527a507fbd61966952d9 (patch) | |
| tree | fc1841ba3c69621d0bd94a67aceac957d70f323b /doc | |
| parent | 0d0e935627c816569b76b1258ea7bf70360cff09 (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 131 |
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 @@ | |||
| 1 | 2007-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 | |||
| 1 | 2007-09-15 Glenn Morris <rgm@gnu.org> | 7 | 2007-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, |
| 1251 | integrating the version control operations smoothly with editing. VC | 1251 | integrating the version control operations smoothly with editing. |
| 1252 | provides a uniform interface to version control, so that regardless of | 1252 | Though VC cannot completely bridge the gaps between version-control |
| 1253 | which version control system is in use, you can use it the same way. | 1253 | systems with widely differing capabilities, it does provide |
| 1254 | a uniform interface to many version control operations. Regardless of | ||
| 1255 | which version control system is in use, you will be able to do basic | ||
| 1256 | operations 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 |
| 1256 | describes the version control systems that VC supports. You can skip | 1259 | describes 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: |
| 1271 | reversibility, 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 |
| 1274 | reversibility, the ability to back up to a saved, known-good state when | 1277 | reversibility, 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 |
| 1296 | of free software projects today. It allows concurrent multi-user | 1299 | 2007) used for the majority of free software projects, though it is now |
| 1297 | development either locally or over the network. Some of its | 1300 | being superseded by other systems. It allows concurrent |
| 1298 | shortcomings, corrected by newer systems such as GNU Arch, are that it | 1301 | multi-user development either locally or over the network. Some of its |
| 1299 | lacks atomic commits or support for renaming files. VC supports all | 1302 | shortcomings, corrected by newer systems such as Subversion or GNU Arch, |
| 1300 | basic editing operations under CVS, but for some less common tasks you | 1303 | are that it lacks atomic commits or support for renaming files. VC |
| 1301 | still need to call CVS from the command line. Note also that before | 1304 | supports all basic editing operations under CVS, but for some less |
| 1302 | using CVS you must set up a repository, which is a subject too complex | 1305 | common tasks you still need to call CVS from the command line. Note |
| 1303 | to treat here. | 1306 | also that before using CVS you must set up a repository, which is a |
| 1307 | subject 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 |
| 1318 | built. The VC commands are therefore conceptually closest to RCS. | 1322 | built. Almost everything you can do with RCS can be done through VC. You |
| 1319 | Almost everything you can do with RCS can be done through VC. You | 1323 | cannot use RCS over the network, though, and it only works at the level |
| 1320 | cannot use RCS over the network though, and it only works at the level | ||
| 1321 | of individual files, rather than projects. You should use it if you | 1324 | of individual files, rather than projects. You should use it if you |
| 1322 | want a simple, yet reliable tool for handling individual files. | 1325 | want 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 |
| 1327 | to CVS but without CVS's problems. Subversion supports atomic commits, | 1330 | CVS but without CVS's problems, and is now (2007) rapidly superseding |
| 1328 | and versions directories, symbolic links, meta-data, renames, copies, | 1331 | CVS. Subversion supports atomic commits, and versions directories, |
| 1329 | and deletes. It can be used via http or via its own protocol. | 1332 | symbolic links, meta-data, renames, copies, and deletes. It can be used |
| 1330 | 1333 | via 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 | ||
| 1334 | supports directory structure versioning, improved branching and | ||
| 1335 | merging, 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 |
| 1339 | terms of capabilities, it is the weakest of the six that VC supports. | 1337 | superseded by later and more advanced ones; Emacs supports it only for |
| 1340 | VC compensates for certain features missing in SCCS (snapshots, for | 1338 | backward compatibility and historical reasons. VC compensates for |
| 1341 | example) by implementing them itself, but some other VC features, such | 1339 | certain features missing in SCCS (snapshots, for example) by |
| 1342 | as multiple branches, are not available with SCCS. Since SCCS is | 1340 | implementing them itself, but some other VC features, such as multiple |
| 1343 | non-free, not respecting its users freedom, you should not use it; | 1341 | branches, are not available with SCCS. Since SCCS is non-free you |
| 1344 | use its free replacement CSSC instead. But you should use CSSC only | 1342 | should not use it; use its free replacement CSSC instead. But you |
| 1345 | if for some reason you cannot use RCS, or one of the higher-level | 1343 | should use CSSC only if for some reason you cannot use a more |
| 1346 | systems such as CVS or GNU Arch. | 1344 | recent and better-designed version-control system. |
| 1347 | |||
| 1348 | In the following, we discuss mainly RCS, SCCS and CVS. Nearly | ||
| 1349 | everything said about CVS applies to GNU Arch, Subversion and Meta-CVS | ||
| 1350 | as 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 |
| 1359 | has a corresponding @dfn{master file} which represents the file's | 1353 | @dfn{repository} which stores both the file's present state plus its |
| 1360 | present state plus its change history---enough to reconstruct the | 1354 | change history---enough to reconstruct the current version or any |
| 1361 | current version or any earlier version. Usually the master file also | 1355 | earlier version. The repository will also contain a @dfn{log entry} for |
| 1362 | records a @dfn{log entry} for each version, describing in words what was | 1356 | each change to the file, describing in words what was modified in that |
| 1363 | changed in that version. | 1357 | revision. |
| 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 |
| 1368 | the @dfn{work file} corresponding to its master file. You edit the work | 1362 | the @dfn{work file}. You edit the work file and make changes in it, as |
| 1369 | file and make changes in it, as you would with an ordinary file. (With | 1363 | you would with an ordinary file. After you are done with a set of |
| 1370 | SCCS and RCS, you must @dfn{lock} the file before you start to edit it.) | 1364 | changes, you @dfn{check the file in}, which records the changes in the |
| 1371 | After you are done with a set of changes, you @dfn{check the file in}, | 1365 | repository, along with a log entry for them. |
| 1372 | which records the changes in the master file, along with a log entry for | ||
| 1373 | them. | ||
| 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 |
| 1376 | ways in which version-control systems can differ from each other. They | 1368 | ways 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 | |||
| 1427 | between them as much as possible. | 1419 | between 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 |
| 1431 | and other operations are @dfn{file-based}; each file has its own | 1423 | and 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 |
| 1433 | from that of all other files in the system. Later systems, beginning | 1425 | from 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 |
| 1440 | more powerful than file-based version control; usually, when a change to | 1432 | more powerful than file-based version control; usually, when a change to |
| 1441 | multiple files has to be backed out, it's good to be able to easily | 1433 | multiple files has to be backed out, it's good to be able to easily |
| 1442 | identify and remove all of it. | 1434 | identify and remove all of it. But it took some years for designers to |
| 1435 | figure that out, and while file-based systems are passing out of use | ||
| 1436 | there are lots of legacy repositories still to be dealt with at time of | ||
| 1437 | writing 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} |
| 1446 | model in which each project has only one repository used by all | 1442 | model in which each project has only one repository used by all |
| 1447 | developers. SCCS, RCS, CVS, and Subversion share this kind of model. | 1443 | developers. SCCS, RCS, CVS, and Subversion share this kind of model. |
| 1448 | It has two important problems. One is that a single repository is a | 1444 | It has two important problems. One is that a single repository is a |
| 1449 | single point of failure---if the repository server is down all work | 1445 | single point of failure--if the repository server is down all work |
| 1450 | stops. The other is that you need to be connected live to the server to | 1446 | stops. The other is that you need to be connected live to the server to |
| 1451 | do checkins and checkouts; if you're offline, you can't work. | 1447 | do 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} |
| 1481 | types of log for changes. One is the per-file log maintained by the | 1477 | types of log for changes. One is the log maintained by the |
| 1482 | revision control system: each time you check in a change, you must | 1478 | revision control system: each time you check in a change, you must |
| 1483 | fill out a @dfn{log entry} for the change (@pxref{Log Buffer}). This | 1479 | fill out a @dfn{log entry} for the change (@pxref{Log Buffer}). This |
| 1484 | kind of log is called the @dfn{version control log}, also the | 1480 | kind 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 | |||
| 1491 | may well merit a @file{ChangeLog} file in each major directory. | 1487 | may 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 |
| 1495 | log, or it can use both kinds of logs. It can handle some files one | 1491 | file-based version control. Changelogs are a GNU convention, later |
| 1496 | way and some files the other way. Each project has its policy, which | 1492 | more widely adopted, that help developers to get a changeset-based |
| 1497 | you should follow. | 1493 | view of a project even when its version-control system has that |
| 1494 | information split up in multiple file-based logs. | ||
| 1495 | |||
| 1496 | Changeset-based version systems, on the other hand, often maintain | ||
| 1497 | a changeset-based modification log for the entire system that makes | ||
| 1498 | ChangeLogs mostly redundant. The only advantage ChangeLogs retain is that | ||
| 1499 | it may be useful to be able to view the transaction history of a | ||
| 1500 | single directory separately from those of other directories. | ||
| 1501 | |||
| 1502 | A project maintained with version control can use just the | ||
| 1503 | version-control log, or it can use both kinds of logs. It can | ||
| 1504 | handle some files one way and some files the other way. Each project | ||
| 1505 | has 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 |
| 1500 | for each change just once, then put it into both logs. You can write | 1508 | for 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 | ||