<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
  <!ENTITY kappname "&cervisia;">
  <!ENTITY package "kdesdk">
  <!ENTITY ssh "<command>ssh</command>">
  <!ENTITY rsh "<command>rsh</command>">
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE"> <!-- Change language only here -->
  <!ENTITY CVS "<application>CVS</application>">
]>

<book lang="&language;">

<bookinfo>
<title>&cervisia; Manual</title>
<authorgroup>
<author>
<firstname>Bernd</firstname><surname>Gehrmann</surname>
<affiliation><address><email>bernd@mail.berlios.de</email></address></affiliation>
</author> 

<!-- TRANS:ROLES_OF_TRANSLATORS -->

</authorgroup>

<copyright>
<year>1999</year>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<holder>Bernd Gehrmann</holder>
</copyright>
<legalnotice>
 
<para>This program may be distributed under the terms of the Q Public
 License as defined by Trolltech AS of Norway and appearing in the
 file LICENSE.QPL included in the packaging of this file.</para>

<para> This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</para>
</legalnotice>

<legalnotice>&FDLNotice;</legalnotice>

<date>2002-06-30</date>
<releaseinfo>2.00.00</releaseinfo>

<abstract>
<para>&cervisia; provides a graphical view of &CVS;.</para>
</abstract>

<keywordset>
<keyword>KDE</keyword>
<keyword>kdesdk</keyword>
<keyword>Cervisia</keyword>
<keyword>CVS</keyword>
<keyword>version control</keyword>
<keyword>revision control</keyword>
</keywordset>

</bookinfo>
   
<chapter id="getting-started">
<title>Getting Started</title>

<sect1 id="accessing-repository">
<title>Accessing The Repository</title>
      
<para>
In this section we assume that you are using &CVS; only on the client
side. That means, someone (probably the administrator of the &CVS;
repository) gave you an account on the server machine, and it's your
job to checkout modules from the repository and work with them.
</para>

<para>
&CVS; supports several methods of accessing the repository, which can
be categorized as follows:
</para>

<variablelist>
<varlistentry>
<term>Local</term>
<listitem>
<para>
The repository is something like <filename
class="directory">/home/cvs</filename> and is simply stored in  a folder
which is accessible from your computer.  It may physically be on a disk which
is mounted via <acronym>NFS</acronym>, but this is an irrelevant detail.  If
you often use a certain local repository, you will want to tell &cervisia;
about it.
</para>

<procedure>
<title>Adding A Local Repository</title>
<step><para>Open the Repositories dialog by choosing
<menuchoice><guimenu>Repository</guimenu>
<guimenuitem>Repositories...</guimenuitem></menuchoice>.</para></step>

<step><para>Press the <guibutton>Add...</guibutton>
button.</para></step>

<step><para>Enter the details of the repository in the dialog box that
displays.</para></step>

<step><para>Confirm by pressing the <guibutton>OK</guibutton>
button.</para></step>

</procedure>

<para>In the future, whenever you use &cervisia; to check out a new
module, &cervisia; will present you the repositories you have added
here.</para>

</listitem>
</varlistentry>

<varlistentry>
<term>rsh</term>
<listitem>
<para>The repository name is something like
<literal>:ext:bernd@cvs.cervisia.sourceforge.net:/cvsroot/cervisia</literal>.</para>

