Debian Codegraph @

doc/index.docbook

raw
1 <?xml version="1.0" ?>
2 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
3 <!ENTITY ssh "<command>ssh</command>">
4 <!ENTITY rsh "<command>rsh</command>">
5 <!ENTITY % addindex "IGNORE">
6 <!ENTITY % English "INCLUDE"> <!-- Change language only here -->
7 <!ENTITY CVS "<application>CVS</application>">
8 ]>
9
10 <book id="cervisia" lang="&language;">
11
12 <bookinfo>
13 <title>&cervisia; Manual</title>
14 <authorgroup>
15 <author>
16 <firstname>Bernd</firstname><surname>Gehrmann</surname>
17 <affiliation><address>&Bernd.Gehrmann.mail;</address></affiliation>
18 </author>
19 <author>
20 <firstname>Carlos</firstname><surname>Woelz</surname>
21 <affiliation><address><email>[email protected]</email></address></affiliation>
22 </author>
23
24
25 <!-- TRANS:ROLES_OF_TRANSLATORS -->
26
27 </authorgroup>
28
29 <copyright>
30 <year>1999</year>
31 <year>2000</year>
32 <year>2001</year>
33 <year>2002</year>
34 <holder>&Bernd.Gehrmann;</holder>
35 </copyright>
36
37 <copyright>
38 <year>2004</year>
39 <holder>Carlos Woelz</holder>
40 </copyright>
41
42 <legalnotice>&FDLNotice;</legalnotice>
43
44 <date>2016-06-16</date>
45 <releaseinfo>3.11 (Applications 16.08)</releaseinfo>
46
47 <abstract>
48 <para>&cervisia; provides a graphical view of &CVS;.</para>
49 </abstract>
50
51 <keywordset>
52 <keyword>KDE</keyword>
53 <keyword>Cervisia</keyword>
54 <keyword>CVS</keyword>
55 <keyword>version control</keyword>
56 <keyword>revision control</keyword>
57 </keywordset>
58
59 </bookinfo>
60
61 <chapter id="introduction">
62 <title>Introduction</title>
63
64 <para>
65 <ulink url="https://www.kde.org/applications/development/cervisia/">&cervisia;</ulink> is a
66 user friendly version control system front-end. The aim is to support &CVS;
67 in a unified interface, featuring conflict
68 resolution, difference and history viewers, status for the working copy files,
69 and support for most version control functions. You can get &cervisia;
70 by building the <ulink url="https://commits.kde.org/cervisia">&cervisia;</ulink>
71 program or installing the &cervisia; package provided by your distribution.
72 </para>
73
74 <para>
75 A version control system is a tool to record, manage, and distribute
76 different versions of files. &CVS; is a version control system. It allows you
77 to share your modifications easily, as each of the contributors can work on their
78 local copy at the same time, without fear of overwriting each others'
79 modifications. It allows the recovery of past versions (useful for tracking
80 bugs), the creation of branches (for experimental development or for releases
81 of code) and more.
82 </para>
83
84 <para>
85 The main <firstterm>repository</firstterm> usually holds a collaborative
86 project (commercial or not), but you can take advantage of the nice revision
87 control features offered by &CVS; even for a project developed exclusively by
88 you. It is easy to set up a local repository, and you will gain the ability to
89 track changes that caused bugs, revert changes, avoid accidental loss of
90 information, &etc;
91 </para>
92
93 <para>
94 The repository holds the project files, and every contributor keeps their
95 own local copy, named <firstterm>working copy</firstterm> or
96 <firstterm>sandbox</firstterm>; one can then add their modifications to the main
97 repository (a process called <quote>committing</quote>) and/or update their own
98 copy to reflect recent changes made by other contributors.
99 </para>
100
101 </chapter>
102
103 <chapter id="getting-started">
104 <title>Getting Started</title>
105
106 <sect1 id="accessing-repository">
107 <title>Accessing The Repository</title>
108
109 <para>
110 In this section, we show how to use the basic version control system
111 functionality using &cervisia; to checkout modules from the
112 repository and work with them. To do that, you must have access to the
113 repository as a client, meaning that someone (probably the administrator of
114 the &CVS; repository) gave you an account on the server machine. Alternatively,
115 you can easily create a local repository for your own project.
116 </para>
117
118 <tip><para>
119 If you plan to develop a complex project, it is a good idea to use the
120 &CVS; features, even if you are the only developer. You can make all changes in
121 the working copy, and use &cervisia; (or any other &CVS; tool) to update and
122 commit. This way, you will gain the ability to track changes that caused bugs,
123 revert changes, avoid accidental loss of information, &etc; Using &cervisia;, it
124 is simple to create a local repository.
125 </para>
126
127 <procedure>
128 <title>Creating a Local Repository</title>
129
130 <step><para>
131 Open the <guilabel>Create New Repository (cvs init)</guilabel>
132 dialog by choosing
133 <menuchoice><guimenu>Repository</guimenu>
134 <guimenuitem>Create...</guimenuitem></menuchoice>.
135 </para></step>
136
137 <step><para>
138 Press the <guilabel>...</guilabel> button to select the folder where you want to
139 create the repository, or enter its location in the text box. For instance, if you
140 want to place the repository in the <filename>/home/user</filename> folder, and
141 to name it <filename>cvsroot</filename>, you should type
142 <filename>/home/user/cvsroot</filename> in the text box, or select the
143 <filename>/home/user</filename> folder using the file picker, and add
144 <filename>cvsroot</filename>.
145 </para></step>
146
147 <step><para>
148 Confirm by pressing the <guibutton>OK</guibutton>
149 button. &cervisia; will create and initialize the new repository folder.
150 </para></step>
151
152 <step><para>
153 Now you can import your current work to the repository, or simply create a
154 folder in the repository to start a new module from scratch.
155 </para></step>
156
157 </procedure>
158
159 </tip>
160
161
162 <para>
163 &cervisia; offers an integrated front-end to manage all your repository
164 locations, the <guilabel>Configure Access to Repositories</guilabel> dialog.
165 To display it, select the <menuchoice><guimenu>Repository</guimenu>
166 <guimenuitem>Repositories...</guimenuitem></menuchoice> menu item.
167 </para>
168
169 <figure id="screenshot-repositories" float="1">
170 <title>A screenshot of &cervisia;'s Configure Access to Repositories dialog</title>
171 <mediaobject>
172 <imageobject><imagedata format="PNG" fileref="repositories.png"/></imageobject>
173 <textobject><phrase>A screenshot of &cervisia;'s Configure Access to
174 Repositories dialog</phrase></textobject>
175 </mediaobject>
176 </figure>
177
178 <para>
179 There are several methods to access a &CVS; repository. It may be reached via
180 password authentication (:pserver:), secure shell (using :ext:), local
181 repository (:local:), &etc; The format for the repository location is
182 (optional items appear between square brackets):
183 </para>
184
185 <para>
186 <filename>[:method:][[user][:password]@]hostname[:[port]]/path/to/repository</filename>
187 </para>
188
189 <para>
190 Not all these items (user, password, hostname, port) are always necessary
191 to access the repository. The required information depends on the access method
192 used, which can be categorized as follows:
193 </para>
194
195 <variablelist>
196
197 <varlistentry>
198 <term>Local</term>
199
200 <listitem>
201 <para>
202 The local access method is the default method used by &CVS;. Therefore, it is
203 optional to add the :local: method to the repository location: you can enter
204 simply the path to the folder which stores the &CVS;
205 repository, and is accessible from your computer, like
206 <filename class="directory">/path/to/repository</filename> or to give a real
207 life example, <filename class="directory">/home/cvs</filename>.</para>
208
209 <para>
210 It may physically be on a disk which is mounted via <acronym>NFS</acronym>,
211 but this is an irrelevant detail. If you created a local repository, the
212 location will be simple the path to it.
213 </para>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="rsh">
218 <term>&rsh;</term>
219
220 <listitem>
221 <para>
222 The repository location is something like
223 <filename>:ext:[email protected]:/path/to/repository</filename>.
224 </para>
225
226 <para>
227 This method requires that you have a user account on the server machine (in
228 this example, <systemitem class="systemname">host.url.org</systemitem>) and
229 use a remote shell for communication. By default, &CVS; uses &rsh; for this
230 purpose; however, &rsh; has long considered to be insecure, and is widely
231 replaced by &ssh;.
232 </para>
233
234 <para>
235 If you wish to use &ssh;, you must set the environment variable
236 $<envar>CVS_RSH</envar> to &ssh; when using the <command>cvs</command>
237 client. &cervisia; supports this easily.
238 </para>
239
240 <!-- TODO: verify if the above still apply -->
241
242 <para>
243 Note that &cervisia; cannot answer possible password requests from the
244 server machine. You must make sure that a remote login works without requiring
245 you to enter the password. With plain vanilla &rsh;, this can be achieved for
246 example by creating a <filename>.rhosts</filename> file in your home folder
247 with a list of trusted hosts (see the &rsh; manpage).
248 </para>
249
250 <para>
251 With &ssh;, it can be achieved by copying your public key located in the file
252 <filename>identity.pub</filename>, located in the
253 <filename>$<envar>HOME</envar>/.ssh/</filename> folder to the server. In this
254 case, the key must not be encrypted with a passphrase, see the &ssh; manpage.
255 </para>
256
257 </listitem>
258 </varlistentry>
259
260 <varlistentry>
261 <term>pserver</term>
262
263 <listitem>
264 <para>
265 The repository location looks like
266 <filename>:pserver:[email protected]:/path/to/repository</filename>
267 </para>
268
269 <para>
270 This method accesses the server via a special protocol with a relatively weak
271 authentication (<literal>pserver</literal> stands for password
272 authentication). Before you can use such a server, you need a username and
273 password given by the &CVS; server administrator, and you have to login. Note
274 that your &CVS; password authentication username does not necessarily match the
275 system's username. Before accessing the &CVS; server, you will need to login.
276 </para>
277
278 <para>
279 Open-source projects typically offer Anonymous &CVS; access to their
280 sources. This means you can easily grab the latest sources, modify, and create
281 patches (differences) against the repository without asking for a &CVS; account.
282 As a general rule, Anonymous &CVS; uses password authentication (:pserver:), and
283 is a read-only repository, not allowing you to upload your changes directly.
284 </para>
285
286 </listitem>
287 </varlistentry>
288 </variablelist>
289
290 <para>
291 Knowing the access method and location to the repository, you can add it
292 to &cervisia;'s repositories list:
293 </para>
294
295 <procedure>
296 <title>Adding a New Repository</title>
297
298 <step><para>
299 Open the <guilabel>Configure Access to Repositories</guilabel> dialog by
300 choosing the <menuchoice><guimenu>Repository</guimenu>
301 <guimenuitem>Repositories...</guimenuitem></menuchoice> menu item.
302 </para></step>
303
304 <step><para>
305 Press the <guilabel>Add...</guilabel> button to open the
306 <guilabel>Add Repository</guilabel> dialog.
307 </para></step>
308
309 <step><para>
310 Enter the repository location in the <guilabel>Repository:</guilabel> text box.
311 &cervisia; will automatically disable the areas of the dialog that are not
312 relevant to the access method you entered.
313 </para></step>
314
315 <step><para>
316 If you are using the ext method to access the repository, enter the remote shell
317 you wish to use (&eg; &ssh;) in the <guilabel>Use remote shell (only for :ext:
318 repositories):</guilabel> text box.
319 </para></step>
320
321 <step><para>
322 Press <guibutton>OK</guibutton>. You will see the repository you just entered
323 on the repositories list.
324 </para></step>
325
326 <step><para>
327 If the access method to the repository you just entered is password
328 authentication (pserver), you will need to login before connecting the server.
329 Click the repository on the list to select it, and press the
330 <guilabel>Login...</guilabel> button. Enter your password in the upcoming dialog.
331 </para>
332 <para>
333 If you successfully enter your password, the <guilabel>Status</guilabel>
334 column entry of the pserver repository will change from
335 <guilabel>Not logged in</guilabel> to <guilabel>Logged in</guilabel>.
336 </para></step>
337
338 <step><para>
339 Press <guibutton>OK</guibutton> to apply your modifications, or add another
340 location to the list. &cervisia; will store as many locations as you like.
341 </para></step>
342
343 </procedure>
344
345 </sect1>
346
347
348 <sect1 id="importing">
349 <title>Importing a Module Into the Repository</title>
350
351 <para>
352 In this section, we discuss how you can put a new project into the &CVS;
353 repository. If you just want to work with an existing project which is already
354 in a repository, you may skip this section.
355 </para>
356
357 <para>
358 There are two ways to put a project into the &CVS;:
359 </para>
360
361 <itemizedlist>
362
363 <listitem><para>
364 Import the files and folders to a new <firstterm>module</firstterm>, using
365 &cervisia;'s import dialog. Modules are the top folders in the &CVS; repository
366 folder tree, and are used to separate and organize the different software
367 projects inside the repository.
368 </para></listitem>
369
370 <listitem><para>
371 Create an empty module and add the new files and folders manually. You will have
372 more control, but it will probably take a little more time.
373 </para></listitem>
374
375 </itemizedlist>
376
377 <important>
378 <para>
379 Keep in mind that &CVS; was initially designed to handle
380 text files. Many features, like revision merging, creating differences in a
381 readable form, &etc; are only performed to text files. This does not mean you
382 cannot use &CVS; to keep binary files, it just means you have to
383 <emphasis>explicitly tell &CVS; if it is a text or binary file</emphasis>. If
384 you declare the wrong file type, you will experience problems with the &CVS;
385 functionality for these files, and they may get corrupted.
386 </para>
387 </important>
388
389
390 <para>
391 Importing a project (as a new module) has some advantages: you will import all
392 files and folders recursively, and the module will automatically be created
393 for you. This makes importing large existing projects to the repository
394 easier. However, there are some disadvantages: you cannot use &cervisia;'s import
395 dialog to add files to existing modules, and you can either import the files
396 as text or binary files. You can work around this limitation by creating a
397 folder with files of only one of the types, or by informing the patterns
398 of the files that should be ignored during the import process.
399 </para>
400
401 <para>
402 For instance, suppose your project contains text files and some PNG images
403 (binary files) only. You can tell &CVS; to ignore all files with the pattern
404 <filename class="extension">*.png</filename> while importing the other files as
405 text, or you can move the images to a separate folder, and then import
406 the remaining files (as text files). Either way, you will have to
407 <link linkend="checkingout">checkout</link> the newly imported module to a
408 new working copy, copy the missing files and folders to it,
409 <link linkend="addingfiles">add</link> and
410 <link linkend="committingfiles">commit</link> them to the repository to complete
411 the import process.
412 </para>
413
414 <para>
415 As an alternative, you can add the files and folders manually, creating an empty
416 module for them. To add an empty module to a repository, just create a new
417 folder in the &CVS; repository root folder. The name of this new folder will be
418 the name of the module. <link linkend="checkingout">Checkout</link> the new
419 empty module. Then copy the files and folders to the working copy,
420 <link linkend="addingfiles">add</link> and
421 <link linkend="committingfiles">commit</link> to upload them to the &CVS;
422 repository.
423 </para>
424
425
426 <figure id="screenshot-import" float="1">
427 <title>A screenshot of &cervisia;'s import dialog</title>
428 <mediaobject>
429 <imageobject><imagedata format="PNG" fileref="import.png"/></imageobject>
430 <textobject><phrase>A screenshot of &cervisia;'s import dialog</phrase></textobject>
431 </mediaobject>
432 </figure>
433
434 <para>
435 In <xref linkend="screenshot-import"/> you can see the dialog which helps you
436 to <emphasis>import</emphasis> a project as a module. To access &cervisia;'s
437 import dialog, choose the <menuchoice><guimenu>Repository</guimenu>
438 <guimenuitem>Import...</guimenuitem></menuchoice>
439 menu item.
440 </para>
441
442 <variablelist>
443
444 <varlistentry>
445 <term><guilabel>Repository:</guilabel> <xref linkend="co-repository" /></term>
446 <listitem><para>
447 Enter or select from the drop down box the name of the &CVS; repository, also
448 known as $<envar>CVSROOT</envar>. You must have write access to it, and the
449 repository must be properly initialized. If the repository does not yet exist,
450 you can create one choosing the
451 <menuchoice>
452 <guimenu>Repository</guimenu>
453 <guimenuitem>Create...</guimenuitem>
454 </menuchoice>
455 menu item.
456 </para>
457 <para>
458 The drop down box shows a
459 list of the repositories you previously entered using the <guilabel>Configure
460 Access to Repositories</guilabel> dialog box. If the repository is remote,
461 make sure that authentication works. See <xref
462 linkend="accessing-repository"/> for more information.
463 </para></listitem>
464 </varlistentry>
465
466 <varlistentry>
467 <term><guilabel>Module:</guilabel> <xref linkend="co-module" /></term>
468 <listitem><para>
469 The name of the module under which the project will be stored. After
470 the import, the project can be checked out under this name. See
471 <xref linkend="checkingout"/> for more information. This is also the name of
472 the corresponding folder in the repository.
473 </para></listitem>
474 </varlistentry>
475
476 <varlistentry>
477 <term><guilabel>Working Folder:</guilabel></term>
478 <listitem><para>
479 The toplevel folder of the project you want to import. The import
480 starts from this folder and goes down recursively.
481 </para></listitem>
482 </varlistentry>
483
484 <varlistentry>
485 <term><guilabel>Vendor tag:</guilabel> <xref linkend="co-vendortag" /></term>
486 <listitem><para>
487 The vendor tag is historically used for tracking third-party sources. Just use
488 your user name if you have no better idea. It does not matter much what you
489 enter here.
490 </para></listitem>
491 </varlistentry>
492
493 <varlistentry>
494 <term><guilabel>Release tag:</guilabel> <xref linkend="co-releasetag" /></term>
495 <listitem><para>
496 This tag is also historically used for importing different versions of
497 third-party software. If you are not doing this, use the word
498 <literal>start</literal> or a string <literal>FOO_1_0</literal> where
499 <literal>FOO</literal> is the name of your project and <literal>1.0</literal>
500 is the version number of the imported release.
501 </para></listitem>
502 </varlistentry>
503
504 <varlistentry>
505 <term><guilabel>Ignore files:</guilabel></term>
506 <listitem><para>
507 If you fill out this field, an additional <option>-I <replaceable>file names</replaceable></option>
508 option is given go the <command>cvs import</command> command. This entry is
509 interpreted as a whitespace-separated list of file name patterns which are
510 ignored. In general, a cleaner and less error-prone way to control which files
511 go into the repository is to create a folder with only the files which you
512 want to import and start from that. Nevertheless, this entry may be useful if
513 the project contains files which are by default ignored by &CVS;, &eg; files
514 with the name <filename>core</filename>. In such a case, simply enter the
515 character <literal>!</literal> in this field: this overrules &CVS;'s scheme of
516 ignored files, see <xref linkend="ignoredfiles"/>.
517 </para></listitem>
518 </varlistentry>
519
520 <varlistentry>
521 <term><guilabel>Comment:</guilabel> <xref linkend="co-comment" /></term>
522 <listitem><para>
523 Use this field to record the comments you might have about the origin, use,
524 development, &etc; of the files you are importing.
525 </para></listitem>
526 </varlistentry>
527
528 <varlistentry>
529 <term><guilabel>Import as binaries</guilabel></term>
530 <listitem><para>
531 If you check this box, all files are imported in binary mode, &ie; an argument
532 <option>-kb</option> is given to <command>cvs import</command>.
533 </para></listitem>
534 </varlistentry>
535
536 <varlistentry>
537 <term><guilabel>Use file's modification as time of import</guilabel></term>
538 <listitem><para>
539 If you check this box, the time of import will be the file's modification time
540 instead of the import time.
541 </para></listitem>
542 </varlistentry>
543
544 </variablelist>
545
546
547 <para>After you have filled out this form and confirmed by
548 pressing <guibutton>OK</guibutton>, the following &CVS; command is used:</para>
549
550 <screen><command>cvs</command> -d <co id="co-repository"></co><replaceable>repository</replaceable> import -m "<co id="co-comment"></co>" <co id="co-module"></co><replaceable>module</replaceable> <co id="co-vendortag"></co><replaceable>vendortag</replaceable> <co id="co-releasetag"></co><replaceable>releasetag</replaceable></screen>
551
552 </sect1>
553
554
555 <sect1 id="checkingout">
556 <title>Checkout a Module From the Repository</title>
557 <para>
558 Now that you successfully defined your repository location, and imported the
559 initial files to the repository, it is time to retrieve the module from the
560 &CVS; repository, creating your working copy.
561 </para>
562
563 <para>
564 You should also know the name of the <firstterm>branch</firstterm> or
565 <firstterm>tag</firstterm> you want to use.
566 </para>
567
568 <para>
569 Branches of a module are parallel versions of this module. A good real-life
570 example of the use of this feature is the release of a software project. After a
571 major release, there are bugs in the code that should be fixed, but people want
572 to add new features to the application too. It is very hard to do both at the
573 same time because new features usually introduce new bugs, making it hard to
574 track down the old ones. To solve this dilemma, &CVS; lets you create a parallel
575 version, that we will call the <quote>stable release branch</quote>, where you can
576 only add bugfixes, leaving the main branch (HEAD) open for adding new features.
577 </para>
578
579 <para>
580 Tags are used to mark a version of a project. &CVS; stamps one
581 version of each file with the tag, so when you checkout or
582 update to a specific tag, you will get always the same file versions.
583 Therefore, in opposition to branches, tags are not dynamic: you cannot develop a
584 tag. Tags are useful to mark releases, big changes in the code, &etc;
585 Using tags, you can easily return the project to a previous state, to reproduce and
586 track bugs, generate the release code again, &etc;
587 </para>
588
589 <figure id="screenshot-checkout" float="1">
590 <title>A screenshot of &cervisia;'s checkout dialog</title>
591 <mediaobject>
592 <imageobject><imagedata format="PNG" fileref="checkout.png"/></imageobject>
593 <textobject><phrase>A screenshot of &cervisia;'s checkout dialog</phrase></textobject>
594 </mediaobject>
595 </figure>
596
597 <variablelist>
598
599 <varlistentry>
600 <term><guilabel>Repository:</guilabel></term>
601 <listitem><para>
602 The name of the &CVS; repository, also known as
603 <filename><envar>$CVSROOT</envar></filename>. The drop down box shows a
604 list of the repositories you previously entered using the <guilabel>Configure
605 Access to Repositories</guilabel> dialog box. If the repository is remote,
606 make sure that authentication works. See <xref
607 linkend="accessing-repository"/> for more information.
608 </para></listitem>
609 </varlistentry>
610
611 <varlistentry>
612 <term><guilabel>Module:</guilabel></term>
613 <listitem><para>
614 The name of the module to be checked out. If you are working with an existing
615 repository, you can probably get this name from the system administrator;
616 or, if it is an open-source repository, you can get the module names from the
617 project web pages. If you want to create a new module from scratch using a local
618 repository, just create a new folder in the local repository root folder. The
619 name of the folder will be the same as the name of the empty module.
620 </para>
621 <para>
622 Alternatively, if the repository has a
623 <filename><envar>$CVSROOT</envar>/modules</filename> file, you can retrieve a
624 list of available modules by pressing the <guibutton>Fetch List</guibutton>
625 button.
626 </para>
627 <para>
628 Note that it is possible to checkout any existing subfolder of the module,
629 without retrieving the rest of the module. Just enter the path to the subfolder
630 as well.
631 </para></listitem>
632 </varlistentry>
633
634 <varlistentry>
635 <term><guilabel>Branch tag:</guilabel></term>
636 <listitem><para>
637 The name of the branch or tag you want to check out. If you leave this field
638 empty, &cervisia; will retrieve the main (HEAD) branch.
639 </para></listitem>
640 </varlistentry>
641
642 <varlistentry>
643 <term><guilabel>Working folder:</guilabel></term>
644 <listitem><para>
645 The folder under which the module should be checked out. Note that
646 the working copy toplevel folder is named after the module you are retrieving,
647 unless you give it an alternative name in the <guilabel>Check out as:</guilabel>
648 field.
649 </para></listitem>
650 </varlistentry>
651
652 <varlistentry>
653 <term><guilabel>Check out as:</guilabel></term>
654 <listitem><para>
655 This results in the working copy files being checked out to an alternative
656 folder under the working folder rather than a folder named after the module.
657 </para></listitem>
658 </varlistentry>
659
660 <varlistentry>
661 <term><guilabel>Export only</guilabel></term>
662 <listitem><para>
663 If you check this box, the files will be exported rather than checked out.
664 Exporting obtains a copy of the source for the module without the &CVS;
665 administrative folders. For example, export may be used to prepare the
666 source code for a release.
667 </para></listitem>
668 </varlistentry>
669
670 <varlistentry>
671 <term><guilabel>Recursive checkout</guilabel></term>
672 <listitem><para>
673 Checkout all files and folders recursively.</para></listitem>
674 </varlistentry>
675
676 </variablelist>
677
678 </sect1>
679
680
681 <sect1 id="mainscreen">
682 <title>The Main Screen, Viewing File Status and Updating</title>
683 <para>
684 When you start &cervisia;, and open a working copy by choosing
685 <menuchoice>
686 <guimenu>File</guimenu>
687 <guimenuitem>Open Sandbox...</guimenuitem>
688 </menuchoice>,
689 you can see two main areas in &cervisia;'s main window: the top one is a
690 hierarchical (tree) view of the current working copy; the bottom area is
691 used to display the &CVS; commands &cervisia; issues to perform its tasks, as
692 well as the output generated by these commands.
693 </para>
694
695 <para>
696 By default, &cervisia; does not display the files contained by the sub-folders,
697 so you will have to click the folders you want to see. To display all files
698 of the working copy, select
699 <menuchoice>
700 <guimenu>View</guimenu>
701 <guimenuitem>Unfold File Tree</guimenuitem>
702 </menuchoice>.
703 To close back all folders from the working copy, choose
704 <menuchoice>
705 <guimenu>View</guimenu>
706 <guimenuitem>Fold File Tree</guimenuitem>
707 </menuchoice>.
708 </para>
709
710 <para>
711 According to the settings in your
712 <filename>.cvsignore</filename> files, the files you usually do not want to
713 include into the repository - such as object files - are not shown in the tree
714 view. For each file, you see its corresponding status. In the default setting,
715 after opening the sandbox, this is "Unknown" because &cervisia; delays the
716 fetching of information until you select the files and folders whose status you
717 want to update or view and choose
718 <menuchoice>
719 <guimenu>File</guimenu>
720 <guimenuitem>Update</guimenuitem>
721 </menuchoice>
722 or
723 <menuchoice>
724 <guimenu>File</guimenu>
725 <guimenuitem>Status</guimenuitem>
726 </menuchoice>. With this approach, you have a minimal
727 amount of functionality available even if you do not have a permanent
728 connection to the &CVS; server.
729 </para>
730
731 <figure id="screenshot-mainview" float="1">
732 <title>A screenshot of &cervisia;'s main view</title>
733 <mediaobject>
734 <imageobject><imagedata format="PNG" fileref="mainview.png"/></imageobject>
735 <textobject><phrase>A screenshot of &cervisia;'s main view</phrase></textobject>
736 </mediaobject>
737 </figure>
738
739 <para>
740 The commands in the File menu usually act only on the files which you have
741 marked. You may also mark folders. Now choose
742 <menuchoice>
743 <guimenu>File</guimenu>
744 <guimenuitem>Status</guimenuitem>
745 </menuchoice> or press <keycap>F5</keycap>. &cervisia; issues a
746 </para>
747
748 <para>
749 <screen><command>cvs update -n <replaceable>file names</replaceable></command></screen>
750 </para>
751
752 <para>
753 command to get status information for the marked files. Note that &cervisia;
754 goes recursively into subfolders only if you have the according option
755 in the <guimenu>Settings</guimenu> menu set. According to the respective
756 file's status, you now see an entry in the <guilabel>Status</guilabel> column:
757 </para>
758
759 <variablelist>
760
761 <varlistentry>
762 <term><guilabel>Locally Modified</guilabel></term>
763 <listitem><para>
764 This means you have modified the file compared to the
765 version in the repository.
766 </para></listitem>
767 </varlistentry>
768
769
770 <varlistentry>
771 <term><guilabel>Locally Added</guilabel></term>
772 <listitem><para>
773 This means the file does not exist in the repository, but in
774 your working copy and you have scheduled it for addition. The actual
775 insertion into the repository only happens after a commit.
776 </para></listitem>
777 </varlistentry>
778
779 <varlistentry>
780 <term><guilabel>Locally Removed</guilabel></term>
781 <listitem><para>
782 This means you have scheduled the file for removal, but it
783 still exists in the repository. The actual removal happens only after a
784 commit.
785 </para></listitem>
786 </varlistentry>
787
788 <varlistentry>
789 <term><guilabel>Needs Update</guilabel></term>
790 <listitem><para>
791 This is shown if a newer version of the file exists in the
792 repository, &eg; because someone committed a modification. Normally, you want
793 to update this file so you have an up-to-date version in your folder.
794 </para></listitem>
795 </varlistentry>
796
797 <varlistentry>
798 <term><guilabel>Needs Patch</guilabel></term>
799 <listitem><para>
800 This is essentially the same as before; the difference is
801 that in case of an update, the &CVS; server transfers only a patch
802 instead of the whole file to you.
803 </para></listitem>
804 </varlistentry>
805
806 <varlistentry>
807 <term><guilabel>Needs Merge</guilabel></term>
808 <listitem><para>
809 Indicates that a merge of the revision of this file in your
810 working copy with the version in the repository is necessary. This
811 typically happens if you have made modifications to the file while
812 someone else has committed his modifications. If you choose to update, the
813 modifications in the repository are merged into your file. In case of a
814 conflict (&ie; if someone else has changed some of the same lines like you)
815 the new status is then "Conflict".
816 </para></listitem>
817 </varlistentry>
818
819 <varlistentry>
820 <term><guilabel>Up to Date</guilabel></term>
821 <listitem><para>
822 Indicates that the file is identical with the version in the
823 repository.
824 </para></listitem>
825 </varlistentry>
826
827 <varlistentry>
828 <term><guilabel>Conflict</guilabel></term>
829 <listitem><para>
830 This is shown if this file still has conflict markers in it. Maybe
831 you have previously updated the file and not resolved the conflicts.
832 </para></listitem>
833 </varlistentry>
834
835 <varlistentry>
836 <term><guilabel>Not In CVS</guilabel></term>
837 <listitem><para>
838 Indicates that the file is not registered in the &CVS;
839 repository. If you want it to available for others, you should add it to the
840 repository. If not, you may consider adding it to your
841 <filename>.cvsignore</filename> file.
842 </para></listitem>
843 </varlistentry>
844
845 </variablelist>
846
847 <para>
848 Now that you have got an overview of the current status of the &CVS;, you may
849 want to do an update. Mark some files (or the root of the folder tree which
850 is equivalent to marking all files in this folder). Now choose
851 <menuchoice>
852 <guimenu>File</guimenu>
853 <guimenuitem>Update</guimenuitem>
854 </menuchoice> (Of course, you could have chosen this at the beginning of
855 the session). For some
856 of the files the status may change now. Typically, files which had "Needs
857 Patch" or "Needs Update" are updated. So the following new items are possible
858 in the status column:
859 </para>
860
861 <variablelist>
862
863 <varlistentry>
864 <term><guilabel>Updated</guilabel></term>
865 <listitem><para>
866 Shown if the file was updated from the repository.
867 </para></listitem>
868 </varlistentry>
869
870 <varlistentry>
871 <term><guilabel>Patched</guilabel></term>
872 <listitem><para>
873 Indicates that the &CVS; server has sent a patch for this file and
874 the patch has been successfully applied. If the patch was not successful
875 because there was a conflict between your modifications and those someone else
876 committed to the repository, the status is now <guilabel>Conflict</guilabel>.
877 </para></listitem>
878 </varlistentry>
879
880 </variablelist>
881
882 <para>
883 You may have noticed that according to the status of the file, its row has a
884 different color. The colors are chosen to somehow reflect the priority of the
885 status. For example, a file with a conflict is marked red to show you that you
886 have to resolve a conflict before you can continue working with the file. If
887 your folder contains a high number of files, you may nevertheless lose the
888 overview. To get more concise information about which files have an unusual
889 status, simply click on the header of the <guilabel>Status</guilabel>
890 column. The file list is then sorted by priority, so you have all important
891 information at the top of the list. To get back to the alphabetically sorted
892 view, click on the header of the <guilabel>File name</guilabel> column.
893 </para>
894
895 </sect1>
896
897 </chapter>
898
899
900 <chapter id="workingwithfiles">
901 <title>Working With Files</title>
902
903 <para>
904 All commonly used &CVS; functionality is directly available in &cervisia;'s
905 main view. Commands usually act on several files at once, namely all which
906 currently selected. If the selection includes folders, its interpretation
907 depends on the settings made under the <guimenu>Settings</guimenu> menu. For
908 example, if <menuchoice><guimenu>Settings</guimenu><guimenuitem>Commit &amp;
909 Remove Recursively</guimenuitem></menuchoice> is checked and you choose
910 <menuchoice><guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem></menuchoice>
911 while a folder is selected, then all files in the tree under that folder
912 are committed. Otherwise, only the regular files in the folder itself are
913 affected.
914 </para>
915
916 <figure id="screenshot-popup" float="1">
917 <title>A screenshot of &cervisia;'s context menu</title>
918 <mediaobject>
919 <imageobject><imagedata format="PNG" fileref="popup.png"/></imageobject>
920 </mediaobject>
921 </figure>
922
923 <para>
924 The most used actions are also available by right clicking the files in the tree
925 view, through the context menu. <xref linkend="screenshot-popup" /> shows
926 &cervisia;'s main window context menu.
927 </para>
928
929 <para>
930 You can simply edit a file by double-clicking on it or selecting it and pressing
931 &Enter;. This starts the default application that handles that
932 file type (the default application for each file type is a &kde; wide setting). If
933 the default application is not the one you want to use, you can right click the
934 file and choose the
935 <menuchoice>
936 <guisubmenu>Edit With</guisubmenu>
937 </menuchoice>
938 submenu, and select one of the other applications that handle that file type.
939 </para>
940
941 <sect1 id="addingfiles">
942 <title>Adding Files</title>
943
944 <para>
945 Adding files to a project requires two steps: first, the files must be
946 registered with &CVS;, or in other words,
947 <emphasis>added to the repository</emphasis>. This is necessary, but not
948 sufficient. In order to actually put the files into the repository, you must
949 <emphasis>commit</emphasis> them. This procedure has an important advantage:
950 you can commit the files together with modifications to other parts of the
951 project. When doing this, one can easily see (&eg; in commit emails) that all
952 these changes are part of a whole.
953 </para>
954
955 <para>
956 To this end, mark all files to be added in &cervisia;'s
957 main view. Then, choose <menuchoice><guimenu>File</guimenu><guimenuitem>Add to
958 Repository...</guimenuitem></menuchoice>, or right click the marked files and
959 choose <guimenuitem>Add to Repository...</guimenuitem>. The
960 <guilabel>CVS Add</guilabel> dialog will appear, listing the files you marked, and
961 asks for confirmation. Press <guibutton>OK</guibutton>.
962 </para>
963
964 <para>&cervisia; issues a command</para>
965
966 <para>
967 <screen><command>cvs add <replaceable>file names</replaceable></command></screen>
968 </para>
969
970 <para>
971 If the operation was successful, the status column should have "Added to
972 repository" for the added files.
973 </para>
974
975 <warning><para>
976 &CVS; is not designed to provide meaningful revision control for binary
977 files. For example, merging binary files normally does not make
978 sense. Furthermore, by default &CVS; performs keyword expansion (&eg; on the
979 string <literal>&dollar;Revision: 1.6 &dollar;</literal>) when a file is committed. In binary
980 files, such replacements may corrupt the file and make it completely
981 unusable.
982 </para></warning>
983
984 <para>
985 In order to switch the above behavior off, you should commit binary files
986 (or other files, like Postscript or PNG images) by choosing
987 <menuchoice><guimenu>File</guimenu><guimenuitem>Add Binary...</guimenuitem></menuchoice>.
988 The <guilabel>CVS Add</guilabel> dialog will appear, listing the binary files
989 you marked, and asks for confirmation. Press <guibutton>OK</guibutton>.
990 </para>
991
992 <para>
993 &cervisia; issues a command
994 </para>
995
996 <para>
997 <screen><command>cvs add -kb <replaceable>file names</replaceable></command></screen>
998 </para>
999
1000 </sect1>
1001
1002
1003 <sect1 id="removingfiles">
1004 <title>Removing Files</title>
1005
1006 <para>
1007 Like adding files, removing files is done in two steps: First, the files have
1008 to be registered as removed by choosing
1009 <menuchoice><guimenu>File</guimenu><guimenuitem>Remove From
1010 Repository...</guimenuitem></menuchoice> or right clicking the marked files and
1011 choosing <guimenuitem>Remove From Repository...</guimenuitem> from the context
1012 menu. The <guilabel>CVS Remove</guilabel> dialog will appear, listing the files
1013 you marked, and asking for confirmation. Press <guibutton>OK</guibutton>.
1014 &cervisia; issues the command
1015 </para>
1016 <para>
1017 <screen><command>cvs remove -f <replaceable>file names</replaceable></command></screen>
1018 </para>
1019
1020 <para>
1021 After that, this modification to the sandbox has to be committed, possibly
1022 together with other modifications to the project.
1023 </para>
1024
1025 <note><para>
1026 The above command only works if the file is up-to-date. Otherwise, you get an
1027 error message. This behavior is sensible: If you have modified the file
1028 compared to the version in the repository, or if someone else has made any
1029 modifications, you will first want to check if you really want to discard
1030 them.
1031 </para></note>
1032
1033 </sect1>
1034
1035
1036 <sect1 id="addingremovingdirs">
1037 <title>Adding and Removing Folders</title>
1038
1039 <para>
1040 Folders are handled fundamentally different from ordinary files by
1041 &CVS;. They are not under revision control, &ie; you cannot tell which
1042 folders existed in the project at a certain time. Furthermore, folders
1043 can never be explicitly removed (except by removing them directly in the
1044 repository).
1045 </para>
1046
1047 <para>
1048 As a substitute, &CVS; follows the convention that a folder is "non-existent"
1049 in a version of the project if it is empty. This convention can be
1050 enforced by using the option <option>-P</option> to <command>cvs
1051 update</command> and <command>cvs checkout</command>. This option can be set
1052 in the menu <menuchoice><guimenu>Settings</guimenu><guimenuitem>Prune Empty
1053 Folders on Update</guimenuitem></menuchoice>.
1054 </para>
1055
1056 <para>
1057 A folder can be added to the repository choosing
1058 <menuchoice><guimenu>File</guimenu><guimenuitem>Add to
1059 Repository...</guimenuitem></menuchoice> or right clicking the marked folder and
1060 choosing <guimenuitem>Add to Repository...</guimenuitem> from the context menu.
1061 Note that in contrast to adding files, adding folders does not require a commit
1062 afterwards. &cervisia; issues the command
1063 </para>
1064
1065
1066 <para>
1067 <screen><command>cvs add <replaceable>dirname</replaceable></command></screen>
1068 </para>
1069
1070 </sect1>
1071
1072
1073 <sect1 id="committingfiles">
1074 <title>Committing Files</title>
1075
1076 <para>
1077 When you have made a certain number of changes to your working copy, and you
1078 want other developers to have access to them, you <emphasis>commit</emphasis>
1079 them. With a commit, you place your versions of the modified files as new
1080 revisions into the repository. A subsequent update by another developer will
1081 bring your modifications into their working copy.
1082 </para>
1083
1084 <para>
1085 In order to commit a couple of files, select them in &cervisia;'s main view and
1086 choose
1087 <menuchoice><guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem></menuchoice>
1088 or right click the marked files and choose
1089 <guimenuitem>Commit...</guimenuitem> from the context menu.
1090 </para>
1091
1092 <figure id="screenshot-commit" float="1">
1093 <title>A screenshot of &cervisia;'s commit dialog</title>
1094 <mediaobject>
1095 <imageobject><imagedata format="PNG" fileref="commit.png"/></imageobject>
1096 </mediaobject>
1097 </figure>
1098
1099 <para>
1100 You get a dialog that shows you a list of the selected files on the top section
1101 and a log message for your changes below. &cervisia; helps you in several ways
1102 to find a meaningful log message: first, in the file list you can double-click
1103 a file or press <keycap>Return</keycap> in order to see the changes you have
1104 made to the file. Second, it gives you a list of log messages you have
1105 previously used in a combo box. Third, this dialog is integrated with
1106 &cervisia;'s changelog editor described below. When you have finished the
1107 dialog, the command
1108 </para>
1109
1110 <para>
1111 <screen><command>cvs commit -m <replaceable>message</replaceable> <replaceable>file names</replaceable></command></screen>
1112 </para>
1113
1114 <para>
1115 is used.
1116 </para>
1117
1118
1119 <note><para>
1120 A common error you may encounter when committing is <errorname>Up-to-date check
1121 failed</errorname>. This indicates that someone has committed changes to the
1122 repository since you last updated; or, more technically, that your
1123 <literal>BASE</literal> revision is not the newest on its branch. In such a
1124 case, &CVS; refuses to merge your modifications into the repository. The
1125 solution is to update, resolve any conflicts and commit again. Of course, if
1126 you are working on a software project, it is normally good style to check if
1127 the program still works after you have updated - after all, there could be bad
1128 interactions between your modifications and the other modifications which
1129 break the code.
1130 </para></note>
1131
1132 <note>
1133 <para>
1134 Another popular mistake results in the error message <errorname>Sticky tag 'X'
1135 for file 'X' is not a branch</errorname>. This happens if you try to commit a
1136 file which you have previously brought to a certain revision or tag with the command
1137 </para>
1138 <para>
1139 <screen><prompt>%</prompt><userinput>cvs update -r X</userinput></screen>
1140 </para>
1141 <para>
1142 (which is &eg; used by the menu item
1143 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
1144 Tag/Date...</guimenuitem></menuchoice>). In such a case, the tag on the file
1145 gets sticky, &ie; further updates do not bring you to the newest revision on
1146 the branch. If you want to commit further revisions to the branch, you have to
1147 update to the branch tag before you do further commits.
1148 </para>
1149 </note>
1150
1151 <para>
1152 With &cervisia;, it is quite easy to maintain a ChangeLog file that is
1153 compliant with the format laid out in the &GNU; coding guidelines. To use it,
1154 choose <menuchoice><guimenu>File</guimenu><guimenuitem>Insert ChangeLog
1155 Entry...</guimenuitem></menuchoice>. If a file with the name
1156 <filename>ChangeLog</filename> exists in the toplevel folder of your
1157 sandbox, this file will be loaded and you have the possibility to edit it. To
1158 this end, at the top of the file, an entry with the current date and your user
1159 name (which can be configured as described in <xref
1160 linkend="customize-general"/>) is inserted. When you are finished the dialog can
1161 be closed by clicking <guibutton>OK</guibutton>, the next commit dialog you open
1162 will have the log message set to the message you last entered in the ChangeLog.
1163 </para>
1164
1165 </sect1>
1166
1167
1168 <sect1 id="resolvingconflicts">
1169 <title>Resolving Conflicts</title>
1170
1171 <para>
1172 Conflicts may occur whenever you have made changes to a file which was also
1173 modified by another developer. The conflict is detected by &CVS; when you
1174 update the modified file; &CVS; then tries to merge the modifications committed
1175 by the other developer into your working copy. The merge fails if both your
1176 and his modifications are in overlapping parts of the file, and the &CVS;
1177 server issues an error message.
1178 </para>
1179
1180 <para>
1181 In &cervisia;'s main view, files with conflicts are indicated with "Conflict"
1182 in the status column and with a red color. It is your job now to resolve these
1183 conflicts before you commit the file. &CVS; will refuse to commit any files with
1184 conflicts until they have been edited. From the main view, you can of
1185 course resolve conflicts the traditional way: just double-click the file in
1186 question and edit it with your favorite editor.</para>
1187
1188 <para>
1189 &CVS; marks the conflicting changes by placing marks in the middle
1190 of the files, in the following manner:</para>
1191
1192 <screen>
1193 &lt;&lt;&lt;&lt;&lt;&lt;&lt;
1194 Changes in your working copy
1195 =======
1196 Changes in the repository
1197 &gt;&gt;&gt;&gt;&gt;&gt;&gt; revision_number
1198 </screen>
1199
1200 <para>You should replace this whole block with the new merged version. Of
1201 course, you have a great amount of freedom when resolving a
1202 set of conflicts: for each conflict you can decide to take one of the two
1203 alternative versions. You can also decide that both approaches are broken
1204 and rewrite a whole routine or the complete file from scratch.
1205 </para>
1206
1207 <para>
1208 Fortunately, &cervisia; offers a nicer interface for handling these conflicts.
1209 This does not mean that you will never need to manually edit the files, but
1210 at least can eliminate the need to do so for the trivial conflict resolution.
1211 To use &cervisia;'s <guilabel>CVS Resolve</guilabel> dialog choose
1212 <menuchoice><guimenu>File</guimenu><guimenuitem>Resolve...</guimenuitem></menuchoice>
1213 or right click the marked file and choose
1214 <guimenuitem>Resolve...</guimenuitem> from the context menu.
1215 </para>
1216
1217 <figure id="screenshot-resolve" float="1">
1218 <title>A screenshot of &cervisia;'s resolve dialog</title>
1219 <mediaobject>
1220 <imageobject><imagedata format="PNG" fileref="resolve.png"/></imageobject>
1221 <textobject><phrase>A screenshot of &cervisia;'s resolve dialog</phrase></textobject>
1222 </mediaobject>
1223 </figure>
1224
1225 <para>
1226 On the top of the dialog, you see <guilabel>Your version (A)</guilabel> of the
1227 file on the left hand side and the version in the repository, <guilabel>Other
1228 version (B)</guilabel>, on the right hand side. The differences
1229 between them are marked in red color. Below these two versions, you can see
1230 the <guilabel>Merged version</guilabel>. The merged version reflects what that
1231 section will be in your working copy if you press the <guibutton>Save</guibutton>
1232 button.
1233 </para>
1234
1235 <para>
1236 You can go back and forward between the conflicting sections by pressing
1237 <guibutton>&lt;&lt;</guibutton> and <guibutton>&gt;&gt;</guibutton>. In the
1238 lower middle of the dialog you can see which section is currently marked. For
1239 example, <literal>2 of 3</literal> means that you are currently at the second
1240 differing section of 3 total.
1241 </para>
1242
1243 <para>
1244 Now you can decide section by section which version you want to have in the
1245 merged file. By pressing <guibutton>A</guibutton>, you take over the version you
1246 edited. By pressing <guibutton>B</guibutton>, you take over the version from the
1247 repository. By pressing <guibutton>A+B</guibutton>, both versions will be added,
1248 and your version will come first. <guibutton>B+A</guibutton> yields the same
1249 result, but the order will be different: first the repository version, then
1250 yours.
1251 </para>
1252
1253 <para>
1254 If you are not happy with any of these versions, press
1255 <guibutton>Edit</guibutton> to open a simple text editor where you can
1256 edit the section. When you are finished editing, press <guibutton>OK</guibutton>
1257 to return to the <guilabel>CVS Resolve</guilabel> dialog and resume solving
1258 conflicts. You will see the section you just edited in the
1259 <guilabel>Merged version</guilabel>, with your modifications.
1260 </para>
1261
1262 <para>
1263 To save your modifications, overwriting the working copy version, press
1264 <guibutton>Save</guibutton>. Note that this will save the choices not only the
1265 section you are currently viewing, but all sections in the file. If you want to
1266 save it to another file, press <guibutton>Save As...</guibutton>.
1267 Press <guibutton>Close</guibutton> to exit the dialog. If you close the dialog
1268 without saving, the changes you made will be lost.
1269 </para>
1270
1271 </sect1>
1272
1273 </chapter>
1274
1275
1276 <chapter id="obtaininginformation">
1277 <title>Obtaining Information About Files and Creating Patches</title>
1278
1279 <sect1 id="diff">
1280 <title>Watching Differences Between Revisions</title>
1281
1282 <para>
1283 There are several places in &cervisia; where you can ask for a window showing
1284 the differences between revisions of a file:
1285 </para>
1286
1287 <itemizedlist>
1288
1289 <listitem><para>
1290 In the main view, you can choose
1291 <menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
1292 Repository (BASE)...</guimenuitem></menuchoice>. This is based on the command
1293 <command>cvs diff</command> and shows you the differences between the version
1294 in your sandbox and the version to which you last updated (also known as
1295 <literal>BASE</literal>). This is in particular useful just before you commit
1296 a file, so you can find an appropriate log message.
1297 </para></listitem>
1298
1299 <listitem><para>
1300 You can view the differences between the version in your sandbox and the version
1301 in the main development branch (also called <literal>HEAD</literal>) by choosing
1302 <menuchoice><guimenu>View</guimenu>
1303 <guimenuitem>Difference to Repository (HEAD)...</guimenuitem></menuchoice>.
1304 </para></listitem>
1305
1306 <listitem><para>
1307 You can view the differences between the last two revisions of the selected file
1308 choosing <menuchoice><guimenu>View</guimenu>
1309 <guimenuitem>Last Change...</guimenuitem></menuchoice>.
1310 </para></listitem>
1311
1312 <listitem><para>
1313 You can access the <guimenuitem>Difference to Repository (BASE)...</guimenuitem>,
1314 <guimenuitem>Difference to Repository (HEAD)...</guimenuitem> and
1315 <guimenuitem>Last Change...</guimenuitem> menu items from the main view context
1316 menu, by right-clicking the file you want to view.
1317 </para></listitem>
1318
1319 <listitem><para>
1320 In the dialog that is shown when a you commit a set of files, you can request
1321 a difference window by selecting a file name in the selection list, either by
1322 double-clicking it or by pressing <keycap>Return</keycap>. This is quite
1323 similar to using <menuchoice><guimenu>View</guimenu><guimenuitem>Difference
1324 to Repository (BASE)...</guimenuitem></menuchoice> with the respective file in the
1325 main view.
1326 </para></listitem>
1327
1328 <listitem><para>
1329 In the Browse Logs dialog, you can mark two revisions of a file and request a
1330 dialog showing the differences between them (see <xref linkend="browsinglogs"/>).
1331 </para></listitem>
1332
1333 </itemizedlist>
1334
1335 <para>
1336 As you may have expected, &cervisia; does not just dump the output of the
1337 <command>diff</command> command into your terminal, but shows you a graphical
1338 view as seen in <xref linkend="screenshot-log"/>.
1339 </para>
1340
1341 <figure id="screenshot-log" float="1">
1342 <title>A screenshot of &cervisia;'s diff dialog</title>
1343 <mediaobject>
1344 <imageobject><imagedata format="PNG" fileref="diff.png"/></imageobject>
1345 <textobject><phrase>A screenshot of &cervisia;'s diff dialog</phrase></textobject>
1346 </mediaobject>
1347 </figure>
1348
1349 <para>
1350 The text in the dialog is an improved variant of the text given by the diff
1351 command with the <option>-u</option> option. You can see the differing
1352 versions in two windows, with lines arranged such that you can do a
1353 side-by-side comparison. That means, where text has been added or deleted,
1354 the respective window shows empty lines with the marker
1355 <literal>+++++</literal> at the left hand side. Elsewhere, you can see the
1356 running number of each line in the left column.
1357 </para>
1358
1359 <para>
1360 In the second column in the right window, you can see which kind of change has
1361 been made. Possible types are <literal>Add</literal>,
1362 <literal>Delete</literal> and <literal>Change</literal>. The respective lines
1363 are marked in blue, green and red color. In the middle of the dialog a
1364 compressed image of the color markers is shown. In this way, you can get a
1365 quick overview of the overall changes to the file. You can also use the
1366 position of the colored regions in the compressed image as an orientation when
1367 you using the scroll bars.
1368 </para>
1369
1370 <para>
1371 Normally, the scrollbars at the left and the right window are synchronized,
1372 &ie; if you scroll on the left hand side, the right hand side is scrolled by
1373 the same amount. You can change this by checking the box
1374 <guibutton>Synchronize scroll bars</guibutton>.
1375 </para>
1376
1377 <para>
1378 For information about how to customize the diff dialog, see <xref linkend="customize-diff"/>.
1379 </para>
1380
1381 </sect1>
1382
1383 <sect1 id="creatingpatches">
1384 <title>Creating Patches</title>
1385
1386 <para>
1387 Sometimes you want to offer your modifications for review, before committing them,
1388 or you do not have write access to the repository (therefore you cannot
1389 commit). &CVS; offers standard formats to share the modifications in
1390 your working copy, so other people can review your changes, test them in their
1391 working copy and apply them to the &CVS; repository. A file containing these
1392 differences is called a <firstterm>patch</firstterm>, and is generated by the
1393 <command>cvs diff</command> command, in the same way as the differences in
1394 <xref linkend="diff"/>. Sharing patches instead of sets of files requires less
1395 bandwidth, and patches are easier to handle, as you can send only one patch
1396 file containing all the differences from many source files.
1397 </para>
1398
1399 <para>
1400 &cervisia; gives you access to this feature by choosing
1401 <menuchoice><guimenu>Advanced</guimenu>
1402 <guimenuitem>Create Patch Against Repository...</guimenuitem></menuchoice>.
1403 </para>
1404
1405 <important><para>
1406 The <guimenuitem>Create Patch Against Repository...</guimenuitem> action
1407 creates a patch with all modifications in all files in your working copy
1408 (sandbox) against the <literal>BASE</literal> repository. Therefore, the
1409 selection of files in the main view does not affect the patch that will be
1410 generated.
1411 </para></important>
1412
1413 <para>
1414 Another possibility is to select one file in the main view and choose
1415 <guimenuitem>Browse Log...</guimenuitem> from the <guimenu>View</guimenu> menu
1416 or right click the marked file and choose
1417 <guimenuitem>Browse Log...</guimenuitem> from the context menu, in order to open
1418 the <link linkend="browsinglogs">Browse log dialog</link>. Now, select the
1419 version you want to create a patch against, as revision <quote>A</quote> and press
1420 the button <guilabel>Create Patch...</guilabel>. This will generate a patch with
1421 the differences between the <emphasis>marked file</emphasis> in your working
1422 copy and the version selected as revision <quote>A</quote>.
1423 </para>
1424
1425 <para>
1426 Before generating the patch, &cervisia; displays a dialog allowing you to
1427 configure the output format.
1428 </para>
1429
1430 <figure id="screenshot-patch" float="1">
1431 <title>A screenshot of &cervisia;'s patch dialog</title>
1432 <mediaobject>
1433 <imageobject><imagedata format="PNG" fileref="patch.png"/></imageobject>
1434 <textobject><phrase>A screenshot of &cervisia;'s patch dialog</phrase></textobject>
1435 </mediaobject>
1436 </figure>
1437
1438 <variablelist>
1439
1440 <varlistentry>
1441 <term><guilabel>Output Format</guilabel></term>
1442 <listitem><para>
1443 There are three output formats available:
1444 </para>
1445 <para>
1446 <guilabel>Normal</guilabel>: a format that can be used to cause the ed editor
1447 to automatically make another copy of the old file match the new file. In
1448 the normal output format, the characters &lt; and &gt; mark the changes, and
1449 there is no context information.
1450 </para>
1451 <para>
1452 <guilabel>Unified</guilabel>: the most used format for
1453 exchanging patches. The unified format uses context lines in addition to line
1454 numbers to record the differences. This makes the process of
1455 applying patches more robust. This format displays the
1456 differences in a compact and readable form, with a header for each file
1457 involved, and separate sections (chunks) for each difference. The context lines
1458 available for each difference make reading the modifications easier. In
1459 the unified output format, the characters + and - mark the changes.
1460 </para>
1461 <para>
1462 <guilabel>Context</guilabel>, which presents the same information as the unified
1463 format, but in a less compact way. In the context output format, the character !
1464 marks the changes.
1465 </para></listitem>
1466 </varlistentry>
1467
1468 <varlistentry>
1469 <term><guilabel>Number of context lines:</guilabel></term>
1470 <listitem><para>
1471 Set here the number of context lines for the unified or context output formats.
1472 This option is not available for the normal output format, as in this format
1473 no context information is recorded. More context information makes reading the
1474 raw output easier, and applying the patch more precise, but increases the patch
1475 size. It is recommended to use at least two context lines for proper patch
1476 operation.
1477 </para></listitem>
1478 </varlistentry>
1479
1480 <varlistentry>
1481 <term><guilabel>Ignore Options</guilabel></term>
1482 <listitem><para>
1483 Check here the changes that should not be considered as differences when
1484 generating the patch.
1485 </para></listitem>
1486 </varlistentry>
1487
1488 </variablelist>
1489
1490
1491 <para>
1492 After setting the output format, &cervisia; generates the patch and displays the
1493 <guilabel>Save As</guilabel> dialog. Enter in this dialog the file name
1494 and location of the patch file.
1495 </para>
1496
1497
1498 </sect1>
1499
1500 <sect1 id="annotate">
1501 <title>Watching an Annotated View of a File</title>
1502
1503 <para>
1504 With the command <command>cvs annotate</command>, &CVS; offers the possibility
1505 to see - for each line in a file - who has modified a line the most recently.
1506 This view may be helpful in order to find out who has introduced a change in
1507 the behavior of a program or who should be asked about some change or bug in
1508 the code.
1509 </para>
1510
1511 <para>
1512 &cervisia; gives you access to this feature, but it further enriches the
1513 information in an interactive way. You obtain an annotate view by choosing
1514 <menuchoice><guimenu>View</guimenu><guimenuitem>Annotate...</guimenuitem></menuchoice>.
1515 Another possibility is to press the button <guilabel>Annotate</guilabel> in
1516 the <link linkend="browsinglogs">Browse log dialog</link>, in which you can
1517 select which version of the file you want to display.
1518 In <xref linkend="screenshot-annotate"/> you can see a screenshot of the
1519 dialog.
1520 </para>
1521
1522 <figure id="screenshot-annotate" float="1">
1523 <title>A screenshot of &cervisia;'s annotate dialog</title>
1524 <mediaobject>
1525 <imageobject><imagedata format="PNG" fileref="annotate.png"/></imageobject>
1526 <textobject><phrase>A screenshot of &cervisia;'s annotate dialog</phrase></textobject>
1527 </mediaobject>
1528 </figure>
1529
1530 <para>
1531 In the annotate dialog, you see in a window the latest version of the selected
1532 file (or the revision <quote>A</quote>version, in case you launched the annotate
1533 dialog from the <link linkend="browsinglogs">Browse log dialog</link>). In
1534 the columns before the text, you get some information related to the
1535 latest change in each line. In the first column the line number is
1536 displayed. In the second column you see the name of the author and
1537 revision number. Finally, in the third column you see the actual content of that
1538 line.
1539 </para>
1540
1541 <para>
1542 Consequently, when a certain line appears strange to you or you assume a bug
1543 there, you can immediately see who is responsible for that line. But not only
1544 that, you can also find out <emphasis>why</emphasis> that line was
1545 changed. To this end, move the mouse cursor over the respective revision
1546 number. Then a tooltip appears that shows the log message and the date of the
1547 change.
1548 </para>
1549
1550 </sect1>
1551
1552
1553 <sect1 id="browsinglogs">
1554 <title>Browsing &CVS; Logs</title>
1555
1556 <para>
1557 When you mark one file in the main view and choose <guimenuitem>Browse
1558 Log...</guimenuitem> from the <guimenu>View</guimenu> menu
1559 or right click the marked file and choose
1560 <guimenuitem>Browse Log...</guimenuitem> from the context menu, the
1561 <guilabel>CVS Log</guilabel> dialog is shown (if you mark more than one, nothing
1562 happens, as &cervisia; can only generate and parse the log for one file at a
1563 time). This dialog offers functionality that is beyond viewing the file's
1564 history. Using it as a version browser you can:
1565 </para>
1566
1567 <itemizedlist>
1568
1569 <listitem><para>
1570 View the revision, author, date, branch, commit message, and tags for each
1571 version of the marked file.
1572 </para></listitem>
1573
1574 <listitem><para>
1575 View a graphical tree representation showing the branching and tagging of the
1576 marked file.
1577 </para></listitem>
1578
1579 <listitem><para>
1580 View any version of the marked file (with the default application).
1581 </para></listitem>
1582
1583 <listitem><para>
1584 Watch an annotated view of any version of the marked file
1585 </para></listitem>
1586
1587 <listitem><para>
1588 View the differences between any pair of versions of the marked file,
1589 including pairs with the current working copy version of the marked file.
1590 </para></listitem>
1591
1592 <listitem><para>
1593 Create patches containing the differences between any pair of versions of the marked
1594 file, including pairs with the current working copy version of the marked file.
1595 </para></listitem>
1596
1597 </itemizedlist>
1598
1599 <figure float="1">
1600 <title>A screenshot of &cervisia;'s browse logs dialog</title>
1601 <mediaobject>
1602 <imageobject><imagedata format="PNG" fileref="logtree.png"/></imageobject>
1603 <textobject><phrase>A screenshot of &cervisia;'s browse logs dialog</phrase></textobject>
1604 </mediaobject>
1605 </figure>
1606
1607 <para>
1608 You can choose to see the history as provided by the <command>cvs
1609 log</command> command (<guilabel>CVS Output</guilabel>), as a
1610 <guilabel>Tree</guilabel>, or in <guilabel>List</guilabel> form. What you prefer
1611 is of course a matter of taste and it depends on what information you are
1612 interested in. The tree is an intuitive representation of what has been done
1613 on different branches by which authors. As tooltips, you can see the corresponding
1614 log messages. The list is by its nature linear and, therefore, does not give an
1615 immediate view of branches; on the other hand, it concentrates more otherwise
1616 relevant information on less screen estate, namely the time of each change of
1617 the file and the first part of the log message. The &CVS; output information is
1618 complete, but long, and difficult to read. To alleviate these problems, you
1619 have the ability to search the text of the &CVS; output, by pressing the
1620 <guibutton>Find...</guibutton> button.
1621 </para>
1622
1623 <para>
1624 To obtain more information about a certain revision, you can click on it
1625 either in the list or the tree view. The fields in the middle of the dialog
1626 are then filled with the complete information provided by <command>cvs
1627 log</command>. You can mark two revisions, called <quote>A</quote>and <quote>B</quote>, which are
1628 relevant if you make use of further features provided by the buttons.
1629 Revision <quote>A</quote>can be chosen with the left mouse button, revision <quote>B</quote>
1630 with the middle one. In the list view, you can also
1631 navigate with your cursor keys. In order to mark revisions <quote>A</quote>and <quote>B</quote>,
1632 use the shortcuts <keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo>,
1633 <keycombo action="simul">&Ctrl;<keycap>B</keycap></keycombo>, respectively.
1634 Using the <guilabel>CVS Output</guilabel> view, you can click on the
1635 <guilabel>Select for revision A</guilabel> and <guilabel>Select for
1636 revision B</guilabel> to mark the revisions.
1637 </para>
1638
1639 <para>
1640 If you press the <guibutton>Annotate</guibutton> button, you get a dialog
1641 showing the text of file belonging to the revision marked as <quote>A</quote>.
1642 Every line is prefixed with the information about who edited this last time,
1643 and at which revision this happened. You can get more information about viewing
1644 annotated versions in <xref linkend="annotate" />.
1645 </para>
1646
1647 <para>
1648 If you press the <guibutton>Diff</guibutton> button, a <command>cvs diff</command>
1649 call is issued and you get a dialog in which all the modifications between the
1650 two marked revisions are shown. If you mark revision <quote>A</quote>, but not
1651 revision <quote>B</quote>, &cervisia; will generate the modifications between
1652 the file version marked as revision <quote>A</quote>and the working copy version
1653 of the file. This allows you to view the differences between your version of the
1654 file and any version available in &CVS;. To make it easy to see the changes,
1655 different colors are used to mark lines which have been added, removed or simply
1656 changed. You can get more information about viewing differences in
1657 <xref linkend="diff" />.
1658 </para>
1659
1660 <para>
1661 If you press the <guibutton>Create Patch...</guibutton> button, you get a dialog
1662 in which you can set the format options for generating a file containing all the
1663 modifications between the two marked revisions which are shown. If you mark
1664 revision <quote>A</quote>, but not revision <quote>B</quote>, &cervisia; will generate
1665 the modifications between the file version marked as revision <quote>A</quote>and
1666 the working copy version of the file. This allows you to generate a patch, or
1667 difference file, between your version of the file and any version available in
1668 &CVS;. After configuring the format of the patch in the dialog, and pressing
1669 <guibutton>OK</guibutton>, a <command>cvs diff</command> command is issued to
1670 generate the difference file. A <guilabel>Save As</guilabel> dialog will pop up.
1671 Enter the file name and location of the patch file &cervisia; generated, in order
1672 to save it. You can get more information about creating patches, and the patch
1673 format options in <xref linkend="creatingpatches" />.
1674 </para>
1675
1676 <para>
1677 If you press the <guibutton>View</guibutton> button, &cervisia; will retrieve
1678 the revision marked as <quote>A</quote>and display it using the default
1679 application for its file type.
1680 </para>
1681
1682 <para>
1683 Press the <guibutton>Close</guibutton> button to leave the dialog and return to
1684 the main view.
1685 </para>
1686
1687
1688 <para>
1689 To generate the log that is the base for the <guilabel>CVS Log</guilabel>
1690 dialog, &cervisia; issues the following command:
1691 </para>
1692
1693
1694 <para>
1695 <screen><command>cvs log <replaceable>file name</replaceable></command></screen>
1696 </para>
1697
1698 </sect1>
1699
1700 <sect1 id="browsinghistory">
1701 <title>Browsing the History</title>
1702
1703 <para>
1704 If the used repository has logging enabled, &cervisia; can present you a
1705 history of certain events like checkouts, commits, tags, updates and
1706 releases. Choose <guimenuitem>History</guimenuitem> from the
1707 <guimenu>View</guimenu> menu, and &cervisia; will issue the command
1708 </para>
1709
1710 <para>
1711 <screen><command>cvs history -e -a</command></screen>
1712 </para>
1713
1714 <note><para>
1715 This fetches the complete logging file from the server, &ie; a list of
1716 the events for all users and all modules. This can be a huge amount of data.
1717 </para></note>
1718
1719 <para>
1720 Now you can see the list of events, sorted by date. In the second column, the
1721 type of the event is shown:
1722 </para>
1723
1724 <itemizedlist>
1725
1726 <listitem><para>
1727 Checkout - The user who is displayed in the 'Author' column
1728 has checked out a module
1729 </para></listitem>
1730
1731 <listitem><para>
1732 Tag - A user has used the command <command>cvs rtag</command>. Note that the
1733 usage of <command>cvs tag</command> (as done by &cervisia;'s
1734 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Tag/Branch...</guimenuitem></menuchoice>
1735 command) is not recorded in the history database. This has historical reasons
1736 (see the &CVS; <acronym>FAQ</acronym>).
1737 </para></listitem>
1738
1739 <listitem><para>
1740 Release - A user has released a module. Actually, this command is rarely used
1741 and not of much value.
1742 </para></listitem>
1743
1744 <listitem><para>
1745 Update, Deleted - A user has made an update on a file which was deleted in the
1746 repository. As a consequence, the file was deleted in his working copy.
1747 </para></listitem>
1748
1749 <listitem><para>
1750 Update, Copied - A user has made an update on a file. A new version was copied
1751 into working copy.
1752 </para></listitem>
1753
1754 <listitem><para>
1755 Update, Merged - A user has made an update on a file. The modifications in the
1756 repository version on the file were merged into his working copy.
1757 </para></listitem>
1758
1759 <listitem><para>
1760 Update, Conflict - A user has made an update on a file, and a conflict with
1761 his own modifications was detected.
1762 </para></listitem>
1763
1764 <listitem><para>
1765 Commit, Modified - A user committed a modified file.
1766 </para></listitem>
1767
1768 <listitem><para>
1769 Commit, Added - A user added a file and committed it.
1770 </para></listitem>
1771
1772 <listitem><para>
1773 Commit, Removed - A user removed a file and committed it.
1774 </para></listitem>
1775
1776 </itemizedlist>
1777
1778 <figure id="screenshot-history" float="1">
1779 <title>A screenshot of &cervisia;'s history dialog</title>
1780 <mediaobject>
1781 <imageobject><imagedata format="PNG" fileref="history.png"/></imageobject>
1782 <textobject><phrase>A screenshot of &cervisia;'s history dialog</phrase></textobject>
1783 </mediaobject>
1784 </figure>
1785
1786 <para>
1787 You can sort the list by other criteria simply by clicking on the respective
1788 column header. In order to sort out the history entries you are interested in,
1789 there are various filter options activated by check boxes:
1790 </para>
1791
1792 <itemizedlist>
1793 <listitem><para>Show commit events - shows commits</para></listitem>
1794 <listitem><para>Show checkout events - shows checkouts</para></listitem>
1795 <listitem><para>Show tag events - shows taggings</para></listitem>
1796 <listitem><para>Show other events - shows events not included in the above</para></listitem>
1797 <listitem><para>Only user - shows only events caused by a certain user</para></listitem>
1798 <listitem><para>Only file names matching - filters file names by a regular expression</para></listitem>
1799 <listitem><para>Only folders matching - filters folder names by a regular expression</para></listitem>
1800 </itemizedlist>
1801
1802 <para>
1803 Special characters recognized by the regular expression matcher are:
1804 </para>
1805
1806 <itemizedlist>
1807
1808 <listitem><para>
1809 <literal>x*</literal> matches any number of occurrences of the character
1810 <literal>x</literal>.
1811 </para></listitem>
1812
1813 <listitem><para>
1814 <literal>x+</literal> matches one or more of occurrences of the character
1815 <literal>x</literal>.
1816 </para></listitem>
1817
1818 <listitem><para>
1819 <literal>x?</literal> matches zero or one occurrences of the character
1820 <literal>x</literal>.
1821 </para></listitem>
1822
1823 <listitem><para>
1824 <literal>^</literal> matches the start of the string.
1825 </para></listitem>
1826
1827 <listitem><para>
1828 <literal>$</literal> matches the end of the string.
1829 </para></listitem>
1830
1831 <listitem><para>
1832 <literal>[a-cx-z]</literal> matches a set of characters,
1833 &eg; here the set consisting of a,b,c,x,y,z.
1834 </para></listitem>
1835
1836 </itemizedlist>
1837
1838 </sect1>
1839
1840
1841 </chapter>
1842
1843 <chapter id="advancedusage">
1844 <title>Advanced Usage</title>
1845
1846 <sect1 id="updatingto">
1847 <title>Updating to Tag, Branch or Date</title>
1848
1849 <para>
1850 Branches of a module are parallel versions of this module. A good real life
1851 example of the use of this feature is the release of a software project. After a
1852 major release, there are bugs in the code that should be fixed, but people want
1853 to add new features to the application too. It is very hard to do both at the
1854 same time because new features usually introduce new bugs, making it hard to
1855 track down the old ones. To solve this dilemma, &CVS; lets you create a parallel
1856 version, that we will call the <quote>stable release branch</quote>, where you can
1857 only add bugfixes, leaving the main branch (HEAD) open for adding new features.
1858 </para>
1859
1860 <para>
1861 Tags are used to mark a version of a project. &CVS; stamps one
1862 version of each file with the tag, so when you checkout or
1863 update to a specific tag, you will get always the same file versions;
1864 therefore, as opposed to branches, tags are not dynamic: you cannot develop a
1865 tag. Tags are useful to mark releases, big changes in the code, &etc;
1866 </para>
1867
1868 <para>
1869 When you are developing or following the development of a software project,
1870 you do not necessarily work with the main branch all the time. After a release,
1871 you may want to stay with the released branch for a while, to enjoy its relative
1872 stability, fix bugs, translate the sources, &etc; To do all that, you have to
1873 update to the released branch. All your files will be updated to the latest
1874 version of the files in that branch. After updating, all your new commits will
1875 be uploaded to the new branch as well.
1876 </para>
1877
1878 <para>
1879 Also, if you want to track a bug that was reported
1880 against a past tagged release, &CVS; offers you the possibility to retrieve the
1881 software as it was released, by updating to that tag. Besides, if you want to
1882 fetch a past version of your project, you can update your working copy to a
1883 specific date. This may be useful if an error was introduced in the project
1884 between two releases, and you have an opinion on when that was. When you update
1885 to a date or tag, the versions of your files will be the same as the versions
1886 in that specific date or the versions stamped by that tag.
1887 </para>
1888
1889 <warning><para>
1890 Before updating to a different branch or tag, make sure you committed all your
1891 changes to the branch you are working with. If your are not ready to
1892 commit your changes, but do not want to discard them, do not update to the new
1893 branch, as you may lose your changes. As an alternative, you can do a new
1894 <link linkend="checkingout">checkout</link>, to work in parallel with
1895 both versions.
1896 </para></warning>
1897
1898 <figure id="screenshot-updatetag" float="1">
1899 <title>A screenshot of &cervisia;'s update to tag dialog</title>
1900 <mediaobject>
1901 <imageobject><imagedata format="PNG" fileref="updatetag.png"/></imageobject>
1902 <textobject><phrase>A screenshot of &cervisia;'s update to tag dialog</phrase></textobject>
1903 </mediaobject>
1904 </figure>
1905
1906 <variablelist>
1907 <varlistentry>
1908 <term><guilabel>Update to branch</guilabel></term>
1909 <listitem><para>
1910 Select this option to update to a branch. Enter the name of the branch in the
1911 drop down text box (or press the <guilabel>Fetch List</guilabel> button to
1912 retrieve the list of branches from the &CVS; server, and select the one you want
1913 in the drop down list).
1914 </para></listitem>
1915 </varlistentry>
1916
1917 <varlistentry>
1918 <term><guilabel>Update to tag</guilabel></term>
1919 <listitem><para>
1920 Select this option to update to a tag. Enter the name of the tag in the
1921 drop down text box (or press the <guilabel>Fetch List</guilabel> button to
1922 retrieve the list of tags from the &CVS; server, and select the one you want
1923 in the drop down list).
1924 </para></listitem>
1925 </varlistentry>
1926
1927 <varlistentry>
1928 <term><guilabel>Update to date</guilabel></term>
1929 <listitem><para>
1930 Select this option to update to a date. In the field below, you can enter a wide
1931 variety of date formats. One possible format is <literal>yyyy-mm-dd</literal>
1932 where <literal>yyyy</literal> is the year, <literal>mm</literal> is the month
1933 (numerically) and <literal>dd</literal> is the day. Alternatives are some
1934 English phrases like <literal>yesterday</literal> or <literal>2 weeks
1935 ago</literal>.
1936 </para></listitem>
1937 </varlistentry>
1938
1939 </variablelist>
1940
1941 <note><para>
1942 Updating to a tag or date make them 'sticky', &ie; you cannot commit
1943 further modifications on that files (unless the tag is a branch tag). In order
1944 to get back to the main branch, use the menu item
1945 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
1946 HEAD</guimenuitem></menuchoice>.
1947 </para></note>
1948
1949 <para>
1950 The command issued to update to a branch or tag is:
1951 <screen><command>cvs update -r <replaceable>tag</replaceable></command></screen>
1952 </para>
1953
1954 <para>
1955 The command issued to update to a date is:
1956 <screen><command>cvs update -D <replaceable>date</replaceable></command></screen>
1957 </para>
1958
1959 <para>
1960 The command issued to update to the main branch (HEAD) is:
1961 <screen><command>cvs update <option>-A</option></command></screen>
1962 </para>
1963
1964 </sect1>
1965
1966
1967 <sect1 id="taggingbranching">
1968 <title>Tagging and Branching</title>
1969
1970 <para>
1971 We discuss here only the technical aspects of tagging and branching. If you
1972 are only a <emphasis>user</emphasis>, not the administrator of the repository,
1973 you will probably not be confronted with the problem. If however you are your
1974 own administrator, you should first read about the non-technical problems that
1975 accompany branching, in order to get an impression of how time-consuming and
1976 error-prone maintaining different branches of a project can be. The appendix
1977 includes some references about this topic.
1978 </para>
1979
1980 <para>
1981 Simple tagging is something you usually do when a release is made, so that you
1982 can at any time easily get back to the project state at that time. Tags are
1983 usually given a name consisting of the project name and the version
1984 number. For example, &cervisia; 1.0 is available under the tag
1985 <literal>CERVISIA_1_0</literal>. &cervisia; enforces &CVS;'s strict rules
1986 about what constitutes valid tag name. It must begin with a letter and may
1987 contain letters, digits, hyphens and underscores.
1988 </para>
1989
1990 <para>
1991 Normally, you will want to tag the whole project (although &CVS; of course
1992 allows you to tag only a subset). To this end, mark the toplevel folder in
1993 the view and choose
1994 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Tag/Branch</guimenuitem></menuchoice>.
1995 Now enter the name of the tag, press <keycap>Return</keycap> and you are done.
1996 </para>
1997
1998 <para>
1999 Creating a branch is not significantly more difficult: In the tag dialog,
2000 check the box <guibutton>Create branch with this tag</guibutton>. You can also
2001 delete an existing tag: Choose
2002 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Delete
2003 Tag</guimenuitem></menuchoice> in the main view.
2004 </para>
2005
2006 <para>
2007 Another aspect of branching is the merging of modifications from a branch to
2008 the current branch. If you are going to do this, choose
2009 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Merge...</guimenuitem></menuchoice>.
2010 The dialog that appears now gives you two options:
2011 </para>
2012
2013 <para>
2014 Either you may merge all modifications done on a branch to the current
2015 branch. In that case, check the box <guibutton>Merge from branch</guibutton>
2016 and fill in the branch you want to merge from. &cervisia; will then execute
2017 the command
2018 </para>
2019
2020 <para>
2021 <screen><command>cvs update <option>-j</option> <replaceable>branchtag</replaceable></command></screen>
2022 </para>
2023
2024 <para>
2025 The other possibility is that you want to merge only the modifications made
2026 between two tags on a branch. This usually happens when you merge from the
2027 same branch to the trunk several times. In that case, check the box
2028 <guibutton>Merge modifications</guibutton> and enter (in the correct order)
2029 the two relevant tags. This will result in a command
2030 </para>
2031
2032 <para>
2033 <screen><command>cvs update <option>-j</option> <replaceable>branchtag1</replaceable> <option>-j</option> <replaceable>branchtag2</replaceable></command></screen>
2034 </para>
2035
2036 </sect1>
2037
2038
2039 <sect1 id="watches">
2040 <title>Using Watches</title>
2041
2042 <para>
2043 A watch is the conventional name for &CVS;'s feature to notify users of the
2044 repository whenever a file has been changed or a developer has started editing
2045 a file. The usage of watches requires that the file
2046 <filename><envar>$CVSROOT</envar>/CVSROOT/notify</filename> has been set up
2047 properly. This is not discussed here; if you need further information on the
2048 setup from the administrator's point of view, read one of the books listed in
2049 the appendix.
2050 </para>
2051
2052 <para>
2053 &cervisia;'s main support of watches are six menu items.
2054 </para>
2055
2056 <para>
2057 In order to add a watch to one or several files, use
2058 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Add
2059 Watch...</guimenuitem></menuchoice>. In the dialog you get, you can choose to
2060 get notified for any of the types of events that &CVS; supports. For example,
2061 if you only want to get notified when a file is committed, check the boxes
2062 <guibutton>Only</guibutton> and <guibutton>Commits</guibutton>. If you want to
2063 get notified about any event related to the marked files, check the box
2064 <guibutton>All</guibutton>. The command line used when you accept the dialog
2065 is
2066 </para>
2067
2068 <para>
2069 <screen><command>cvs watch add -a commit <replaceable>file names</replaceable></command></screen>
2070 </para>
2071
2072 <para>
2073 or with a similar option, depending on the events you chose to watch.
2074 </para>
2075
2076 <para>
2077 If you are not interested in some files anymore, you can remove your watches on
2078 them. To this end, use
2079 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Remove
2080 Watch...</guimenuitem></menuchoice>. In the dialog you get here, the same
2081 options are offered as in the form you filled out when adding the watch. When
2082 you confirm this dialog, &cervisia; issues the command
2083 </para>
2084
2085 <para>
2086 <screen><command>cvs watch remove <replaceable>file names</replaceable></command></screen>
2087 </para>
2088
2089 <para>
2090 possibly with an option <option>-a</option> for the chosen events.
2091 </para>
2092
2093 <para>
2094 Finally, you can get a list of the people who are watching a couple of
2095 files. Choose <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Show
2096 Watchers</guimenuitem></menuchoice>. Using this menu item will result in a
2097 command
2098 </para>
2099
2100 <para>
2101 <screen><command>cvs watchers <replaceable>file names</replaceable></command></screen>
2102 </para>
2103
2104 <para>
2105 In the normal usage scenario of &CVS;, each developer works separately in his
2106 checked out sandbox. When he wants to modify some file, he can just open it in
2107 his editor and start working on it. Nobody else will know about this work
2108 until the file gets committed.
2109 </para>
2110
2111 <para>
2112 For some developer groups, this is not the preferred model of
2113 cooperation. They want to get notified about someone working on a file
2114 <emphasis>as soon as</emphasis> he starts with it. This can be achieved by some
2115 further &CVS; commands. Before you start editing a file, select it in
2116 &cervisia;'s main window and choose
2117 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit Files</guimenuitem></menuchoice>.
2118 This will execute the command
2119 </para>
2120
2121 <para>
2122 <screen><command>cvs edit <replaceable>file names</replaceable></command></screen>
2123 </para>
2124
2125 <para>
2126 This will send out a notification to everyone who has set an
2127 <literal>edit</literal> watch on this file. It will also register you as an
2128 <emphasis>editor</emphasis> of the file. You can obtain a list of all editors
2129 of a certain file by using
2130 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Show
2131 Editors</guimenuitem></menuchoice>. This is equivalent to typing on the
2132 command line
2133 </para>
2134
2135 <para>
2136 <screen><command>cvs editors <replaceable>file names</replaceable></command></screen>
2137 </para>
2138
2139 <para>
2140 An editing session is automatically ended when you commit the affected file.
2141 At that moment, an <literal>unedit</literal> notification gets sent out to all
2142 people who have registered a respective watch on the file. Of course,
2143 sometimes you may not want to commit the file, but abort the editing session
2144 and revert to the previous version of the file. This is done by using
2145 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unedit Files</guimenuitem></menuchoice>.
2146 Note that &cervisia; will not ask you for confirmation; that means if you use
2147 this menu item, all your work done since you used
2148 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit Files</guimenuitem></menuchoice>
2149 will be lost. Precisely, &cervisia; uses the command line
2150 </para>
2151
2152 <para>
2153 <screen><command>echo y | cvs unedit <replaceable>file names</replaceable></command></screen>
2154 </para>
2155
2156 <para>
2157 So far, we have only discussed the case where edits and unedits are used
2158 voluntarily be the developers. In addition &CVS; supports a model which
2159 <emphasis>enforces</emphasis> the usage of these commands. The responsible
2160 command to switch to this model is <command>cvs watch on</command> which we
2161 will not explain further because it is mostly used by the administrator of the
2162 repository. However, the important point from the developer's point of view is
2163 that when the project enforces edits, working copies are checked out
2164 <emphasis>readonly</emphasis>. That means you cannot edit a file by default
2165 (unless you use tricks like <command>chmod</command>). Only when you use
2166 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit Files</guimenuitem></menuchoice>,
2167 the file becomes writable. It is made read-only again when you commit the file
2168 or use
2169 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unedit Files</guimenuitem></menuchoice>.
2170 </para>
2171
2172 <para>
2173 &cervisia;'s editor interface helps you with projects that enforce watches
2174 also in a different way. If you just started an editor with a readonly file
2175 by double-clicking on it or by using
2176 <menuchoice><guimenu>File</guimenu><guimenuitem>Edit</guimenuitem></menuchoice>,
2177 you would not be able to save your modifications later. This has of course a
2178 reason: Whenever you want to change a file, you should run <command>cvs
2179 edit</command> before, so that all people watching the file get a notification
2180 that you are working on it.
2181 </para>
2182
2183 <para>
2184 In such a case, it is advisable to check the option
2185 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Do cvs edit Automatically
2186 When Necessary</guimenuitem></menuchoice>. Now, whenever you edit a file by
2187 double-clicking it, &cervisia; will run <command>cvs edit</command> before the
2188 editor is actually executed. Then you can edit your file as usual. When you
2189 have finished your work, commit your files, and the committed files are
2190 read-only again.
2191 </para>
2192
2193 </sect1>
2194
2195
2196 <sect1 id="locking">
2197 <title>Locking</title>
2198
2199 <para>
2200 The development model usually followed when &CVS; is used is called
2201 <emphasis>unreserved checkouts</emphasis>. Each developer has his own sandbox
2202 where he can edit files as he likes. If when the watch features - like
2203 <command>cvs edit</command> - are used, multiple developers can work on files
2204 synchronously. Changes done by a different developer are merged into the local
2205 sandbox when an update is performed.
2206 </para>
2207
2208 <para>
2209 Other revision control systems - like <acronym>RCS</acronym> and
2210 <application>SourceSafe</application> use a different model. When a developer
2211 wants to a edit a file, he has to <emphasis>lock</emphasis> it. Only one
2212 developer at a time can a lock a file. When he has finished editing, the lock
2213 is released. On the one hand, with this model, conflicts can never happen. On
2214 the other hand, two developers cannot work on the same file at the same time,
2215 even when their changes do not affect each other. This can be a bottleneck.
2216 We are not going to discuss the organizational benefits of both approaches.
2217 Nevertheless we mention that although &CVS; has some support for locking, it is
2218 not the preferred way of working with &CVS;. You should not use these features
2219 unless you are sure that your project manager allows them.
2220 </para>
2221
2222 <para>
2223 With &cervisia;, you lock files as follows. Select the desired files in the
2224 main view. Then choose
2225 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Lock Files</guimenuitem></menuchoice>.
2226 This runs the command
2227 </para>
2228
2229 <para>
2230 <screen><command>cvs admin -l <replaceable>file names</replaceable></command></screen>
2231 </para>
2232
2233 <para>The reverse effect is achieved by using
2234 <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unlock Files</guimenuitem></menuchoice>.
2235 This runs the command</para>
2236
2237 <para>
2238 <screen><command>cvs admin -u <replaceable>file names</replaceable></command></screen>
2239 </para>
2240
2241 </sect1>
2242
2243 </chapter>
2244
2245
2246 <chapter id="customization">
2247 <title>Customizing &cervisia;</title>
2248
2249 <para>
2250 &cervisia; can be customized in various ways to your needs and
2251 preferences. Some options which you may want to change regularly are directly
2252 available in the <guimenu>Settings</guimenu> menu.
2253 <!-- not in 4.1 Others are united in a common
2254 dialog which is available via
2255 <menuchoice><guimenu>Option</guimenu><guimenuitem>Settings...</guimenuitem></menuchoice-->
2256 </para>
2257
2258
2259 <sect1 id="customize-general">
2260 <title>General</title>
2261
2262 <variablelist>
2263
2264 <varlistentry id="customize-username">
2265 <term><guilabel>User name for the change log editor:</guilabel></term>
2266 <listitem><para>
2267 Whenever you use the menu item
2268 <menuchoice><guimenu>File</guimenu><guimenuitem>Insert ChangeLog
2269 Entry...</guimenuitem></menuchoice>, a new ChangeLog entry is generated with
2270 the current date and your username. Normally, it is considered good style to
2271 insert your full name and your email address into each of your ChangeLog
2272 entries. &cervisia; automatically adds the full name and email address
2273 entered here.
2274 </para></listitem>
2275 </varlistentry>
2276
2277 <varlistentry id="customize-cvspath">
2278 <term><guilabel>Path to CVS executable, or 'cvs':</guilabel></term>
2279 <listitem><para>
2280 Here you can set the name (or path) to the <command>cvs</command> command
2281 line client. By default, the &CVS; executable found in your <envar>$PATH</envar> is
2282 used by &cervisia;.
2283 </para></listitem>
2284 </varlistentry>
2285
2286 </variablelist>
2287
2288 </sect1>
2289
2290 <sect1 id="customize-diff">
2291 <title>Diff Viewer</title>
2292
2293 <variablelist>
2294
2295 <varlistentry id="customize-context">
2296 <term><guilabel>Number of context lines in the diff dialog:</guilabel></term>
2297 <listitem><para>
2298 For the diff dialog, &cervisia; uses the option <option>-U</option> to
2299 <command>diff</command>. This lets <command>diff</command> show only a limited
2300 number of lines around each difference region (context lines). Here you can set
2301 the argument to <option>-U</option>.
2302 </para></listitem>
2303 </varlistentry>
2304
2305 <varlistentry id="customize-diffopt">
2306 <term><guilabel>Additional options for cvs diff:</guilabel></term>
2307 <listitem><para>
2308 Here you can add additional arguments to the <command>diff</command>. A
2309 popular example is <option>-b</option> which lets <command>diff</command>
2310 ignore changes in the amount of whitespace.
2311 </para></listitem>
2312 </varlistentry>
2313
2314 <varlistentry id="customize-tabwidth">
2315 <term><guilabel>Tab width in diff dialog:</guilabel></term>
2316 <listitem><para>
2317 In the diff dialog, tab characters present in your file or in the output
2318 of the <command>diff</command> command are expanded into a fixed number of
2319 space characters. By default, each tab is replaced by eight spaces, but here
2320 you can setup a different number.
2321 </para></listitem>
2322 </varlistentry>
2323
2324 <varlistentry id="customize-difffrontend">
2325 <term><guilabel>External diff frontend:</guilabel></term>
2326 <listitem><para>
2327 When you use any of the features which show the diff dialog, like
2328 <menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
2329 Repository...</guimenuitem></menuchoice>, &cervisia; invokes its internal diff
2330 frontend. If you prefer a different one, like
2331 &kompare;, <application>TkDiff</application>, or
2332 <application>xxdiff</application>, enter its file name and path here.
2333 </para></listitem>
2334 </varlistentry>
2335
2336 </variablelist>
2337
2338 </sect1>
2339
2340 <sect1 id="customize-status">
2341 <title>Status</title>
2342
2343 <variablelist>
2344
2345 <varlistentry id="customize-startstatus-remote">
2346 <term><guilabel>When opening a sandbox from a remote repository, start a
2347 File-&gt;Status command automatically</guilabel></term>
2348 <listitem><para>
2349 When you check this option, the
2350 <menuchoice><guimenu>File</guimenu><guimenuitem>Status</guimenuitem></menuchoice>
2351 command is started whenever you open a remote sandbox. This command may need some
2352 time and also needs a connection to the server for remote repositories (making
2353 it unusable for offline usage).
2354 </para></listitem>
2355 </varlistentry>
2356
2357 <varlistentry id="customize-startstatus-local">
2358 <term><guilabel>When opening a sandbox from a local repository, start a
2359 File-&gt;Status command automatically</guilabel></term>
2360 <listitem><para>
2361 When you check this option, the
2362 <menuchoice><guimenu>File</guimenu><guimenuitem>Status</guimenuitem></menuchoice>
2363 command is started whenever you open a local sandbox.
2364 </para></listitem>
2365 </varlistentry>
2366
2367 </variablelist>
2368
2369 </sect1>
2370
2371 <sect1 id="customize-advanced">
2372 <title>Advanced</title>
2373
2374 <variablelist>
2375
2376 <varlistentry id="customize-timeout">
2377 <term><guilabel>Timeout after which a progress dialog appears (in ms):</guilabel></term>
2378 <listitem><para>
2379 Practically all &CVS; commands started in a sandbox which belongs to a remote
2380 repository need a connection to the &CVS; server. This is affected by delays
2381 from the network connection or a high load on the server. For this reason, for
2382 commands like <menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
2383 Repository...</guimenuitem></menuchoice> &cervisia; opens a dialog which
2384 indicates that the command is still running and which allows you to abort
2385 it. Furthermore, this dialog is used to show you error messages from &CVS;. As
2386 this dialog may become annoying after some time, it is shown only after a
2387 certain timeout which is 4 seconds by default. Here you can change this value.
2388 </para></listitem>
2389 </varlistentry>
2390
2391 <varlistentry id="customize-compression">
2392 <term><guilabel>Default compression level:</guilabel></term>
2393 <listitem><para>
2394 The <command>cvs</command> client compresses files and patches when they are
2395 transferred over a network. With the command line option <option>-z</option>,
2396 the compression level can be set. You can setup &cervisia; to use this option
2397 by configuring the level here. The value set here is used only as a default;
2398 additionally there is a per-repository setting available in
2399 <menuchoice><guimenu>Repository</guimenu><guimenuitem>Repositories...</guimenuitem></menuchoice>.
2400 </para></listitem>
2401 </varlistentry>
2402
2403 <varlistentry id="customize-sshagent">
2404 <term><guilabel>Utilize a running or start a new ssh-agent process</guilabel></term>
2405 <listitem><para>
2406 Check this box if you use <link linkend="rsh">ext (&rsh;) repositories</link>,
2407 the &ssh; remote shell to communicate with the repository and
2408 <application>ssh-agent</application> to manage your keys.
2409 </para></listitem>
2410 </varlistentry>
2411
2412 </variablelist>
2413
2414 </sect1>
2415
2416
2417 <sect1 id="customize-look">
2418 <title>Appearance</title>
2419
2420 <variablelist>
2421
2422 <varlistentry id="customize-protocolfont">
2423 <term><guilabel>Font for Protocol Window...</guilabel></term>
2424 <listitem><para>
2425 Press this button to open the <guilabel>Select Font</guilabel> dialog, to set the
2426 font used in the protocol window (this is the window showing the
2427 output of the <command>cvs</command> client).
2428 </para></listitem>
2429 </varlistentry>
2430
2431 <varlistentry id="customize-annotatefont">
2432 <term><guilabel>Font for Annotate View...</guilabel></term>
2433 <listitem><para>
2434 Press this button to open the <guilabel>Select Font</guilabel> dialog, to set the
2435 font used in the <link linkend="annotate">annotate view</link>.
2436 </para></listitem>
2437 </varlistentry>
2438
2439 <varlistentry id="customize-difffont">
2440 <term><guilabel>Font for Diff View...</guilabel></term>
2441 <listitem><para>
2442 Press this button to open the <guilabel>Select Font</guilabel> dialog, to set the
2443 font used in <link linkend="diff">diff dialogs</link>.
2444 </para></listitem>
2445 </varlistentry>
2446
2447 <varlistentry id="customize-colors">
2448 <term><guilabel>Colors</guilabel></term>
2449 <listitem><para>
2450 Press the colored buttons to open the <guilabel>Select Color</guilabel> dialog,
2451 to set the color used for <guilabel>Conflict</guilabel>, <guilabel>Local
2452 change</guilabel>, or <guilabel>Remote change</guilabel>, in the main view or
2453 <guilabel>Diff change</guilabel>, <guilabel>Diff insertion</guilabel>, or
2454 <guilabel>Diff deletion</guilabel>, in &cervisia;'s built-in diff frontend.
2455 </para></listitem>
2456 </varlistentry>
2457
2458 <varlistentry id="customize-splitter">
2459 <term><guilabel>Split main window horizontally</guilabel></term>
2460 <listitem><para>
2461 &cervisia;'s main window is normally split vertically into a window with
2462 the file tree above and one with the &CVS; output below; alternatively, you can
2463 arrange them horizontally.
2464 </para></listitem>
2465 </varlistentry>
2466
2467 </variablelist>
2468
2469 </sect1>
2470 </chapter>
2471
2472
2473 <chapter id="appendix">
2474 <title>Appendix</title>
2475
2476 <sect1 id="ignoredfiles">
2477 <title>Ignored Files</title>
2478
2479 <para>
2480 In its main file tree, &cervisia; does not display all files which are
2481 actually there. This is analog to <command>cvs</command> itself and helps to
2482 avoid clutter caused by uninteresting stuff like object files. &cervisia;
2483 tries to mimic <command>cvs</command>'s behavior as close as possible,
2484 &ie; it gets ignore lists from the following sources:
2485 </para>
2486
2487 <itemizedlist>
2488
2489 <listitem><para>
2490 A static list of entries which includes things like <literal
2491 role="extension">*.o</literal> and <filename>core</filename>. For details,
2492 see the &CVS; documentation.
2493 </para></listitem>
2494 <listitem><para>
2495 The file <filename><envar>$HOME</envar>/.cvsignore</filename>.
2496 </para></listitem>
2497
2498 <listitem><para>
2499 The environment variable <envar>$CVSIGNORE</envar>.
2500 </para></listitem>
2501 <listitem><para>
2502 The <filename>.cvsignore</filename> file in the respective folder.
2503 </para></listitem>
2504
2505 </itemizedlist>
2506
2507 <para>
2508 <command>cvs</command> itself additionally looks up entries in
2509 <filename><envar>$CVSROOT</envar>/CVSROOT/cvsignore</filename>, but this is a
2510 file on the server, and &cervisia; should be able to start up offline. If you
2511 are working with a group that prefers to use an ignore list on the server,
2512 it's probably a good idea to take a look which patterns are listed there and
2513 to put them into the <filename>.cvsignore</filename> file in your home
2514 folder.
2515 </para>
2516
2517 </sect1>
2518
2519
2520 <sect1 id="information">
2521 <title>Further Information and Support</title>
2522
2523 <itemizedlist>
2524
2525 <listitem><para>
2526 &CVS; comes with a complete set of documentation in the form of info pages,
2527 known as "The Cederqvist". If it is properly installed, you can browse it by
2528 typing in <userinput>info:/cvs</userinput> into the locationbar of
2529 &konqueror;, or you can just choose
2530 <menuchoice><guimenu>Help</guimenu><guimenuitem>CVS
2531 Manual</guimenuitem></menuchoice> in &cervisia;. An on-line PDF version of the
2532 Cederqvist is available <ulink
2533 url="https://ftp.gnu.org/non-gnu/cvs/source/stable/1.11.21/cederqvist-1.11.21.pdf">on the web</ulink>.
2534 </para>
2535
2536 <para>
2537 As this book is maintained together with &CVS;, it is normally the most
2538 up-to-date reference; nevertheless, considering other documentation
2539 for learning to use &CVS; is recommended, in particular the following.
2540 </para></listitem>
2541
2542 <listitem><para>
2543 Karl Fogel has written the excellent book <ulink
2544 url="http://cvsbook.red-bean.com/index.html">Open Source Development with
2545 &CVS;</ulink>. About half of this book is about the development process of Open
2546 Source software. The other half is a technical documentation of
2547 &CVS;. Thankfully, the technical part of the book has been made freely
2548 redistributable under the GPL, so that you can download a &HTML; version of
2549 it. A list of errata is available on the web page mentioned above.
2550 </para></listitem>
2551
2552 <listitem><para>
2553 &CVS; issues are discussed on a dedicated <ulink
2554 url="http://mail.gnu.org/mailman/listinfo/info-cvs">mailing list</ulink>.
2555 </para></listitem>
2556
2557 <listitem><para>
2558 There is USENET group <literal>comp.software.config-mgmt</literal> dedicated
2559 to configuration management in general. &CVS; is only marginally a topic in
2560 this group, but nevertheless it may be interesting for discussing merits of
2561 various revision control systems compared to &CVS;.
2562 </para></listitem>
2563
2564 </itemizedlist>
2565
2566 </sect1>
2567
2568
2569 <sect1 id="commandreference">
2570 <title>Command Reference</title>
2571
2572 <!-- File Menu -->
2573 <sect2 id="menufile">
2574
2575 <title>The File Menu</title>
2576
2577 <variablelist>
2578
2579 <varlistentry>
2580 <term><menuchoice>
2581 <shortcut><keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo></shortcut>
2582 <guimenu>File</guimenu><guimenuitem>Open Sandbox...</guimenuitem>
2583 </menuchoice></term>
2584 <listitem><para>
2585 Opens a sandbox in the main window. See <xref linkend="mainscreen" />.
2586 </para></listitem>
2587 </varlistentry>
2588
2589 <varlistentry>
2590 <term><menuchoice>
2591 <guimenu>File</guimenu><guisubmenu>Recent Sandboxes</guisubmenu>
2592 </menuchoice></term>
2593 <listitem><para>
2594 Opens one of the sandboxes that were in use recently.
2595 </para></listitem>
2596 </varlistentry>
2597
2598 <varlistentry>
2599 <term><menuchoice>
2600 <guimenu>File</guimenu><guimenuitem>Insert ChangeLog Entry...</guimenuitem>
2601 </menuchoice></term>
2602 <listitem><para>
2603 Opens the ChangeLog editor, prepared such that you can add a new entry with
2604 the current date. See <xref linkend="committingfiles" />.
2605 </para></listitem>
2606 </varlistentry>
2607
2608 <varlistentry>
2609 <term><menuchoice>
2610 <shortcut><keycombo action="simul">&Ctrl;<keycap>U</keycap></keycombo></shortcut>
2611 <guimenu>File</guimenu><guimenuitem>Update</guimenuitem>
2612 </menuchoice></term>
2613 <listitem><para>
2614 Runs 'cvs update' on selected files and changes the status and revision
2615 numbers in the listing accordingly. See <xref linkend="mainscreen" />.
2616 </para></listitem>
2617 </varlistentry>
2618
2619 <varlistentry>
2620 <term><menuchoice>
2621 <shortcut><keycap>F5</keycap></shortcut>
2622 <guimenu>File</guimenu><guimenuitem>Status</guimenuitem>
2623 </menuchoice></term>
2624 <listitem><para>
2625 Runs 'cvs -n update' on selected files and changes the status and revision
2626 numbers in the listing accordingly. See <xref linkend="mainscreen" />.
2627 </para></listitem>
2628 </varlistentry>
2629
2630 <varlistentry>
2631 <term><menuchoice>
2632 <guimenu>File</guimenu><guimenuitem>Edit</guimenuitem>
2633 </menuchoice></term>
2634 <listitem><para>
2635 Opens the selected file in &kde;'s default editor for the selected file's type.
2636 </para></listitem>
2637 </varlistentry>
2638
2639 <varlistentry>
2640 <term><menuchoice>
2641 <guimenu>File</guimenu><guimenuitem>Resolve...</guimenuitem>
2642 </menuchoice></term>
2643 <listitem><para>
2644 Opens a dialog for the selected file which allows
2645 you to resolve merge conflicts in it. See <xref linkend="resolvingconflicts" />.
2646 </para></listitem>
2647 </varlistentry>
2648
2649 <varlistentry>
2650 <term><menuchoice>
2651 <shortcut><keycap>#</keycap></shortcut>
2652 <guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem>
2653 </menuchoice></term>
2654 <listitem><para>
2655 Allows you to commit the selected files. See <xref linkend="committingfiles" />.
2656 </para></listitem>
2657 </varlistentry>
2658
2659 <varlistentry>
2660 <term><menuchoice>
2661 <shortcut><keycap>Ins</keycap></shortcut>
2662 <guimenu>File</guimenu><guimenuitem>Add to Repository...</guimenuitem>
2663 </menuchoice></term>
2664 <listitem><para>
2665 Allows you to add the selected files to the repository. See <xref linkend="addingfiles" />.
2666 </para></listitem>
2667 </varlistentry>
2668
2669 <varlistentry>
2670 <term><menuchoice><guimenu>File</guimenu><guimenuitem>Add Binary...</guimenuitem>
2671 </menuchoice></term>
2672 <listitem><para>
2673 Allows you to add the selected files to the repository as binaries
2674 (<command>cvs add<option>-kb</option></command>). See <xref linkend="addingfiles" />.
2675 </para></listitem>
2676 </varlistentry>
2677
2678 <varlistentry>
2679 <term><menuchoice>
2680 <shortcut><keycap>Del</keycap></shortcut>
2681 <guimenu>File</guimenu><guimenuitem>Remove from Repository...</guimenuitem>
2682 </menuchoice></term>
2683 <listitem><para>
2684 Allows you to remove the selected files from the repository. See <xref linkend="removingfiles" />.
2685 </para></listitem>
2686 </varlistentry>
2687
2688 <!--TODO: add the revert action to the working with files chapter -->
2689
2690 <varlistentry>
2691 <term><menuchoice><guimenu>File</guimenu><guimenuitem>Revert</guimenuitem>
2692 </menuchoice></term>
2693 <listitem><para>
2694 Discards any local changes you have made to the selected files and reverts to
2695 the version in the repository (Option <option>-C</option> to <command>cvs
2696 update</command>).
2697 </para></listitem>
2698 </varlistentry>
2699 <!--FIXME Properties-->
2700 <varlistentry>
2701 <term><menuchoice>
2702 <shortcut><keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo></shortcut>
2703 <guimenu>File</guimenu><guimenuitem>Quit</guimenuitem>
2704 </menuchoice></term>
2705 <listitem><para>Quits &cervisia;.
2706 </para></listitem>
2707 </varlistentry>
2708
2709 </variablelist>
2710
2711 </sect2>
2712
2713 <!-- View Menu -->
2714 <sect2 id="menuview">
2715
2716 <title>The View Menu</title>
2717
2718 <variablelist>
2719
2720 <varlistentry>
2721 <term><menuchoice>
2722 <shortcut><keycap>Escape</keycap></shortcut>
2723 <guimenu>View</guimenu><guimenuitem>Stop</guimenuitem>
2724 </menuchoice></term>
2725 <listitem><para>
2726 Aborts any running subprocesses.
2727 </para></listitem>
2728 </varlistentry>
2729
2730 <varlistentry>
2731 <term><menuchoice>
2732 <shortcut><keycombo action="simul">&Ctrl;<keycap>L</keycap></keycombo></shortcut>
2733 <guimenu>View</guimenu><guimenuitem>Browse Log...</guimenuitem>
2734 </menuchoice></term>
2735 <listitem><para>
2736 Shows the log browser of the selected file versions. See <xref linkend="browsinglogs" />.
2737 </para></listitem>
2738 </varlistentry>
2739
2740 <varlistentry>
2741 <term><menuchoice>
2742 <shortcut><keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo></shortcut>
2743 <guimenu>View</guimenu><guimenuitem>Annotate...</guimenuitem>
2744 </menuchoice></term>
2745 <listitem><para>
2746 Shows an annotated view of the selected file, &ie; a view where you
2747 can for each line see which author modified it last. See <xref linkend="annotate" />.
2748 </para></listitem>
2749 </varlistentry>
2750
2751 <varlistentry>
2752 <term><menuchoice>
2753 <shortcut><keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo></shortcut>
2754 <guimenu>View</guimenu><guimenuitem>Difference to Repository (BASE)...</guimenuitem>
2755 </menuchoice></term>
2756 <listitem><para>
2757 Shows the differences between the selected file in the sandbox
2758 and the revision you last updated (BASE). See <xref linkend="diff" />.
2759 </para></listitem>
2760 </varlistentry>
2761
2762 <varlistentry>
2763 <term><menuchoice>
2764 <shortcut><keycombo action="simul">&Ctrl;<keycap>H</keycap></keycombo></shortcut>
2765 <guimenu>View</guimenu><guimenuitem>Difference to Repository (HEAD)...</guimenuitem>
2766 </menuchoice></term>
2767 <listitem><para>
2768 Shows the differences between the selected file in the sandbox
2769 and the revision you last updated (HEAD). See <xref linkend="diff" />.
2770 </para></listitem>
2771 </varlistentry>
2772
2773
2774 <varlistentry>
2775 <term><menuchoice>
2776 <guimenu>View</guimenu><guimenuitem>Last Change...</guimenuitem>
2777 </menuchoice></term>
2778 <listitem><para>
2779 Shows the differences between the revision of the selected
2780 file you last updated (BASE) and the revision before. See <xref linkend="diff" />.
2781 </para></listitem>
2782 </varlistentry>
2783
2784 <varlistentry>
2785 <term><menuchoice>
2786 <guimenu>View</guimenu><guimenuitem>History...</guimenuitem>
2787 </menuchoice></term>
2788 <listitem><para>
2789 Shows the &CVS; history as reported by the server. See <xref linkend="browsinghistory" />.
2790 </para></listitem>
2791 </varlistentry>
2792
2793 <!--TODO: add hide menus to mainscreen section-->
2794
2795 <varlistentry>
2796 <term><menuchoice>
2797 <guimenu>View</guimenu><guimenuitem>Hide All Files</guimenuitem>
2798 </menuchoice></term>
2799 <listitem><para>
2800 Determines whether only folders are shown in the main tree view. See <xref linkend="mainscreen" />.
2801 </para></listitem>
2802 </varlistentry>
2803
2804 <varlistentry>
2805 <term><menuchoice>
2806 <guimenu>View</guimenu><guimenuitem>Hide Unmodified Files</guimenuitem>
2807 </menuchoice></term>
2808 <listitem><para>
2809 Determines whether unknown and up to date files are hidden in the main tree view. See <xref linkend="mainscreen" />.
2810 </para></listitem>
2811 </varlistentry>
2812
2813 <varlistentry>
2814 <term><menuchoice>
2815 <guimenu>View</guimenu><guimenuitem>Hide Removed Files</guimenuitem>
2816 </menuchoice></term>
2817 <listitem><para>
2818 Determines whether removed files are hidden in the main tree view. See <xref linkend="mainscreen" />.
2819 </para></listitem>
2820 </varlistentry>
2821
2822 <varlistentry>
2823 <term><menuchoice>
2824 <guimenu>View</guimenu><guimenuitem>Hide Non-CVS Files</guimenuitem>
2825 </menuchoice></term>
2826 <listitem><para>
2827 Determines whether files not in &CVS; are hidden in the main tree view. See <xref linkend="mainscreen" />.
2828 </para></listitem>
2829 </varlistentry>
2830
2831 <varlistentry>
2832 <term><menuchoice>
2833 <guimenu>View</guimenu><guimenuitem>Hide Empty Folders</guimenuitem>
2834 </menuchoice></term>
2835 <listitem><para>
2836 Determines whether folders without visible entries are hidden in the main tree view. See <xref linkend="mainscreen" />.
2837 </para></listitem>
2838 </varlistentry>
2839
2840 <varlistentry>
2841 <term><menuchoice>
2842 <guimenu>View</guimenu><guimenuitem>Unfold File Tree</guimenuitem>
2843 </menuchoice></term>
2844 <listitem><para>
2845 Opens all branches in the file tree so that you can
2846 see all files and folders. See <xref linkend="mainscreen" />.
2847 </para></listitem>
2848 </varlistentry>
2849
2850 <varlistentry>
2851 <term><menuchoice>
2852 <guimenu>View</guimenu><guimenuitem>Fold File Tree</guimenuitem>
2853 </menuchoice></term>
2854 <listitem><para>
2855 Closes all branches in the file tree. See <xref linkend="mainscreen" />.
2856 </para></listitem>
2857 </varlistentry>
2858
2859 </variablelist>
2860
2861 </sect2>
2862
2863 <!-- Advanced Menu -->
2864 <sect2 id="menuadvanced">
2865
2866 <title>The Advanced Menu</title>
2867
2868 <variablelist>
2869
2870 <varlistentry>
2871 <term><menuchoice>
2872 <guimenu>Advanced</guimenu><guimenuitem>Tag/Branch...</guimenuitem>
2873 </menuchoice></term>
2874 <listitem><para>
2875 Tags or branches the selected files. See <xref linkend="taggingbranching" />.
2876 </para></listitem>
2877 </varlistentry>
2878
2879 <varlistentry>
2880 <term><menuchoice>
2881 <guimenu>Advanced</guimenu><guimenuitem>Delete Tag...</guimenuitem>
2882 </menuchoice></term>
2883 <listitem><para>
2884 Removes a given tag from the selected files. See <xref linkend="taggingbranching" />.
2885 </para></listitem>
2886 </varlistentry>
2887
2888 <varlistentry>
2889 <term><menuchoice>
2890 <guimenu>Advanced</guimenu><guimenuitem>Update to Tag/Date...</guimenuitem>
2891 </menuchoice></term>
2892 <listitem><para>
2893 Brings the selected files to a given tag or date,
2894 making it sticky. See <xref linkend="updatingto" />.
2895 </para></listitem>
2896 </varlistentry>
2897
2898 <varlistentry>
2899 <term><menuchoice>
2900 <guimenu>Advanced</guimenu><guimenuitem>Update to HEAD...</guimenuitem>
2901 </menuchoice></term>
2902 <listitem><para>
2903 Brings the selected files to the respective HEAD revision. See <xref linkend="updatingto" />.
2904 </para></listitem>
2905 </varlistentry>
2906
2907 <varlistentry>
2908 <term><menuchoice>
2909 <guimenu>Advanced</guimenu><guimenuitem>Merge...</guimenuitem>
2910 </menuchoice></term>
2911 <listitem><para>
2912 Merges either a given branch or the modifications
2913 between two tags into the selected files. See <xref linkend="taggingbranching" />.
2914 </para></listitem>
2915 </varlistentry>
2916
2917 <varlistentry>
2918 <term><menuchoice>
2919 <guimenu>Advanced</guimenu><guimenuitem>Add Watch...</guimenuitem>
2920 </menuchoice></term>
2921 <listitem><para>
2922 Adds a watch for a set of events on the selected files. See <xref linkend="watches" />.
2923 </para></listitem>
2924 </varlistentry>
2925 <varlistentry>
2926 <term><menuchoice>
2927 <guimenu>Advanced</guimenu><guimenuitem>Remove Watch...</guimenuitem>
2928 </menuchoice></term>
2929 <listitem><para>Removes a watch for a set of events from the selected files. See <xref linkend="watches" />.
2930 </para></listitem>
2931 </varlistentry>
2932
2933 <varlistentry>
2934 <term><menuchoice>
2935 <guimenu>Advanced</guimenu><guimenuitem>Show Watchers</guimenuitem>
2936 </menuchoice></term>
2937 <listitem><para>
2938 Lists the watchers of the selected files. See <xref linkend="watches" />.
2939 </para></listitem>
2940 </varlistentry>
2941
2942 <varlistentry>
2943 <term><menuchoice>
2944 <guimenu>Advanced</guimenu><guimenuitem>Edit Files</guimenuitem>
2945 </menuchoice></term>
2946 <listitem><para>
2947 Runs <command>cvs edit</command> on the selected files. See <xref linkend="watches" />.
2948 </para></listitem>
2949 </varlistentry>
2950
2951 <varlistentry>
2952 <term><menuchoice>
2953 <guimenu>Advanced</guimenu><guimenuitem>Unedit Files</guimenuitem>
2954 </menuchoice></term>
2955 <listitem><para>
2956 Runs <command>cvs unedit</command> on the selected files. See <xref linkend="watches" />.
2957 </para></listitem>
2958 </varlistentry>
2959
2960 <varlistentry>
2961 <term><menuchoice>
2962 <guimenu>Advanced</guimenu><guimenuitem>Show Editors</guimenuitem>
2963 </menuchoice></term>
2964 <listitem><para>
2965 Runs <command>cvs editors</command> on the selected files. See <xref linkend="watches" />.
2966 </para></listitem>
2967 </varlistentry>
2968
2969 <varlistentry>
2970 <term><menuchoice>
2971 <guimenu>Advanced</guimenu><guimenuitem>Lock Files</guimenuitem>
2972 </menuchoice></term>
2973 <listitem><para>
2974 Locks the selected files. See <xref linkend="locking" />.
2975 </para></listitem>
2976 </varlistentry>
2977
2978 <varlistentry>
2979 <term><menuchoice>
2980 <guimenu>Advanced</guimenu><guimenuitem>Unlock Files</guimenuitem>
2981 </menuchoice></term>
2982 <listitem><para>
2983 Unlocks the selected files. See <xref linkend="locking" />.
2984 </para></listitem>
2985 </varlistentry>
2986
2987 <varlistentry>
2988 <term><menuchoice>
2989 <guimenu>Advanced</guimenu><guimenuitem>Create Patch Against Repository...</guimenuitem>
2990 </menuchoice></term>
2991 <listitem><para>
2992 Creates a patch from the modifications in your sandbox. See <xref linkend="creatingpatches" />.
2993 </para></listitem>
2994 </varlistentry>
2995
2996 </variablelist>
2997
2998 </sect2>
2999
3000 <!-- Repository Menu -->
3001 <sect2 id="menurepository">
3002
3003 <title>The Repository Menu</title>
3004
3005 <variablelist>
3006
3007 <varlistentry>
3008 <term><menuchoice>
3009 <guimenu>Repository</guimenu><guimenuitem>Create...</guimenuitem>
3010 </menuchoice></term>
3011 <listitem><para>Opens a dialog which allows you to create a new local
3012 repository. See <xref linkend="accessing-repository" />.
3013 </para></listitem>
3014 </varlistentry>
3015
3016 <varlistentry>
3017 <term><menuchoice>
3018 <guimenu>Repository</guimenu><guimenuitem>Checkout...</guimenuitem>
3019 </menuchoice></term>
3020 <listitem><para>
3021 Opens a dialog which allows you to checkout
3022 a module from a repository. See <xref linkend="checkingout" />.
3023 </para></listitem>
3024 </varlistentry>
3025
3026 <varlistentry>
3027 <term><menuchoice>
3028 <guimenu>Repository</guimenu><guimenuitem>Import...</guimenuitem>
3029 </menuchoice></term>
3030 <listitem><para>
3031 Opens a dialog which allows you to import
3032 a package into the repository. See <xref linkend="importing" />.
3033 </para></listitem>
3034 </varlistentry>
3035
3036 <varlistentry>
3037 <term><menuchoice>
3038 <guimenu>Repository</guimenu><guimenuitem>Repositories...</guimenuitem>
3039 </menuchoice></term>
3040 <listitem><para>Configures a list of repositories you often use
3041 and how to access them. See <xref linkend="accessing-repository" />.
3042 </para></listitem>
3043 </varlistentry>
3044
3045 </variablelist>
3046
3047 </sect2>
3048
3049 <!-- Settings Menu -->
3050 <sect2 id="menuoptions">
3051 <title>The Settings and Help Menu</title>
3052
3053 <para>Apart from the common &kde; <guimenu>Settings</guimenu> and <guimenu>Help</guimenu>
3054 menus described in the <ulink url="help:/fundamentals/menus.html">Menu</ulink>
3055 chapter of the &kde; Fundamentals documentation &cervisia; has these application specific menu entries:
3056 </para>
3057
3058 <variablelist>
3059
3060 <varlistentry>
3061 <term><menuchoice>
3062 <guimenu>Settings</guimenu><guimenuitem>Create Folders on Update</guimenuitem>
3063 </menuchoice></term>
3064 <listitem><para>
3065 Determines whether updates create folders in the sandbox which were not
3066 there before (Option <option>-d</option> to <command>cvs update</command>).
3067 </para></listitem>
3068 </varlistentry>
3069
3070 <varlistentry>
3071 <term><menuchoice>
3072 <guimenu>Settings</guimenu><guimenuitem>Prune Empty Folders on Update</guimenuitem>
3073 </menuchoice></term>
3074 <listitem><para>
3075 Determines whether updates remove empty folders in the sandbox. (Option
3076 <option>-P</option> to <command>cvs update</command>).
3077 </para></listitem>
3078 </varlistentry>
3079
3080 <varlistentry>
3081 <term><menuchoice>
3082 <guimenu>Settings</guimenu><guimenuitem>Update Recursively</guimenuitem>
3083 </menuchoice></term>
3084 <listitem><para>
3085 Determines whether updates are recursive (Option <option>-r</option> to
3086 <command>cvs update</command>).
3087 </para></listitem>
3088 </varlistentry>
3089
3090 <varlistentry>
3091 <term><menuchoice>
3092 <guimenu>Settings</guimenu><guimenuitem>Commit &amp; Remove Recursively</guimenuitem>
3093 </menuchoice></term>
3094 <listitem><para>Determines whether commits and removes are recursive
3095 (Option <option>-r</option> to <command>cvs add</command>,
3096 <command>cvs remove</command> resp.).
3097 </para></listitem>
3098 </varlistentry>
3099
3100 <varlistentry>
3101 <term><menuchoice>
3102 <guimenu>Settings</guimenu><guimenuitem>Do cvs edit Automatically When Necessary</guimenuitem>
3103 </menuchoice></term>
3104 <listitem><para>
3105 Determines whether <command>cvs edit</command> is executed automatically
3106 whenever you edit a file.
3107 </para></listitem>
3108 </varlistentry>
3109
3110 <varlistentry>
3111 <term><menuchoice>
3112 <guimenu>Help</guimenu><guimenuitem>CVS Manual</guimenuitem>
3113 </menuchoice></term>
3114 <listitem><para>
3115 Opens the &CVS; info pages in the &khelpcenter;.
3116 </para></listitem>
3117 </varlistentry>
3118 </variablelist>
3119
3120 </sect2>
3121
3122 </sect1>
3123
3124 </chapter>
3125
3126
3127 <chapter id="credits-and-license">
3128 <title>Credits And License</title>
3129 <para>Program copyright</para>
3130 <itemizedlist>
3131 <listitem><para>1999-2002 &Bernd.Gehrmann; &Bernd.Gehrmann.mail;</para></listitem>
3132 <listitem><para>2002-2008 the &cervisia; authors</para></listitem>
3133 </itemizedlist>
3134
3135 <para>Documentation Copyright 1999-2002 &Bernd.Gehrmann; &Bernd.Gehrmann.mail; and 2004 Carlos Woelz
3136 [email protected]</para>
3137
3138 <!-- TRANS:CREDIT_FOR_TRANSLATORS -->
3139 &underFDL;
3140 &underGPL;
3141
3142 </chapter>
3143 </book>