aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2008-11-01 01:58:34 +0000
committerRichard M. Stallman2008-11-01 01:58:34 +0000
commita11d373796f896363dfb69fac5c38c32c031e866 (patch)
tree437c14207187cc74bc7359fe1c1e9cc5625542d9
parent6cda144ffe7e8da08b15430072f3b112967d5281 (diff)
downloademacs-a11d373796f896363dfb69fac5c38c32c031e866.tar.gz
emacs-a11d373796f896363dfb69fac5c38c32c031e866.zip
(Types of Log File): Change logs are older than version control.
(VCS Concepts): Simplify and rearrange. (Version Control Systems): Make it clear that Linux is only the kernel. (VC Mode Line): Shorten reference to menu item. (Basic VC Editing): Clarify VC fileset. Shorten and simplify. (VC Directory Mode): Minor cleanup. Unchanged files are hidden, not omitted. (VC Directory Commands): Shorten and simplify. (Change Log Commands): New node, split from Change Logs. (VC Directory Buffer): New node, split from VC Directory Mode.
-rw-r--r--doc/emacs/ChangeLog14
-rw-r--r--doc/emacs/maintaining.texi171
2 files changed, 90 insertions, 95 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index a8ddec5270e..eb85f6a1e1d 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,17 @@
12008-11-01 Richard M. Stallman <rms@gnu.org>
2
3 * maintaining.texi (Types of Log File): Change logs are older than
4 version control.
5 (VCS Concepts): Simplify and rearrange.
6 (Version Control Systems): Make it clear that Linux is only the kernel.
7 (VC Mode Line): Shorten reference to menu item.
8 (Basic VC Editing): Clarify VC fileset. Shorten and simplify.
9 (VC Directory Mode): Minor cleanup.
10 Unchanged files are hidden, not omitted.
11 (VC Directory Commands): Shorten and simplify.
12 (Change Log Commands): New node, split from Change Logs.
13 (VC Directory Buffer): New node, split from VC Directory Mode.
14
12008-10-31 Chong Yidong <cyd@stupidchicken.com> 152008-10-31 Chong Yidong <cyd@stupidchicken.com>
2 16
3 * misc.texi (Document View): Renamed from Document Files, moved here 17 * misc.texi (Document View): Renamed from Document Files, moved here
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 31a312d16dc..99f6ef0e8d4 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -170,7 +170,7 @@ sometimes invoke it from the command line.
170@cindex git 170@cindex git
171@item 171@item
172Git is a distributed version control system invented by Linus Torvalds to support 172Git is a distributed version control system invented by Linus Torvalds to support
173Linux kernel development. It supports atomic commits of filesets and 173development of Linux (his kernel). It supports atomic commits of filesets and
174file moving/renaming. One significant feature of git is that it 174file moving/renaming. One significant feature of git is that it
175largely abolishes the notion of a single centralized repository; 175largely abolishes the notion of a single centralized repository;
176instead, each working copy of a git project is its own repository and 176instead, each working copy of a git project is its own repository and
@@ -229,11 +229,10 @@ on the version control system; in the simplest case, it is just an
229integer. 229integer.
230 230
231 To go beyond these basic concepts, you will need to understand three 231 To go beyond these basic concepts, you will need to understand three
232ways in which version control systems can differ from each other. 232aspects in which version control systems differ.
233They can be locking-based or merging-based; they can be file-based or 233They can be locking-based or merging-based; they can be file-based or
234changeset-based; and they can be centralized or decentralized. VC 234changeset-based; and they can be centralized or decentralized. VC
235handles all these choices, but they lead to differing behaviors which 235handles all these modes of operation, but it cannot hide the differences.
236you will need to understand as you use it.
237 236
238@cindex locking versus merging 237@cindex locking versus merging
239 A version control system typically has some mechanism to coordinate 238 A version control system typically has some mechanism to coordinate
@@ -263,21 +262,21 @@ unable to because it is locked. In merging systems, @dfn{merge
263conflicts} happen when you check in a change to a file that conflicts 262conflicts} happen when you check in a change to a file that conflicts
264with a change checked in by someone else after your checkout. Both 263with a change checked in by someone else after your checkout. Both
265kinds of conflict have to be resolved by human judgment and 264kinds of conflict have to be resolved by human judgment and
266communication. 265communication. Experience has shown that merging is superior to
266locking, both in convenience to developers and in minimizing the
267number and severity of conflicts that actually occur.
267 268
268 SCCS always uses locking. RCS is lock-based by default but can be 269 SCCS always uses locking. RCS is lock-based by default but can be
269told to operate in a merging style. CVS and Subversion are 270told to operate in a merging style. CVS and Subversion are
270merge-based by default but can be told to operate in a locking mode. 271merge-based by default but can be told to operate in a locking mode.
271Distributed version control systems, such as GNU Arch, git, and 272Distributed version control systems, such as GNU Arch, git, and
272Mercurial, are exclusively merging-based. Experience has shown that 273Mercurial, are exclusively merging-based.
273merging is superior to locking, both in convenience to developers and
274in minimizing the number and severity of conflicts that actually
275occur. Sometimes, however, newer version control systems may have
276locks retrofitted onto them for reasons having nothing to do with
277technology@footnote{Usually the control-freak instincts of managers.}.
278 274
279 VC mode supports both locking and merging version control and tries 275 VC mode supports both locking and merging version control. The
280to hide the differences between them as much as possible. 276terms ``checkin'' and ``checkout'' come from locking-based version
277control systems; newer version control systems have slightly different
278operations usually called ``commit'' and ``update'', but VC hides the
279differences between them as much as possible.
281 280
282@cindex files versus changesets. 281@cindex files versus changesets.
283 On SCCS, RCS, CVS, and other early version control systems, version 282 On SCCS, RCS, CVS, and other early version control systems, version
@@ -292,33 +291,21 @@ but to the changeset itself.
292 Changeset-based version control is more flexible and powerful than 291 Changeset-based version control is more flexible and powerful than
293file-based version control; usually, when a change to multiple files 292file-based version control; usually, when a change to multiple files
294has to be reversed, it's good to be able to easily identify and remove 293has to be reversed, it's good to be able to easily identify and remove
295all of it. But it took some years for designers to figure that out, 294all of it.
296and while file-based systems are passing out of use, there are lots of
297legacy repositories still to be dealt with as of this writing (2008).
298
299 Prior to Emacs 23, VC supported only file-based systems, leading to
300unhappy results when it was used to drive changeset-based
301systems---the Subversion support, for example, used to break up
302changesets into multiple per-file commits. This has been fixed, but
303it has left a mark in VC's terminology. The terms ``checkin'' and
304``checkout'' are associated with file-based and locking-based systems
305and a bit archaic; nowadays those operations are usually called
306``commit'' and ``update''.
307 295
308@cindex centralized vs. decentralized version control 296@cindex centralized vs. decentralized version control
309 Early version control systems were designed around a 297 Early version control systems were designed around a
310@dfn{centralized} model in which each project has only one repository 298@dfn{centralized} model in which each project has only one repository
311used by all developers. SCCS, RCS, CVS, and Subversion share this 299used by all developers. SCCS, RCS, CVS, and Subversion share this
312kind of model. One problem with this approach is that a single 300kind of model. One of its drawbacks is that the repository is a choke
313repository is a single point of failure---if the repository server is 301point for reliability and efficiency.
314down, all work stops.
315 302
316 Newer version control systems like GNU Arch, git, Mercurial, and 303 GNU Arch pioneered the concept of @dfn{decentralized} version
317Bazaar are @dfn{decentralized}. A project may have several different 304control, later implemented in git, Mercurial, and Bazaar. A project
318repositories, and these systems support a sort of super-merge between 305may have several different repositories, and these systems support a
319repositories that tries to reconcile their change histories. At the 306sort of super-merge between repositories that tries to reconcile their
320limit, each developer has his/her own repository, and repository 307change histories. At the limit, each developer has his/her own
321merges replace checkin/commit operations. 308repository, and repository merges replace checkin/commit operations.
322 309
323 VC's job is to help you manage the traffic between your personal 310 VC's job is to help you manage the traffic between your personal
324workfiles and a repository. Whether that repository is a single 311workfiles and a repository. Whether that repository is a single
@@ -343,20 +330,14 @@ Log}). It provides a chronological record of all changes to a large
343portion of a program---typically one directory and its subdirectories. 330portion of a program---typically one directory and its subdirectories.
344A small program would use one @file{ChangeLog} file; a large program 331A small program would use one @file{ChangeLog} file; a large program
345may have a @file{ChangeLog} file in each major directory. 332may have a @file{ChangeLog} file in each major directory.
346@xref{Change Log}. 333@xref{Change Log}. Programmers have used change logs since long
347 334before version control systems.
348 Actually, the fact that both kinds of log exist is partly a legacy 335
349from file-based version control. Changelogs are a GNU convention, 336 Changeset-based version systems typically maintain a changeset-based
350later more widely adopted, that help developers to get a 337modification log for the entire system, which makes change log files
351changeset-based view of a project even when its version control system 338somewhat redundant. One advantage that they retain is that it is
352has that information split up in multiple file-based logs. 339sometimes useful to be able to view the transaction history of a
353 340single directory separately from those of other directories.
354 Changeset-based version systems, on the other hand, often maintain a
355changeset-based modification log for the entire system that makes
356ChangeLogs somewhat redundant. One advantage that ChangeLogs retain
357is that it is sometimes useful to be able to view the transaction
358history of a single directory separately from those of other
359directories.
360 341
361 A project maintained with version control can use just the version 342 A project maintained with version control can use just the version
362control log, or it can use both kinds of logs. It can handle some 343control log, or it can use both kinds of logs. It can handle some
@@ -395,8 +376,7 @@ instance, @samp{jim}), that is displayed as @samp{RCS:jim:1.3}.
395indicator to pop up a ``tool-tip'', which displays a more verbose 376indicator to pop up a ``tool-tip'', which displays a more verbose
396description of the version control status. Pressing @kbd{Mouse-1} 377description of the version control status. Pressing @kbd{Mouse-1}
397over the indicator pops up a menu of VC commands. This menu is 378over the indicator pops up a menu of VC commands. This menu is
398identical to the @samp{Version Control} menu item, which can be found 379identical to the @samp{Tools / Version Control} menu item.
399in the @samp{Tools} menu on the menu bar.
400 380
401@vindex auto-revert-check-vc-info 381@vindex auto-revert-check-vc-info
402 When Auto Revert mode (@pxref{Reverting}) reverts a buffer that is 382 When Auto Revert mode (@pxref{Reverting}) reverts a buffer that is
@@ -413,25 +393,23 @@ system, but is usually not excessive.
413@node Basic VC Editing 393@node Basic VC Editing
414@subsection Basic Editing under Version Control 394@subsection Basic Editing under Version Control
415 395
416@cindex filesets 396@cindex filesets, VC
417 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a 397 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a
418group of one or more files that are treated as a unit, for the 398collection of one or more files that a VC operation acts on. When you
419purposes of version control. 399type VC commands in a buffer visiting a version-controlled file, the
420 400VC fileset is simply that one file. When you type them in a VC
421 If you are visiting a version-controlled file in the current 401Directory buffer, and some files in it are marked, the VC fileset
422buffer, the VC fileset is simply that one file. If you are visiting a
423VC directory buffer, and some files in it are marked, the VC fileset
424consists of the marked files (@pxref{VC Directory Mode}). 402consists of the marked files (@pxref{VC Directory Mode}).
425 403
426 The principal VC command is an all-purpose command, @kbd{C-x v v} 404 The principal VC command is an all-purpose command, @kbd{C-x v v}
427(@code{vc-next-action}), that performs either locking, merging or a 405(@code{vc-next-action}), that performs either locking, merging or a
428check-in on the current VC fileset, depending on the situation. You 406check-in (depending on the situation) on the current VC fileset. You
429can call @kbd{C-x v v} from a version-controlled file, or from the VC 407can use @kbd{C-x v v} in a file-visiting buffer or in a VC Directory
430Directory buffer. 408buffer.
431 409
432@table @kbd 410@table @kbd
433@itemx C-x v v 411@itemx C-x v v
434Perform the next logical version control operation on the VC fileset. 412Perform the appropriate next version control operation on the VC fileset.
435@end table 413@end table
436 414
437@findex vc-next-action 415@findex vc-next-action
@@ -450,15 +428,11 @@ command line. All files in a VC fileset must be under the same
450version control system; if they are not, Emacs signals an error when 428version control system; if they are not, Emacs signals an error when
451you attempt to execute a command on the fileset. 429you attempt to execute a command on the fileset.
452 430
453 If you are accustomed to previous versions of VC, most of the 431 Support for VC filesets and changeset-based version control systems
454changes to VC in Emacs 23 are found in VC directory mode (@pxref{VC 432is the main improvement to VC in Emacs 23. When you mark multi-file
455Directory Mode}). When multiple files are marked in the VC directory 433VC in a VC Directory buffer, VC operations treat them as a VC fileset,
456buffer, they are treated as a VC fileset; typing @kbd{C-x v v} in the 434and operate on them all at once if the version control system is
457VC directory buffer passes them to the version control backends as a 435changeset-based. @xref{VC Directory Mode}
458single unit. Other commands in VC directory mode now act on the VC
459fileset, rather than the file on the current line. These changes
460allow VC to interoperate correctly with changeset-based version
461control systems.
462 436
463 VC filesets are distinct from the ``named filesets'' used for 437 VC filesets are distinct from the ``named filesets'' used for
464viewing and visiting files in functional groups (@pxref{Filesets}). 438viewing and visiting files in functional groups (@pxref{Filesets}).
@@ -1001,19 +975,26 @@ window.
1001@cindex PCL-CVS 975@cindex PCL-CVS
1002@pindex cvs 976@pindex cvs
1003@cindex CVS directory mode 977@cindex CVS directory mode
1004 The VC Directory buffer described here works with all the version 978 The VC Directory buffer works with all the version control systems
1005control systems that VC supports. Another more powerful facility, 979that VC supports. For CVS, Emacs also offers a more powerful facility
1006designed specifically for CVS, is called PCL-CVS. @xref{Top, , About 980called PCL-CVS. @xref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The
1007PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. 981Emacs Front-End to CVS}.
982
983@menu
984* Buffer: VC Directory Buffer. What the buffer looks like and means.
985* Commands: VC Directory Commands. Commands to use in a VC directory buffer.
986@end menu
987
988@node VC Directory Buffer
989@subsubsection The VC Directory Buffer
1008 990
1009 The VC Directory buffer contains a list of version-controlled files 991 The VC Directory buffer contains a list of version-controlled files
1010in the current directory and its subdirectories. Files which are 992in the current directory and its subdirectories. Files which are
1011up-to-date (have no local differences from the repository copy) are 993up-to-date (have no local differences from the repository copy) are
1012omitted; if all files in a directory are up-to-date, the directory is 994usually hidden; if all files in a subdirectory are up-to-date, the
1013omitted as well. (However, the directory in which @code{vc-dir} was 995subdirectory is hidden as well. There is an exception to this rule:
1014run will always be shown as @file{./}.) There is an exception to this 996if VC mode detects that a file has changed to an up-to-date state
1015rule: if VC mode detects that a file has changed to an up-to-date 997since you last looked at it, that file and its state are shown.
1016state since you last looked at it, that file and its state are shown.
1017 998
1018 If a directory uses more that one version control system, you can 999 If a directory uses more that one version control system, you can
1019select which system to use for the @code{vc-dir} command by invoking 1000select which system to use for the @code{vc-dir} command by invoking
@@ -1043,7 +1024,7 @@ need to merge them with the work file before you can check it in.
1043@vindex vc-cvs-stay-local 1024@vindex vc-cvs-stay-local
1044 In the above, if the repository were on a remote machine, VC only 1025 In the above, if the repository were on a remote machine, VC only
1045contacts it when the variable @code{vc-stay-local} (or 1026contacts it when the variable @code{vc-stay-local} (or
1046@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is 1027@code{vc-cvs-stay-local}) is @code{nil} (@pxref{CVS Options}). This is
1047because access to the repository may be slow, or you may be working 1028because access to the repository may be slow, or you may be working
1048offline and not have access to the repository at all. As a 1029offline and not have access to the repository at all. As a
1049consequence, VC would not be able to tell you that @samp{file3.c} is 1030consequence, VC would not be able to tell you that @samp{file3.c} is
@@ -1064,10 +1045,6 @@ this includes Version Control subdirectories such as @samp{RCS} and
1064@samp{CVS}; you can customize this by setting the variable 1045@samp{CVS}; you can customize this by setting the variable
1065@code{vc-directory-exclusion-list}. 1046@code{vc-directory-exclusion-list}.
1066 1047
1067@menu
1068* VC Directory Commands:: Commands to use in a VC directory buffer.
1069@end menu
1070
1071@node VC Directory Commands 1048@node VC Directory Commands
1072@subsubsection VC Directory Commands 1049@subsubsection VC Directory Commands
1073 1050
@@ -1134,12 +1111,12 @@ If the underlying VC supports atomic commits of multiple-file
1134changesets, @kbd{C-x v v} with a selected set of modified but not 1111changesets, @kbd{C-x v v} with a selected set of modified but not
1135committed files will commit all of them at once as a single changeset. 1112committed files will commit all of them at once as a single changeset.
1136 1113
1137 When @kbd{C-x v v} (@code{vc-next-action}) operates on a set of files, 1114 When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple
1138it requires that all of those files must be either in the same state or 1115files, all of those files must be either in the same state or in
1139in compatible states; otherwise it will throw an error (added, 1116compatible states (added, modified and removed states are considered
1140modified and removed states are considered compatible). Note that this 1117compatible). Otherwise it signals an error. This differs from the
1141differs from the behavior of older versions of VC, which did not have 1118behavior of older versions of VC, which did not have fileset
1142fileset operations and simply did @code{vc-next-action} on each file 1119operations and simply did @code{vc-next-action} on each file
1143individually. 1120individually.
1144 1121
1145 If any files are in a state that calls for commit, @kbd{C-x v v} reads a 1122 If any files are in a state that calls for commit, @kbd{C-x v v} reads a
@@ -1365,6 +1342,7 @@ during this particular editing session.
1365@node Change Log 1342@node Change Log
1366@section Change Logs 1343@section Change Logs
1367 1344
1345@cindex change log
1368 A change log file contains a chronological record of when and why you 1346 A change log file contains a chronological record of when and why you
1369have changed a program, consisting of a sequence of entries describing 1347have changed a program, consisting of a sequence of entries describing
1370individual changes. Normally it is kept in a file called 1348individual changes. Normally it is kept in a file called
@@ -1373,7 +1351,14 @@ one of its parent directories. A single @file{ChangeLog} file can
1373record changes for all the files in its directory and all its 1351record changes for all the files in its directory and all its
1374subdirectories. 1352subdirectories.
1375 1353
1376@cindex change log 1354@menu
1355* Change Log Commands:: Commands for editing change log files.
1356* Format of ChangeLog:: What the change log file looks like.
1357@end menu
1358
1359@node Change Log Commands
1360@subsection Change Log Commands
1361
1377@kindex C-x 4 a 1362@kindex C-x 4 a
1378@findex add-change-log-entry-other-window 1363@findex add-change-log-entry-other-window
1379 The Emacs command @kbd{C-x 4 a} adds a new entry to the change log 1364 The Emacs command @kbd{C-x 4 a} adds a new entry to the change log
@@ -1440,10 +1425,6 @@ insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a}
1440(@pxref{Change Logs and VC}). 1425(@pxref{Change Logs and VC}).
1441@end ifnottex 1426@end ifnottex
1442 1427
1443@menu
1444* Format of ChangeLog:: What the change log file looks like.
1445@end menu
1446
1447@node Format of ChangeLog 1428@node Format of ChangeLog
1448@subsection Format of ChangeLog 1429@subsection Format of ChangeLog
1449 1430