<para>
This method requires that you have a user account on the server machine (in
this case, <systemitem class="systemname">cvs.sourceforge.net</systemitem> and
use a remote shell for communication.  By default, &CVS; uses &rsh; for this
purpose, however, &rsh; is long considered to be insecure, and is widely
replaced by &ssh;.
</para>

<para>
If you must use &ssh;, you must set the environment variable
$<envar>CVS_RSH</envar> to &ssh; when using the <command>cvs</command>
client. &cervisia; supports this easily.
</para>

<para>
Open the repositories dialog again, and press the
<guibutton>Add...</guibutton> button. Now enter the name of the repository in
the first line and the remote shell (&eg; &ssh;) in the second line. If you
now confirm with the <guibutton>OK</guibutton> button, &cervisia; memorizes
these settings.
</para>

<para>
Note that &cervisia; can not answer possible password requests from the
server machine. You must make sure that a remote login works without requiring
you to enter the password. With plain vanilla &rsh;, this can be achieved for
example by  creating a <filename>$<envar>HOME</envar>/.rhosts</filename> file
with a list of trusted hosts (see the &rsh; manpage).
</para>

<para> 
With &ssh;, it can be achieved by copying your public key
<filename>$<envar>HOME</envar>/.ssh/identity.pub</filename> to the server. In
this case, the key must not be encrypted with a passphrase (see the &ssh;>
manpage and the &CVS;/<acronym>SSH</acronym> <acronym>FAQ</acronym> on
SourceForge). If you are unsure about these issues, ask your system
administrator.
</para>

</listitem>
</varlistentry>

<varlistentry>
<term>pserver</term>
<listitem>

<para>
The repository name looks like
<filename>:pserver:gehrmab@cvs.kde.org:/home/kde</filename>
</para>

<para>
This method accesses the server via a special protocol with a relatively weak
authentication (<literal>pserver</literal> stands for password
authentication). Before you can use such a server, you have to login. As this
is not directly supported by &cervisia;, enter on the command line
</para>

<screen><prompt>%</prompt><userinput><command>cvs</command> <option>-d</option> <parameter>:pserver:joe@cvs.kde.org:/home/kde login</parameter></userinput></screen>

<para>
(of course, with your repository substituted). &CVS; will prompt you for your
password and check with the server. If the password is ok, the repository
name, together with the (slightly scrambled) password, will be appended to the
file <filename>$<envar>HOME</envar>/.cvspass</filename>.  Whenever &CVS;
accesses the repository, it will silently send the password to the server, so
you do not have to take care of that once you have logged in. As everybody who
knows your password can work with the repository in your name (and even do
major damage to it), you should keep the
<filename>$<envar>HOME</envar>/.cvspass</filename> secret and non-readable for
others.
</para>

</listitem>
</varlistentry>
</variablelist>

</sect1>


<sect1 id="importing">
<title>Importing a module into the repository</title>

<para>
In this section, we discuss how you put a new project into the &CVS;
repository. If you just want to work with an existing project which is already
in a repository, you may skip this section.
</para>

<figure id="screenshot-import" float="1">
<title>A screenshot of &cervisia;'s import dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="import.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s import dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
In <xref linkend="screenshot-import"/> you can see the dialog which helps you
to <emphasis>import</emphasis> a project as a module. After you have filled
out this form and confirmed by <guibutton>OK</guibutton>, the following &CVS;
command is used:
</para>

<screen><command>cvs</command> -d <co id="co-repository"></co><replaceable>repository</replaceable> import -m "" <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>

<calloutlist>

<callout arearefs="co-repository">
<para>The name of the &CVS; repository, also known as $<envar>CVSROOT</envar>.
You must have write access to it, and the repository must be properly
initialized. If the repository does not yet exist, initialize it with the
command <userinput><command>cvs</command> <option>-d</option>
<replaceable>repository</replaceable> <command>init</command></userinput>.
</para>

<para>
If the repository is remote, make sure that authentication works (see 
<xref linkend="accessing-repository"/>).
</para>
</callout>

<callout arearefs="co-module">
<para>
The name of the module under which the project will be stored. After the
import, the project can be checked out under this name.  See 
<xref linkend="checkingout"/> for more information.  This is also the name of
the corresponding folder in the repository.
</para>
</callout>

<callout arearefs="co-vendortag">
<para>
The vendor tag is historically used for tracking third-party sources. Just use
your user name if you have no better idea. It does not matter much what you
enter here.
</para>
</callout>

<callout arearefs="co-releasetag">
<para>
This tag is also historically used for importing different versions of
third-party software. If you are not doing this, use the word
<literal>start</literal> or a string <literal>FOO_1_0</literal> where
<literal>FOO</literal> is the name of your project and <literal>1.0</literal>
is the version number of the imported release.
</para>
</callout>

</calloutlist>

<formalpara>
<title>Working folder</title>
<para>
This is the toplevel folder of the project you want to import. The import
starts from this folder and goes down recursively.
</para>
</formalpara>

<formalpara>
<title>Ignore files</title>
<para>
If you fill out this field, an additional <option>-I <replaceable>filenames</replaceable></option>
option is given go the <command>cvs import</command> command. This entry is
interpreted as a whitespace-separated list of file name patterns which are
ignored. In general, a cleaner and less error-prone way to control which files
go into the repository is to create a folder with only the files which you
want to import and start from that. Nevertheless, this entry may be useful if
the project contains files which are by default ignored by &CVS;, e.g. files
with the name <filename>core</filename>. In such a case, simply enter the
character <literal>!</literal> in this field. This overrules &CVS;'s scheme of
ignored files, see <xref linkend="ignoredfiles"/>.
</para>
</formalpara>

<formalpara>
<title>Import as binaries</title>
<para>
If you check this box, all files are imported in binary mode, i.e. an argument
<option>-kb</option> is given to <command>cvs import</command>.
</para>
</formalpara>

</sect1>


<sect1 id="checkingout">
<title>Checkout a module from the repository</title>
<para>
Before you work on a project under revision control, you must check out a
<emphasis>working copy</emphasis>.
</para>

<figure id="screenshot-checkout" float="1">
<title>A screenshot of &cervisia;'s checkout dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="checkout.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s checkout dialog</phrase></textobject>
</mediaobject>
</figure>

<formalpara>
<title>Repository</title>
<para>
The name of the &CVS; repository, also known as
<filename><envar>$CVSROOT</envar></filename>.  If the repository is remote,
make sure that authentication works, see <xref
linkend="accessing-repository"/>.
</para>
</formalpara>

<formalpara>
<title>Module</title>
<para>
The name of the module to be checked out. If you are working with an existing
repository, you have probably got this name from the
administrator. Alternatively, if the repository has a
<filename><envar>$CVSROOT</envar>/modules</filename> file, you can retrieve a
list of available modules by clicking on the <guibutton>Fetch list</guibutton>
button.
</para>
</formalpara>

<formalpara>
<title>Working folder</title>
<para>
The folder under which the module should be checked out. Note that the
toplevel folder of the working copy is always created as a folder with
the name as the module under the folder given here.
</para>
</formalpara>

</sect1>


<sect1 id="mainscreen">
<title>The main screen</title>
<para>
When you start &cervisia;, and open a working copy by choosing
<menuchoice><guimenu>File</guimenu><guimenuitem>Open
Sandbox...</guimenuitem></menuchoice> you see a hierarchical view of the
current folder. According to the settings in your
<filename>.cvsignore</filename> files, the files you usually do not want to
include into the repository - like e.g. object files - are not shown. For each
file, you see its corresponding status. In the default setting, this is
"Unknown" because &cervisia; delays the fetching of information until you
choose <guimenuitem>Update</guimenuitem> or <guimenuitem>Status</guimenuitem>
from the <guimenu>File</guimenu> menu. With this approach, you have a minimal
amount of functionality available even if you do not have a permanent
connection to the &CVS; server.
</para>

<figure id="screenshot-mainview" float="1">
<title>A screenshot of &cervisia;'s main view</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="mainview.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s main view</phrase></textobject>
</mediaobject>
</figure>

<para>
The commands in the File menu usually act only on the files which you have
marked. You may also mark folders. Now choose
<guimenuitem>Update</guimenuitem> from the <guimenu>File</guimenu>
menu. &cervisia; issues a</para>

<para>
<screen><command>cvs update -n <replaceable>filenames</replaceable></command></screen>
</para>

<para>
command to get status information for the marked files. Note that &cervisia;
goes recursively into subfolders.  only if you have the according option
in the <guimenu>Settings</guimenu> menu set. According to the respective
file's status, you now see an entry in the <guilabel>Status</guilabel> column:
</para>

<itemizedlist>

<listitem><para>
Locally Modified - This means you have modified the file compared to the
version in the repository.
</para></listitem>

<listitem><para>
Locally Added - This means the file does not exist in the repository, but in
your working folder and you have scheduled it for addition. The actual
insertion into the repository only happens after a commit.
</para></listitem>

<listitem><para>
Locally Removed - This means you have scheduled the file for removal, but it
still exists in the repository. The actual removal happens only after a
commit.
</para></listitem>

<listitem><para>
Needs Update - This is shown if a newer version of the file exists in the
repository, e.g. because someone committed a modification. Normally, you want
to update this file so you have an up-to-date version in your folder.
</para></listitem>

<listitem><para>
Needs Patch - This is essentially the same as before. The difference is only
the hint that in case of an update, the &CVS; server transfers only a patch
instead of the whole file to you.
</para></listitem>

<listitem><para>
Needs Merge - Indicates that a merge of the revision of this file in your
working folder with the version in the repository is necessary. This
typically happens if you have made modifications to the file file while
someone else has committed his modifications. If you choose to update, the
modifications in the repository are merged into your file. In case of a
conflict (i.e. if someone else has changed some of the same lines like you)
the new status is then "Conflict".
</para></listitem>
       
<listitem><para>
Up to Date - Indicates that the file is identical with the version in the
repository.
</para></listitem>

<listitem><para>
Conflict - This is shown if this file still has conflict markers in it. Maybe
you have previously updated the file and not resolved the conflicts.
</para></listitem>

<listitem><para>
Not In CVS - Indicates that the file is not registered in the &CVS;
repository. If you want it to available for others, you should add it to the
repository. If not, you may consider adding it to your
<filename>.cvsignore</filename> file. 
</para></listitem>

</itemizedlist>
      
<para>
Now that you have got an overview of the current status of the CVS, you may
want to do an update. Mark some files (or the root of the folder tree which
is equivalent to marking all files in this folder). Now choose
<guimenuitem>Update</guimenuitem> from the <guimenu>File</guimenu> menu. (Of
course, you could have chosen this at the beginning of the session). For some
of the files the status may change now. Typically, files which had "Needs
Patch" or "Needs Update" are updated. So the following new items are possible
in the status column:
</para>
      
<itemizedlist>

<listitem><para>
Updated - Shown if the file was updated from the repository.
</para></listitem>

<listitem><para>
Patched - Indicates that the &CVS; server has sent a patch for this file and
the patch has been successfully applied. If the patch was not successful
because there was a conflict between your modifications and those someone else
committed to the repository, the status is now "Conflict".
</para></listitem>

</itemizedlist>
      
<para>
You may have noticed that according to the status of the file, its row has a
different color. The colors are chosen to somehow reflect the priority of the
status. For example, a file with a conflict is marked red to show you that you
have to resolve a conflict before you can continue working with the file. If
your folder contains a high number of files, you may nevertheless lose the
overview. To get more concise information about which files have an unusual
status, simply click on the header of the <guilabel>Status</guilabel>
column. The file list is then sorted by priority, so you have all important
information at the top of the list. To get back to the alphabetically sorted
view, click on the header of the <guilabel>File name</guilabel> column.
</para>

</sect1>
</chapter>

   
<chapter id="workingwithfiles">
<title>Working with files</title>

<para>
All commonly used &CVS; functionality is directly available in &cervisia;'s
main view. Commands usually act on several files at once, namely all which
currently selected. If the selection includes folders, its interpretation
depends on the settings made under the <guimenu>Settings</guimenu> menu. For
example, if <menuchoice><guimenu>Settings</guimenu><guimenuitem>Commit and
remove recursively</guimenuitem></menuchoice> is checked and you choose
<menuchoice><guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem></menuchoice>
while a folder is selected, then all files in the tree under that folder
are committed. Otherwise, only the regular files in the folder itself are
affected.
</para>

<para>
You can simply edit a file by double-clicking on it or pressing
<keycap>Return</keycap>. This starts the editor configured under
<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure
Cervisia...</guimenuitem></menuchoice> with the file name as argument.
</para>

<sect1 id="addingfiles">
<title>Adding files</title>

<para>
Adding files to a project requires two steps: First, the files must be
registered with &CVS;. To this end, mark all files to be added in &cervisia;'s
main view. Then, choose <menuchoice><guimenu>File</guimenu><guimenuitem>Add to
repository</guimenuitem></menuchoice>. &cervisia; issues a command</para>

<para>
<screen><command>cvs add <replaceable>filenames</replaceable></command></screen>
</para>

<para>
If the operation was successful, the status column should have "Added to
repository" for the added files.
</para>

<para>
In order to actually put the files into the repository, you must commit
them. This procedure has an important advantage: You can commit the files
together with modifications to other parts of the project. When doing this,
one can easily see (e.g. in commit emails) that all these changes are part of
a whole.
</para>

<para>
&CVS; is not designed to provide meaningful revision control for binary
files. For example, merging binary files normally does not make
sense. Furthermore, by default &CVS; performs keyword expansion (&eg; on the
string <literal>&dollar;Revision: 1.6 &dollar;</literal>) when a file is committed. In binary
files, such replacements may corrupt the file and make it completely
unusable. In order to switch this behavior off, you should commit binary files
(or other files, like Postscript) with a command line
</para>

<para>
<screen><command>cvs add -kb <replaceable>filenames</replaceable></command></screen>
</para>

<para>
In &cervisia;, this is achieved by choosing
<menuchoice><guimenu>File</guimenu><guimenuitem>Add binary...</guimenuitem></menuchoice> 
</para>

</sect1>


<sect1 id="removingfiles">
<title>Removing files</title>

<para>
Like adding files, removing files is done in two steps: First, the files have
to be registered as removed by choosing
<menuchoice><guimenu>File</guimenu><guimenuitem>Remove from
repository</guimenuitem></menuchoice> which issues the command
</para>
<para>
<screen><command>cvs remove -f <replaceable>filenames</replaceable></command></screen>
</para>

<para>
After that, this modification to the sandbox has to be committed, possibly
together with other modifications to the project.
</para>

<note><para>
The above command only works if the file is up-to-date. Otherwise, you get an
error message. This behavior is sensible: If you have modified the file
compared to the version in the repository, or if someone else has made any
modifications, you will first want to check if you really want to discard
them.
</para></note>

</sect1>
   
   
<sect1 id="addingremovingdirs">
<title>Adding and removing folders</title>

<para>
Folders are handled fundamentally different from ordinary files by
&CVS;. They are not under revision control, i.e. you cannot tell which
folders existed in the project at a certain time. Furthermore, folders
can never be explicitly removed (expect by removing them directly in the
repository).
</para>

<para>
As a substitute, &CVS; follows the convention that a folder is "not
existent" in a version of the project if is is empty. This convention can be
enforced by using the option <option>-P</option> to <command>cvs
update</command> and <command>cvs checkout</command>. This option can be set
in the menu <menuchoice><guimenu>Settings</guimenu><guimenuitem>Prune Empty
Folders On Update</guimenuitem></menuchoice>.
</para>

<para>
A folder can be added to the repository with the command
</para>

<para>
<screen><command>cvs add <replaceable>dirname</replaceable></command></screen>
</para>

<para>
which is implied by the menu item
<menuchoice><guimenu>File</guimenu><guimenuitem>Add to
repository</guimenuitem></menuchoice>. Note that in contrast to adding files,
adding folders does not require a commit afterwards.
</para>

</sect1>


<sect1 id="commitingfiles">
<title>Committing files</title>

<para>
When you have made a certain amount of changes to your working copy, and you
want other developers to have access to them, you 'commit' them. With a
commit, you place your versions of the modified files as new revisions into
the repository. A subsequent update by another developer will bring your
modifications into his working copy.
</para>

<para>
In order to commit a couple of files, select them in &cervisia;'s main view and
choose
<menuchoice><guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem></menuchoice>.
</para>

<figure id="screenshot-commit" float="1">
<title>A screenshot of &cervisia;'s commit dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="commit.png"/></imageobject>
</mediaobject>
</figure>

<para>
You get a dialog that shows you on the top a list of the selected files and on
the bottom a log message for your changes. When you have finished the dialog, the command
</para>

<para>
<screen><command>cvs commit -m <replaceable>message</replaceable> <replaceable>filenames</replaceable></command></screen>
</para>

<para>
is used. &cervisia; helps you in several ways to find a meaningful log
message: First, in the file list you can double-click a file or press
<keycap>Return</keycap> in order to see the changes you have made to the
file. Second, it gives you a list of log messages you have previously used in
a combo box. Third, this dialog is integrated with &cervisia;'s changelog
editor described below.
</para>

<note><para>
A common error you may encounter when committing is <errorname>Up-to-date check
failed</errorname>. This indicates that someone has committed changes to the
repository since you last updated. Or more technically, that your
<literal>BASE</literal> revision is not the newest on its branch. In such a
case, &CVS; refuses to merge your modifications into the repository. The
solution is to update, resolve any conflicts and commit again. Of course, if
you are working on a software project, it is normally good style to check if
the program still works after you have updated - after all, there could be bad
interactions between your modifications and the other modifications which
break the code.
</para></note>

<note>
<para>
Another popular mistake results in the error message <errorname>Sticky tag 'X'
for file 'X' is not a branch</errorname>. This happens if you try to commit a
file which you have previously brought to a certain revision or tag with the command
</para>
<para>
<screen><prompt>%</prompt><userinput>cvs update -r X</userinput></screen>
</para>
<para>
(which is &eg; used by the menu item
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
Tag/Date...</guimenuitem></menuchoice>). In such a case, the tag on the file
gets sticky, i.e. further updates do not bring you to the newest revision on
the branch. If you want to commit further revisions to the branch, you have to
update to the branch tag before you do further commits.
</para>
</note>

<para>
With &cervisia;, it is quite easy to maintain a ChangeLog file that is
compliant with the format laid out in the GNU coding guidelines. To use it,
choose <menuchoice><guimenu>File</guimenu><guimenuitem>Insert ChangeLog
entry...</guimenuitem></menuchoice>.  If a file with the name
<filename>ChangeLog</filename> exists in the toplevel folder of your
sandbox, this file will be loaded and you have the possibility to edit it. To
this end, at the top of the file, an entry with the current date and your user
name (which can be configured as described in <xref
linkend="customize-general"/>) is inserted. When you finish the dialog this
dialog by clicking <guibutton>OK</guibutton>, the next commit dialog you open
will have the log message set to the message you last entered in the change
log. 
</para>

</sect1>


<sect1 id="resolvingconflicts">
<title>Resolving conflicts</title>

<para>
Conflicts may occur whenever you have made changes to a file which was also
modified by another developer. The conflict is detected by &CVS; when you
update the modified file. &CVS; then tries to merge the modifications committed
by the other developer into your working copy. The merge fails if both your
and his modifications are in overlapping parts of the file, and the &CVS;
server issues and error message.
</para>

<para>
It is your job now to resolve these conflicts before you commit the
file. &CVS; will refuse to commit any files with conflicts until they have
been edited. Of course, you have a great amount of freedom when resolving a
set of conflicts: you can for each conflict decide to take one of the two
alternative versions. You can also decide that both approaches are are broken
and rewrite a whole routine or the complete file from scratch.
</para>

<para>
In &cervisia;'s main view, files with conflicts are indicated with "Conflict"
in the status column and with a red color. From the main view, you can of
course resolve conflicts the traditional way: just double-click the file in
question and edit it with your favorite editor. But you can also choose to
use the dialog available via
<menuchoice><guimenu>File</guimenu><guimenuitem>Resolve...</guimenuitem></menuchoice>.
</para>

<figure id="screenshot-resolve" float="1">
<title>A screenshot of &cervisia;'s resolve dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="resolve.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s resolve dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
On the top of the dialog, you see your version the file on the left hand side
and the version in the repository on the right hand side. The differences
between them are marked in red color. Below these two versions, you can see
the merged version which will be saved as soon as you click the
<guibutton>Save</guibutton> button.
</para>

<para>
You can switch between the differing sections by pressing
<guibutton>&lt;&lt;</guibutton> and <guibutton>&gt;&gt;</guibutton>. In the
lower middle of the dialog you can see which section is currently marked. For
example, <literal>2 of 8</literal> means that you are currently at the second
differing section of 8 total. Now can can decide section by section which of
the both versions you want to have in the merged file. By pressing
<guibutton>A</guibutton>, you take over the version you edited. By pressing
<guibutton>B</guibutton>, you take over the version from the repository.
</para>

</sect1>

</chapter>


<chapter id="obtaininginformation">
<title>Obtaining information about files</title>

<sect1 id="browsinglogs">
<title>Browsing cvs logs</title>

<para>
When you mark a file in the main view and choose <guimenuitem>Browse
log</guimenuitem> from the <guimenu>View</guimenu> menu, a
</para>

<para>
<screen><command>cvs log <replaceable>filenames</replaceable></command></screen>
</para>

<para>
command is issued and a dialog is shown which reflects the version history of
the marked file.
</para>

<figure float="1">
<title>A screenshot of &cervisia;'s browse logs dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="logtree.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s browse logs dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
You can choose to see the history as a tree or in list form. What you prefer
is of course a matter of taste and it depends on what information you are
interested in.  The tree is an intuitive representation of what has been done
on different branches by which authors. As tooltips, you can see the according
log messages. The list is by its nature linear and therefore does not give an
immediate view of branches. On the other hand, it concentrates more otherwise
relevant information on less screen estate, namely the time of each change of
the file and the first part of the log message.
</para>

<para>
To obtain more information about a certain revision, you can click on it
either in the list or the tree view. The fields in the middle of the dialog
are then filled with the complete information provided by <command>cvs
log</command>. You can mark two revisions, called 'A' and 'B', which are
relevant if you make use of further features provided by the push
buttons. Revision 'A' can be chosen with the left mouse button, revision 'B'
with the middle one. In the list view, you can also navigate with with your
cursor keys. In order to mark revisions 'A' and 'B', use the keybindings
<keycombo><keycap>Ctrl</keycap><keycap>A</keycap></keycombo>,
<keycombo><keycap>Ctrl</keycap><keycap>B</keycap></keycombo>, resp.
</para>

<para>
If you press the button <guibutton>Annotate</guibutton>, you get a dialog
showing the text of file belonging to the revision marked as 'A'.  Every line
is prefixed with the information about who edited this last time, and at which
revision this happened.
</para>

<para>
If you press the button <guibutton>Diff</guibutton>, a <command>cvs diff</command>
call is issued and you get a dialog in which all the modifications between the
two marked revisions are shown. To make it easy to see the changes, different
colors are used to mark lines which have been added, removed or simply changed.
</para>

</sect1>

   
<sect1 id="browsinghistory">
<title>Browsing the history</title>

<para>
If the used repository has logging enabled, &cervisia; can present you a
history of certain events like checkouts, commits, rtags, updates and
releases. Choose <guimenuitem>History</guimenuitem> from the
<guimenu>View</guimenu> menu, and &cervisia; will issue the command
</para>

<para>
<screen><command>cvs history -e -a</command></screen>
</para>

<note><para>
This fetches the complete logging file from the server, i.e. a list of
the events for all users and all modules. This can be a huge amount of data!
</para></note>

<para>
Now you can see the list of events, sorted by date. In the second column, the
type of the event is shown:
</para>

<itemizedlist>

<listitem><para>
Checkout - The user who is displayed in the 'Author' column
has checked out a module
</para></listitem>

<listitem><para>
Tag - A user has used the command <command>cvs rtag</command>. Note that the
usage of <command>cvs tag</command> (as done by &cervisia;'s
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Tag/Branch...</guimenuitem></menuchoice>
command) is not recorded in the history database. This has historical reasons
(see the &CVS; <acronym>FAQ</acronym>). 
</para></listitem>

<listitem><para>
Release - A user has released a module. Actually, this command is rarely used
and not of much value.
</para></listitem>

<listitem><para>
Update, Deleted - A user has made an update on a file which was deleted in the
repository. As a consequence, the file was deleted in his working copy.
</para></listitem>

<listitem><para>
Update, Copied - A user has made an update on a file. A new version was copied
into working folder.
</para></listitem>

<listitem><para>
Update, Merged - A user has made an update on a file. The modifications in the
repository version on the file were merged into his working copy.
</para></listitem>

<listitem><para>
Update, Conflict - A user has made an update on a file, and a conflict with
his own modifications was detected.
</para></listitem>

<listitem><para>
Commit, Modified - A user committed a modified file.
</para></listitem>

<listitem><para>
Commit, Added - A user added a file and committed it.
</para></listitem>

<listitem><para>
Commit, Removed - A user removed a file and committed it.
</para></listitem>

</itemizedlist>

<figure id="screenshot-history" float="1">
<title>A screenshot of &cervisia;'s history dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="history.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s history dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
You can sort the list by other criteria simply by clicking on the respective
column header. In order to sort out the history entries you are interested in,
there are various filter options activated by check boxes:
</para>

<itemizedlist>
<listitem><para>Show commit events - shows commits</para></listitem>
<listitem><para>Show checkout events - shows checkouts</para></listitem>
<listitem><para>Show tag events - shows taggings</para></listitem>
<listitem><para>Show other events - shows events not included in the above</para></listitem>
<listitem><para>Only user - shows only events caused by a certain user</para></listitem>
<listitem><para>Only filenames matching - filters file names by a regular expression</para></listitem>
<listitem><para>Only dirnames matching - filters folder names by a regular expression</para></listitem>
</itemizedlist>

<para>
Special characters recognized by the regular expression matcher are:
</para>

<itemizedlist>

<listitem><para>
<literal>x*</literal> matches any number of occurrences of the character 
<literal>x</literal>.
</para></listitem>

<listitem><para>
<literal>x+</literal> matches one or more of occurrences of the character 
<literal>x</literal>.
</para></listitem>

<listitem><para>
<literal>x?</literal> matches zero or one occurrences of the character 
<literal>x</literal>.
</para></listitem>

<listitem><para>
<literal>^</literal> matches the start of the string.
</para></listitem>

<listitem><para>
<literal>$</literal> matches the end of the string.
</para></listitem>

<listitem><para>
<literal>[a-cx-z]</literal> matches a set of characters,
&eg; here the set consisting of a,b,c,x,y,z.
</para></listitem>

</itemizedlist>

</sect1>


<sect1 id="diff">
<title>Watching differences between revisions</title>

<para>
There are several places in &cervisia; where you can ask for a window showing
the differences between revisions of a file:
</para>

<itemizedlist>

<listitem><para>
In the main view, you can choose
<menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
repository...</guimenuitem></menuchoice>. This is based on the command
<command>cvs diff</command> and shows you the differences between the version
in your sandbox and the version to which you last updated (also known as
<literal>BASE</literal>). This is in particular useful just before you commit
a file, so you can find an appropriate log message.
</para></listitem>

<listitem><para>
In the dialog that is shown when a you commit a set of files, you can request
a difference window by selecting a file name in the selection list, either by
double-clicking it or by pressing <keycap>Return</keycap>. This is quite
similar to using  <menuchoice><guimenu>View</guimenu><guimenuitem>Difference
to repository...</guimenuitem></menuchoice> with the respective file in the
main view. 
</para></listitem>

<listitem><para>
In the Browse logs dialog, you can mark two revisions of a file and request a
dialog showing the differences between them (see the section <xref linkend="browsinglogs"/>).
</para></listitem>

</itemizedlist>

<para>
As you may have expected, &cervisia; does not just dump the output of the
<command>diff</command> command into your terminal, but shows you a graphical
view as seen in <xref linkend="screenshot-log"/>.
</para>

<figure id="screenshot-log" float="1">
<title>A screenshot of &cervisia;'s diff dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="diff.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s diff dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
The text in the dialog is an improved variant of the text given by the diff
command with the <option>-u</option> option. You can see the differing
versions in two windows, with lines arranged such that you can do a
side-by-side comparison.  That means, where text has been added or deleted,
the respective window shows empty lines with the marker
<literal>+++++</literal> at the left hand side. Elsewhere, you can see the running number of each line in the left column.
</para>

<para>
In the second column in the right window, you can see which kind of change has
been made. Possible types are <literal>Add</literal>,
<literal>Delete</literal> and <literal>Change</literal>. The respective lines
are marked in blue, green and red color. In the middle of the dialog a
compressed image of the color markers is shown. In this way, you can get a
quick overview of the overall changes to the file. You can also use the
position of the colored regions in the compressed image as an orientation when
you using the scroll bars.
</para>

<para>
Normally, the scrollbars at the left and the right window are synchronized,
i.e. if you scroll on the left hand side, the right hand side is scrolled by
the same amount. You can change this by checking the box
<guibutton>Synchronize scroll bars</guibutton>.
</para>

<para>
For information about how to customize the diff dialog, see <xref linkend="customize-commands"/>.
</para>

</sect1>


<sect1 id="annotate">
<title>Watching an annotated view of a file</title>

<para>
With the command <command>cvs annotate</command>, &CVS; offers the possibility
to see - for each line in a file - who has modified a line the most recently.
This view may be helpful in order to find out who has introduced a change in
the behavior of a program or who should be asked about some change or bug in
the code.
</para>

<para>
&cervisia; gives you to access to this feature, but it further enriches the
information in an interactive way. You obtain an annotate view by choosing
<menuchoice><guimenu>View</guimenu><guimenuitem>Annotate...</guimenuitem></menuchoice>.
Another possibility is to press the button <guilabel>Annotate</guilabel> in
the Browse log dialog.
In <xref linkend="screenshot-annotate"/> you can see a screenshot of the
dialog.
</para>

<figure id="screenshot-annotate" float="1">
<title>A screenshot of &cervisia;'s annotate dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="annotate.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s update to tag dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
In the annotate dialog, you see in a window the latest version of the selected
file. In the columns before the text, you get some information related to the
latest change in each line. In the first column the revision number is
displayed. In the second column you see the name of the author of that
revision. Finally, in the third column you see the date of the latest change
in the line. 
</para>

<para>
Consequently, when a certain line appears strange to you or you assume a bug
there, you can immediately see who is responsible for that line. But not only
that, you can also find out <emphasis>why</emphasis> that line was
changed. To this end, move the mouse cursor over the respective revision
number. Then a tooltip appears that shows the log message and the date of the
change.
</para>

</sect1>

</chapter>


<chapter id="advancedusage">
<title>Advanced usage</title>

<sect1 id="taggingbranching">
<title>Tagging and branching</title>

<para>
We discuss here only the technical aspects of tagging and branching.  If you
are only a <emphasis>user</emphasis>, not the administrator of the repository,
you will probably not be confronted with the problem. If however you are your
own administrator, you should first read about the non-technical problems that
accompany branching, in order to get an impression of how time-consuming and
error-prone maintaining different branches of a project can be. The appendix
includes some references about this topic.
</para>

<para>
Simple tagging is something you usually do when a release is made, so that you
can at any time easily get back to the project state at that time. Tags are
usually given a name consisting of the project name and the version
number. For example, &cervisia; 1.0 is available under the tag
<literal>CERVISIA_1_0</literal>. &cervisia; enforces &CVS;'s strict rules
about what constitutes valid tag name. It must begin with a letter and may
contain letters, digits, hyphens and underscores.
</para>

<para> 
Normally, you will want to tag the whole project (although &CVS; of course
allows you to tag only a subset). To this end, mark the toplevel folder in
the view and choose
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Tag/Branch</guimenuitem></menuchoice>.
Now enter the name of the tag, press <keycap>Return</keycap> and you are done!
</para>

<para>
Creating a branch is not significantly more difficult: In the tag dialog,
check the box <guibutton>Create branch with this tag</guibutton>. You can also
delete an existing tag: Choose
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Delete
tag</guimenuitem></menuchoice> in the main view.
</para>

<para>
There are several ways to update to a certain state of the project:
</para>

<itemizedlist>

<listitem><para>
You can update to a certain tag. Use
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
tag/date</guimenuitem></menuchoice> for this. The same procedure is used for
updating to a branch. The command issued by &cervisia; is
</para>

<para>
<screen><command>cvs update -r <replaceable>tag</replaceable></command></screen>
</para></listitem>

<listitem><para>
You can update to a certain date. This may be useful if an error was
introduced in the project between two releases, you know approximately
between, and have an opinion on when that was. You can go to some date by
choosing <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
tag/date</guimenuitem></menuchoice> and checking the box <guibutton>Update to
date</guibutton>. In the field below, you can enter a wide variety of date
formats. One possible format is <literal>yyyy-mm-dd</literal> where
<literal>yyyy</literal> is the year, <literal>mm</literal> is the month
(numerically) and <literal>dd</literal> is the day. Alternatives are some
english phrases like <literal>yesterday</literal> or <literal>2 weeks
ago</literal>. When you use this option, &cervisia; uses the command
</para>

<para>
<screen><command>cvs update -D <replaceable>date</replaceable></command></screen>
</para></listitem>

<listitem><para>
Both options above make a tag or date 'sticky', i.e. you can not commit
further modifications on that files (unless the tag is a branch tag). In order
to get back to the trunk, also known as the branch with the name
<literal>HEAD</literal>, use the menu item
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Update to
HEAD</guimenuitem></menuchoice>. This results in a command
</para>
<para>
<screen><command>cvs update <option>-A</option></command></screen>
</para></listitem>

</itemizedlist>

<figure id="screenshot-updatetag" float="1">
<title>A screenshot of &cervisia;'s update to tag dialog</title>
<mediaobject>
<imageobject><imagedata format="PNG" fileref="updatetag.png"/></imageobject>
<textobject><phrase>A screenshot of &cervisia;'s update to tag dialog</phrase></textobject>
</mediaobject>
</figure>

<para>
Another aspect of branching is the merging of modifications from a branch to
the current branch. If you are going to do this, choose
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Merge...</guimenuitem></menuchoice>.
The dialog that appears now gives you two options:
</para>

<para>
Either you may merge all modifications done on a branch to the current
branch. In that case, check the box <guibutton>Merge from branch</guibutton>
and fill in the branch you want to merge from. &cervisia; will then execute
the command
</para>

<para>
<screen><command>cvs update <option>-j</option> <replaceable>branchtag</replaceable></command></screen>
</para>

<para>
The other possibility is that you want to merge only the modifications made
between two tags on a branch. This usually happens when you merge from the
same branch to the trunk several times. In that case, check the box
<guibutton>Merge modifications</guibutton> and enter (in the correct order)
the two relevant tags. This will result in a command
</para>

<para>
<screen><command>cvs update <option>-j</option> <replaceable>branchtag1</replaceable> <option>-j</option> <replaceable>branchtag2</replaceable></command></screen>
</para>

</sect1>


<sect1 id="watches">
<title>Using watches</title>

<para>
A watch is the conventional name for &CVS;'s feature to notify users of the
repository whenever a file has been changed or a developer has started editing
a file. The usage of watches requires that the file
<filename><envar>$CVSROOT</envar>/CVSROOT/notify</filename> has been set up
properly. This is not discussed here; if you need further information on the
setup from the administrator's point of view, read one of the books listed in
the appendix.
</para>

<para>
&cervisia;'s main support of watches are six menu items.
</para>

<para>
In order to add a watch to one or several files, use
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Add
watch...</guimenuitem></menuchoice>. In the dialog you get, you can choose to
get notified for any of the types of events that &CVS; supports. For example,
if you only want to get notified when a file is committed, check the boxes
<guibutton>Only</guibutton> and <guibutton>Commits</guibutton>. If you want to
get notified about any event related to the marked files, check the box
<guibutton>All</guibutton>. The command line used when you accept the dialog
is
</para>

<para>
<screen><command>cvs watch add -a commit <replaceable>filenames</replaceable></command></screen>
</para>

<para>
or with a similar option, depending on the events you chose to watch.
</para>

<para>
If you are not interested in some files anymore, you can remove your watches on
them. To this end, use
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Remove
watch...</guimenuitem></menuchoice>. In the dialog you get here, the same
options are offered as in the form you filled out when adding the watch. When
you confirm this dialog, &cervisia; issues the command
</para>

<para>
<screen><command>cvs watch remove <replaceable>filenames</replaceable></command></screen>
</para>

<para>
possibly with an option <option>-a</option> for the chosen events. 
</para>

<para>
Finally, you can get a list of the people who are watching a couple of
files. Choose <menuchoice><guimenu>Advanced</guimenu><guimenuitem>Show
watchers</guimenuitem></menuchoice>. Using this menu item will result in a
command
</para>

<para>
<screen><command>cvs watchers <replaceable>filenames</replaceable></command></screen>
</para>

<para>
In the normal usage scenario of &CVS;, each developer works separately in his
checked out sandbox. When he wants to modify some file, he can just open it in
his editor and start working on it. Nobody else will know about this work
until the file gets committed.
</para>

<para>
For some developer groups, this is not the preferred model of
cooperation. They want to get notified about someone working on a file
<emphasis>as soon as</emphasis> he starts with it. This can be achieved by some
further &CVS; commands. Before you start editing a file, select it in
&cervisia;'s main window and choose 
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit</guimenuitem></menuchoice>.
This will execute the command
</para>

<para>
<screen><command>cvs edit <replaceable>filenames</replaceable></command></screen>
</para>

<para>
This will send out a notification to everyone who has set an
<literal>edit</literal> watch on this file. It will also register you as an
<emphasis>editor</emphasis> of the file. You can obtain a list of all editors
of a certain file by using
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Show
editors</guimenuitem></menuchoice>. This is equivalent to typing on the
command line
</para>

<para>
<screen><command>cvs editors <replaceable>filenames</replaceable></command></screen>
</para>

<para>
An editing session is automatically ended when you commit the affected file.
At that moment, an <literal>unedit</literal> notification gets sent out to all
people who have registered a respective watch on the file. Of course,
sometimes you may not want to commit the file, but abort the editing session
and revert to the previous version of the file. This is done by using
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unedit</guimenuitem></menuchoice>.
Note that &cervisia; will not ask you for confirmation! That means, if you use
this menu item, all your work done since you used
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit</guimenuitem></menuchoice>
will get lost. Precisely, &cervisia; uses the command line
</para>

<para>
<screen><command>echo y | cvs unedit <replaceable>filenames</replaceable></command></screen>
</para>

<para>
So far, we have only the discussed the case where edits and unedits are used
voluntarily be the developers. In addition &CVS; supports a model which
<emphasis>enforces</emphasis> the usage of these commands. The responsible
command to switch to this model is <command>cvs watch on</command> which we
will not explain further because it is mostly used by the administrator of the
repository. However, the important point from the developer's point of view is
that when the project enforces edits, working copies are checked out
<emphasis>readonly</emphasis>. That means you cannot edit a file by default
(unless you use tricks like <command>chmod</command>). Only when you use 
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Edit</guimenuitem></menuchoice>,
the file becomes writable. It is made readonly again when you commit the file
or use
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unedit</guimenuitem></menuchoice>.
</para>

<para>
&cervisia;'s editor interface helps you with projects that enforce watches
also in a different way. If you just started an editor with a readonly file
by double-clicking on it or by using
<menuchoice><guimenu>File</guimenu><guimenuitem>Edit</guimenuitem></menuchoice>,
you would not be able to save your modifications later. This has of course a
reason: Whenever you want to change a file, you should run <command>cvs
edit</command> before, so that all people watching the file get a notification
that you are working on it.
</para>

<para>
In such a case, it is advisable to check the option
<menuchoice><guimenu>Settings</guimenu><guimenuitem>Do cvs edit automatically
when necessary</guimenuitem></menuchoice>. Now, whenever you edit a file by
double-clicking it, &cervisia; will run <command>cvs edit</command> before the
editor is actually executed. Then you can edit your file as usual. When you
have finished your work, commit your files, and the committed files are
readonly again.
</para>

</sect1>


<sect1 id="locking">
<title>Locking</title>

<para>
The development model usually followed when &CVS; is used is called
<emphasis>unreserved checkouts</emphasis>. Each developer has his own sandbox
where he can edit files as he likes. If when the watch features - like
<command>cvs edit</command> - are used, multiple developers can work on files
synchronously. Changes done by a different developer are merged into the local
sandbox when an update is performed.
</para>

<para>
Other revision control systems - like <acronym>RCS</acronym> and
<application>SourceSafe</application> use a different model. When a developer
wants to a edit a file, he has to <emphasis>lock</emphasis> it. Only one
developer at a time can a lock a file. When he has finished editing, the lock
is released. On the one hand, with this model, conflicts can never happen. On
the other hand, two developers can not work on the same file at the same time,
even when their changes do not affect each other. This can be a bottleneck.
We are not going to discuss the organizational benefits of both approaches.
Nevertheless we mention that although &CVS; has some support for locking, it is
not the preferred way of working with &CVS;. You should not use these features
unless you are sure that your project manager allows them.
</para>

<para>
With &cervisia;, you lock files as follows. Select the desired files in the
main view. Then choose
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Lock</guimenuitem></menuchoice>.
This runs the command
</para>

<para>
<screen><command>cvs admin -l <replaceable>filenames</replaceable></command></screen>
</para>

<para>The reverse effect is achieved by using
<menuchoice><guimenu>Advanced</guimenu><guimenuitem>Unlock</guimenuitem></menuchoice>.
This runs the command</para>

<para>
<screen><command>cvs admin -u <replaceable>filenames</replaceable></command></screen>
</para>

</sect1>

</chapter>


<chapter id="customization">
<title>Customizing &cervisia;</title>

<para>
&cervisia; can be customized in various ways to your needs and
preferences. Some options which you may want to change regularly are directly
available in the <guimenu>Settings</guimenu> menu. Others are united in a common
dialog which is available via
<menuchoice><guimenu>Option</guimenu><guimenuitem>Settings...</guimenuitem></menuchoice>.
</para>


<sect1 id="customize-general">
<title>General</title>

<formalpara id="customize-username">
<title>User name for the ChangeLog editor</title>
<para>
Whenever you use the menu item
<menuchoice><guimenu>File</guimenu><guimenuitem>Insert ChangeLog
entry...</guimenuitem></menuchoice>, a new ChangeLog entry is generated with
the current date and your username. Normally, it is considered good style to
insert your full name and your email address into each of your ChangeLog
entries. Here you can configure this.
</para>
</formalpara>

<formalpara id="customize-cvspath">
<title>Path to cvs</title>
<para>
Here you can set the name (or path) to the <command>cvs</command> command
line client. By default, the executable found in your <envar>$PATH</envar> is
used by &cervisia;.
</para>
</formalpara>

<formalpara id="customize-editor">
<title>Editor</title>
<para>
Here you can configure which editor is called when a file in the main view is
double-clicked. To execute the editor, the entry made here is concatenated
with the file name and given to a shell. So it is acceptable to use programs
like <command>gnuclient</command> here.  You can also enter the string
<envar>$EDITOR</envar> if your environment variable <envar>$EDITOR</envar>
points to an editor which opens an X11 window itself.
</para>
</formalpara>

</sect1>

<sect1 id="customize-commands">
<title>Various commands</title>

<formalpara id="customize-context">
<title>Number of context lines in the diff dialog</title>
<para>
For the diff dialog, &cervisia; uses the option <option>-U</option> to
<command>diff</command>. This lets <command>diff</command> show only a limited
number of lines around each difference region. Here you can set the argument
to <option>-U</option>.
</para>
</formalpara>

<formalpara id="customize-diffopt">
<title>Additional options for cvs diff</title>
<para>
Here you can add additional arguments to the <command>diff</command>. A
popular example is <option>-b</option> which lets <command>diff</command>
ignore changes in the amount of whitespace.
</para>
</formalpara>

<formalpara id="customize-tabwidth">
<title>Tab width in diff dialog</title>
<para>
In the diff dialog, tab characters present in your file or in the output
of the <command>diff</command> command are expanded into a fixed number of
space characters. By default, each tab is replaced by eight spaces, but here
you can setup a different number.
</para>
</formalpara>

<formalpara id="customize-difffrontend">
<title>External diff frontend</title>
<para>
When you use any of the features which show the diff dialog, like
<menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
Repository...</guimenuitem></menuchoice>, &cervisia; invokes its internal diff
frontend. If you prefer a different one, like
<application>Kompare</application>, <application>TkDiff</application>, or
<application>xxdiff</application>, you can configure this here.
</para>
</formalpara>

<formalpara id="customize-startstatus">
<title>Start
<menuchoice><guimenu>File</guimenu><guimenuitem>Status</guimenuitem></menuchoice>
automatically</title> 

<para>
When you check this option, the
<menuchoice><guimenu>File</guimenu><guimenuitem>Status</guimenuitem></menuchoice>
command is started whenever you open a sandbox. As this command may need some
time and also needs a connection to the server for remote repositories (making
it unusable for offline usage), you can set this option separately for local
and remote repositories.
</para>
</formalpara>

<formalpara id="customize-timeout">
<title>Timeout after which a progress dialog appears</title>
<para>
Practically all &CVS; commands started in a sandbox which belongs to a remote
repository need a connection to the &CVS; server. This is affected by delays
from the network connection or a high load on the server. For this reason, for
commands like <menuchoice><guimenu>View</guimenu><guimenuitem>Difference to
repository...</guimenuitem></menuchoice> &cervisia; opens a dialog which
indicates that the command is still running and which allows you to abort
it. Furthermore, this dialog is used to show you error messages from &CVS;. As
this dialog may become annoying after some time, it is shown only after a
certain timeout which is 4 seconds by default. Here you can change this value.
</para>
</formalpara>

<formalpara id="customize-compression">
<title>Default compression level</title>
<para>
The <command>cvs</command> client compresses files and patches when they are
transferred over a network. With the command line option <option>-z</option>,
the compression level can be set. You can setup &cervisia; to use this option
by configuring the level here. The value set here is used only as a default;
additionally there is a per-repository setting available in
<menuchoice><guimenu>Repository</guimenu><guimenuitem>Repositories...</guimenuitem></menuchoice>.
</para>
</formalpara>

</sect1>


<sect1 id="customize-look">
<title>Look'n'feel</title>

<formalpara id="customize-splitter">
<title>Split main window horizontally</title>
<para>
&cervisia;'s main window is normally splitted vertically into a window with
the file tree and one with the output. Alternatively, you can arrange them
horizontally.
</para>
</formalpara>

<formalpara id="customize-protocolfont">
<title>Font for protocol window</title>
<para>
This is the font used in the protocol window. This is the window showing the
output of the <command>cvs</command> client.
</para>
</formalpara>

<formalpara id="customize-annotatefont">
<title>Font for annotate view</title>
<para>
This is the font used in the annotate view.
</para>
</formalpara>

<formalpara id="customize-difffont">
<title>Font for diff view</title>
<para>
This is the font used in diff dialogs.
</para>
</formalpara>

</sect1>
</chapter>


<chapter id="appendix">
<title>Appendix</title>

<sect1 id="ignoredfiles">
<title>Ignored files</title>

<para>
In its main file tree, &cervisia; does not display all files which are
actually there. This is analog to <command>cvs</command> itself and helps to
avoid clutter caused by uninteresting stuff like object files. &cervisia;
tries to mimic <command>cvs</command>'s behavior as close as possible,
i.e. it gets ignore lists from the following sources:
</para>

<itemizedlist>

<listitem><para> 
A static list of entries which includes things like <literal
role="extension">*.o</literal> and <filename>core</filename>. For details,
see the &CVS; documentation.
</para></listitem>
<listitem><para> 
The file <filename><envar>$HOME</envar>/.cvsignore</filename>.
</para></listitem>

<listitem><para> 
The environment variable <envar>$CVSIGNORE</envar>.
</para></listitem>
<listitem><para> 
The <filename>.cvsignore</filename> file in the respective folder.
</para></listitem>

</itemizedlist>

<para>
<command>cvs</command> itself additionally looks up entries in
<filename><envar>$CVSROOT</envar>/CVSROOT/cvsignore</filename>, but this is a
file on the server, and &cervisia; should be able to start up offline. If you
are working with a group that prefers to use an ignore list on the server,
it's probably a good idea to take a look which patterns are listed there and
to put them into the <filename>.cvsignore</filename> file in your home
folder.
</para>

</sect1>
   

<sect1 id="information">
<title>Further information and support</title>

<itemizedlist>

<listitem><para>
&CVS; comes with a complete set of documentation in the form of info pages,
known as "The Cederqvist". If it is properly installed, you get browse it by
typing in <userinput>info:/cvs</userinput> into the locationbar of
<application>kdehelp</application>, <application>khelpcenter</application>
resp. Alternative, you can just choose
<menuchoice><guimenu>Help</guimenu><guimenuitem>CVS
Info</guimenuitem></menuchoice> in &cervisia;. An online HTML version of the
Cederqvist is available <ulink
url="http://cvshome.org/docs/manual/cvs.html">on the web</ulink>.
</para>

<para>
As this book is maintained together with &CVS;, it is normally the most
up-to-date reference. Nevertheless I recommend considering other documentation
for learning to use &CVS;, in partical the following.
</para></listitem>

<listitem><para>
Karl Fogel has written the excellent book  <ulink
url="http://cvsbook.red-bean.com/index.html">Open Source Development with
CVS</ulink>. About half of this book is about the development process of Open
Source software. The other half is a technical documentation of
&CVS;. Thankfully, the technical part of the book has been made freely
redistributable under the GPL, so that you can download a HTML version of
it. A list of errata is available on the webpage mentioned above.
</para></listitem>

<listitem><para>
&CVS; issues are discussed on a dedicated <ulink
url="http://mail.gnu.org/mailman/listinfo/info-cvs">mailing list</ulink>.
</para></listitem>

<listitem><para>
There is USENET group <literal>comp.software.config-mgmt</literal> dedicated
to configuration management in general. &CVS; is only marginally a topic in
this group,  but nevertheless it may be interesting for discussing merits of
various revision control systems compared to &CVS;.
</para></listitem>

<listitem><para>
Last but not least, there is a (low traffic) <ulink
url="http://lists.sourceforge.net/mailman/listinfo/cervisia-user">&cervisia;
mailing list</ulink>.
</para></listitem>

</itemizedlist>

</sect1>
   

<sect1 id="commandreference">
<title>Command Reference</title>
      
<!-- File Menu -->
<sect2 id="menufile">

<title>The File Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu><guimenuitem>Open Sandbox...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a sandbox in the main window.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu><guimenuitem>Recent sandboxes</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens one of the sandboxes that were in use recently.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu><guimenuitem>Insert ChangeLog entry...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens the ChangeLog editor, prepared such that you can add a new entry with
the current date.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycombo><keycap>&Ctrl;</keycap><keycap>U</keycap></keycombo></shortcut>
<guimenu>File</guimenu><guimenuitem>Update</guimenuitem>
</menuchoice></term>
<listitem><para>
Runs 'cvs update' on selected files and changes the status and revision
numbers in the listing accordingly.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>F5</keycap></shortcut>
<guimenu>File</guimenu><guimenuitem>Status</guimenuitem>
</menuchoice></term>
<listitem><para>
Runs 'cvs -n update' on selected files and changes the status and revision
numbers in the listing accordingly.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu><guimenuitem>Edit</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens the selected file in your editor.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu><guimenuitem>Resolve...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a dialog for the selected file which allows
you to resolve merge conflicts in it.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>#</keycap></shortcut>
<guimenu>File</guimenu><guimenuitem>Commit...</guimenuitem>
</menuchoice></term>
<listitem><para>
Allows you to commit the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>+</keycap></shortcut>
<guimenu>File</guimenu><guimenuitem>Add to Repository...</guimenuitem>
</menuchoice></term>
<listitem><para>
Allows you to add the selected files to the repository.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice><guimenu>File</guimenu><guimenuitem>Add binary...</guimenuitem>
</menuchoice></term>
<listitem><para>
Allows you to add the selected files to the repository as binaries
(<command>cvs add<option>-kb</option></command>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>-</keycap></shortcut>
<guimenu>File</guimenu><guimenuitem>Remove from Repository...</guimenuitem>
</menuchoice></term>
<listitem><para>
Allows you to remove the selected files from the repository.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice><guimenu>File</guimenu><guimenuitem>Revert</guimenuitem>
</menuchoice></term>
<listitem><para>
Discards any local changes you have made to the selected files and reverts to
the version in the repository (Option <option>-C</option> to <command>cvs
update</command>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycombo><keycap>&Ctrl;</keycap><keycap>Q</keycap></keycombo></shortcut>
<guimenu>File</guimenu><guimenuitem>Exit</guimenuitem>
</menuchoice></term>
<listitem><para>Quits &cervisia;.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

<!-- View Menu -->
<sect2 id="menuview">

<title>The View Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>Escape</keycap></shortcut>
<guimenu>View</guimenu><guimenuitem>Stop</guimenuitem>
</menuchoice></term>
<listitem><para>
Aborts any running subprocesses.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycombo><keycap>&Ctrl;</keycap><keycap>L</keycap></keycombo></shortcut>
<guimenu>View</guimenu><guimenuitem>Browse Log...</guimenuitem>
</menuchoice></term>
<listitem><para>
Shows the revision tree of the selected file.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycombo><keycap>&Ctrl;</keycap><keycap>A</keycap></keycombo></shortcut>
<guimenu>View</guimenu><guimenuitem>Annotate...</guimenuitem>
</menuchoice></term>
<listitem><para>
Shows an annotated view of the selected file, i.e. a view where you
can for each line see which author modified it last.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<shortcut><keycombo><keycap>&Ctrl;</keycap><keycap>D</keycap></keycombo></shortcut>
<guimenu>View</guimenu><guimenuitem>Difference to repository...</guimenuitem>
</menuchoice></term>
<listitem><para>
Shows the differences between the selected file in the sandbox
and the revision you last updated (BASE).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu><guimenuitem>Last Change...</guimenuitem>
</menuchoice></term>
<listitem><para>
Shows the differences between the revision of the selected
file you last updated (BASE) and the revision before.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu><guimenuitem>History...</guimenuitem>
</menuchoice></term>
<listitem><para>
Shows the &CVS; history as reported by the server.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu><guimenuitem>Unfold file tree</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens all branches in the file tree so that you can
see all files and folders.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu><guimenuitem>Fold file tree</guimenuitem>
</menuchoice></term>
<listitem><para>
Closes all branches in the file tree.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

<!-- Advanced Menu -->
<sect2 id="menuadvanced">

<title>The Advanced Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Tag/Branch...</guimenuitem>
</menuchoice></term>
<listitem><para>
Tags or branches the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Delete tag...</guimenuitem>
</menuchoice></term>
<listitem><para>
Removes a given tag from the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Update to Tag/Date...</guimenuitem>
</menuchoice></term>
<listitem><para>
Brings the selected files to a given tag or date,
making it sticky.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Update to HEAD...</guimenuitem>
</menuchoice></term>
<listitem><para>
Brings the selected files to the respective HEAD revision.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Merge...</guimenuitem>
</menuchoice></term>
<listitem><para>
Merges either a given branch or the modifications
between two tags into the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Add watch...</guimenuitem>
</menuchoice></term>
<listitem><para>
Adds a watch for a set of events on the selected files.
</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Remove watch...</guimenuitem>
</menuchoice></term>
<listitem><para>Removes a watch for a set of events from the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Show watchers</guimenuitem>
</menuchoice></term>
<listitem><para>
Lists the watchers of the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Edit</guimenuitem>
</menuchoice></term>
<listitem><para>
Runs <command>cvs edit</command> on the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Unedit</guimenuitem>
</menuchoice></term>
<listitem><para>
Runs <command>cvs unedit</command> on the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Show editors</guimenuitem>
</menuchoice></term>
<listitem><para>
Runs <command>cvs editors</command> on the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Lock</guimenuitem>
</menuchoice></term>
<listitem><para>
Locks the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Unlock</guimenuitem>
</menuchoice></term>
<listitem><para>
Unlocks the selected files.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Advanced</guimenu><guimenuitem>Create patch against repository...</guimenuitem>
</menuchoice></term>
<listitem><para>
Creates a patch from the modifications in your sandbox.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

<!-- Repository Menu -->
<sect2 id="menurepository">

<title>The Repository Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<guimenu>Repository</guimenu><guimenuitem>Checkout...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a dialog which allows you to checkout
a module from a repository.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Repository</guimenu><guimenuitem>Import...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a dialog which allows you to import
a package into the repository.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Repository</guimenu><guimenuitem>Repositories...</guimenuitem>
</menuchoice></term>
<listitem><para>Configures a list of repositories you often use
and how to access them.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

<!-- Settings Menu -->
<sect2 id="menuoptions">
<title>The Settings Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Configure Shortcuts...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a dialog for configuring keybindings.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Configure Cervisia...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens a dialog for customizing &cervisia;.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Create folders on update</guimenuitem>
</menuchoice></term>
<listitem><para>
Determines whether updates create folders in the sandbox which weren't
there before (Option <option>-d</option> to <command>cvs update</command>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Prune empty folders on update</guimenuitem>
</menuchoice></term>
<listitem><para>
Determines whether updates remove empty folders in the sandbox. (Option
<option>-P</option> to <command>cvs update</command>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Update recursively</guimenuitem>
</menuchoice></term>
<listitem><para>
Determines whether updates are recursive (Option <option>-r</option> to
<command>cvs update</command>).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Commit and remove recursively</guimenuitem>
</menuchoice></term>
<listitem><para>Determines whether commits and removes are recursive
(Option <option>-r</option> to <command>cvs add</command>,
<command>cvs remove</command> resp.).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Settings</guimenu><guimenuitem>Do cvs edit automatically when necessary</guimenuitem>
</menuchoice></term>
<listitem><para>
Determines whether <command>cvs edit</command> is executed automatically
whenever you edit a file.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

<!-- Help -->
<sect2 id="menuhelp">
<title>The Help Menu</title>

<variablelist>

<varlistentry>
<term><menuchoice>
<shortcut><keycap>F1</keycap></shortcut>
<guimenu>Help</guimenu><guimenuitem>Cervisia Handbook</guimenuitem>
</menuchoice></term>
<listitem><para>
Invokes the KDE Help system starting at the &cervisia; help pages. (this
document).
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Help</guimenu><guimenuitem>Report Bug...</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens the Bug report dialog.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Help</guimenu>
<guimenuitem>About &cervisia;</guimenuitem>
</menuchoice></term>
<listitem><para>
This will display version and author information.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Help</guimenu><guimenuitem>About KDE</guimenuitem>
</menuchoice></term>
<listitem><para>
This displays the KDE version and other basic information.
</para></listitem>
</varlistentry>

<varlistentry>
<term><menuchoice>
<guimenu>Help</guimenu><guimenuitem>CVS Manual</guimenuitem>
</menuchoice></term>
<listitem><para>
Opens the &CVS; info pages in the KDE help system.
</para></listitem>
</varlistentry>

</variablelist>

</sect2>

</sect1>

</chapter>


<chapter id="credits-and-licenses">
<title>Credits And Licenses</title>

&underFDL;

</chapter>
</book>
