comparison man/files.texi @ 90988:492971a3f31f unicode-xft-base

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 816-823) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 59-69) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 237-238) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-235
author Miles Bader <miles@gnu.org>
date Tue, 24 Jul 2007 01:23:55 +0000
parents 70bf32a0f523 fa89e40167b9
children 424b655804ca
comparison
equal deleted inserted replaced
90987:b2d8a283f27e 90988:492971a3f31f
1256 describes the version control systems that VC supports. You can skip 1256 describes the version control systems that VC supports. You can skip
1257 this section if you are already familiar with the version control system 1257 this section if you are already familiar with the version control system
1258 you want to use. 1258 you want to use.
1259 1259
1260 @menu 1260 @menu
1261 * Why Version Control?:: Understanding the problems it addresses
1261 * Version Systems:: Supported version control back-end systems. 1262 * Version Systems:: Supported version control back-end systems.
1262 * VC Concepts:: Words and concepts related to version control. 1263 * VC Concepts:: Words and concepts related to version control.
1263 * Types of Log File:: The per-file VC log in contrast to the ChangeLog. 1264 * Types of Log File:: The per-file VC log in contrast to the ChangeLog.
1264 @end menu 1265 @end menu
1266
1267 @node Why Version Control?
1268 @subsubsection Understanding the problems it addresses
1269
1270 Version control systems provide you with three important capabilities:
1271 reversibility, concurrency, and history.
1272
1273 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
1275 you discover that some modification you did was a mistake or a bad idea.
1276
1277 Version-control systems also support concurrency, the ability to
1278 have many people modifying the same collection of code or documents
1279 knowing that conflicting modifications can be detected and resolved.
1280
1281 Version-control systems give you the capability to attach a history
1282 to your data, explanatory comments about the intention behind each
1283 change to it. Even for a programmer working solo change histories
1284 are an important aid to memory; for a multi-person project they
1285 become a vitally important form of communication among developers.
1265 1286
1266 @node Version Systems 1287 @node Version Systems
1267 @subsubsection Supported Version Control Systems 1288 @subsubsection Supported Version Control Systems
1268 1289
1269 @cindex back end (version control) 1290 @cindex back end (version control)
1349 SCCS and RCS, you must @dfn{lock} the file before you start to edit it.) 1370 SCCS and RCS, you must @dfn{lock} the file before you start to edit it.)
1350 After you are done with a set of changes, you @dfn{check the file in}, 1371 After you are done with a set of changes, you @dfn{check the file in},
1351 which records the changes in the master file, along with a log entry for 1372 which records the changes in the master file, along with a log entry for
1352 them. 1373 them.
1353 1374
1354 With CVS, there are usually multiple work files corresponding to a 1375 To go beyond these basic concepts, you will need to understand three
1355 single master file---often each user has his own copy. It is also 1376 ways in which version-control systems can differ from each other. They
1356 possible to use RCS in this way, but this is not the usual way to use 1377 can be locking or merging; they can be file-based or changeset-based;
1357 RCS. 1378 and they can be centralized or decentralized. VC handles all these
1358 1379 choices, but they lead to differing behaviors which you will need
1359 @cindex locking and version control 1380 to understand as you use it.
1381
1382 @cindex locking versus merging
1360 A version control system typically has some mechanism to coordinate 1383 A version control system typically has some mechanism to coordinate
1361 between users who want to change the same file. One method is 1384 between users who want to change the same file. One method is
1362 @dfn{locking} (analogous to the locking that Emacs uses to detect 1385 @dfn{locking} (analogous to the locking that Emacs uses to detect
1363 simultaneous editing of a file, but distinct from it). The other method 1386 simultaneous editing of a file, but distinct from it). In a locking
1364 is to merge your changes with other people's changes when you check them 1387 system, such as SCCS, you must @dfn{lock} a file before you start to
1365 in. 1388 edit it. The other method is @dfn{merging}; the system tries to
1389 merge your changes with other people's changes when you check them in.
1366 1390
1367 With version control locking, work files are normally read-only so 1391 With version control locking, work files are normally read-only so
1368 that you cannot change them. You ask the version control system to make 1392 that you cannot change them. You ask the version control system to make
1369 a work file writable for you by locking it; only one user can do 1393 a work file writable for you by locking it; only one user can do
1370 this at any given time. When you check in your changes, that unlocks 1394 this at any given time. When you check in your changes, that unlocks
1371 the file, making the work file read-only again. This allows other users 1395 the file, making the work file read-only again. This allows other users
1372 to lock the file to make further changes. SCCS always uses locking, and 1396 to lock the file to make further changes.
1373 RCS normally does. 1397
1374 1398 By contrast, a merging system lets each user check out and modify a
1375 The other alternative for RCS is to let each user modify the work file 1399 work file at any time. When you check in a a file, the system will
1376 at any time. In this mode, locking is not required, but it is 1400 attempt to merge your changes with any others checked into the
1377 permitted; check-in is still the way to record a new version. 1401 repository since you checked out the file.
1378 1402
1379 CVS normally allows each user to modify his own copy of the work file 1403 Both locking and merging systems can have problems when multiple users
1380 at any time, but requires merging with changes from other users at 1404 try to modify the same file at the same time. Locking systems have
1381 check-in time. However, CVS can also be set up to require locking. 1405 @dfn{lock conflicts}; a user may try to check a file out and be unable
1406 to because it is locked. In merging systems, @dfn{merge conflicts}
1407 happen when you check in a change to a file that conflicts with a change
1408 checked in by someone else after your checkout. Both kinds of conflict
1409 have to be resolved by human judgment and communication.
1410
1411 SCCS always uses locking. RCS is lock-based by default but can be told
1412 to operate in a merging style. CVS is merge-based by default but can
1413 be told to operate in a locking mode. Most later version-control
1414 systems, such as Subversion and GNU Arch, have been fundamentally
1415 merging-based rather than locking-based. This is because experience
1416 has shown that the merging-based approach is generally superior to
1417 the locking one, both in convenience to developers and in minimizing
1418 the number and severity of conflicts that actually occur.
1419
1420 While it is rather unlikely that anyone will ever again build a
1421 fundamentally locking-based rather than merging-based version-control
1422 system in the future, merging-based version-systems sometimes have locks
1423 retrofitted onto them for reasons having nothing to do with technology.
1424 @footnote{Usually the control-freak instincts of managers.} For this
1425 reason, and to support older systems still in use, VC mode supports
1426 both locking and merging version control and tries to hide the differences
1427 between them as much as possible.
1428
1429 @cindex files versus changesets.
1430 On SCCS, RCS, CVS, and other early version-control systems, checkins
1431 and other operations are @dfn{file-based}; each file has its own
1432 @dfn{master file} with its own comment- and revision history separate
1433 from that of all other files in the system. Later systems, beginning
1434 with Subversion, are @dfn{changeset-based}; a checkin may include
1435 changes to several files and that change set is treated as a unit by the
1436 system. Any comment associated with the change doesn't belong to any
1437 one file, but is attached to the changeset itself.
1438
1439 Changeset-based version control is in general both more flexible and
1440 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
1442 identify and remove all of it.
1443
1444 @cindex centralized vs. decentralized
1445 Early version-control systems were designed around a @dfn{centralized}
1446 model in which each project has only one repository used by all
1447 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
1449 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
1451 do checkins and checkouts; if you're offline, you can't work.
1452
1453 Newer version-control systems like GNU Arch are @dfn{decentralized}.
1454 A project may have several different repositories, and these systems
1455 support a sort of super-merge between repositories that tries to
1456 reconcile their change histories. At the limit, each developer has
1457 his/her own repository, and repository merges replace checkin/commit
1458 operations.
1459
1460 VC's job is to help you manage the traffic between your personal
1461 workfiles and a repository. Whether that repository is a single master
1462 or one of a network of peer repositories is not something VC has to care
1463 about. Thus, the difference between a centralized and a decentralized
1464 version-control system is invisible to VC mode.
1465
1382 @iftex 1466 @iftex
1383 (@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). 1467 (@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
1384 @end iftex 1468 @end iftex
1385 @ifnottex 1469 @ifnottex
1386 (@pxref{CVS Options}). 1470 (@pxref{CVS Options}).