<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >Using watches</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK REL="HOME" TITLE="Cervisia Manual" HREF="index.html"><LINK REL="UP" TITLE="Advanced usage" HREF="advancedusage.html"><LINK REL="PREVIOUS" TITLE="Advanced usage" HREF="advancedusage.html"><LINK REL="NEXT" TITLE="Customizing Cervisia" HREF="customization.html"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><META NAME="Generator" CONTENT="KDE DBMSS Customisation $Revision: 1.65 $"><LINK REL="stylesheet" HREF="common/kde-common.css" TYPE="text/css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META HTTP-EQUIV="Content-Language" CONTENT="en"><LINK REL="stylesheet" HREF="common/kde-localised.css" TYPE="text/css" TITLE="KDE-English"><LINK REL="stylesheet" HREF="common/kde-default.css" TYPE="text/css" TITLE="KDE-Default"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#AA0000" VLINK="#AA0055" ALINK="#AA0000" STYLE="font-family: sans-serif; position:absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;" ><TABLE CLASS="navheader" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD CLASS="bulb" ><IMG SRC="common/doctop1.png" ALT="" WIDTH="150" HEIGHT="85"></TD ><TD COLSPAN="2" HEIGHT="85" CLASS="headline" ><H1 ><SPAN CLASS="APPLICATION" >Cervisia</SPAN > Manual</H1 ></TD ></TR ><TR STYLE="background-color: #515151;" CLASS="navrow" ><TD ALIGN="left" CLASS="left" HEIGHT="25" ><A HREF="advancedusage.html" >Prev</A ></TD ><TD ALIGN="center" CLASS="center" HEIGHT="25" >Chapter 4. Advanced usage </TD ><TD ALIGN="right" CLASS="right" HEIGHT="25" ><A HREF="customization.html" >Next</A ></TD ></TR ><TR ><TD COLSPAN="3" CLASS="shadow" ><IMG WIDTH="100%" SRC="common/shadow.png" ALT="" HEIGHT="14"></TD ></TR ></TABLE ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="WATCHES" >4.2. Using watches</A ></H1 ><P > A watch is the conventional name for <SPAN CLASS="APPLICATION" >CVS</SPAN >'s feature to notify users of the repository whenever a file has been changed. The usage of watches requires that the file <TT CLASS="FILENAME" ><TT CLASS="ENVAR" >$CVSROOT</TT >/CVSROOT/notify</TT > 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. </P ><P > <SPAN CLASS="APPLICATION" >Cervisia</SPAN >'s main support of watches are three menu items. In order to add a watch to one or several files, use <SPAN CLASS="GUIMENU" >Advanved</SPAN >-><SPAN CLASS="GUIMENUITEM" >Add watch...</SPAN >. In the dialog you get, you can choose to get notified for any of the types of events that <SPAN CLASS="APPLICATION" >CVS</SPAN > supports. For example, if you only want to get notified when a file is commited, check the boxes <SPAN CLASS="GUIBUTTON" >Only</SPAN > and <SPAN CLASS="GUIBUTTON" >Commits</SPAN >. If you want to get notified about any event related to the marked files, check the box <SPAN CLASS="GUIBUTTON" >All</SPAN >. The command line used when you accept the dialog is </P ><P > <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="SCREEN" > <B CLASS="COMMAND" >cvs watch add -a commit <TT CLASS="REPLACEABLE" ><I >filenames</I ></TT ></B ></PRE ></TD ></TR ></TABLE > </P ><P > or with a similar option, depending on the events you chose to watch. </P ><P > If you not interested into some files anymore, you can remove your watches on them. To this end, use <SPAN CLASS="GUIMENU" >Advanved</SPAN >-><SPAN CLASS="GUIMENUITEM" >Remove watch...</SPAN >. 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, <SPAN CLASS="APPLICATION" >Cervisia</SPAN > issues the command </P ><P > <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="SCREEN" > <B CLASS="COMMAND" >cvs watch remove <TT CLASS="REPLACEABLE" ><I >filenames</I ></TT ></B ></PRE ></TD ></TR ></TABLE > </P ><P > possibly with an option <TT CLASS="OPTION" >-a</TT > for the chosen events. </P ><P > Finally, you can get a list of the people who are watching a couple of files. Choose <SPAN CLASS="GUIMENU" >Advanved</SPAN >-><SPAN CLASS="GUIMENUITEM" >Show watchers</SPAN >. Using this menu item will result in a command </P ><P > <TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="SCREEN" > <B CLASS="COMMAND" >cvs watchers <TT CLASS="REPLACEABLE" ><I >filenames</I ></TT ></B ></PRE ></TD ></TR ></TABLE > </P ><P > <SPAN CLASS="APPLICATION" >Cervisia</SPAN >'s editor interface helps you with projects that use watches. In such projeccts, files that are watched are checked out readonly. If you would just start an editor with such a readonly file, you cannot save your modifications later. This has of course a reason: Whenever you want to change a file, you should run <B CLASS="COMMAND" >cvs edit</B > before, so that all people watching the file get a notification that you are working on it. </P ><P > If you are working with watched files, it is advisable to check the option <SPAN CLASS="GUIMENU" >Settings</SPAN >-><SPAN CLASS="GUIMENUITEM" >Do cvs edit automatically when necessary</SPAN >. Now, whenever you edit a file by double-clicking it, <SPAN CLASS="APPLICATION" >Cervisia</SPAN > will run <B CLASS="COMMAND" >cvs edit</B > 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 commited files are readonly again. </P ></DIV ><DIV CLASS="NAVFOOTER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><COLGROUP ><COL WIDTH="*"><COL WIDTH="227"></COLGROUP ><TBODY ><TR ><TD CLASS="end" WIDTH="100%" ><IMG SRC="common/bottom1.png" ALT="" HEIGHT="59"></TD ><TD ><A HREF="http://www.kde.org/" ><IMG SRC="common/bottom2.png" ALT="KDE Logo" WIDTH="227" BORDER="0" HEIGHT="59"></A ></TD ></TR ><TR ><TD HEIGHT="50" COLSPAN="2" > </TD ></TR ></TBODY ></TABLE ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="advancedusage.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="customization.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Advanced usage</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="advancedusage.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Customizing <SPAN CLASS="APPLICATION" >Cervisia</SPAN ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >