\input texinfo  @c -*-texinfo-*-
@comment Documentation for CVS.
@setfilename cvs.info
@macro copyleftnotice
@noindent
Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
                       2001, 2002, 2003 Free Software Foundation, Inc.

@multitable @columnfractions .12 .88
@item Portions
@item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Derek R. Price,
@item @tab Copyright @copyright{} 2002, 2003 Ximbiot @url{http://ximbiot.com},
@item @tab Copyright @copyright{} 1992, 1993, 1999 Signum Support AB,
@item @tab and Copyright @copyright{} others.
@end multitable

@ignore
Permission is granted to process this file through Tex and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Free Software Foundation.
@end macro

@comment This file is part of the CVS distribution.

@comment CVS is free software; you can redistribute it and/or modify
@comment it under the terms of the GNU General Public License as published by
@comment the Free Software Foundation; either version 2, or (at your option)
@comment any later version.

@comment CVS is distributed in the hope that it will be useful,
@comment but WITHOUT ANY WARRANTY; without even the implied warranty of
@comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@comment GNU General Public License for more details.

@c See ../README for A4 vs. US letter size.
@c When we provided A4 postscript, and people tried to
@c print it on US letter, the usual complaint was that the
@c page numbers would get cut off.
@c If one prints US letter on A4, reportedly there is
@c some extra space at the top and/or bottom, and the side
@c margins are a bit narrow, but no text is lost.
@c
@c See
@c http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html
@c for more on paper sizes.  Insuring that margins are
@c big enough to print on either A4 or US letter does
@c indeed seem to be the usual approach (RFC2346).

@c This document seems to get overfull hboxes with some
@c frequency (probably because the tendency is to
@c sanity-check it with "make info" and run TeX less
@c often).  The big ugly boxes just seem to add insult
@c to injury, and I'm not aware of them helping to fix
@c the overfull hboxes at all.
@finalout

@c ???@include version.texi???
@settitle CVS---Concurrent Versions System v@c ???@value{VERSION}???
@setchapternewpage odd

@c -- TODO list:
@c -- Fix all lines that match "^@c -- "
@c -- Also places marked with FIXME should be manual
@c problems (as opposed to FIXCVS for CVS problems).

@c @splitrcskeyword{} is used to avoid keyword expansion.  It is replaced by
@c @asis when generating info and dvi, and by <i></i> in the generated html,
@c such that keywords are not expanded in the generated html. 
@ifnothtml
@macro splitrcskeyword {arg}
@asis{}\arg\
@end macro
@end ifnothtml

@ifhtml
@macro splitrcskeyword {arg}
@i{}\arg\
@end macro
@end ifhtml

@dircategory GNU Packages
@direntry
* CVS: (cvs).                   Concurrent Versions System
@end direntry
@dircategory Individual utilities
@direntry
* cvs: (cvs)CVS commands.       Concurrent Versions System
@end direntry

@comment The titlepage section does not appear in the Info file.
@titlepage
@sp 4
@comment The title is printed in a large font.
@center @titlefont{Version Management}
@sp
@center @titlefont{with}
@sp
@center @titlefont{CVS}
@sp 2
@center for @sc{cvs} @c ???@value{VERSION}???
@comment -release-
@sp 3
@center Per Cederqvist et al

@comment  The following two commands start the copyright page
@comment  for the printed manual.  This will not appear in the Info file.
@page
@vskip 0pt plus 1filll
@copyleftnotice
@end titlepage

@comment ================================================================
@comment                   The real text starts here
@comment ================================================================

@ifnottex
@c ---------------------------------------------------------------------
@node    Top
@top

@c <en> This info manual describes how to use and administer
Esta página manual ensina a como usar e administrar o
@c <en> @sc{cvs} version @value{VERSION}.
@sc{cvs} versão @c ???@value{VERSION}???.
@end ifnottex

@ifinfo
@copyleftnotice
@end ifinfo

@c This menu is pretty long.  Not sure how easily that
@c can be fixed (no brilliant ideas right away)...
@menu
@c <en>* Overview::                    An introduction to CVS
* Visão Geral::                 Uma introdução ao CVS
@c <en>* Repository::                  Where all your sources are stored
* Repositório::                 Onde todos os seus fontes são guardados
@c <en>* Starting a new project::      Starting a project with CVS
* Começando um novo projeto::   Começando um projeto com CVS
@c <en>* Revisions::                   Numeric and symbolic names for revisions
* Revisões::                    Nomes numéricos e simbólicos para revisões
@c <en>* Branching and merging::       Diverging/rejoining branches of development
* Ramificando e mesclando::     Divergindo/reunindo ramos de desenvolvimento
@c <en>* Recursive behavior::          CVS descends directories
* Comportamento recursivo::     CVS adentra nos diretórios
@c <en>* Adding and removing::         Adding/removing/renaming files/directories
* Adicionando e removendo::     Adicionando/apagando/renomeando arquivos/diretórios
@c <en>* History browsing::            Viewing the history of files in various ways
* Navegação no Histórico::      Vendo o histórico dos arquivos de várias formas

@c <en>CVS and the Real World.
CVS e o mundo Real.
-----------------------
@c <en>* Binary files::                CVS can handle binary files
* Arquivos binários::             CVS pode lidar com arquivos binários
@c <en>* Multiple developers::         How CVS helps a group of developers
* Múltiplos desenvolvedores::     Como CVS ajuda um grupo de desenvolvedores
@c <en>* Revision management::         Policy questions for revision management
* Gerenciamento de revisões::     Questões de política para gerenciamento de revisões
@c <en>* Keyword substitution::        CVS can include the revision inside the file
* Substituição de palavra-chave:: CVS inclui a revisão dentro do arquivo
@c <en>* Tracking sources::            Tracking third-party sources
* Acompanhando fontes::           Acompanhando fontes de terceiros
@c <en>* Builds::                      Issues related to CVS and builds
* Builds::                        Issues related to CVS and builds
@c <en>* Special Files::		Devices, links and other non-regular files
* Arquivos especiais::		  Dispositivos, ligações e outros arquivos diferentes

@c <en>References.
Referências.
-----------
@c <en>* CVS commands::                CVS commands share some things
* Comandos do CVS::            Comandos do CVS têm algo em comum
@c <en>* Invoking CVS::                Quick reference to CVS commands
* Chamando o CVS::             Referência rápida aos comandos do CVS
@c <en>* Administrative files::        Reference manual for the Administrative files
* Arquivos administrativos::   Manual de referência para os arquivos administrativos
@c <en>* Environment variables::       All environment variables which affect CVS
* Variáveis de ambiente::      Todas as variáveis de ambiente que afetam o CVS
@c <en>* Compatibility::               Upgrading CVS versions
* Compatibilidade::            Upgrading CVS versions
@c <en>* Troubleshooting::             Some tips when nothing works
* Resolução de problemas::     Algumas dicas quando nada funciona
@c <en>* Credits::                     Some of the contributors to this manual
* Créditos::                   Alguns dos contribuidores deste manual
@c <en>* BUGS::                        Dealing with bugs in CVS or this manual
* Paus::                       Lidando com paus no CVS ou neste manual
@c <en>* Index::                       Index
* Indice::                     Índice
@end menu

@c ---------------------------------------------------------------------
@c <en>@node Overview
@c <en>@chapter Overview
@c <en>@cindex Overview
@node Visão Geral
@chapter Visão Geral
@cindex Visão Geral

@c <en>This chapter is for people who have never used
@c <en>@sc{cvs}, and perhaps have never used version control
@c <en>software before.
Este capítulo é para aqueles que nunca usaram o
@sc{cvs} antes, e talvez nunca tenham usado um programa
de controle de versões antes.

@c <en>If you are already familiar with @sc{cvs} and are just
@c <en>trying to learn a particular feature or remember a
@c <en>certain command, you can probably skip everything here.
Se você já conhece o @sc{cvs} e está apenas tentando
aprender sobre uma habilidade em particular ou lembrar
um certo comando, você provavelmente pode pular tudo
aqui.

@menu
@c <en>* What is CVS?::                What you can do with @sc{cvs}
* O que é CVS?::                O que você pode fazer com @sc{cvs}
@c <en>* What is CVS not?::            Problems @sc{cvs} doesn't try to solve
* O que CVS não é?::            Problemas que o @sc{cvs} não tenta resolver
@c <en>* A sample session::            A tour of basic @sc{cvs} usage
* Uma sessão de exemplo::          Um tour pelo uso básico do @sc{cvs}
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node What is CVS?
@c <en>@section What is CVS?
@c <en>@cindex What is CVS?
@c <en>@cindex Introduction to CVS
@c <en>@cindex CVS, introduction to
@node O que é CVS?
@section O que é CVS?
@cindex O que é CVS?
@cindex Introdução ao CVS
@cindex CVS, introdução ao

@c <en>@sc{cvs} is a version control system.  Using it, you can
@c <en>record the history of your source files.
@sc{cvs} é um sistema de controle de versões.  Ao
usá-lo, você pode registrar a história dos seus códigos
fonte.

@c -- ///
@c -- ///Those who cannot remember the past are condemned to repeat it.
@c -- ///               -- George Santayana
@c -- //////

@c -- Insert history  quote here!
@c <en>For example, bugs sometimes creep in when
@c <en>software is modified, and you might not detect the bug
@c <en>until a long time after you make the modification.
@c <en>With @sc{cvs}, you can easily retrieve old versions to see
@c <en>exactly which change caused the bug.  This can
@c <en>sometimes be a big help.
Por exemplo, às vezes aparecem erros quando um programa
é modificado e você não detecta o problema até muito
tempo depois de você ter feito a modificação.  Com
@sc{cvs}, você pode recuperar versões antigas para ver
exatamente o que causou o erro.  Isto às vezes é de
grande ajuda.

@c <en>You could of course save every version of every file
@c <en>you have ever created.  This would
@c <en>however waste an enormous amount of disk space.  @sc{cvs}
@c <en>stores all the versions of a file in a single file in a
@c <en>clever way that only stores the differences between
@c <en>versions.
Você pode, é claro, salvar toda versão de todo arquivo
que um dia você criou.  Mas isto vai consumir um enorme
espaço no disco.  O @sc{cvs} guarda todas as versões de um
arquivo em um único arquivo em uma forma inteligente
que guarda apenas as diferenças entre versões.

@c <en>@sc{cvs} also helps you if you are part of a group of people working
@c <en>on the same project.  It is all too easy to overwrite
@c <en>each others' changes unless you are extremely careful.
@c <en>Some editors, like @sc{gnu} Emacs, try to make sure that
@c <en>the same file is never modified by two people at the
@c <en>same time.  Unfortunately, if someone is using another
@c <en>editor, that safeguard will not work.  @sc{cvs} solves this problem
@c <en>by insulating the different developers from each other.  Every
@c <en>developer works in his own directory, and @sc{cvs} merges
@c <en>the work when each developer is done.
@sc{cvs} também ajuda se você é parte de um grupo de
pessoas trabalhando no mesmo projeto.  É muito fácil uns
sobreescreverem as mudanças de outros se não forem
extremamente cuidadosos.  Alguns editores, como o
@sc{gnu} Emacs, tentam se certificar de que o mesmo
arquivo nunca seja modificado por duas pessoas ao mesmo
tempo.  Infelizmente, se alguém estiver usando outro
editor, está segurança não vai funcionar.  O @sc{cvs}
resolve este problema isolando os desenvolvedores uns
dos outros.  Todo desenvolvedor trabalha em seu próprio
diretório e o @sc{cvs} mescla o trabalho quando cada
desenvolvedor tiver terminado.

@c <en>@cindex History of CVS
@cindex História do CVS
@c <en>@cindex CVS, history of
@cindex CVS, história do
@c <en>@cindex Credits (CVS program)
@cindex Créditos (programa CVS)
@c <en>@cindex Contributors (CVS program)
@cindex Contribuidores (programa CVS)
@c <en>@sc{cvs} started out as a bunch of shell scripts written by
@c <en>Dick Grune, posted to the newsgroup
@c <en>@code{comp.sources.unix} in the volume 6
@c <en>release of July, 1986.  While no actual code from
@c <en>these shell scripts is present in the current version
@c <en>of @sc{cvs} much of the @sc{cvs} conflict resolution algorithms
@c <en>come from them.
@sc{cvs} começou como um monte de shell scripts
escritos por Dick Grune, postados no newsgroup
@code{comp.sources.unix} no volume 6, de Julho de
1986.  Na verdade, nenhum código daqueles scripts está
presente na versão atual do @sc{cvs}, mas muito dos
algoritmos de resolução de conflitos do @sc{cvs} vem
deles.

@c <en>In April, 1989, Brian Berliner designed and coded @sc{cvs}.
@c <en>Jeff Polk later helped Brian with the design of the @sc{cvs}
@c <en>module and vendor branch support.
Em abril de 1989, Brian Berliner projetou e codificou
@sc{cvs}.  Depois, Jeff Polk ajudou Brian com o projeto
do módulo @sc{cvs} e o suporte ao ramo do fornecedor.

@c <en>@cindex Source, getting CVS source
@cindex Fontes, adquirindo os fontes do CVS
@c <en>You can get @sc{cvs} in a variety of ways, including
@c <en>free download from the internet.  For more information
@c <en>on downloading @sc{cvs} and other @sc{cvs} topics, see:
Você pode conseguir o @sc{cvs} de várias formas,
inclusive baixando gratuitamente da internet.  Para
maiores informações sobre baixar o @sc{cvs} e para
outros tópicos sobre @sc{cvs}, veja:

@example
@url{http://cvs.nongnu.org/}
@end example

@c <en>@cindex Mailing list
@cindex Lista de Discussão
@c <en>@cindex List, mailing list
@cindex Lista, lista de discussão
@c <en>@cindex Newsgroups
@cindex Newsgroups
@c <en>There is a mailing list, known as @email{info-cvs@@nongnu.org},
@c <en>devoted to @sc{cvs}.  To subscribe or
@c <en>unsubscribe
@c <en>write to
@c <en>@email{info-cvs-request@@nongnu.org}.
@c <en>If you prefer a usenet group, there is a one-way mirror (posts to the email
@c <en>list are usually sent to the news group, but not visa versa) of
@c <en>@email{info-cvs@@nongnu.org} at @url{news:gnu.cvs.help}.  The right
@c <en>usenet group for posts is @url{news:comp.software.config-mgmt} which is for
@c <en>@sc{cvs} discussions (along with other configuration
@c <en>management systems).  In the future, it might be
@c <en>possible to create a
@c <en>@code{comp.software.config-mgmt.cvs}, but probably only
@c <en>if there is sufficient @sc{cvs} traffic on
@c <en>@url{news:comp.software.config-mgmt}.
Existe uma lista de discussão, conhecida como @email{info-cvs@@nongnu.org},
dedicada ao @sc{cvs}.  Para se cadastrar ou descadastrar nela
escreva para @email{info-cvs-request@@nongnu.org}.  Se você
preferir um grupo de usenet, existe um espelho de mão
única (postagens para a lista de email são usualmente
mandadas para o news group, mas não vice-versa) da lista
@email{info-cvs@@nongnu.org} em @url{news:gnu.cvs.help}.  O
grupo usenet correto para postagens é o
@url{news:comp.software.config-mgmt} que é para
discussões sobre @sc{cvs} (juntamente com outros
sistemas de gerência de configuração).  No futuro, poderá ser criada uma
@code{comp.software.config-mgmt.cvs}, mas apenas se
houver bastante tráfego sobre o @sc{cvs} na
@url{news:comp.software.config-mgmt}.
@c Other random data is that the tale was very
@c skeptical of comp.software.config-mgmt.cvs when the
@c subject came up around 1995 or so (for one
@c thing, because creating it would be a "reorg" which
@c would need to take a more comprehensive look at the
@c whole comp.software.config-mgmt.* hierarchy).

@c <en>You can also subscribe to the @email{bug-cvs@@nongnu.org} mailing list,
@c <en>described in more detail in @ref{BUGS}.  To subscribe
@c <en>send mail to @email{bug-cvs-request@@nongnu.org}.  There is a two-way
@c <en>usenet mirror (posts to the usenet group are usually sent to the email list and
@c <en>visa versa) of @email{bug-cvs@@nongnu.org} named @url{news:gnu.cvs.bug}.
Você também pode se cadastrar na lista de discussão
@email{bug-cvs@@nongnu.org}, descrita em maiores detalhes
em @ref{Paus}.  Para se cadastrar mande um e-mail para
@email{bug-cvs-request@@nongnu.org}.  Existe um espelho
usenet de mão-dupla (postagens para o grupo usenet são
usualmente mandadas para a lista e vice-versa) de
@email{bug-cvs@@nongnu.org} chamado
@url{news:gnu.cvs.bug}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node What is CVS not?
@node O que CVS não é?
@c <en>@section What is CVS not?
@section O que CVS não é?
@c <en>@cindex What is CVS not?
@cindex O que CVS não é?

@c <en>@sc{cvs} can do a lot of things for you, but it does
@c <en>not try to be everything for everyone.
@sc{cvs} pode fazer várias coisas para você, mas não
tenta fazer tudo para todo mundo.

@table @asis
@c <en>@item @sc{cvs} is not a build system.
@item @sc{cvs} não é um sistema de construção (build system).

@c <en>Though the structure of your repository and modules
@c <en>file interact with your build system
@c <en>(e.g. @file{Makefile}s), they are essentially
@c <en>independent.
Embora a estrutura do seu repositório e arquivos de
módulo interajam com seu sistema de construção
(e.g. @file{Makefile}s), eles são essencialmente
independentes.

@c <en>@sc{cvs} does not dictate how you build anything.  It
@c <en>merely stores files for retrieval in a tree structure
@c <en>you devise.
@sc{cvs} não dita como você constroi nada.  Ele apenas
guarda arquivos para recuperação numa estrutura de
árvore que você concebeu.

@c <en>@sc{cvs} does not dictate how to use disk space in the
@c <en>checked out working directories.  If you write your
@c <en>@file{Makefile}s or scripts in every directory so they
@c <en>have to know the relative positions of everything else,
@c <en>you wind up requiring the entire repository to be
@c <en>checked out.
@sc{cvs} não dita como usar o espaço em disco em
diretórios de trabalho locais.  Se você
escreve seus @file{Makefile}s ou scripts em cada
diretório, eles têm que saber a posição relativa de
todo o resto, logo você acaba tendo que pegar todo o
repositório.

@c <en>If you modularize your work, and construct a build
@c <en>system that will share files (via links, mounts,
@c <en>@code{VPATH} in @file{Makefile}s, etc.), you can
@c <en>arrange your disk usage however you like.
Se você modularizar o seu trabalho e fizer um sistema
de construção (build) que irá compartilhar arquivos
(via links, mounts, @code{VPATH} em @file{Makefile}s,
etc.), você pode organizar a sua utilização de disco de
qualquer forma.

@c <en>But you have to remember that @emph{any} such system is
@c <en>a lot of work to construct and maintain.  @sc{cvs} does
@c <en>not address the issues involved.
Mas você tem que lembrar que @emph{qualquer} sistema
desse é muito trabalhoso para construir e
manter.  O @sc{cvs} não se importa com tais questões.

@c <en>Of course, you should place the tools created to
@c <en>support such a build system (scripts, @file{Makefile}s,
@c <en>etc) under @sc{cvs}.
Obviamente, você pode botar as ferramentas criadas para
auxiliar tal sistema de construção (scripts,
@file{Makefile}s, etc) dentro do @sc{cvs}.

@c <en>Figuring out what files need to be rebuilt when
@c <en>something changes is, again, something to be handled
@c <en>outside the scope of @sc{cvs}.  One traditional
@c <en>approach is to use @code{make} for building, and use
@c <en>some automated tool for generating the dependencies which
@c <en>@code{make} uses.
Definir quais arquivos precisam ser reconstruídos
quando algo muda é, novamente, algo para ser visto fora
do escopo do @sc{cvs}.  Uma abordagem tradicional é
usar o @code{make} para construir, e usar alguma
ferramenta automatizada para gerar as dependências que
o @code{make} usa.

@c <en>Veja em @ref{Builds}, for more information on doing builds
@c <en>in conjunction with @sc{cvs}.
See @ref{Builds}, para mais informações sobre
construção com @sc{cvs}.

@c <en>@item @sc{cvs} is not a substitute for management.
@item @sc{cvs} não substitui gerenciamento.

@c <en>Your managers and project leaders are expected to talk
@c <en>to you frequently enough to make certain you are aware
@c <en>of schedules, merge points, branch names and release
@c <en>dates.  If they don't, @sc{cvs} can't help.
Espera-se que seus gerentes e líderes de projetos falem
com você com a frequência suficiente para que você
saiba de prazos, pontos de mescla, nomes de ramos e
datas de lançamento (release).  Se eles não o fizerem, o
@sc{cvs} não pode ajudar.

@c <en>@sc{cvs} is an instrument for making sources dance to
@c <en>your tune.  But you are the piper and the composer.  No
@c <en>instrument plays itself or writes its own music.
@sc{cvs} é um instrumento para fazer o fonte dançar
conforme a sua música.  Mas você é o maestro e o
compositor.  Nenhum instrumento toca sozinho ou escreve
sua própria música.

@c <en>@item @sc{cvs} is not a substitute for developer communication.
@item @sc{cvs} não é um substituto para comunicação entre desenvolvedores.

@c <en>When faced with conflicts within a single file, most
@c <en>developers manage to resolve them without too much
@c <en>effort.  But a more general definition of ``conflict''
@c <en>includes problems too difficult to solve without
@c <en>communication between developers.
Quando se deparam com conflitos num único arquivo, a
maioria dos desenvolvedores conseguem resolvê-los sem
muito esforço.  Mas uma definição mais geral de
``conflito'' inclui problemas tão difíceis de resolver
que é necessária a comunicação entre os desenvolvedores.

@c <en>@sc{cvs} cannot determine when simultaneous changes
@c <en>within a single file, or across a whole collection of
@c <en>files, will logically conflict with one another.  Its
@c <en>concept of a @dfn{conflict} is purely textual, arising
@c <en>when two changes to the same base file are near enough
@c <en>to spook the merge (i.e. @code{diff3}) command.
@sc{cvs} não pode determinar quando é que alterações
simultâneas em um arquivo, ou vários, vão conflitar
logicamente umas com as outras.  Seu conceito de
@dfn{conflito} é puramente textual, surgindo quando
duas alterações num mesmo arquivo base são próximas o
suficiente para intimidar o comando de mescla
(i.e. @code{diff3}).

@c <en>@sc{cvs} does not claim to help at all in figuring out
@c <en>non-textual or distributed conflicts in program logic.
@sc{cvs} não se propõe a dar qualquer ajuda quanto a
localizar conflitos não-textuais ou distribuídos na
lógica de programação.

@c <en>For example: Say you change the arguments to function
@c <en>@code{X} defined in file @file{A}.  At the same time,
@c <en>someone edits file @file{B}, adding new calls to
@c <en>function @code{X} using the old arguments.  You are
@c <en>outside the realm of @sc{cvs}'s competence.
Por exemplo: Digamos que você altere os argumentos da
função @code{X} definida no arquivo @file{A}.  Neste
instante, alguem altera o arquivo @file{B}, adicionando
novas chamadas à função @code{X} usando os argumentos
antigos.  Vocês estão fora do escopo da competência do
@sc{cvs}.

@c <en>Acquire the habit of reading specs and talking to your
@c <en>peers.
Adquira o hábito de ler documentação e conversar com
seus parceiros.


@c <en>@item @sc{cvs} does not have change control
@item @sc{cvs} não tem controle de mudanças

@c <en>Change control refers to a number of things.  First of
@c <en>all it can mean @dfn{bug-tracking}, that is being able
@c <en>to keep a database of reported bugs and the status of
@c <en>each one (is it fixed?  in what release?  has the bug
@c <en>submitter agreed that it is fixed?).  For interfacing
@c <en>@sc{cvs} to an external bug-tracking system, see the
@c <en>@file{rcsinfo} and @file{verifymsg} files
@c <en>(@pxref{Administrative files}).
Controle de mudanças se refere a várias coisas.  Em
primeiro lugar, pode significar @dfn{bug-tracking
(busca de erros)}, que é manter uma base de dados de
erros relatados e o status de cada um (foi consertado?
em qual lançamento? o submissor do erro concordou que o
erro foi corrigido?).  Para fazer a interface do
@sc{cvs} com um sistema de bug-tracking externo, veja
os arquivos @file{rcsinfo} e @file{verifymsg}
(@pxref{Arquivos administrativos}).

@c <en>Another aspect of change control is keeping track of
@c <en>the fact that changes to several files were in fact
@c <en>changed together as one logical change.  If you check
@c <en>in several files in a single @code{cvs commit}
@c <en>operation, @sc{cvs} then forgets that those files were
@c <en>checked in together, and the fact that they have the
@c <en>same log message is the only thing tying them
@c <en>together.  Keeping a @sc{gnu} style @file{ChangeLog}
@c <en>can help somewhat.
Outra característica de controle de mudanças é manter
um controle no fato de que mudanças em vários arquivos
foram, de fato, uma única mudança lógica.  Se você
devolve vários arquivos numa única operação com
@code{cvs commit} (efetivar), @sc{cvs} esquece que os arquivos
foram devolvidos juntos, e o fato de eles terem a mesma
mensagem de log é a única coisa que os une.  Manter um
@file{ChangeLog} no estilo @sc{gnu} pode de certa forma
ajudar.
@c FIXME: should have an xref to a section which talks
@c more about keeping ChangeLog's with CVS, but that
@c section hasn't been written yet.

@c <en>Another aspect of change control, in some systems, is
@c <en>the ability to keep track of the status of each
@c <en>change.  Some changes have been written by a developer,
@c <en>others have been reviewed by a second developer, and so
@c <en>on.  Generally, the way to do this with @sc{cvs} is to
@c <en>generate a diff (using @code{cvs diff} or @code{diff})
@c <en>and email it to someone who can then apply it using the
@c <en>@code{patch} utility.  This is very flexible, but
@c <en>depends on mechanisms outside @sc{cvs} to make sure
@c <en>nothing falls through the cracks.
Outro aspecto do controle de mudanças, em alguns
sistemas, é a habilidade de se obter informação sobre o
status de cada mudança.  Algumas mudanças foram escritas
por um certo desenvolvedor, outras foram revisadas por
um segundo desenvolvedor, e por aí vai.  Geralmente, a
forma de fazer isto com o @sc{cvs} é gerando um diff
(usando @code{cvs diff} ou @code{diff}) e mandando por
email para alguem que possa resolver as diferenças usando o
utilitário @code{patch}.  Isto é muito flexível, mas
depende de mecanismos externos ao @sc{cvs} para
garantir que nada dê problema.

@c <en>@item @sc{cvs} is not an automated testing program
@item @sc{cvs} não é um programa de testes automático

@c <en>It should be possible to enforce mandatory use of a
@c <en>testsuite using the @code{commitinfo} file.  I haven't
@c <en>heard a lot about projects trying to do that or whether
@c <en>there are subtle gotchas, however.
é possível reforçar o uso obrigatório de uma suíte de
testes usando o arquivo @code{commitinfo}.  Eu nunca
ouvi falar muito sobre projetos que tentam fazer isto,
ou se existem armadilhas sutís nestes casos.

@c <en>@item @sc{cvs} does not have a builtin process model
@item @sc{cvs} não tem um modelo de processo inerente

@c <en>Some systems provide ways to ensure that changes or
@c <en>releases go through various steps, with various
@c <en>approvals as needed.  Generally, one can accomplish
@c <en>this with @sc{cvs} but it might be a little more work.
@c <en>In some cases you'll want to use the @file{commitinfo},
@c <en>@file{loginfo}, @file{rcsinfo}, or @file{verifymsg}
@c <en>files, to require that certain steps be performed
@c <en>before cvs will allow a checkin.  Also consider whether
@c <en>features such as branches and tags can be used to
@c <en>perform tasks such as doing work in a development tree
@c <en>and then merging certain changes over to a stable tree
@c <en>only once they have been proven.
alguns sistemas fornecem formas de garantir que
mudanças ou lançamentos sigam vários passos, com várias
aprovações obrigatórias.  Geralmente, pode-se obter
isto com o @sc{cvs}, mas acarreta em um pouco mais de
trabalho.  Em alguns casos você vai querer usar o
arquivo @file{commitinfo}, @file{loginfo},
@file{rcsinfo}, ou @file{verifymsg} para exigir que
certos passos sejam executados antes que o cvs permita
uma devolução (checkin).  Também considere se
características tais como ramos e etiquetas (tags) podem ser usadas
para realizar tarefas como desenvolver numa árvore de
desenvolvimento e então mesclar certas mudanças numa
árvore estável apenas quando eles tenham sido confirmados.
@end table

@c ---------------------------------------------------------------------
@c <en>@node A sample session
@node Uma sessão de exemplo
@c <en>@section A sample session
@section Uma sessão de exemplo
@c <en>@cindex Example of a work-session
@cindex Exemplo de uma sessão de trabalho
@c <en>@cindex Getting started
@cindex Iniciando
@c <en>@cindex Work-session, example of
@cindex Sessão de trabalho, exemplo de uma
@c <en>@cindex tc, Trivial Compiler (example)
@cindex tc, Trivial Compiler (Compilador trivial) (exemplo)
@c <en>@cindex Trivial Compiler (example)
@cindex Trivial Compiler (Compilador trivial) (exemplo)

@c I think an example is a pretty good way to start.  But
@c somewhere in here, maybe after the sample session,
@c we need something which is kind of
@c a "roadmap" which is more directed at sketching out
@c the functionality of CVS and pointing people to
@c various other parts of the manual.  As it stands now
@c people who read in order get dumped right into all
@c manner of hair regarding remote repositories,
@c creating a repository, etc.
@c
@c The following was in the old Basic concepts node.  I don't
@c know how good a job it does at introducing modules,
@c or whether they need to be introduced so soon, but
@c something of this sort might go into some
@c introductory material somewhere.
@ignore
@cindex Modules (intro)
The repository contains directories and files, in an
arbitrary tree.  The @dfn{modules} feature can be used
to group together a set of directories or files into a
single entity (@pxref{modules}).  A typical usage is to
define one module per project.
@end ignore

@c <en>As a way of introducing @sc{cvs}, we'll go through a
@c <en>typical work-session using @sc{cvs}.  The first thing
@c <en>to understand is that @sc{cvs} stores all files in a
@c <en>centralized @dfn{repository} (@pxref{Repository}); this
@c <en>section assumes that a repository is set up.
Vamos apresentar o @sc{cvs} usando numa sessão de
trabalho típica.  A primeira coisa a saber é que
@sc{cvs} guarda todos os arquivos em um
@dfn{repository} centralizado (@pxref{Repositório});
esta sessão assume que um repositório esteja ativo.
@c I'm not sure that the sentence concerning the
@c repository quite tells the user what they need to
@c know at this point.  Might need to expand on "centralized"
@c slightly (maybe not here, maybe further down in the example?)

@c <en>Suppose you are working on a simple compiler.  The source
@c <en>consists of a handful of C files and a @file{Makefile}.
@c <en>The compiler is called @samp{tc} (Trivial Compiler),
@c <en>and the repository is set up so that there is a module
@c <en>called @samp{tc}.
Suponha que você esteja trabalhando num compilador
simples.  O fonte é um monte de arquivos C e um
@file{Makefile}.  O compilador é chamado @samp{tc}
(Trivial Compiler, ou Compilador trivial), e o repositório é feito de
forma que exista um módulo chamado @samp{tc}.

@menu
@c <en>* Getting the source::          Creating a workspace
* Obtendo os fontes::           Criando uma área de trabalho
@c <en>* Committing your changes::     Making your work available to others
* Efetivando suas alterações::  Disponibilizando seu trabalho para outros
@c <en>* Cleaning up::                 Cleaning up
* Limpando::                    Limpando
@c <en>* Viewing differences::         Viewing differences
* Vendo as diferenças::         Vendo as diferenças
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Getting the source
@node Obtendo os fontes
@c <en>@subsection Getting the source
@subsection Obtendo os fontes
@c <en>@cindex Getting the source
@cindex Obtendo os fontes
@c <en>@cindex Checking out source
@cindex Pegando emprestado os fontes
@c <en>@cindex Fetching source
@cindex Recuperando os fontes
@c <en>@cindex Source, getting from CVS
@cindex Fonte, pegando do CVS
@c <en>@cindex Checkout, example
@cindex Checkout, exemplo

@c <en>The first thing you must do is to get your own working copy of the
@c <en>source for @samp{tc}.  For this, you use the @code{checkout} command:
A primeira coisa a fazer é pegar sua própria cópia de
trabalho dos fontes de @samp{tc}.  Para isto, use o comando
@code{checkout} (pegar emprestado):

@example
$ cvs checkout tc
@end example

@noindent
@c <en>This will create a new directory called @file{tc} and populate it with
@c <en>the source files.
Isto vai criar um novo diretório chamado @file{tc} e
povoa-lo com os fontes.

@example
$ cd tc
$ ls
CVS         Makefile    backend.c   driver.c    frontend.c  parser.c
@end example

@c <en>The @file{CVS} directory is used internally by
@c <en>@sc{cvs}.  Normally, you should not modify or remove
@c <en>any of the files in it.
O diretório @file{CVS} é usado internamente pelo
@sc{cvs}.  Normalmente, você não deve modificar ou
remover quaisquer arquivos dele.

@c <en>You start your favorite editor, hack away at @file{backend.c}, and a couple
@c <en>of hours later you have added an optimization pass to the compiler.
@c <en>A note to @sc{rcs} and @sc{sccs} users: There is no need to lock the files that
@c <en>you want to edit.  @xref{Multiple developers}, for an explanation.
Você abre o seu editor favorito, trabalha no arquivo
@file{backend.c}, e algumas horas depois você deixou o
compilador mais otimizado.  Uma observação para usuários
de @sc{rcs} e @sc{sccs}: Não é necessário travar (lock)
os arquivos que você quer editar.  @xref{Múltiplos
desenvolvedores}, para uma explicação.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Committing your changes
@node Efetivando suas alterações
@c <en>@subsection Committing your changes
@subsection Efetivando suas alterações
@c <en>@cindex Committing changes to files
@cindex Efetivando mudanças nos arquivos
@c <en>@cindex Log message entry
@cindex Registro de mensagens de log

@c <en>When you have checked that the compiler is still compilable you decide
@c <en>to make a new version of @file{backend.c}.  This will
@c <en>store your new @file{backend.c} in the repository and
@c <en>make it available to anyone else who is using that same
@c <en>repository.
Quando você se certificar que o compilador ainda é
compilável você decide criar uma nova versão de
@file{backend.c}.  Tal ato vai botar o seu novo
@file{backend.c} no repositório e torná-lo disponível
para qualquer outra pessoa que esteja usando o mesmo
repositório.

@example
$ cvs commit backend.c
@end example

@noindent
@c <en>@sc{cvs} starts an editor, to allow you to enter a log
@c <en>message.  You type in ``Added an optimization pass.'',
@c <en>save the temporary file, and exit the editor.
@sc{cvs} inicia um editor, para que você possa digitar
uma messagem de log.  Você digita ``Uma otimização adicionada.'',
salva o arquivo temporário e sai do editor.

@c <en>@cindex CVSEDITOR, environment variable
@cindex CVSEDITOR, variável de ambiente
@c <en>@cindex EDITOR, environment variable
@cindex EDITOR, variável de ambiente
@c <en>The environment variable @code{$CVSEDITOR} determines
@c <en>which editor is started.  If @code{$CVSEDITOR} is not
@c <en>set, then if the environment variable @code{$EDITOR} is
@c <en>set, it will be used. If both @code{$CVSEDITOR} and
@c <en>@code{$EDITOR} are not set then there is a default
@c <en>which will vary with your operating system, for example
@c <en>@code{vi} for unix or @code{notepad} for Windows
@c <en>NT/95.
A variável de ambiente @code{$CVSEDITOR} determina qual
editor vai ser aberto.  Se @code{$CVSEDITOR} não existe,
e se a variável de ambiente @code{$EDITOR} existe, esta
última é usada.  Se nenhuma das duas @code{$CVSEDITOR} e
@code{$EDITOR} existem então o padrão vai variar
dependendo do sistema operacional, por exemplo,
@code{vi} para unix ou @code{notepad} para Windows
NT/95.

@c <en>@cindex VISUAL, environment variable
@cindex VISUAL, variável de ambiente
@c <en>In addition, @sc{cvs} checks the @code{$VISUAL} environment
@c <en>variable.  Opinions vary on whether this behavior is desirable and
@c <en>whether future releases of @sc{cvs} should check @code{$VISUAL} or
@c <en>ignore it.  You will be OK either way if you make sure that
@c <en>@code{$VISUAL} is either unset or set to the same thing as
@c <en>@code{$EDITOR}.
Adicionalmente, @sc{cvs} busca pela variável de
ambiente @code{$VISUAL}.  Isto gera duas opiniões
divergentes, se este é um comportamento desejável ou se
releases futuras do @sc{cvs} devem verificar
@code{$VISUAL} ou ignorá-la.  Você vai estar OK se não
tiver a variável @code{$VISUAL} ou se ela for igual à
@code{$EDITOR}.

@c This probably should go into some new node
@c containing detailed info on the editor, rather than
@c the intro.  In fact, perhaps some of the stuff with
@c CVSEDITOR and -m and so on should too.
@c <en>When @sc{cvs} starts the editor, it includes a list of
@c <en>files which are modified.  For the @sc{cvs} client,
@c <en>this list is based on comparing the modification time
@c <en>of the file against the modification time that the file
@c <en>had when it was last gotten or updated.  Therefore, if
@c <en>a file's modification time has changed but its contents
@c <en>have not, it will show up as modified.  The simplest
@c <en>way to handle this is simply not to worry about it---if
@c <en>you proceed with the commit @sc{cvs} will detect that
@c <en>the contents are not modified and treat it as an
@c <en>unmodified file.  The next @code{update} will clue
@c <en>@sc{cvs} in to the fact that the file is unmodified,
@c <en>and it will reset its stored timestamp so that the file
@c <en>will not show up in future editor sessions.
Quando o @sc{cvs} inicia o editor, ele inclui uma lista
de arquivos que foram modificados.  Para o @sc{cvs}
cliente, esta lista é baseada na comparação da data de
modificação do arquivo com a data de modificação que o
arquivo tinha da última vez que foi pego ou
atualizado.  Entretanto, se a data de modificação de um
arquivo mudou mas seu conteúdo não, ele vai ser
considerado modificado.  A maneira mais fácil de lidar
com isto é desconsidarando---se você seguir efetivando,
o @sc{cvs} vai notar que o conteúdo está intacto e vai
tratar o arquivo como não-modificado.  O próximo
@code{update} vai dar a dica para o @sc{cvs} de que o
arquivo está igual, e isto vai restaurar a data,
fazendo com que o arquivo não apareça nas próximas
aparições do editor.
@c FIXCVS: Might be nice if "commit" and other commands
@c would reset that timestamp too, but currently commit
@c doesn't.
@c FIXME: Need to talk more about the process of
@c prompting for the log message.  Like show an example
@c of what it pops up in the editor, for example.  Also
@c a discussion of how to get the "a)bort, c)ontinue,
@c e)dit" prompt and what to do with it.  Might also
@c work in the suggestion that if you want a diff, you
@c should make it before running commit (someone
@c suggested that the diff pop up in the editor.  I'm
@c not sure that is better than telling people to run
@c "cvs diff" first if that is what they want, but if
@c we want to tell people that, the manual possibly
@c should say it).

@c <en>If you want to avoid
@c <en>starting an editor you can specify the log message on
@c <en>the command line using the @samp{-m} flag instead, like
@c <en>this:
Se você quer evitar o aparecimento de um editor, você
pode especificar a mensagem de log na linha de comando
usando a opção @samp{-m}, desta forma:

@example
$ cvs commit -m "Uma otimização adicionada" backend.c
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Cleaning up
@node Limpando
@c <en>@subsection Cleaning up
@subsection Limpando
@c <en>@cindex Cleaning up
@cindex Limpando
@c <en>@cindex Working copy, removing
@cindex Cópia de trabalho, removendo
@c <en>@cindex Removing your working copy
@cindex Removendo sua cópia de trabalho
@c <en>@cindex Releasing your working copy
@cindex Lançando sua cópia de trabalho

@c <en>Before you turn to other tasks you decide to remove your working copy of
@c <en>tc.  One acceptable way to do that is of course
Antes de ir fazer outras tarefas, você decide remover
sua cópia de trabalho de tc.  Uma forma aceitável de
fazer isto é, obviamente:

@example
$ cd ..
$ rm -r tc
@end example

@noindent
mas uma forma melhor é usando o comando @code{release} (@pxref{release}):

@example
$ cd ..
$ cvs release -d tc
M driver.c
? tc
You have [1] altered files in this repository.
Are you sure you want to release (and delete) directory `tc': n
** `release' aborted by user choice.
@end example

@c <en>The @code{release} command checks that all your modifications have been
@c <en>committed.  If history logging is enabled it also makes a note in the
@c <en>history file.  @xref{history file}.
O comando @code{release} verifica se todas as suas
modificações foram efetivadas.  Se o registro
histórico (history log) está ativo ele também escreve uma
observação no arquivo de histórico.  @xref{arquivo
history (histórico)}.

@c <en>When you use the @samp{-d} flag with @code{release}, it
@c <en>also removes your working copy.
Quando você usa a opção @samp{-d} com o @code{release},
ele também remove a sua cópia de trabalho local.

@c <en>In the example above, the @code{release} command wrote a couple of lines
@c <en>of output.  @samp{? tc} means that the file @file{tc} is unknown to @sc{cvs}.
@c <en>That is nothing to worry about: @file{tc} is the executable compiler,
@c <en>and it should not be stored in the repository.  @xref{cvsignore},
@c <en>for information about how to make that warning go away.
@c <en>@xref{release output}, for a complete explanation of
@c <en>all possible output from @code{release}.
No exemplo acima, o comando @code{release} escreve
poucas linhas de saída.  @samp{? tc} significa que o
arquivo @file{tc} é desconhecido pelo @sc{cvs}.  Não há
nada com que se preocupar: @file{tc} é um compilador
executável, e não deve ser guardado no
repositório.  @xref{cvsignore}, para ver como fazer para
sumir com este aviso.  @xref{release output}, para uma
explicação geral de todas as possíveis saídas do
@code{release}.

@c <en>@samp{M driver.c} is more serious.  It means that the
@c <en>file @file{driver.c} has been modified since it was
@c <en>checked out.
@samp{M driver.c} é mais sério.  Significa que o arquivo
@file{driver.c} foi modificado desde quando foi pego.

@c <en>The @code{release} command always finishes by telling
@c <en>you how many modified files you have in your working
@c <en>copy of the sources, and then asks you for confirmation
@c <en>before deleting any files or making any note in the
@c <en>history file.
O comando @code{release} sempre termina dizendo quantos
arquivos modificados você tem em sua cópia de trabalho
dos fontes, e então pergunta por confirmação antes de
apagar qualquer arquivo ou escrever qualquer coisa no
arquivo de histórico.

@c <en>You decide to play it safe and answer @kbd{n @key{RET}}
@c <en>when @code{release} asks for confirmation.
Você decide que executar isto é seguro e responde @kbd{n @key{RET}}
quando @code{release} pede uma confirmação.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Viewing differences
@node Vendo as diferenças
@c <en>@subsection Viewing differences
@subsection Vendo diferenças
@c <en>@cindex Viewing differences
@cindex Vendo diferenças
@c <en>@cindex Diff
@cindex Diff

@c <en>You do not remember modifying @file{driver.c}, so you want to see what
@c <en>has happened to that file.
Você não lembra se modificou @file{driver.c}.  Logo,
você precisa ver o que aconteceu com este arquivo.

@example
$ cd tc
$ cvs diff driver.c
@end example

@c <en>This command runs @code{diff} to compare the version of @file{driver.c}
@c <en>that you checked out with your working copy.  When you see the output
@c <en>you remember that you added a command line option that enabled the
@c <en>optimization pass.  You check it in, and release the module.
Este comando roda o @code{diff} para comparar a versão
de @file{driver.c} que você pegou com a da sua cópia de
trabalho.  Quando você vê a saída, você lembra de ter
adicionado uma opção de linha de comando que permite a
otimização.  Você devolve e lança (release) o módulo.
@c FIXME: we haven't yet defined the term "check in".

@example
@c <en>$ cvs commit -m "Added an optimization pass" driver.c
$ cvs commit -m "Uma otimização adicionada" driver.c
Checking in driver.c;
/usr/local/cvsroot/tc/driver.c,v  <--  driver.c
new revision: 1.2; previous revision: 1.1
done
$ cd ..
$ cvs release -d tc
? tc
You have [0] altered files in this repository.
Are you sure you want to release (and delete) directory `tc': y
@end example

@c ---------------------------------------------------------------------
@c <en>@node Repository
@node Repositório
@c <en>@chapter The Repository
@chapter O Repositório
@c <en>@cindex Repository (intro)
@cindex Repositório (intro)
@c <en>@cindex Repository, example
@cindex Repositório, exemplo
@c <en>@cindex Layout of repository
@cindex Estrutura do repositório
@c <en>@cindex Typical repository
@cindex Repositório típico
@c <en>@cindex /usr/local/cvsroot, as example repository
@cindex /usr/local/cvsroot, como um repositório de exemplo
@c <en>@cindex cvsroot
@cindex cvsroot

@c <en>The @sc{cvs} @dfn{repository} stores a complete copy of
@c <en>all the files and directories which are under version
@c <en>control.
O @dfn{repositório} do @sc{cvs} guarda uma cópia
completa de todos os arquivos e diretórios que estão
sob controle de versão.

@c <en>Normally, you never access any of the files in the
@c <en>repository directly.  Instead, you use @sc{cvs}
@c <en>commands to get your own copy of the files into a
@c <en>@dfn{working directory}, and then
@c <en>work on that copy.  When you've finished a set of
@c <en>changes, you check (or @dfn{commit}) them back into the
@c <en>repository.  The repository then contains the changes
@c <en>which you have made, as well as recording exactly what
@c <en>you changed, when you changed it, and other such
@c <en>information.  Note that the repository is not a
@c <en>subdirectory of the working directory, or vice versa;
@c <en>they should be in separate locations.
Normalmente, você nunca acessa qualquer dos arquivos do
repositório diretamente.  Ao invés disso, você usa os
comandos do @sc{cvs} para pegar emprestada a sua cópia
dos arquivos num @dfn{diretório de trabalho}, e então
trabalhar nesta cópia.  Quando você termina um conjunto
de mudanças, você as @dfn{efetiva} no repositório.  O
repositório então passa a conter as mudanças que você
fez, assim como gravar exatamente o que você fez,
quando você fez e outras informações deste
tipo.  Observe que o repositório não é um subdiretório
do diretório de trabalho nem vice-versa; eles estão em
locais diferentes.
@c Need some example, e.g. repository
@c /usr/local/cvsroot; working directory
@c /home/joe/sources.  But this node is too long
@c as it is; need a little reorganization...

@c <en>@cindex :local:, setting up
@cindex :local:, ajustando
@c <en>@sc{cvs} can access a repository by a variety of
@c <en>means.  It might be on the local computer, or it might
@c <en>be on a computer across the room or across the world.
@c <en>To distinguish various ways to access a repository, the
@c <en>repository name can start with an @dfn{access method}.
@c <en>For example, the access method @code{:local:} means to
@c <en>access a repository directory, so the repository
@c <en>@code{:local:/usr/local/cvsroot} means that the
@c <en>repository is in @file{/usr/local/cvsroot} on the
@c <en>computer running @sc{cvs}.  For information on other
@c <en>access methods, see @ref{Remote repositories}.
@sc{cvs} pode acessar um repositório de várias
formas.  Ele pode estar no mesmo computador, ou num
computador do outro lado da sala, ou do outro lado do
mundo.  Para distinguir as várias formas de acessar um
repositório o seu nome deve começar com um
@dfn{método de acesso}.  Por exemplo, o método de acesso
@code{:local:} significa acessar um diretório que é um
repositório.  Logo, @code{:local:/usr/local/cvsroot}
significa que o repositório está em
@file{/usr/local/cvsroot} no computador rodando
@sc{cvs}.  Para informações sobre outros métodos de
acesso, vá em @ref{Repositórios remotos}.

@c Can se say this more concisely?  Like by passing
@c more of the buck to the Remote repositories node?
@c <en>If the access method is omitted, then if the repository
@c <en>starts with @samp{/}, then @code{:local:} is
@c <en>assumed.  If it does not start with @samp{/} then either
@c <en>@code{:ext:} or @code{:server:} is assumed.  For
@c <en>example, if you have a local repository in
@c <en>@file{/usr/local/cvsroot}, you can use
@c <en>@code{/usr/local/cvsroot} instead of
@c <en>@code{:local:/usr/local/cvsroot}.  But if (under
@c <en>Windows NT, for example) your local repository is
@c <en>@file{c:\src\cvsroot}, then you must specify the access
@c <en>method, as in @code{:local:c:/src/cvsroot}.
Se o método de acesso é omitido e se o repositório
começa com @samp{/}, então assume-se @code{:local:}.  Se
não começa com @samp{/} então ou @code{:ext:} ou
@code{:server:} é assumido.  Por exemplo, se você tem um
repositório local em @file{/usr/local/cvsroot}, você
pode usar @code{/usr/local/cvsroot} ao invés de
@code{:local:/usr/local/cvsroot}.  Mas se (no Windows
NT, por exemplo) seu repositório local é
@file{c:\src\cvsroot}, então você deve especificar o
método de acesso, como em @code{:local:c:/src/cvsroot}.

@c This might appear to go in Repository storage, but
@c actually it is describing something which is quite
@c user-visible, when you do a "cvs co CVSROOT".  This
@c isn't necessary the perfect place for that, though.
@c <en>The repository is split in two parts.  @file{$CVSROOT/CVSROOT} contains
@c <en>administrative files for @sc{cvs}.  The other directories contain the actual
@c <en>user-defined modules.
O repositório é separado em duas
partes.  @file{$CVSROOT/CVSROOT} contém arquivos
administrativos do @sc{cvs}.  Os outros diretórios
contém os módulos definidos pelo usuário.

@menu
@c <en>* Specifying a repository::  Telling CVS where your repository is
* Especificando um repositório::          Dizendo ao CVS onde está o seu repositório
@c <en>* Repository storage::       The structure of the repository
* Armazenamento do repositório::          A estrutura do repositório
@c <en>* Working directory storage:: The structure of working directories
* Armazenamento do Diretório de trabalho:: A estrutura dos diretórios de trabalho
@c <en>* Intro administrative files::  Defining modules
* Intro aos arquivos administrativos:: Definindo módulos
@c <en>* Multiple repositories::       Multiple repositories
* Repositórios múltiplos::             Repositórios múltiplos
@c <en>* Creating a repository::       Creating a repository
* Criando um repositório::             Criando um repositório
@c <en>* Backing up::                  Backing up a repository
* Fazendo backup::                     Criando Backup de um repositório
@c <en>* Moving a repository::         Moving a repository
* Movendo um repositório::             Movendo um repositório
@c <en>* Remote repositories::         Accessing repositories on remote machines
* Repositórios remotos::               Acessando repositórios em máquinas remotas
@c <en>* Read-only access::            Granting read-only access to the repository
* Acesso somente-leitura::             Dando acesso somente-leitura ao repositório
@c <en>* Server temporary directory::  The server creates temporary directories
* Diretório temporário do servidor::   O servidor cria diretórios temporários
@end menu

@c <en>@node Specifying a repository
@node Especificando um repositório
@c <en>@section Telling CVS where your repository is
@section Dizendo ao CVS onde está o seu repositório

@c <en>There are several ways to tell @sc{cvs}
@c <en>where to find the repository.  You can name the
@c <en>repository on the command line explicitly, with the
@c <en>@code{-d} (for "directory") option:
Existem várias formas de dizer ao @sc{cvs} onde
encontrar o repositório.  Você pode dar o nome do
repositório explicitamente na linha de comando, com a
opção @code{-d} (de "diretório"):

@example
cvs -d /usr/local/cvsroot checkout yoyodyne/tc
@end example

@c <en>@cindex .profile, setting CVSROOT in
@cindex .profile, configurando o CVSROOT no
@c <en>@cindex .cshrc, setting CVSROOT in
@cindex .cshrc, configurando o CVSROOT no
@c <en>@cindex .tcshrc, setting CVSROOT in
@cindex .tcshrc, configurando o CVSROOT no
@c <en>@cindex .bashrc, setting CVSROOT in
@cindex .bashrc, configurando o CVSROOT no
@c <en>@cindex CVSROOT, environment variable
@cindex CVSROOT, variável de ambiente
@c <en>        Or you can set the @code{$CVSROOT} environment
@c <en>variable to an absolute path to the root of the
@c <en>repository, @file{/usr/local/cvsroot} in this example.
@c <en>To set @code{$CVSROOT}, @code{csh} and @code{tcsh}
@c <en>users should have this line in their @file{.cshrc} or
@c <en>@file{.tcshrc} files:
        Ou você pode ajustar a variável de ambiente
@code{$CVSROOT} para um caminho absoluto para a raiz
(root) do repositório, @file{/usr/local/cvsroot} neste
exemplo.  Para ajustar o @code{$CVSROOT}, usuário de
@code{csh} e @code{tcsh} devem ter esta linha no seu
arquivo @file{.cshrc} ou @file{.tcshrc}:

@example
setenv CVSROOT /usr/local/cvsroot
@end example

@noindent
@c <en>@code{sh} and @code{bash} users should instead have these lines in their
@c <en>@file{.profile} or @file{.bashrc}:
usuários de @code{sh} e @code{bash} devem, por sua vez,
ter estas linhas nos seus @file{.profile} ou @file{.bashrc}:

@example
CVSROOT=/usr/local/cvsroot
export CVSROOT
@end example

@c <en>@cindex Root file, in CVS directory
@cindex O arquivo Root, no diretório CVS
@c <en>@cindex CVS/Root file
@cindex O arquivo CVS/Root
@c <en>        A repository specified with @code{-d} will
@c <en>override the @code{$CVSROOT} environment variable.
@c <en>Once you've checked a working copy out from the
@c <en>repository, it will remember where its repository is
@c <en>(the information is recorded in the
@c <en>@file{CVS/Root} file in the working copy).
        Um repositório especificado com @code{-d} se
sobrepõe à variável de ambiente @code{$CVSROOT}.  Uma
vez que você tenha pego emprestada uma cópia de
trabalho do repositório, ela vai se lembrar onde está o
seu repositório (a informação é registrada no arquivo
@file{CVS/Root} na cópia de trabalho).

@c <en>The @code{-d} option and the @file{CVS/Root} file both
@c <en>override the @code{$CVSROOT} environment variable.  If
@c <en>@code{-d} option differs from @file{CVS/Root}, the
@c <en>former is used.  Of course, for proper operation they
@c <en>should be two ways of referring to the same repository.
Tanto a opção @code{-d} quanto o arquivo
@file{CVS/Root} sobreescrevem a variável de ambiente
@code{$CVSROOT}.  Se a opção @code{-d} é diferente do
@file{CVS/Root}, a primeira é usada.  Obviamente, para
operações corretas, elas devem ser duas formas de
referenciar o mesmo repositório.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Repository storage
@node Armazenamento do repositório
@c <en>@section How data is stored in the repository
@section Como os dados são guardados no repositório
@c <en>@cindex Repository, how data is stored
@cindex Repositório, como os dados são guardados no

@c <en>For most purposes it isn't important @emph{how}
@c <en>@sc{cvs} stores information in the repository.  In
@c <en>fact, the format has changed in the past, and is likely
@c <en>to change in the future.  Since in almost all cases one
@c <en>accesses the repository via @sc{cvs} commands, such
@c <en>changes need not be disruptive.
Para a maioria das aplicações, não importa @emph{como}
o @sc{cvs} guarda as informações no repositório.  De
fato, o formato mudou no passado, e provavelmente vai
mudar no futuro.  Já que em quase todo os casos o acesso
ao repositório é feito via comandos do @sc{cvs}, tais
mudanças não serão radicais.

@c <en>However, in some cases it may be necessary to
@c <en>understand how @sc{cvs} stores data in the repository,
@c <en>for example you might need to track down @sc{cvs} locks
@c <en>(@pxref{Concurrency}) or you might need to deal with
@c <en>the file permissions appropriate for the repository.
Entretanto, em alguns casos pode ser necessário
entender como o @sc{cvs} guarda os dados no
repositório.  Por exemplo, você pode precisar localizar
travas do @sc{cvs} (@pxref{Concorrência}) ou você pode
precisar lidar com permissões de arquivos apropriadas
para o repositório.

@menu
@c <en>* Repository files::            What files are stored in the repository
* Arquivos do repositório::           Quais arquivos são guardados no repositório
@c <en>* File permissions::            File permissions
* Permissões de arquivos::            Permisões de arquivos
@c <en>* Windows permissions::         Issues specific to Windows
* Permissões no Windows::         Questões específicas ao Windows
@c <en>* Attic::                       Some files are stored in the Attic
* Attic::                       Alguns arquivos são guardados no Attic
@c <en>* CVS in repository::           Additional information in CVS directory
* CVS no repositório::           Informações adicionais no diretório CVS
@c <en>* Locks::                       CVS locks control concurrent accesses
* Travas::                       Travas do CVS controlam acesso concorrente
@c <en>* CVSROOT storage::             A few things about CVSROOT are different
* Armazenamento do CVSROOT::          Umas poucas coisas sobre CVSROOT são diferentes
@end menu

@c <en>@node Repository files
@node Arquivos do repositório
@c <en>@subsection Where files are stored within the repository
@subsection Onde arquivos são guardados dentro do repositório

@c @cindex Filenames, legal
@c @cindex Legal filenames
@c Somewhere we need to say something about legitimate
@c characters in filenames in working directory and
@c repository.  Not "/" (not even on non-unix).  And
@c here is a specific set of issues:
@c 	Files starting with a - are handled inconsistently. They can not
@c   be added to a repository with an add command, because it they are
@c   interpreted as a switch. They can appear in a repository if they are
@c   part of a tree that is imported. They can not be removed from the tree
@c   once they are there.
@c Note that "--" *is* supported (as a
@c consequence of using GNU getopt).  Should document
@c this somewhere ("Common options"?).  The other usual technique,
@c "./-foo", isn't as effective, at least for "cvs add"
@c which doesn't support pathnames containing "/".

@c <en>The overall structure of the repository is a directory
@c <en>tree corresponding to the directories in the working
@c <en>directory.  For example, supposing the repository is in
A estrutura geral do repositório é uma árvore de
diretórios correspondendo aos diretórios no diretório
de trabalho.  Por exemplo, suponha que o repositório
está em

@example
/usr/local/cvsroot
@end example

@noindent
@c <en>here is a possible directory tree (showing only the
@c <en>directories):
Aqui está uma possível árvore de diretórios (mostrando
apenas os diretórios):

@example
@t{/usr}
 |
 +--@t{local}
 |   |
 |   +--@t{cvsroot}
 |   |    |
 |   |    +--@t{CVSROOT}
@c <en>          |      (administrative files)
          |      (arquivos administrativos)
          |
          +--@t{gnu}
          |   |
          |   +--@t{diff}
@c <en>          |   |   (source code to @sc{gnu} diff)
          |   |   (código fonte do @sc{gnu} diff)
          |   |
          |   +--@t{rcs}
@c <en>          |   |   (source code to @sc{rcs})
          |   |   (código fonte do @sc{rcs})
          |   |
          |   +--@t{cvs}
@c <en>          |       (source code to @sc{cvs})
          |       (código fonte do @sc{cvs})
          |
          +--@t{yoyodyne}
              |
              +--@t{tc}
              |    |
              |    +--@t{man}
              |    |
              |    +--@t{testing}
              |
              +--(other Yoyodyne software)
@end example

@c <en>With the directories are @dfn{history files} for each file
@c <en>under version control.  The name of the history file is
@c <en>the name of the corresponding file with @samp{,v}
@c <en>appended to the end.  Here is what the repository for
@c <en>the @file{yoyodyne/tc} directory might look like:
Nos diretórios estão os @dfn{arquivos de histórico} para
cada arquivo sob controle de versão.  O nome do arquivo
de histórico é o nome do arquivo correspondente com um
@samp{,v} no final.  Aqui está como o repositório do
diretório @file{yoyodyne/tc} deve se parecer:
@c FIXME: Should also mention CVS (CVSREP)
@c FIXME? Should we introduce Attic with an xref to
@c Attic?  Not sure whether that is a good idea or not.
@example
  @code{$CVSROOT}
    |
    +--@t{yoyodyne}
    |   |
    |   +--@t{tc}
    |   |   |
            +--@t{Makefile,v}
            +--@t{backend.c,v}
            +--@t{driver.c,v}
            +--@t{frontend.c,v}
            +--@t{parser.c,v}
            +--@t{man}
            |    |
            |    +--@t{tc.1,v}
            |
            +--@t{testing}
                 |
                 +--@t{testpgm.t,v}
                 +--@t{test2.t,v}
@end example

@c <en>@cindex History files
@cindex Arquivos de histórico
@c <en>@cindex RCS history files
@cindex Arquivos de histórico do RCS
@c The first sentence, about what history files
@c contain, is kind of redundant with our intro to what the
@c repository does in node Repository....
@c <en>The history files contain, among other things, enough
@c <en>information to recreate any revision of the file, a log
@c <en>of all commit messages and the user-name of the person
@c <en>who committed the revision.  The history files are
@c <en>known as @dfn{RCS files}, because the first program to
@c <en>store files in that format was a version control system
@c <en>known as @sc{rcs}.  For a full
@c <en>description of the file format, see the @code{man} page
@c <en>@cite{rcsfile(5)}, distributed with @sc{rcs}, or the
@c <en>file @file{doc/RCSFILES} in the @sc{cvs} source
@c <en>distribution.  This
@c <en>file format has become very common---many systems other
@c <en>than @sc{cvs} or @sc{rcs} can at least import history
@c <en>files in this format.
Os arquivos de histórico contém, entre outras coisas,
informações suficientes para recriar qualquer revisão
do arquivo, um log com todas as mensagens ???de
commit??? e o usuário que efetivou (commit) a
@comment This is the same as a "log message", "log entry", or whatever else
@comment you might want to call it.  It is sometimes called a "commit message"
@comment in this manual because it is entered into the log at commit time.
@comment -DRP
revisão.  Os arquivos de histórico são conhecidos como
@dfn{arquivos RCS} (RCS files), pois o primeiro
programa a guardar arquivos neste formato foi o sistema
de controle de versões conhecido como @sc{rcs}.  Para
uma descrição completa do formato de arquivo, leia a
página @code{man} @cite{rcsfile(5)}, distribuída com o
@sc{rcs}, ou o arquivo @file{doc/RCSFILES} na
distribuição dos fontes do @sc{cvs}.  Este formato de
arquivo se tornou muito comum---muitos sistemas além do
@sc{cvs} e do @sc{rcs} podem, pelo menos, importar
arquivos de histórico neste formato.
@c FIXME: Think about including documentation for this
@c rather than citing it?  In the long run, getting
@c this to be a standard (not sure if we can cope with
@c a standards process as formal as IEEE/ANSI/ISO/etc,
@c though...) is the way to go, so maybe citing is
@c better.

@c <en>The @sc{rcs} files used in @sc{cvs} differ in a few
@c <en>ways from the standard format.  The biggest difference
@c <en>is magic branches; for more information see @ref{Magic
@c <en>branch numbers}.  Also in @sc{cvs} the valid tag names
@c <en>are a subset of what @sc{rcs} accepts; for @sc{cvs}'s
@c <en>rules see @ref{Tags}.
Os arquivos @sc{rcs} usados no @sc{cvs} diferem em
algumas poucas coisas do formato padrão.  A maior
diferença são os ramos mágicos; para mais informações
veja em @ref{Números de ramos mágicos}.  Além disso, no
@sc{cvs} os nomes válidos de etiquetas (tags) é um subconjunto dos
que são aceitos pelo @sc{rcs}; para regras do @sc{cvs},
leia em @ref{Etiquetas}.

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c <en>@node File permissions
@node Permissões de arquivos
@c <en>@subsection File permissions
@subsection Permissões de arquivos
@c -- Move this to @node Creating a repository or similar
@c <en>@cindex Security, file permissions in repository
@cindex Segurança, permissões de arquivos no repositório
@c <en>@cindex File permissions, general
@cindex Permissões de arquivos, geral
@c <en>@cindex Permissions, general
@cindex Permissões, geral
@c FIXME: we need to somehow reflect "permissions in
@c repository" versus "permissions in working
@c directory" in the index entries.
@c <en>@cindex Group, UNIX file permissions, in repository
@cindex Grupo, permissões de arquivos UNIX, no repositório
@c <en>@cindex Read-only files, in repository
@cindex Arquivos somente-leitura, no repositório
@c <en>All @samp{,v} files are created read-only, and you
@c <en>should not change the permission of those files.  The
@c <en>directories inside the repository should be writable by
@c <en>the persons that have permission to modify the files in
@c <en>each directory.  This normally means that you must
@c <en>create a UNIX group (see group(5)) consisting of the
@c <en>persons that are to edit the files in a project, and
@c <en>set up the repository so that it is that group that
@c <en>owns the directory.
@c <en>(On some systems, you also need to set the set-group-ID-on-execution bit
@c <en>on the repository directories (see chmod(1)) so that newly-created files
@c <en>and directories get the group-ID of the parent directory rather than
@c <en>that of the current process.)
Todos os arquivos @samp{,v} são criados
somente-leitura, e você não deve mudar as permissões
destes arquivos.  Os diretórios dentro do repositório
devem dar permissão de escrita para as pessoas que tem
permissão para modificar os arquivos em cada diretório.
Isto normalmente significa que você deve criar um grupo
do UNIX (veja em group(5)) consistindo nas pessoas que
vão editar os arquivos num projeto, e ajustar o
repositório tal que aquele grupo seja o dono do
diretório.  (Em alguns sistemas, você também vai
precisar ajustar o bit set-group-ID-on-execution nos
diretórios do repositório (veja em chmod(1)) de forma
que arquivos e diretório criados recebam o ID de grupo
do diretório pai e não do processo atual.)

@c See also comment in commitinfo node regarding cases
@c which are really awkward with unix groups.

@c <en>This means that you can only control access to files on
@c <en>a per-directory basis.
Isto significa que você pode apenas controlar o acesso
aos arquivos por diretório.

@c <en>Note that users must also have write access to check
@c <en>out files, because @sc{cvs} needs to create lock files
@c <en>(@pxref{Concurrency}).  You can use LockDir in CVSROOT/config
@c <en>to put the lock files somewhere other than in the repository
@c <en>if you want to allow read-only access to some directories
@c <en>(@pxref{config}).
Observe que os usuários devem ter direito de escrita
para pegar arquivos emprestados, já que o @sc{cvs} tem
que criar arquivos de trava (@pxref{Concorrência}).  Você
pode usar LockDir (diretório de trava) no CVSROOT/config
para botar os arquivos de trava num lugar fora do
repositório se você quer permitir acesso
somente-leitura a alguns diretórios (@pxref{config}).

@c CVS seems to use CVSUMASK in picking permissions for
@c val-tags, but maybe we should say more about this.
@c Like val-tags gets created by someone who doesn't
@c have CVSUMASK set right?
@c <en>@cindex CVSROOT/val-tags file, and read-only access to projects
@cindex O arquivo CVSROOT/val-tags, e acesso somente-leitura a projetos
@c <en>@cindex val-tags file, and read-only access to projects
@cindex O arquivo val-tags, e acesso somente-leitura a projetos
@c <en>Also note that users must have write access to the
@c <en>@file{CVSROOT/val-tags} file.  @sc{cvs} uses it to keep
@c <en>track of what tags are valid tag names (it is sometimes
@c <en>updated when tags are used, as well as when they are
@c <en>created).
Observe também que os usuários devem ter permissão de
escrita ao arquivo @file{CVSROOT/val-tags}.  O @sc{cvs} usa
tal arquivo para ter controle sobre quais etiquetas
(tags) são nomes de etiquetas válidos (é às vezes
atualizado quando etiquetas são usadas ou criadas).

@c <en>Each @sc{rcs} file will be owned by the user who last
@c <en>checked it in.  This has little significance; what
@c <en>really matters is who owns the directories.
Cada arquivo @sc{rcs} vai pertencer ao usuário que o
devolveu por último.  Isto tem pouco significado; o que
realmente importa é quem possui os diretórios.

@c <en>@cindex CVSUMASK, environment variable
@cindex CVSUMASK, variável de ambiente
@c <en>@cindex Umask, for repository files
@cindex Umask, para arquivos do repositório
@c <en>@sc{cvs} tries to set up reasonable file permissions
@c <en>for new directories that are added inside the tree, but
@c <en>you must fix the permissions manually when a new
@c <en>directory should have different permissions than its
@c <en>parent directory.  If you set the @code{CVSUMASK}
@c <en>environment variable that will control the file
@c <en>permissions which @sc{cvs} uses in creating directories
@c <en>and/or files in the repository.  @code{CVSUMASK} does
@c <en>not affect the file permissions in the working
@c <en>directory; such files have the permissions which are
@c <en>typical for newly created files, except that sometimes
@c <en>@sc{cvs} creates them read-only (see the sections on
@c <en>watches, @ref{Setting a watch}; -r, @ref{Global
@c <en>options}; or @code{CVSREAD}, @ref{Environment variables}).
O @sc{cvs} tenta ajustar de forma razoável as permissões para novos
diretórios que vão sendo adicionados na árvore, mas
você vai ter que mudar as permissões manualmente quando
um novo diretório deve ter permissões diferentes das do
seu diretório pai.  Se você ajusta a variável de
ambiente @code{CVSUMASK} ela vai controlar as
permissões que o @sc{cvs} usa na criação de diretórios
e/ou arquivos no repositório.  @code{CVSUMASK} não mexe
nas permissões do diretório de trabalho; tais arquivos
têm as permissões que são típicas para novos arquivos,
exceto que algumas vezes o @sc{cvs} cria os arquivos
somente-leitura (veja as seções em ???watches???,
@comment From Webster's:
@comment 1. The act of watching; forbearance of sleep; vigil; wakeful,
@comment    vigilant, or constantly observant attention; close
@comment    observation; guard; preservative or preventive vigilance;
@comment    formerly, a watching or guarding by night.
@comment 
@comment A "watch" in CVS terminology, is the command run to request
@comment notifications of file status changes.  Thus CVS keeps a "watch" on the
@comment file for you and notifies you of changes.  When you have requested
@comment that CVS "watch" several files, it is said to be keeping "watches".
@comment -DRP
@ref{Ajustando um ???watch???}; -r, @ref{Opções globais}; or
@code{CVSREAD}, @ref{Variáveis de ambiente}).
@c FIXME: Need more discussion of which
@c group should own the file in the repository.
@c Include a somewhat detailed example of the usual
@c case where CVSUMASK is 007, the developers are all
@c in a group, and that group owns stuff in the
@c repository.  Need to talk about group ownership of
@c newly-created directories/files (on some unices,
@c such as SunOS4, setting the setgid bit on the
@c directories will make files inherit the directory's
@c group.  On other unices, your mileage may vary.  I
@c can't remember what POSIX says about this, if
@c anything).

@c <en>Note that using the client/server @sc{cvs}
@c <en>(@pxref{Remote repositories}), there is no good way to
@c <en>set @code{CVSUMASK}; the setting on the client machine
@c <en>has no effect.  If you are connecting with @code{rsh}, you
@c <en>can set @code{CVSUMASK} in @file{.bashrc} or @file{.cshrc}, as
@c <en>described in the documentation for your operating
@c <en>system.  This behavior might change in future versions
@c <en>of @sc{cvs}; do not rely on the setting of
@c <en>@code{CVSUMASK} on the client having no effect.
Observe que ao usar o @sc{cvs} cliente/servidor
(@pxref{Repositórios remotos}), não há uma boa maneira
de ajustar o @code{CVSUMASK}; o ajuste na máquina
cliente não tem efeito.  Se você está se conectando com
@code{rsh}, você pode ajustar o @code{CVSUMASK} em
@file{.bashrc} ou @file{.cshrc}, como descrito na
documentação de seu sistema operacional.  Este
comportamento pode mudar em futuras versões do
@sc{cvs}; Não se basear na configuração do @code{CVSUMASK}
no cliente não afeta nada.
@c FIXME: need to explain what a umask is or cite
@c someplace which does.
@c
@c There is also a larger (largely separate) issue
@c about the meaning of CVSUMASK in a non-unix context.
@c For example, whether there is
@c an equivalent which fits better into other
@c protection schemes like POSIX.6, VMS, &c.
@c
@c FIXME: Need one place which discusses this
@c read-only files thing.  Why would one use -r or
@c CVSREAD?  Why would one use watches?  How do they
@c interact?
@c
@c FIXME: We need to state
@c whether using CVSUMASK removes the need for manually
@c fixing permissions (in fact, if we are going to mention
@c manually fixing permission, we better document a lot
@c better just what we mean by "fix").

@c <en>Using pserver, you will generally need stricter
@c <en>permissions on the @sc{cvsroot} directory and
@c <en>directories above it in the tree; see @ref{Password
@c <en>authentication security}.
Quando usar pserver, você deve ser, em geral, mais mais
restritivo com permissões no diretório @sc{cvsroot} e
nos diretórios abaixo dele na árvore; veja em
@ref{Segurança com autenticação por senha}.

@c <en>@cindex Setuid
@cindex Setuid
@c <en>@cindex Setgid
@cindex Setgid
@c <en>@cindex Security, setuid
@cindex Segurança, setuid
@c <en>@cindex Installed images (VMS)
@cindex ???Installed images??? (VMS)
@comment I have no idea what I could tell you to help you translate this since
@comment I know little of the VMS operating system.  Perhaps you could look
@comment this up in some VMS documentation somewhere?
@comment -DRP
@c <en>Some operating systems have features which allow a
@c <en>particular program to run with the ability to perform
@c <en>operations which the caller of the program could not.
@c <en>For example, the set user ID (setuid) or set group ID
@c <en>(setgid) features of unix or the installed image
@c <en>feature of VMS.  @sc{cvs} was not written to use such
@c <en>features and therefore attempting to install @sc{cvs} in
@c <en>this fashion will provide protection against only
@c <en>accidental lapses; anyone who is trying to circumvent
@c <en>the measure will be able to do so, and depending on how
@c <en>you have set it up may gain access to more than just
@c <en>@sc{cvs}.  You may wish to instead consider pserver.  It
@c <en>shares some of the same attributes, in terms of
@c <en>possibly providing a false sense of security or opening
@c <en>security holes wider than the ones you are trying to
@c <en>fix, so read the documentation on pserver security
@c <en>carefully if you are considering this option
@c <en>(@ref{Password authentication security}).
alguns sistemas operacionais têm a habilidade de
permitir que um programa execute com a habilidade de
executar certas operações que quem chamou o programa
não não tem.  Por exemplo, os set user ID (setuid) ou
set group ID (setgid) do unix ou a caracteristica de
installed image do VMS.  @sc{cvs} não foi escrito para
usar tais habilidades, logo, tentar instalar o @sc{cvs}
nesta forma vai gerar proteção apenas contra erros
acidentais; qualquer um que esteja tentando driblar a
segurança vai ser capaz de fazê-lo,
e dependendo de como você configurou, o invasor pode ganhar
acesso até a mais do que apenas o @sc{cvs}.  Você pode
estar considerando o uso do pserver.  Ele compartilha
alguns dos mesmos atributos, em termos de possivelmente
fornecer uma falsa sensação de segurança ou de abrir
buracos de segurança ainda maiores dos que os que você
quer fechar.  Portanto leia a documentação de segurança
com pserver cuidadosamente se você está pensando nesta
opção (@ref{Segurança com autenticação por senha}).

@c <en>@node Windows permissions
@node Permissões no Windows
@c <en>@subsection File Permission issues specific to Windows
@subsection Questões sobre permissões de arquivos específicas ao Windows
@c <en>@cindex Windows, and permissions
@cindex Windows, e permissões
@c <en>@cindex File permissions, Windows-specific
@cindex Permissões de arquivos, específicas ao Windows
@c <en>@cindex Permissions, Windows-specific
@cindex Permissões, específicas ao Windows

@c <en>Some file permission issues are specific to Windows
@c <en>operating systems (Windows 95, Windows NT, and
@c <en>presumably future operating systems in this family.
@c <en>Some of the following might apply to OS/2 but I'm not
@c <en>sure).
Algumas questões sobre permissões de arquivos são
específicas ao sistema operacional Windows (Windows 95,
Windows NT e presumivelmente futuros sistemas
operacionais nesta família.  Algumas coisas abaixo se
aplicam ao OS/2 mas não estou bem certo).

@c <en>If you are using local @sc{cvs} and the repository is on a
@c <en>networked file system which is served by the Samba SMB
@c <en>server, some people have reported problems with
@c <en>permissions.  Enabling WRITE=YES in the samba
@c <en>configuration is said to fix/workaround it.
@c <en>Disclaimer: I haven't investigated enough to know the
@c <en>implications of enabling that option, nor do I know
@c <en>whether there is something which @sc{cvs} could be doing
@c <en>differently in order to avoid the problem.  If you find
@c <en>something out, please let us know as described in
@c <en>@ref{BUGS}.
Se você está usando um @sc{cvs} local e o repositório
está num sistema de arquivos em rede de um servidor
Samba SMB, algumas pessoas relataram problemas com
permissões.  Habilitando WRITE=YES na configuração do
samba conserta/resolve.  ???Disclaimer:??? Eu não
@comment "Webster's Revised Unabridged Dictionary (1913)"
@comment Disclaimer Dis*claim"er, n.
@comment    1. One who disclaims, disowns, or renounces.
@comment 
@comment    2. (Law) A denial, disavowal, or renunciation, as of a title,
@comment       claim, interest, estate, or trust; relinquishment or
@comment       waiver of an interest or estate. --Burrill.
@comment 
@comment    3. A public disavowal, as of pretensions, claims, opinions,
@comment       and the like. --Burke.
@comment 
@comment In other words, "Warning:", or "Caution:", might be appropriate.
@comment -DRP
investiguei o suficiente as implicações de habilitar
esta opção, nem sei se há algo que o @sc{cvs} poderia
fazer de diferente para evitar este problema.  Se você
souber de algo, por favor nos ponha a par como descrito
em @ref{Paus}.

@c <en>@node Attic
@node Attic
@c <en>@subsection The attic
@subsection O attic
@c <en>@cindex Attic
@cindex Attic

@c <en>You will notice that sometimes @sc{cvs} stores an
@c <en>@sc{rcs} file in the @code{Attic}.  For example, if the
@c <en>@sc{cvsroot} is @file{/usr/local/cvsroot} and we are
@c <en>talking about the file @file{backend.c} in the
@c <en>directory @file{yoyodyne/tc}, then the file normally
@c <en>would be in
Você deve ter notado que às vezes o @sc{cvs} guarda um
arquivo @sc{rcs} no @code{Attic}.  Por exemplo, se o
@sc{cvsroot} é @file{/usr/local/cvsroot} e nós estamos
falando sobre o arquivo @file{backend.c} no diretório
@file{yoyodyne/tc}, então o arquivo normalmente deve
estar em

@example
/usr/local/cvsroot/yoyodyne/tc/backend.c,v
@end example

@noindent
@c <en>but if it goes in the attic, it would be in
mas se ele vai para o attic, ele deve estar em

@example
/usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v
@end example

@noindent
@c <en>@cindex Dead state
@cindex Estado morto
@c <en>.  It should not matter from a user point of
@c <en>view whether a file is in the attic; @sc{cvs} keeps
@c <en>track of this and looks in the attic when it needs to.
@c <en>But in case you want to know, the rule is that the RCS
@c <en>file is stored in the attic if and only if the head
@c <en>revision on the trunk has state @code{dead}.  A
@c <en>@code{dead} state means that file has been removed, or
@c <en>never added, for that revision.  For example, if you
@c <en>add a file on a branch, it will have a trunk revision
@c <en>in @code{dead} state, and a branch revision in a
@c <en>non-@code{dead} state.
ao invés.  Não importa ao usuário onde, dentro do Attic,
fica o arquivo; @sc{cvs} mantém controle disto e busca
no Attic quando é preciso.  Mas caso você queira saber,
a regra é que o arquivo RCS é guardado no attic se e
somente se a ???head revision??? no tronco está no
@comment "Head", at the front, etc.  In this case, refers to the most recent
@comment revision on the trunk, like the head of a snake would be in front.
@comment In English, the "head of a line" is the person in front and the "tail"
@comment the person in back.
@comment -DRP
estado @code{morto} (dead).  Um estado @code{morto} significa
que o arquivo foi removido, ou nunca foi adicionado,
naquela revisão.  Por exemplo, se você adiciona um
arquivo num ramo, ele vai ter uma revisão de
tronco num estado @code{morto} e uma revisão de
ramo num estado não-@code{morto}.
@c Probably should have some more concrete examples
@c here, or somewhere (not sure exactly how we should
@c arrange the discussion of the dead state, versus
@c discussion of the attic).

@c <en>@node CVS in repository
@node CVS no repositório
@c <en>@subsection The CVS directory in the repository
@subsection O diretório CVS no repositório
@c <en>@cindex CVS directory, in repository
@cindex diretório CVS, no repositório

@c <en>The @file{CVS} directory in each repository directory
@c <en>contains information such as file attributes (in a file
@c <en>called @file{CVS/fileattr}.  In the
@c <en>future additional files may be added to this directory,
@c <en>so implementations should silently ignore additional
@c <en>files.
O diretório @file{CVS} em cada diretório do repositório
contém informações tais como atributos de arquivos (num
arquivo chamado @file{CVS/fileattr}.  No futuro novos
arquivos ficarão neste diretório, logo, implementações
devem ignorar em silêncio arquivos adicionais.

@c <en>This behavior is implemented only by @sc{cvs} 1.7 and
@c <en>later; for details see @ref{Watches Compatibility}.
Este comportamento é implementado apenas pelo @sc{cvs}
1.7 e posteriores; para detalhes veja em
@ref{Compatibilidade de ???Watches???}.
@comment As "watches", previously.
@comment -DRP

@c <en>The format of the fileattr file is a series of entries
@c <en>of the following form (where @samp{@{} and @samp{@}}
@c <en>means the text between the braces can be repeated zero
@c <en>or more times):
O formato do arquivo fileattr é uma série de entradas
da seguinte forma (onde @samp{@{} e @samp{@}}
significam que o texto entre chaves pode ser repetido
zero ou várias vezes):

@var{ent-type} @var{filename} <tab> @var{attrname} = @var{attrval}
  @{; @var{attrname} = @var{attrval}@} <linefeed>

@c <en>@var{ent-type} is @samp{F} for a file, in which case the entry specifies the
@c <en>attributes for that file.
@var{ent-type} é @samp{F} para arquivo, neste caso a
entrada especifica os atributos para tal arquivo.

@c <en>@var{ent-type} is @samp{D},
@c <en>and @var{filename} empty, to specify default attributes
@c <en>to be used for newly added files.
@var{ent-type} é @samp{D},
e @var{filename} vazio, para especificar atributos
padrão para serem usados em novos arquivos adicionados.

@c <en>Other @var{ent-type} are reserved for future expansion.  @sc{cvs} 1.9 and older
@c <en>will delete them any time it writes file attributes.
@c <en>@sc{cvs} 1.10 and later will preserve them.
Outros @var{ent-type} são reservados para futuras
expansões.  @sc{cvs} 1.9 e anteriores vão deletá-los a
toda hora que ele escrever atributos de
arquivos.  @sc{cvs} 1.10 e posteriores vão preservá-los.

@c <en>Note that the order of the lines is not significant;
@c <en>a program writing the fileattr file may
@c <en>rearrange them at its convenience.
Observe que a ordem das linhas não é significante; um
programa escrevendo o arquivo fileattr pode
rearranjá-las de acordo com sua própria conveniência.

@c <en>There is currently no way of quoting tabs or linefeeds in the
@c <en>filename, @samp{=} in @var{attrname},
@c <en>@samp{;} in @var{attrval}, etc.  Note: some implementations also
@c <en>don't handle a NUL character in any of the fields, but
@c <en>implementations are encouraged to allow it.
Não existe atualmente uma forma de tratar tabulações ou quebras de linha
como caractere no nome do arquivo, @samp{=} em @var{attrname},
@samp{;} em @var{attrval}, etc.  Obs.: algumas
implementações também não manipulam o caractere NUL em
nenhum dos campos, mas encorajamos implementações que
permitam isto.

@c <en>By convention, @var{attrname} starting with @samp{_} is for an attribute given
@c <en>special meaning by @sc{cvs}; other @var{attrname}s are for user-defined attributes
@c <en>(or will be, once implementations start supporting user-defined attributes).
Por convenção, @var{attrname} começando com @samp{_} é
para um atributo ao qual foi dado significado especial
pelo @sc{cvs}; outros @var{attrname}s são para
atributos definidos pelo usuário (ou que vão ser, já
que implementações começaram suporte a atributos
definidos pelo usuário).

@c <en>Builtin attributes:
Atributos internos:

@table @code
@item _watched
@c <en>Present means the file is watched and should be checked out
@c <en>read-only.
Quando presente significa que o arquivo está
???watched??? (watched) e deve ser emprestado como
@comment As "watches", before.
@comment -DRP
somente-leitura.

@item _watchers
@c <en>Users with watches for this file.  Value is
@c <en>@var{watcher} > @var{type} @{ , @var{watcher} > @var{type} @}
@c <en>where @var{watcher} is a username, and @var{type}
@c <en>is zero or more of edit,unedit,commit separated by
@c <en>@samp{+} (that is, nothing if none; there is no "none" or "all" keyword).
Usuários com ???watches??? para este arquivo.  O valor é
@comment As "watches", before.
@comment -DRP
@var{watcher} > @var{type} @{ , @var{watcher} > @var{type} @}
onde @var{watcher} é um nome de usuário, e @var{type} é
zero ou mais de edit,unedit,commit separados por
@samp{+} (isto é, deixe em branco para nenhum; não há
palavras-chave para "nenhum" ou "todos").

@item _editors
@c <en>Users editing this file.  Value is
@c <en>@var{editor} > @var{val} @{ , @var{editor} > @var{val} @}
@c <en>@c <en>where @var{editor} is a username, and @var{val} is
@c <en>@var{time}+@var{hostname}+@var{pathname}, where
@c <en>@var{time} is when the @code{cvs edit} command (or
@c <en>equivalent) happened,
@c <en>and @var{hostname} and @var{pathname} are for the working directory.
Usuários editando este arquivo.  O valor é
@var{editor} > @var{val} @{ , @var{editor} > @var{val} @}
onde @var{editor} é um username, e @var{val} é
@var{time}+@var{hostname}+@var{pathname}, onde
@var{time} é quando o comando @code{cvs edit} (ou outro
equivalente) aconteceu, e @var{hostname} e
@var{pathname} são do diretório de trabalho.
@end table

Example:

@c FIXME: sanity.sh should contain a similar test case
@c so we can compare this example from something from
@c Real Life(TM).  See cvsclient.texi (under Notify) for more
@c discussion of the date format of _editors.
@example
Ffile1 _watched=;_watchers=joe>edit,mary>commit
Ffile2 _watched=;_editors=sue>8 Jan 1975+workstn1+/home/sue/cvs
D _watched=
@end example

@noindent
@c <en>means that the file @file{file1} should be checked out
@c <en>read-only.  Furthermore, joe is watching for edits and
@c <en>mary is watching for commits.  The file @file{file2}
@c <en>should be checked out read-only; sue started editing it
@c <en>on 8 Jan 1975 in the directory @file{/home/sue/cvs} on
@c <en>the machine @code{workstn1}.  Future files which are
@c <en>added should be checked out read-only.  To represent
@c <en>this example here, we have shown a space after
@c <en>@samp{D}, @samp{Ffile1}, and @samp{Ffile2}, but in fact
@c <en>there must be a single tab character there and no spaces.
significa que o arquivo @file{file1} deve ser pego como
somente-leitura.  Além disso, joe está ???watching???
edições e mary está ???watching??? ???commits???.  O
@comment "Watching", as "watches", before.
@comment "Commits" are checkins, i.e. via the `cvs commit' command.
@comment -DRP
arquivo @file{file2} deve ser pego somente-leitura; sue
comecou a edita-lo em 8 Jan 1975 no diretorio
@file{/home/sue/cvs} na maquina
@code{workstn1}.  Futuros arquivos que forem adicionados
devem ser pegos somente-leitura.  Para representar este
exemplo aqui, nós mostramos um espaco depois de
@samp{D}, @samp{Ffile1}, e @samp{Ffile2}, mas de fato
existe um caractere de tab e nenhum espaco.

@c <en>@node Locks
@node Travas
@c <en>@subsection CVS locks in the repository
@subsection travas CVS no repositório

@c <en>@cindex #cvs.rfl, technical details
@cindex #cvs.rfl, detalhes técnicos
@c <en>@cindex #cvs.pfl, technical details
@cindex #cvs.pfl, detalhes técnicos
@c <en>@cindex #cvs.wfl, technical details
@cindex #cvs.wfl, detalhes técnicos
@c <en>@cindex #cvs.lock, technical details
@cindex #cvs.lock, detalhes técnicos
@c <en>@cindex Locks, cvs, technical details
@cindex Travas, cvs, detalhes técnicos
@c <en>For an introduction to @sc{cvs} locks focusing on
@c <en>user-visible behavior, see @ref{Concurrency}.  The
@c <en>following section is aimed at people who are writing
@c <en>tools which want to access a @sc{cvs} repository without
@c <en>interfering with other tools accessing the same
@c <en>repository.  If you find yourself confused by concepts
@c <en>described here, like @dfn{read lock}, @dfn{write lock},
@c <en>and @dfn{deadlock}, you might consult the literature on
@c <en>operating systems or databases.
Para uma introdução às travas (locks) no @sc{cvs}
focando no comportamento visível ao usuário, veja em
@ref{Concorrência}.  A seção seguinte foi feita para
para pessoas que escrevem ferramentas as quais precisam
acessar um repositório @sc{cvs} sem interferir com
outras ferramentas acessando o mesmo repositório.  Se
você se sentir confuso com os conceitos descritos aqui,
como @dfn{read lock}, @dfn{write lock} e
@dfn{deadlock}, você deve consultar a literatura de
sistemas operacionais e bancos de dados.

@c <en>@cindex #cvs.tfl
@cindex #cvs.tfl
@c <en>Any file in the repository with a name starting
@c <en>with @file{#cvs.rfl.} is a read lock.  Any file in
@c <en>the repository with a name starting with
@c <en>@file{#cvs.pfl} is a promotable read lock.  Any file in
@c <en>the repository with a name starting with
@c <en>@file{#cvs.wfl} is a write lock.  Old versions of @sc{cvs}
@c <en>(before @sc{cvs} 1.5) also created files with names starting
@c <en>with @file{#cvs.tfl}, but they are not discussed here.
@c <en>The directory @file{#cvs.lock} serves as a master
@c <en>lock.  That is, one must obtain this lock first before
@c <en>creating any of the other locks.
Qualquer arquivo no repositório com um nome começando
com @file{#cvs.rfl.} é uma trava de leitura.  Qualquer
arquivo no repositório com um nome comçando com
@file{#cvs.pfl} é uma trava de leitura
???promotable???.  Qualquer arquivo no repositório com
um nome começando com
@file{#cvs.wfl} é uma trava de escrita.  Versões antigas
do @sc{cvs} (antes do @sc{cvs} 1.5) também criavam
arquivos com nomes começando com @file{#cvs.tfl}, mas
estes não são discutidos aqui.

@c <en>The directory @file{#cvs.lock} serves as a master
@c <en>lock.  That is, one must obtain this lock first before
@c <en>creating any of the other locks.
O diretório @file{#cvs.lock} funciona como uma trava
mestra.  Isto é, deve-se obter esta trava antes de
criar qualquer das outras travas.

@c <en>To obtain a readlock, first create the @file{#cvs.lock}
@c <en>directory.  This operation must be atomic (which should
@c <en>be true for creating a directory under most operating
@c <en>systems).  If it fails because the directory already
@c <en>existed, wait for a while and try again.  After
@c <en>obtaining the @file{#cvs.lock} lock, create a file
@c <en>whose name is @file{#cvs.rfl.} followed by information
@c <en>of your choice (for example, hostname and process
@c <en>identification number).  Then remove the
@c <en>@file{#cvs.lock} directory to release the master lock.
@c <en>Then proceed with reading the repository.  When you are
@c <en>done, remove the @file{#cvs.rfl} file to release the
@c <en>read lock.
Para obter uma trava de leitura, primeiro crie o diretório
@file{#cvs.lock}.  Esta operação deve ser atômica (o
que deve ser verdade para a criação de um diretório na
maioria dos sistemas operacionais).  Se isto falha por
que o diretório já existe, espere um tempinho e tente de
novo.  Depois de obter a trava @file{#cvs.lock}, crie
um arquivo cujo nome seja @file{#cvs.rfl.} seguido pela
informação de sua escolha (por exemplo, nome de host e
nmero de identificaçao de processo).  Então remova o
diretório @file{#cvs.lock} para ativar a trava
mestra.  Então começe a ler o repositório.  Quando você
terminar, remova o arquivo @file{#cvs.rfl} para
liberar a trava de leitura.

@c <en>Promotable read locks are a concept you may not find in other literature on
@c <en>concurrency.  They are used to allow a two (or more) pass process to only lock
@c <en>a file for read on the first (read) pass(es), then upgrade its read locks to
@c <en>write locks if necessary for a final pass, still assured that the files have
@c <en>not changed since they were first read.  @sc{cvs} uses promotable read locks,
@c <en>for example, to prevent commit and tag verification passes from interfering
@c <en>with other reading processes.  It can then lock only a single directory at a
@c <en>time for write during the write pass.
Promotable read locks are a concept you may not find in other literature on
concurrency.  They are used to allow a two (or more) pass process to only lock
a file for read on the first (read) pass(es), then upgrade its read locks to
write locks if necessary for a final pass, still assured that the files have
not changed since they were first read.  @sc{cvs} uses promotable read locks,
for example, to prevent commit and tag verification passes from interfering
with other reading processes.  It can then lock only a single directory at a
time for write during the write pass.

@c <en>To obtain a promotable read lock, first create the @file{#cvs.lock} directory,
@c <en>as with a non-promotable read lock.  Then check
@c <en>that there are no files that start with
@c <en>@file{#cvs.pfl}.  If there are, remove the master @file{#cvs.lock} directory,
@c <en>wait awhile (CVS waits 30 seconds between lock attempts), and try again.  If
@c <en>there are no other promotable locks, go ahead and create a file whose name is
@c <en>@file{#cvs.pfl} followed by information of your choice (for example, CVS uses
@c <en>its hostname and the process identification number of the CVS server process
@c <en>creating the lock).  If versions of @sc{cvs} older than version 1.12.4 access
@c <en>your repository directly (not via a @sc{cvs} server of version 1.12.4 or
@c <en>later), then you should also create a read lock since older versions of CVS
@c <en>will ignore the promotable lock when attempting to create their own write lock.
@c <en>Then remove the master @file{#cvs.lock} directory in order to allow other
@c <en>processes to obtain read locks.
To obtain a promotable read lock, first create the @file{#cvs.lock} directory,
as with a non-promotable read lock.  Then check
that there are no files that start with
@file{#cvs.pfl}.  If there are, remove the master @file{#cvs.lock} directory,
wait awhile (CVS waits 30 seconds between lock attempts), and try again.  If
there are no other promotable locks, go ahead and create a file whose name is
@file{#cvs.pfl} followed by information of your choice (for example, CVS uses
its hostname and the process identification number of the CVS server process
creating the lock).  If versions of @sc{cvs} older than version 1.12.4 access
your repository directly (not via a @sc{cvs} server of version 1.12.4 or
later), then you should also create a read lock since older versions of CVS
will ignore the promotable lock when attempting to create their own write lock.
Then remove the master @file{#cvs.lock} directory in order to allow other
processes to obtain read locks.

@c <en>To obtain a writelock, first create the
@c <en>@file{#cvs.lock} directory, as with readlocks.  Then
@c <en>check that there are no files whose names start with
@c <en>@file{#cvs.rfl.} and no files whose names start with @file{#cvs.pfl} that are
@c <en>not owned by the process attempting to get the write lock.  If either exist,
@c <en>remove @file{#cvs.lock}, wait for a while, and try again.  If
@c <en>there are no readers or promotable locks from other processes, then create a
@c <en>file whose name is @file{#cvs.wfl} followed by information of your choice
@c <en>(again, CVS uses the hostname and server process identification
@c <en>number).  Remove your @file{#cvs.pfl} file if present.  Hang on to the
@c <en>@file{#cvs.lock} lock.  Proceed
@c <en>with writing the repository.  When you are done, first
@c <en>remove the @file{#cvs.wfl} file and then the
@c <en>@file{#cvs.lock} directory. Note that unlike the
@c <en>@file{#cvs.rfl} file, the @file{#cvs.wfl} file is just
@c <en>informational; it has no effect on the locking operation
@c <en>beyond what is provided by holding on to the
@c <en>@file{#cvs.lock} lock itself.
Para obter uma trava de escrita, primeiro crie o
diretório @file{#cvs.lock}, da mesma forma que com as
travas de leitura.  Então verifique se não existem
arquivos cujos nomes começam com @file{#cvs.rfl.} e se
não existem arquivos cujo nome começa com
@file{#cvs.pfl} que não tenha como dono o processo
tentando ter a trava de escrita.  Se ???either???
existe, remova o @file{#cvs.lock}, espere um momento, e
tente de novo.  Se não existem ???readers??? ou travas
???promotable??? de outros processos, então crie um
arquivo cujo nome é @file{#cvs.wfl} seguido de
informações da sua escolha (novamente, o CVS usa o
hostname e o ???server process identification
number??).  Remove your @file{#cvs.pfl} file if present.  Hang on to the
@file{#cvs.lock} lock.  Escreva no repositório.  Quando
tiver terminado, primeiro remova o arquivo
@file{#cvs.wfl} e então o diretório
@file{#cvs.lock}.  Observe que ao contrário do arquivo
@file{#cvs.rfl}, o  arquivo @file{#cvs.wfl} é apenas
informativo; ele não tem efeito na operação de trava
além do que é feito pelo ato de manter a trava
@file{#cvs.lock}.

@c <en>Note that each lock (writelock or readlock) only locks
@c <en>a single directory in the repository, including
@c <en>@file{Attic} and @file{CVS} but not including
@c <en>subdirectories which represent other directories under
@c <en>version control.  To lock an entire tree, you need to
@c <en>lock each directory (note that if you fail to obtain
@c <en>any lock you need, you must release the whole tree
@c <en>before waiting and trying again, to avoid deadlocks).
Observe que cada trava (de escrita ou leitura) apenas trava um
único diretório no
repositório, inclusive no caso do @file{Attic} e do @file{CVS}
sem incluir os subdiretórios que representam outros
diretórios sob controle de versão.  Para travar uma
árvore inteira, voc precisa travar cada diretório
(observe que se você não conseguir obter alguma trava
que você precise, você deve liberar a árvore toda antes
para esperar e tentar novamente, para evitar ???deadlocks???).
@comment "Deadlock" is a computer science term which refers to the scenario
@comment where two processes end up waiting on each other in such a way that
@comment neither will ever get the lock and therefore neither process will
@comment ever run again, and therefore both are said to be "dead".
@comment 
@comment For example, say process 1 wants to lock files "A" and "B", and so
@comment does process 2.  If process 1 locks "A" first, and process 2 locks
@comment file "B" first, then process begins waiting to lock "B" while process
@comment 2 waits to lock "A", then both processes will wait indefinately, a
@comment commonly encountered problem with file locking, especially for
@comment inexperienced programmers.
@comment -DRP

@c <en>Note also that @sc{cvs} expects writelocks to control
@c <en>access to individual @file{foo,v} files.  @sc{rcs} has
@c <en>a scheme where the @file{,foo,} file serves as a lock,
@c <en>but @sc{cvs} does not implement it and so taking out a
@c <en>@sc{cvs} writelock is recommended.  See the comments at
@c <en>rcs_internal_lockfile in the @sc{cvs} source code for
@c <en>further discussion/rationale.
Observe também que o @sc{cvs} espera travas de escrita
para controlar o acesso a arquivos @file{foo,v}
individuais.  O @sc{rcs} tem um esquema onde o arquivo
@file{,foo,} funciona como uma trava, mas o @sc{cvs}
não implementa isso.  Portanto, fazer uma trava de escrita
no @sc{cvs} é recomendado.  Veja os comentários no
rcs_internal_lockfile no código fonte do @sc{cvs} para
mais discussões/explicações.

@c <en>@node CVSROOT storage
@node Armazenamento do CVSROOT
@c <en>@subsection How files are stored in the CVSROOT directory
@subsection Como os arquivos são guardados no diretório CVSROOT
@c <en>@cindex CVSROOT, storage of files
@cindex CVSROOT, armazenamento de arquivos

@c <en>The @file{$CVSROOT/CVSROOT} directory contains the
@c <en>various administrative files.  In some ways this
@c <en>directory is just like any other directory in the
@c <en>repository; it contains @sc{rcs} files whose names end
@c <en>in @samp{,v}, and many of the @sc{cvs} commands operate
@c <en>on it the same way.  However, there are a few
@c <en>differences.
O diretório @file{$CVSROOT/CVSROOT} contém os vários
arquivos administrativos.  Em alguns aspectos este
diretório é igual a qualquer outro diretório no
repositório; ele contém arquivos @sc{rcs} cujos nomes
terminam em @samp{,v}, e muitos dos comandos do
@sc{cvs} operam neles do mesmo jeito.  Entretanto,
existem algumas poucas diferenças.

@c <en>For each administrative file, in addition to the
@c <en>@sc{rcs} file, there is also a checked out copy of the
@c <en>file.  For example, there is an @sc{rcs} file
@c <en>@file{loginfo,v} and a file @file{loginfo} which
@c <en>contains the latest revision contained in
@c <en>@file{loginfo,v}.  When you check in an administrative
@c <en>file, @sc{cvs} should print
Para cada arquivo administrativo, além do arquivo
@sc{rcs}, existe também uma cópia de trabalho do
arquivo.  Por exemplo, existe um arquivo @sc{rcs}
@file{loginfo,v} e um arquivo @file{loginfo} que contém
a ultima revisão contida em @file{loginfo,v}.  Quando
você devolve um arquivo administrativo, o @sc{cvs} vai
mostrar

@example
cvs commit: Rebuilding administrative file database
@end example

@noindent
@c <en>and update the checked out copy in
@c <en>@file{$CVSROOT/CVSROOT}.  If it does not, there is
@c <en>something wrong (@pxref{BUGS}).  To add your own files
@c <en>to the files to be updated in this fashion, you can add
@c <en>them to the @file{checkoutlist} administrative file
@c <en>(@pxref{checkoutlist}).
e atualizar a cópia de trabalho em
@file{$CVSROOT/CVSROOT}.  Se não fizer, tem algo errado
(@pxref{Paus}).  Para adicionar os seus próprios
arquivos aos arquivos a serem atualizados desta
maneira, você pode adicioná-los ao arquivo
administrativo  @file{checkoutlist}
(@pxref{checkoutlist}).

@c <en>@cindex modules.db
@cindex modules.db
@c <en>@cindex modules.pag
@cindex modules.pag
@c <en>@cindex modules.dir
@cindex modules.dir
@c <en>By default, the @file{modules} file behaves as
@c <en>described above.  If the modules file is very large,
@c <en>storing it as a flat text file may make looking up
@c <en>modules slow (I'm not sure whether this is as much of a
@c <en>concern now as when @sc{cvs} first evolved this
@c <en>feature; I haven't seen benchmarks).  Therefore, by
@c <en>making appropriate edits to the @sc{cvs} source code
@c <en>one can store the modules file in a database which
@c <en>implements the @code{ndbm} interface, such as Berkeley
@c <en>db or GDBM.  If this option is in use, then the modules
@c <en>database will be stored in the files @file{modules.db},
@c <en>@file{modules.pag}, and/or @file{modules.dir}.
Por padrão o arquivo @file{modules} se comporta como
descrito acima.  Se o arquivo modules é muito grande,
guardar ele como um arquivo de texto normal faz a busca
por módulos lenta (Não estou bem certo se isso importa
tanto agora como quando o @sc{cvs} primeiramente
desenvolveu esta habilidade; não vi avaliações).
Entretanto, fazendo edições apropriadas no código fonte
do @sc{cvs} pode-se guardar o arquivo modules num banco
de dados que implementa a interface @code{ndbm}, tais
como o Berkeley db ou GDBM.  Se esta opção está em uso,
então o banco de dados modules será guardado nos
arquivos @file{modules.db}, @file{modules.pag}, e/ou @file{modules.dir}.
@c I think fileattr also will use the database stuff.
@c Anything else?

@c <en>For information on the meaning of the various
@c <en>administrative files, see @ref{Administrative files}.
Para informações sobre o significado dos vários arquivos administrativos,
veja em @ref{Arquivos administrativos}.

@c <en>@node Working directory storage
@node Armazenamento do Diretório de trabalho
@c <en>@section How data is stored in the working directory
@section Como os dados são guardados no diretório de trabalho

@c FIXME: Somewhere we should discuss timestamps (test
@c case "stamps" in sanity.sh).  But not here.  Maybe
@c in some kind of "working directory" chapter which
@c would encompass the "Builds" one?  But I'm not sure
@c whether that is a good organization (is it based on
@c what the user wants to do?).

@c <en>@cindex CVS directory, in working directory
@cindex diretório CVS, no diretório de trabalho
@c <en>While we are discussing @sc{cvs} internals which may
@c <en>become visible from time to time, we might as well talk
@c <en>about what @sc{cvs} puts in the @file{CVS} directories
@c <en>in the working directories.  As with the repository,
@c <en>@sc{cvs} handles this information and one can usually
@c <en>access it via @sc{cvs} commands.  But in some cases it
@c <en>may be useful to look at it, and other programs, such
@c <en>as the @code{jCVS} graphical user interface or the
@c <en>@code{VC} package for emacs, may need to look at it.
@c <en>Such programs should follow the recommendations in this
@c <en>section if they hope to be able to work with other
@c <en>programs which use those files, including future
@c <en>versions of the programs just mentioned and the
@c <en>command-line @sc{cvs} client.
Assim como estamos conversando sobre as entranhas do
@sc{cvs}, que podem ficar visíveis de tempos em tempos,
também devemos falar sobre o que o @sc{cvs} bota nos
diretórios @file{CVS} nos diretórios de trabalho.
Assim como com o repositório, o @sc{cvs} manipula esta
informação e pode-se acessá-la normalmente via comandos
@sc{cvs}.  Mas em alguns casos pode ser útil dar uma
olhada, e outros programas, como a interface de usuário
gráfica @code{jCVS} ou o pacote para emacs @code{VC},
precisarem ver o que tem lá.  Tais programas devem
seguir as recomendações nesta seção se eles querem
interagir com outros programas que usam estes arquivos,
inclusive versões futuras dos programas mencinados logo
acima e o  cliente em linha-de-comando do @sc{cvs}.

@c <en>The @file{CVS} directory contains several files.
@c <en>Programs which are reading this directory should
@c <en>silently ignore files which are in the directory but
@c <en>which are not documented here, to allow for future
@c <en>expansion.
O diretório @file{CVS} contém vários
arquivos.  Programas que estão lendo este diretório
devem ignorar em silêncio arquivos que encontrem no
diretório mas que não estejam documentados aqui, para
permitir expansões futuras.

@c <en>The files are stored according to the text file
@c <en>convention for the system in question.  This means that
@c <en>working directories are not portable between systems
@c <en>with differing conventions for storing text files.
@c <en>This is intentional, on the theory that the files being
@c <en>managed by @sc{cvs} probably will not be portable between
@c <en>such systems either.
Os arquivos são guardados de acordo com a convenção de
arquivo de texto do sistema em questão.  Isto significa
que diretórios de trabalho não são portáveis entre
sistemas com diferentes convenções para armazenar
arquivos de texto.  Isto é de propósito, baseado na
teoria de que os arquivos sendo gerenciados pelo
@sc{cvs} provavelmente também não seriam portáveis
entre tais sistemas.

@table @file
@item Root
@c <en>This file contains the current @sc{cvs} root, as
@c <en>described in @ref{Specifying a repository}.
Este arquivo contém a raiz atual do @sc{cvs}, como
descrito em @ref{Especificando um repositório}.

@c <en>@cindex Repository file, in CVS directory
@cindex O arquivo Repository, no diretório CVS
@c <en>@cindex CVS/Repository file
@cindex O arquivo CVS/Repository
@c <en>@item Repository
@item Repositório
@c <en>This file contains the directory within the repository
@c <en>which the current directory corresponds with.  It can
@c <en>be either an absolute pathname or a relative pathname;
@c <en>@sc{cvs} has had the ability to read either format
@c <en>since at least version 1.3 or so.  The relative
@c <en>pathname is relative to the root, and is the more
@c <en>sensible approach, but the absolute pathname is quite
@c <en>common and implementations should accept either.  For
@c <en>example, after the command
Este arquivo contém o diretório no qual está o
repositório correspondente ao diretório atual.  Pode
ser um caminho absoluto ou relativo; @sc{cvs} adquiriu
a habilidade de ler ambos os formatos desde a versão
1.3.  O caminho é relativo à raiz (root), e é a
abordagem mais racional, mas o caminho absoluto é
mais comum e ambos devem ser aceitos.  Por exemplo,
depois do comando

@example
cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc
@end example

@noindent
@c <en>@file{Root} will contain
o @file{Root} vai conter

@example
:local:/usr/local/cvsroot
@end example

@noindent
@c <en>and @file{Repository} will contain either
e o @file{Repositório} vai conter ou

@example
/usr/local/cvsroot/yoyodyne/tc
@end example

@noindent
@c <en>or
ou

@example
yoyodyne/tc
@end example

@c <en>If the particular working directory does not correspond
@c <en>to a directory in the repository, then @file{Repository}
@c <en>should contain @file{CVSROOT/Emptydir}.
Se o diretório de trabalho particular não corresponde a
um diretório no repositório, então o @file{Repositório}
deve conter @file{CVSROOT/Emptydir}.
@c <en>@cindex Emptydir, in CVSROOT directory
@cindex Emptydir, no diretório CVSROOT
@c <en>@cindex CVSROOT/Emptydir directory
@cindex O diretório CVSROOT/Emptydir

@c <en>@cindex Entries file, in CVS directory
@cindex O arquivo Entries, no diretório do CVS
@c <en>@cindex CVS/Entries file
@cindex O arquivo CVS/Entries
@c <en>@item Entries
@item Entries
@c <en>This file lists the files and directories in the
@c <en>working directory.
@c <en>The first character of each line indicates what sort of
@c <en>line it is.  If the character is unrecognized, programs
@c <en>reading the file should silently skip that line, to
@c <en>allow for future expansion.
Este arquivo relaciona os arquivos e diretórios no
diretório de trabalho.  O primeiro caractere de cada
linha indica de que tipo é a linha.  Se  caractere não
for reconhecido, os programas lendo o arquivo devem
pular de linha em silêncio, para permitir futuras expansões.

@c <en>If the first character is @samp{/}, then the format is:
Se o primeiro caractere é @samp{/}, então o formato é:

@example
/@var{name}/@var{revision}/@var{timestamp}[+@var{conflict}]/@var{options}/@var{tagdate}
@end example

@noindent
@c <en>where @samp{[} and @samp{]} are not part of the entry,
@c <en>but instead indicate that the @samp{+} and conflict
@c <en>marker are optional.  @var{name} is the name of the
@c <en>file within the directory.  @var{revision} is the
@c <en>revision that the file in the working derives from, or
@c <en>@samp{0} for an added file, or @samp{-} followed by a
@c <en>revision for a removed file.  @var{timestamp} is the
@c <en>timestamp of the file at the time that @sc{cvs} created
@c <en>it; if the timestamp differs with the actual
@c <en>modification time of the file it means the file has
@c <en>been modified.  It is stored in
@c <en>the format used by the ISO C asctime() function (for
@c <en>example, @samp{Sun Apr  7 01:29:26 1996}).  One may
@c <en>write a string which is not in that format, for
@c <en>example, @samp{Result of merge}, to indicate that the
@c <en>file should always be considered to be modified.  This
@c <en>is not a special case; to see whether a file is
@c <en>modified a program should take the timestamp of the file
@c <en>and simply do a string compare with @var{timestamp}.
@c <en>If there was a conflict, @var{conflict} can be set to
@c <en>the modification time of the file after the file has been
@c <en>written with conflict markers (@pxref{Conflicts example}).
@c <en>Thus if @var{conflict} is subsequently the same as the actual
@c <en>modification time of the file it means that the user
@c <en>has obviously not resolved the conflict.  @var{options}
@c <en>contains sticky options (for example @samp{-kb} for a
@c <en>binary file).  @var{tagdate} contains @samp{T} followed
@c <en>by a tag name, or @samp{D} for a date, followed by a
@c <en>sticky tag or date.  Note that if @var{timestamp}
@c <en>contains a pair of timestamps separated by a space,
@c <en>rather than a single timestamp, you are dealing with a
@c <en>version of @sc{cvs} earlier than @sc{cvs} 1.5 (not
@c <en>documented here).
Onde @samp{[} e @samp{]} não são partes da entrada, mas
indicam que o @samp{+} e o marcador de conflito são
opcionais.  @var{name} é o nome do arquivo no
diretório.  @var{revision} e a revisão da qual o
arquivo no diretório de trabalho deriva, ou @samp{0}
para um arquivo adicionado, ou @samp{-} seguido de uma
revisão para um arquivo removido.  @var{timestamp} é o
???timestamp??? do arquivo quando o @sc{cvs} o criou;
@comment As a file system timestamp.  Usually a creation time or modification
@comment time or something.  I'm not sure what they were prior to CVS 1.5.
@comment -DRP
se o timestamp difere da hora de modificação do
arquivo, significa que o arquivo foi modificado.  É
armazenado no formato usando pela função ISO C
asctime() (por exemplo, @samp{Sun Apr  7 01:29:26
1996}).  Pode-se escrever uma string que não esteja
neste formato, por exemplo, @samp{Result of merge},
para indicar que o arquivo deve ser sempre considerado
como modificado.  Este não é um caso especial; para ver
se um arquivo é modificado, um programa pode pegar o
timestamp do arquivo e simplesmente criar uma string e
comparar com @var{timestamp}.  Se existe um conflito,
@var{conflict} pode ser ajustada para o tempo de
modificação do arquivo depois do arquivo ter sido
escrito com marcações de conflito (@pxref{Exemplo de conflitos}).
Logo, se @var{conflict} é posteriormente o mesmo que o
tempo de modificação real do arquivo significa que o
usuário obviamente não resolveu o conflito.  @var{options}
contém opções adesivas (por exemplo @samp{-kb} para um
arquivo binário).  @var{tagdate} contém @samp{T}
seguindo de um nome de etiqueta (tag), ou @samp{D} para
uma data, seguido de uma data ou etiqueta adesiva.
Observe que se @var{timestamp} contém um par de
timestamps separados por um espaço, ao invés de um
único timestamp, você está lidando com uma versão do
@sc{cvs} anterior ao @sc{cvs} 1.5 (sem documentação aqui).

@c <en>The timezone on the timestamp in CVS/Entries (local or
@c <en>universal) should be the same as the operating system
@c <en>stores for the timestamp of the file itself.  For
@c <en>example, on Unix the file's timestamp is in universal
@c <en>time (UT), so the timestamp in CVS/Entries should be
@c <en>too.  On @sc{vms}, the file's timestamp is in local
@c <en>time, so @sc{cvs} on @sc{vms} should use local time.
@c <en>This rule is so that files do not appear to be modified
@c <en>merely because the timezone changed (for example, to or
@c <en>from summer time).
O fuso horário do timestamp no CVS/Entries (local ou
universal) deve ser igual ao que o sistema
operacional guarda para o timestamp do próprio arquivo.
Por exemplo, no Unix o timestamp do arquivo está em
tempo universal (universal time - UT).  Logo, o
timestamp em CVS/Entries deve estar assim também.  No
@sc{vms}, o timestamp do arquivo está em hora
local, logo, o @sc{cvs} no @sc{vms} deve usar hora
local.  Esta regra é para que arquivos não pareçam estar
modificados simplesmente por que o fuso horário mudou
(por exemplo, saindo ou entrando no horário de verão).
@c See comments and calls to gmtime() and friends in
@c src/vers_ts.c (function time_stamp).

@c <en>If the first character of a line in @file{Entries} is
@c <en>@samp{D}, then it indicates a subdirectory.  @samp{D}
@c <en>on a line all by itself indicates that the program
@c <en>which wrote the @file{Entries} file does record
@c <en>subdirectories (therefore, if there is such a line and
@c <en>no other lines beginning with @samp{D}, one knows there
@c <en>are no subdirectories).  Otherwise, the line looks
@c <en>like:
Se o primeiro caractere de uma linha em @file{Entries}
é @samp{D}, então ele indica um subdiretório.  @samp{D}
sozinho em uma linha indica que o programa
que escreveu o arquivo @file{Entries} registra
subdiretórios (portanto, se existe tal linha e nenhuma
outra linha começando com @samp{D}, conclui-se que não
há subdiretórios).  Caso contrário, a linha vai se
parecer com:

@example
D/@var{name}/@var{filler1}/@var{filler2}/@var{filler3}/@var{filler4}
@end example

@noindent
@c <en>where @var{name} is the name of the subdirectory, and
@c <en>all the @var{filler} fields should be silently ignored,
@c <en>for future expansion.  Programs which modify
@c <en>@code{Entries} files should preserve these fields.
onde @var{name} é o nome do subdiretório, e todos os
campos @var{filler} devem ser ignorados em silêncio,
para expansões futuras.  Programas que modificam
arquivos @code{Entries} devem manter estes campos.

@c <en>The lines in the @file{Entries} file can be in any order.
As linhas no arquivo @file{Entries} podem estar em
qualquer ordem.

@c <en>@cindex Entries.Log file, in CVS directory
@cindex O arquivo Entries.Log, no diretório CVS
@c <en>@cindex CVS/Entries.Log file
@cindex O arquivo CVS/Entries.Log
@c <en>@item Entries.Log
@item Entries.Log
@c <en>This file does not record any information beyond that
@c <en>in @file{Entries}, but it does provide a way to update
@c <en>the information without having to rewrite the entire
@c <en>@file{Entries} file, including the ability to preserve
@c <en>the information even if the program writing
@c <en>@file{Entries} and @file{Entries.Log} abruptly aborts.
@c <en>Programs which are reading the @file{Entries} file
@c <en>should also check for @file{Entries.Log}.  If the latter
@c <en>exists, they should read @file{Entries} and then apply
@c <en>the changes mentioned in @file{Entries.Log}.  After
@c <en>applying the changes, the recommended practice is to
@c <en>rewrite @file{Entries} and then delete @file{Entries.Log}.
@c <en>The format of a line in @file{Entries.Log} is a single
@c <en>character command followed by a space followed by a
@c <en>line in the format specified for a line in
@c <en>@file{Entries}.  The single character command is
@c <en>@samp{A} to indicate that the entry is being added,
@c <en>@samp{R} to indicate that the entry is being removed,
@c <en>or any other character to indicate that the entire line
@c <en>in @file{Entries.Log} should be silently ignored (for
@c <en>future expansion).  If the second character of the line
@c <en>in @file{Entries.Log} is not a space, then it was
@c <en>written by an older version of @sc{cvs} (not documented
@c <en>here).
Este arquivo não registra qualquer informação a mais
que no @file{Entries}, mas fornece um jeito de
atualizar a informação sem ter que reescrever todo o
arquivo @file{Entries}, incluindo a habilidade de
preservar a informação mesmo se o programa que estava
escrevendo o @file{Entries} e o @file{Entries.Log}
aborta abruptamente.  Programas que estão lendo o
arquivo @file{Entries} devem também verificar pelo
@file{Entries.Log}.  Se este último existe, eles devem
ler o @file{Entries} e então aplicar as mudanças
mencionadas no @file{Entries.Log}.  Depois de aplicar
as mudanças, a prática recomendada é reescrever o
@file{Entries} e depois apagar o @file{Entries.Log}.  O
formato de uma linha no @file{Entries.Log} é um comando
de um caractere seguido de um espaço seguido por uma
linha no formato especificado para uma linha no
@file{Entries}.  O caractere de comando é
@samp{A} para indicar que a entrada está sendo
adicionada, @samp{R} para indicar que a entrada está
sendo removida, ou qualquer outro caractere para
indicar que a linha inteira em @file{Entries.Log} deve
ser ignorada em silêncio (para expansão futura).  Se o
segundo caractere da linha em @file{Entries.Log} não é
um espaço, então foi escrito por uma versão antiga do
@sc{cvs} (não documentada aqui).

@c <en>Programs which are writing rather than reading can
@c <en>safely ignore @file{Entries.Log} if they so choose.
Programas que estão escrevendo ao invés de lendo podem
seguramente ignorar @file{Entries.Log} se assim escolherem.

@c <en>@cindex Entries.Backup file, in CVS directory
@cindex O arquivo Entries.Backup, no diretório CVS
@c <en>@cindex CVS/Entries.Backup file
@cindex O arquivo CVS/Entries.Backup
@c <en>@item Entries.Backup
@item Entries.Backup
@c <en>This is a temporary file.  Recommended usage is to
@c <en>write a new entries file to @file{Entries.Backup}, and
@c <en>then to rename it (atomically, where possible) to @file{Entries}.
Este é um arquivo temporário.  O uso recomendado é
escrever um novo arquivo entries para o
@file{Entries.Backup}, e então renomeá-lo
(atomicamente, quando possível) para @file{Entries}.

@c <en>@cindex Entries.Static file, in CVS directory
@cindex O arquivo Entries.Static, no diretório CVS
@c <en>@cindex CVS/Entries.Static file
@cindex O arquivo CVS/Entries.Static
@c <en>@item Entries.Static
@item Entries.Static
@c <en>The only relevant thing about this file is whether it
@c <en>exists or not.  If it exists, then it means that only
@c <en>part of a directory was gotten and @sc{cvs} will
@c <en>not create additional files in that directory.  To
@c <en>clear it, use the @code{update} command with the
@c <en>@samp{-d} option, which will get the additional files
@c <en>and remove @file{Entries.Static}.
A única coisa relevante sobre este arquivo é se ele
existe ou não.  Se ele existe, então quer dizer que
apenas parte de um diretório foi pego e o @sc{cvs} não
vai criar arquivos adicionais neste diretório.  Para
limpar isto, use o comando @code{update} com a opção
@samp{-d}, a qual vai pegar os arquivos adicionais e
remover @file{Entries.Static}.
@c FIXME: This needs to be better documented, in places
@c other than Working Directory Storage.
@c FIXCVS: The fact that this setting exists needs to
@c be more visible to the user.  For example "cvs
@c status foo", in the case where the file would be
@c gotten except for Entries.Static, might say
@c something to distinguish this from other cases.
@c One thing that periodically gets suggested is to
@c have "cvs update" print something when it skips
@c files due to Entries.Static, but IMHO that kind of
@c noise pretty much makes the Entries.Static feature
@c useless.

@c <en>@cindex Tag file, in CVS directory
@cindex O arquivo Tag, no diretório CVS
@c <en>@cindex CVS/Tag file
@cindex O arquivo CVS/Tag
@c <en>@cindex Sticky tags/dates, per-directory
@cindex Por diretório, etiquetas/datas adesivas
@c <en>@cindex Per-directory sticky tags/dates
@cindex Etiquetas/datas adesivas por diretório
@c <en>@item Tag
@item Tag (Etiqueta)
@c <en>This file contains per-directory sticky tags or dates.
@c <en>The first character is @samp{T} for a branch tag,
@c <en>@samp{N} for a non-branch tag, or @samp{D} for a date,
@c <en>or another character to mean the file should be
@c <en>silently ignored, for future expansion.  This character
@c <en>is followed by the tag or date.  Note that
@c <en>per-directory sticky tags or dates are used for things
@c <en>like applying to files which are newly added; they
@c <en>might not be the same as the sticky tags or dates on
@c <en>individual files.  For general information on sticky
@c <en>tags and dates, see @ref{Sticky tags}.
Este arquivo contém as etiquetas (tags) ou datas
adesivas por diretório.  O primeiro caractere é @samp{T}
para uma etiqueta de ramo, @samp{N} para uma etiqueta
que não é de ramo, ou @samp{D} para uma data, ou outro
caractere que quer dizer que o arquivo deve ser
ignorado em silêncio, para expansão futura.  Este
caractere é seguido de uma etiqueta ou data.  Observe
que etiquetas ou data adesivas por diretório são usadas
para coisas como ???applying to??? arquivos que
acabaram de ser adicionados; ???they (the tags or the files)???
podem não ser os mesmos assim como as etiquetas
adesivas ou datas em arquivos isolados.  Para
informações gerais sobre etiquetas adesivas ou datas,
veja em @ref{Etiquetas adesivas}.
@c FIXME: This needs to be much better documented,
@c preferably not in the context of "working directory
@c storage".
@c FIXME: The Sticky tags node needs to discuss, or xref to
@c someplace which discusses, per-directory sticky
@c tags and the distinction with per-file sticky tags.

@c <en>@cindex Notify file, in CVS directory
@cindex O arquivo Notify, no diretório CVS
@c <en>@cindex CVS/Notify file
@cindex O arquivo CVS/Notify
@c <en>@item Notify
@item Notify
@c <en>This file stores notifications (for example, for
@c <en>@code{edit} or @code{unedit}) which have not yet been
@c <en>sent to the server.  Its format is not yet documented
@c <en>here.
Este arquivo guarda notificações (por exemplo, sobre
@code{edit} ou @code{unedit}) que ainda não foram
mandadas para o servidor.  Seu formato ainda não está
documentado aqui.

@c <en>@cindex Notify.tmp file, in CVS directory
@cindex O arquivo Notify.tmp, no diretório CVS
@c <en>@cindex CVS/Notify.tmp file
@cindex O arquivo CVS/Notify.tmp
@c <en>@item Notify.tmp
@item Notify.tmp
@c <en>This file is to @file{Notify} as @file{Entries.Backup}
@c <en>is to @file{Entries}.  That is, to write @file{Notify},
@c <en>first write the new contents to @file{Notify.tmp} and
@c <en>then (atomically where possible), rename it to
@c <en>@file{Notify}.
Este arquivo está para @file{Notify} como o @file{Entries.Backup}
está para @file{Entries}.  Ou seja, para escrever em
@file{Notify}, escreva o novo conteúdo primeiro em
@file{Notify.tmp} e então (atomicamente, quando
possível), renomeie-o para @file{Notify}.

@c <en>@cindex Base directory, in CVS directory
@cindex Diretório Base, no diretório CVS
@c <en>@cindex CVS/Base directory
@cindex Diretório CVS/Base
@c <en>@item Base
@item Base
@c <en>If watches are in use, then an @code{edit} command
@c <en>stores the original copy of the file in the @file{Base}
@c <en>directory.  This allows the @code{unedit} command to
@c <en>operate even if it is unable to communicate with the
@c <en>server.
Se os ???watches??? estão em uso, então um comando
@code{edit} guarda a cópia original do arquivo no
diretório @file{Base}.  Isto permite que o comando
@code{unedit} opere mesmo se estiver sem comunicação
com o servidor.

@c <en>@cindex Baserev file, in CVS directory
@cindex O arquivo Baserev, no diretório CVS
@c <en>@cindex CVS/Baserev file
@cindex O arquivo CVS/Baserev
@c <en>@item Baserev
@item Baserev
@c <en>The file lists the revision for each of the files in
@c <en>the @file{Base} directory.  The format is:
O arquivo lista a revisão de cada arquivo no diretório
@file{Base}.  O formato é:

@example
B@var{name}/@var{rev}/@var{expansion}
@end example

@noindent
@c <en>where @var{expansion} should be ignored, to allow for
@c <en>future expansion.
Onde @var{expansion} deve ser ignorada para permitir
expansão futura.

@c <en>@cindex Baserev.tmp file, in CVS directory
@cindex O arquivo Baserev.tmp, no diretório CVS
@c <en>@cindex CVS/Baserev.tmp file
@cindex O arquivo CVS/Baserev.tmp
@c <en>@item Baserev.tmp
@item Baserev.tmp
@c <en>This file is to @file{Baserev} as @file{Entries.Backup}
@c <en>is to @file{Entries}.  That is, to write @file{Baserev},
@c <en>first write the new contents to @file{Baserev.tmp} and
@c <en>then (atomically where possible), rename it to
@c <en>@file{Baserev}.
Este arquivo está para @file{Baserev} assim como
@file{Entries.Backup} está para @file{Entries}.  Ou
seja, para escrever em @file{Baserev}, escreva o novo
conteúdo primeiro em @file{Baserev.tmp} e então
(atomicamente, quando possível), renomei-o para @file{Baserev}.

@c <en>@cindex Template file, in CVS directory
@cindex O arquivo Template, no diretório CVS
@c <en>@cindex CVS/Template file
@cindex O arquivo CVS/Template
@c <en>@item Template
@item Template
@c <en>This file contains the template specified by the
@c <en>@file{rcsinfo} file (@pxref{rcsinfo}).  It is only used
@c <en>by the client; the non-client/server @sc{cvs} consults
@c <en>@file{rcsinfo} directly.
Este arquivo contém o modelo (template) especificado
pelo arquivo @file{rcsinfo} (@pxref{rcsinfo}).  Ele é
usado apenas pelo cliente; o ???non-client/server???
@sc{cvs} consulta o @file{rcsinfo} diretamente.
@end table

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Intro administrative files
@node Intro aos arquivos administrativos
@c <en>@section The administrative files
@section Os arquivos administrativos
@c <en>@cindex Administrative files (intro)
@cindex Arquivos administrativos (intro)
@c <en>@cindex Modules file
@cindex O arquivo Modules
@c <en>@cindex CVSROOT, module name
@cindex CVSROOT, nome de módulo
@c <en>@cindex Defining modules (intro)
@cindex Definindo módulos (intro)

@c FIXME: this node should be reorganized into "general
@c information about admin files" and put the "editing
@c admin files" stuff up front rather than jumping into
@c the details of modules right away.  Then the
@c Administrative files node can go away, the information
@c on each admin file distributed to a place appropriate
@c to its function, and this node can contain a table
@c listing each file and a @ref to its detailed description.

@c <en>The directory @file{$CVSROOT/CVSROOT} contains some @dfn{administrative
@c <en>files}.  @xref{Administrative files}, for a complete description.
@c <en>You can use @sc{cvs} without any of these files, but
@c <en>some commands work better when at least the
@c <en>@file{modules} file is properly set up.
O diretório @file{$CVSROOT/CVSROOT} contém alguns
@dfn{Arquivos administrativos}.  @xref{Arquivos
administrativos}, para uma descrição completa.  Você
pode usar o @sc{cvs} sem nenhum destes arquivos, mas
alguns comandos funcionam melhor quando pelo menos o
arquivo @file{modules} está bem configurado.

@c <en>The most important of these files is the @file{modules}
@c <en>file.  It defines all modules in the repository.  This
@c <en>is a sample @file{modules} file.
O mais importante destes arquivos é o arquivo
@file{modules}.  Ele define todos os módulos no
repositório.  Este é um exemplo de um arquivo @file{modules}.

@c FIXME: The CVSROOT line is a goofy example now that
@c mkmodules doesn't exist.
@example
CVSROOT         CVSROOT
modules         CVSROOT modules
cvs             gnu/cvs
rcs             gnu/rcs
diff            gnu/diff
tc              yoyodyne/tc
@end example

@c <en>The @file{modules} file is line oriented.  In its
@c <en>simplest form each line contains the name of the
@c <en>module, whitespace, and the directory where the module
@c <en>resides.  The directory is a path relative to
@c <en>@code{$CVSROOT}.  The last four lines in the example
@c <en>above are examples of such lines.
O arquivo @file{modules} é baseado em linha.  Na sua
forma simples, cada linha contém o nome do módulo, um
espaço e o diretório onde o módulo está.  O diretório é
um caminho relativo em @code{$CVSROOT}.  As últimas
quatro linhas no exemplo acima são exemplos de tais linhas.

@c FIXME: might want to introduce the concept of options in modules file
@c (the old example which was here, -i mkmodules, is obsolete).

@c <en>The line that defines the module called @samp{modules}
@c <en>uses features that are not explained here.
@c <en>@xref{modules}, for a full explanation of all the
@c <en>available features.
A linha que define o módulo chamado @samp{modules} usa
funcionalidades que não são explicadas
aqui. @xref{modules}, para uma explicação completa
destas funcionalidades.

@c FIXME: subsection without node is bogus
@c <en>@subsection Editing administrative files
@subsection Editando arquivos administrativos
@c <en>@cindex Editing administrative files
@cindex Editando arquivos administrativos
@c <en>@cindex Administrative files, editing them
@cindex Arquivos administrativos, editando

@c <en>You edit the administrative files in the same way that you would edit
@c <en>any other module.  Use @samp{cvs checkout CVSROOT} to get a working
@c <en>copy, edit it, and commit your changes in the normal way.
Você edita os arquivos administrativos da mesma forma
que você deve deve editar qualquer outro módulo.  Use
@samp{cvs checkout CVSROOT} para obter uma cópia de
trabalho, edite-a e ???commit??? suas mudanças normalmente.

@c <en>It is possible to commit an erroneous administrative
@c <en>file.  You can often fix the error and check in a new
@c <en>revision, but sometimes a particularly bad error in the
@c <en>administrative file makes it impossible to commit new
@c <en>revisions.
É possível ???commit??? um arquivo administrativo
corrompido.  Em geral, você pode consertar o erro e
devolvê-lo numa nova revisão, mas às vezes um erro
particularmente ruim nos arquivos administrativos torna
impossível ???commit??? novas revisões.
@c @xref{Bad administrative files} for a hint
@c about how to solve such situations.
@c -- administrative file checking--

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Multiple repositories
@node Repositórios múltiplos
@c <en>@section Multiple repositories
@section Repositórios múltiplos
@c <en>@cindex Multiple repositories
@cindex Repositórios múltiplos
@c <en>@cindex Repositories, multiple
@cindex Repositórios, múltiplos
@c <en>@cindex Many repositories
@cindex Muitos repositórios
@c <en>@cindex Parallel repositories
@cindex Repositórios paralelos
@c <en>@cindex Disjoint repositories
@cindex Repositórios Disjuntos
@c <en>@cindex CVSROOT, multiple repositories
@cindex CVSROOT, Repositórios Múltiplos

@c <en>In some situations it is a good idea to have more than
@c <en>one repository, for instance if you have two
@c <en>development groups that work on separate projects
@c <en>without sharing any code.  All you have to do to have
@c <en>several repositories is to specify the appropriate
@c <en>repository, using the @code{CVSROOT} environment
@c <en>variable, the @samp{-d} option to @sc{cvs}, or (once
@c <en>you have checked out a working directory) by simply
@c <en>allowing @sc{cvs} to use the repository that was used
@c <en>to check out the working directory
@c <en>(@pxref{Specifying a repository}).
Em algumas situações é uma boa idéia ter mais de um
repositório.  Por exemplo, se você tem duas equipes de
desenvolvimento que trabalham em projetos separados sem
compartilhar nenhum código.  Tudo que você tem que
fazer para ter vários repositórios é especificar o
repositório apropriado, usando a variável de ambiente
@code{CVSROOT} ou a opção @samp{-d} com o @sc{cvs}, ou
(depois de ter pego um diretório de trabalho)
simplesmente deixando o @sc{cvs} usar o repositório de
onde veio o diretório de trabalho (@pxref{Especificando
um repositório}).

@c <en>The big advantage of having multiple repositories is
@c <en>that they can reside on different servers.  With @sc{cvs}
@c <en>version 1.10, a single command cannot recurse into
@c <en>directories from different repositories.  With development
@c <en>versions of @sc{cvs}, you can check out code from multiple
@c <en>servers into your working directory.  @sc{cvs} will
@c <en>recurse and handle all the details of making
@c <en>connections to as many server machines as necessary to
@c <en>perform the requested command.  Here is an example of
@c <en>how to set up a working directory:
A grande vantagem de ter múltiplos repositórios é que
eles podem residir em diferentes servidores.  Com o
@sc{cvs} versão 1.10, um comando não pode fazer
recursão ???into??? diretórios ???from??? repositórios
diferentes.  Com ???development versions??? do
@sc{cvs}, você pode obter código de múltiplos
servidores para o seu diretório de trabalho.  @sc{cvs}
vai fazer a recursão e cuidar dos detalhes para fazer
conexão em quantas máquinas quantas forem necessárias
para executar o comando pedido.  Aqui está um exemplo
de como preparar um diretório de trabalho:

@example
cvs -d server1:/cvs co dir1
cd dir1
cvs -d server2:/root co sdir
cvs update
@end example

@c <en>The @code{cvs co} commands set up the working
@c <en>directory, and then the @code{cvs update} command will
@c <en>contact server2, to update the dir1/sdir subdirectory,
@c <en>and server1, to update everything else.
Os comandos @code{cvs co} acima preparam o diretório de
trabalho.  Depois de feitos, o comando @code{cvs update}
vai contactar o server2, para atualizar o subdiretório
dir1/sdir e o server1, para atualizar o resto.

@c FIXME: Does the FAQ have more about this?  I have a
@c dim recollection, but I'm too lazy to check right now.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Creating a repository
@node Criando um repositório
@c <en>@section Creating a repository
@section Criando um repositório

@c <en>@cindex Repository, setting up
@cindex Repositório, preparando
@c <en>@cindex Creating a repository
@cindex Criando um repositório
@c <en>@cindex Setting up a repository
@cindex Preparando um repositório

@c <en>To set up a @sc{cvs} repository, first choose the
@c <en>machine and disk on which you want to store the
@c <en>revision history of the source files.  CPU and memory
@c <en>requirements are modest, so most machines should be
@c <en>adequate.  For details see @ref{Server requirements}.
Para preparar um repositório do @sc{cvs}, escolha
primeiramente a máquina e o disco onde você deseja
armazenar o histórico de revisões dos fontes.
requisitos de CPU e memória são modestos.  Portanto,
muitas máquinas serão adequadas.  Para detalhes, veja
em @ref{Requisitos do servidor}.
@c Possible that we should be providing a quick rule of
@c thumb, like the 32M memory for the server.  That
@c might increase the number of people who are happy
@c with the answer, without following the xref.

@c <en>To estimate disk space
@c <en>requirements, if you are importing RCS files from
@c <en>another system, the size of those files is the
@c <en>approximate initial size of your repository, or if you
@c <en>are starting without any version history, a rule of
@c <en>thumb is to allow for the server approximately three
@c <en>times the size of the code to be under @sc{cvs} for the
@c <en>repository (you will eventually outgrow this, but not
@c <en>for a while).  On the machines on which the developers
@c <en>will be working, you'll want disk space for
@c <en>approximately one working directory for each developer
@c <en>(either the entire tree or a portion of it, depending
@c <en>on what each developer uses).
Para estimar os requisitos de espaço em disco, se você
estiver importando arquivos RCS de outro sistema, o
tamanho destes arquivos vai ser o tamanho inicial do
seu repositório, ou se você está começando sem nenhum
histórico de versões, uma boa regra é reservar para o
repositório do servidor três vezes o tamanho do código
que estará sob os cuidados do @sc{cvs} (Isto vai
eventualmente estourar, mas não por enquanto).
Nas máquinas dos desenvolvedores, você vai pracisar de
aproximadamente o espaço em disco de um diretório de
trabalho para cada desenvolvedor (ou a árvore inteira
ou uma porção dela, dependendo do que o desenvolvedor
usa).

@c <en>The repository should be accessible
@c <en>(directly or via a networked file system) from all
@c <en>machines which want to use @sc{cvs} in server or local
@c <en>mode; the client machines need not have any access to
@c <en>it other than via the @sc{cvs} protocol.  It is not
@c <en>possible to use @sc{cvs} to read from a repository
@c <en>which one only has read access to; @sc{cvs} needs to be
@c <en>able to create lock files (@pxref{Concurrency}).
O repositório deve estar acessível (diretamente ou
através de um sistema de arquivos de rede) ???from???
@c from-translator-to-reviewer: "from" or "to"?
todas as máquinas que queiram usar o @sc{cvs} em modo
servidor ou localmente; a máquina cliente só precisa
ter acesso a ele através do protocolo do @sc{cvs}.  Não
é possível usar o @sc{cvs} para ler de um repositório
onde só se tem permissão de leitura, pois o @sc{cvs}
tem que ser capaz de criar arquivos de trava
(@pxref{Concorrência}).

@c <en>@cindex init (subcommand)
@cindex init (subcommand)
@c <en>To create a repository, run the @code{cvs init}
@c <en>command.  It will set up an empty repository in the
@c <en>@sc{cvs} root specified in the usual way
@c <en>(@pxref{Repository}).  For example,
Para criar um repositório, rode o comando @code{cvs
init}.  Ele vai criar um repositório vazio no raiz do
@sc{cvs} especificado da forma usual
(@pxref{Repositório}).  For example,

@example
cvs -d /usr/local/cvsroot init
@end example

@c <en>@code{cvs init} is careful to never overwrite any
@c <en>existing files in the repository, so no harm is done if
@c <en>you run @code{cvs init} on an already set-up
@c <en>repository.
O @code{cvs init} tem o cuidado de nunca sobreescrever
nenhum arquivo no repositório, logo, não há perigo em
rodar o @code{cvs init} num repositório já criado.

@c <en>@code{cvs init} will enable history logging; if you
@c <en>don't want that, remove the history file after running
@c <en>@code{cvs init}.  @xref{history file}.
@code{cvs init} pode guardar um registro histórico
(history log); se
você não quer guardar isto, remova o arquivo history
depois de rodar o @code{cvs init}.  @xref{arquivo
history (histórico)}.

@c <en>@node Backing up
@node Fazendo backup
@c <en>@section Backing up a repository
@section Fazendo backup de um repositório
@c <en>@cindex Repository, backing up
@cindex Repositório, fazendo backup
@c <en>@cindex Backing up, repository
@cindex Fazendo backup, repositório

@c <en>There is nothing particularly magical about the files
@c <en>in the repository; for the most part it is possible to
@c <en>back them up just like any other files.  However, there
@c <en>are a few issues to consider.
Não há nada particularmente mágico sobre os arquivos no
repositório; Para a maior parte deles é possível fazer
backup da mesma forma que com qualquer
arquivo.  Entretanto, existem alguns fatos a considerar.

@c <en>@cindex Locks, cvs, and backups
@cindex Travas, cvs e backups
@c <en>@cindex #cvs.rfl, and backups
@cindex #cvs.rfl, and backups
@c <en>The first is that to be paranoid, one should either not
@c <en>use @sc{cvs} during the backup, or have the backup
@c <en>program lock @sc{cvs} while doing the backup.  To not
@c <en>use @sc{cvs}, you might forbid logins to machines which
@c <en>can access the repository, turn off your @sc{cvs}
@c <en>server, or similar mechanisms.  The details would
@c <en>depend on your operating system and how you have
@c <en>@sc{cvs} set up.  To lock @sc{cvs}, you would create
@c <en>@file{#cvs.rfl} locks in each repository directory.
@c <en>See @ref{Concurrency}, for more on @sc{cvs} locks.
@c <en>Having said all this, if you just back up without any
@c <en>of these precautions, the results are unlikely to be
@c <en>particularly dire.  Restoring from backup, the
@c <en>repository might be in an inconsistent state, but this
@c <en>would not be particularly hard to fix manually.
Primeiramente, para ser paranóico, alguem não deve nem
sequer usar o @sc{cvs} durante o backup, ou fazer o
programa de backup travar o @sc{cvs} enquanto estiver
executando.  Para o @sc{cvs} não ser usado, você deve
proibir logins para máquinas que possam acessar o
repositório ou desligar o seu servidor @sc{cvs} or
algum mecanismo similar.  Os detalhes vão depender do
seu sistema operacional e de como você configurou o seu
@sc{cvs}.  Para travar o @sc{cvs}, você deve criar
travas @file{#cvs.rfl} em cada diretório do
repositório.  Veja em @ref{Concorrência}, para saber
mais sobre travas no @sc{cvs}.  ???Having said all
this???,
@c from-translator-to-reviewer can I substitute for
@c "nevertheless"?
se você apenas fizer o backup sem nenhuma
destas precauções, os resultados dificilmente vão ser
catastróficos.  Ao recuperar do backup, o repositório
pode estar em um estado inconsistente, mas isto não
deve ser muito difícil de consertar manualmente.

@c <en>When you restore a repository from backup, assuming
@c <en>that changes in the repository were made after the time
@c <en>of the backup, working directories which were not
@c <en>affected by the failure may refer to revisions which no
@c <en>longer exist in the repository.  Trying to run @sc{cvs}
@c <en>in such directories will typically produce an error
@c <en>message.  One way to get those changes back into the
@c <en>repository is as follows:
Quando você recupera um repositório de um backup,
supondo que mudanças no repositório foram feitas depois
da criação do backup, diretório de trabalho que não
foram afetados pela falha podem se referenciar a
revisões que não mais existam no repositório.  Tentar
rodar o @sc{cvs} em tais diretórios vai gerar uma
mensagem de erro.  uma forma de desfazer estas mudanças
no repositório é dada a seguir:

@itemize @bullet
@item
@c <en>Get a new working directory.
Gere um novo diretório de trabalho.

@item
@c <en>Copy the files from the working directory from before
@c <en>the failure over to the new working directory (do not
@c <en>copy the contents of the @file{CVS} directories, of
@c <en>course).
Copie os arquivos do diretório de trabalho de
antes da falha para o novo diretório de trabalho (não
copie o conteúdo dos diretórios @file{CVS}, obviamente).

@item
@c <en>Working in the new working directory, use commands such
@c <en>as @code{cvs update} and @code{cvs diff} to figure out
@c <en>what has changed, and then when you are ready, commit
@c <en>the changes into the repository.
Mexa no novo diretório de trabalho, usando comandos
como @code{cvs update} e @code{cvs diff} para descobrir
o que mudou, e quando terminar, faça ???commit??? nas
mudanças para o repositório.
@end itemize

@c <en>@node Moving a repository
@node Movendo um repositório
@c <en>@section Moving a repository
@section Movendo um repositório
@c <en>@cindex Repository, moving
@cindex  Repositório, movendo
@c <en>@cindex Moving a repository
@cindex  Movendo um repositório
@c <en>@cindex Copying a repository
@cindex Copiando um repositório

@c <en>Just as backing up the files in the repository is
@c <en>pretty much like backing up any other files, if you
@c <en>need to move a repository from one place to another it
@c <en>is also pretty much like just moving any other
@c <en>collection of files.
Assim como fazer backup dos arquivos no repositório é
muito parecido com fazer backup de quaisquer outros
arquivos, se você precisar mover um repositório de um
lugar para outro, é muito parecido com simplesmente
mover uma coleção de arquivos.

@c <en>The main thing to consider is that working directories
@c <en>point to the repository.  The simplest way to deal with
@c <en>a moved repository is to just get a fresh working
@c <en>directory after the move.  Of course, you'll want to
@c <en>make sure that the old working directory had been
@c <en>checked in before the move, or you figured out some
@c <en>other way to make sure that you don't lose any
@c <en>changes.  If you really do want to reuse the existing
@c <en>working directory, it should be possible with manual
@c <en>surgery on the @file{CVS/Repository} files.  You can
@c <en>see @ref{Working directory storage}, for information on
@c <en>the @file{CVS/Repository} and @file{CVS/Root} files, but
@c <en>unless you are sure you want to bother, it probably
@c <en>isn't worth it.
O mais importante a se considerar é que diretórios de
trabalho apontam para o repositório.  A forma mais
simples de lidar com um repositório movido é
simplesmente pegar um diretório de trabalho novo logo
após da mudança.  É claro que você vai querer se
certificar que o diretório de trabalho antigo foi
devolvido antes da mudança, ou usar de qualquer outro
artifício para se certificar de que não perderá nenhuma
mudança.  Se você realmente quer reusar o antigo diretório de
trabalho, é possível, desde que você faça uma operação
manual nos arquivos @file{CVS/Repository}.  Você pode
ver em @ref{Armazenamento do Diretório de trabalho},
para informações sobre os arquivos
@file{CVS/Repository} e @file{CVS/Root}, mas só se você
quiser ter aborrecimentos, caso contrário esta opção
não é boa.
@c FIXME: Surgery on CVS/Repository should be avoided
@c by making RELATIVE_REPOS the default.
@c FIXME-maybe: might want some documented way to
@c change the CVS/Root files in some particular tree.
@c But then again, I don't know, maybe just having
@c people do this in perl/shell/&c isn't so bad...

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Remote repositories
@node Repositórios remotos
@c <en>@section Remote repositories
@section Repositórios remotos
@c <en>@cindex Repositories, remote
@cindex Repositórios, remotos
@c <en>@cindex Remote repositories
@cindex Repositórios remotos
@c <en>@cindex Client/Server Operation
@cindex Operação cliente/Servidor
@c <en>@cindex Server, CVS
@cindex Servidor, CVS
@c <en>@cindex Remote repositories, port specification
@cindex Repositórios remotos, especificação de porta
@c <en>@cindex Repositories, remote, port specification
@cindex Repositórios, remotos, especificação de porta
@c <en>@cindex Client/Server Operation, port specification
@cindex Operação cliente/Servidor, especificação de porta
@c <en>@cindex pserver (client/server connection method), port specification
@cindex pserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex kserver (client/server connection method), port specification
@cindex kserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex gserver (client/server connection method), port specification
@cindex gserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex port, specifying for remote repositories
@cindex porta, especificação para repositórios remotos

@c <en>        Your working copy of the sources can be on a
@c <en>different machine than the repository.  Using @sc{cvs}
@c <en>in this manner is known as @dfn{client/server}
@c <en>operation.  You run @sc{cvs} on a machine which can
@c <en>mount your working directory, known as the
@c <en>@dfn{client}, and tell it to communicate to a machine
@c <en>which can mount the repository, known as the
@c <en>@dfn{server}.  Generally, using a remote
@c <en>repository is just like using a local one, except that
@c <en>the format of the repository name is:
Sua cópia de trabalho dos fontes pode estar em
uma máquina diferente da do repositório.  Esta forma de
usar o @sc{cvs} é chamada operação
@dfn{client/server}.  Você roda o @sc{cvs} numa máquina
que possa montar seu diretório de trabalho, conhecida
como o @dfn{cliente}, e diz a ela para se comunicar com
uma máquina que pode montar o repositório, chamada de
@dfn{servidor}.  No geral, usar um repositório remoto
é a mesma coisa que usar um local, exceto que o formato
do nome do repositório é:

@example
[:@var{method}:][[@var{user}][:@var{password}]@@]@var{hostname}[:[@var{port}]]/path/to/repository
@end example

@c <en>Specifying a password in the repository name is not recommended during
@c <en>checkout, since this will cause @sc{cvs} to store a cleartext copy of the
@c <en>password in each created directory.  @code{cvs login} first instead
@c <en>(@pxref{Password authentication client}).
Colocar a senha no nome do repositório durante
operações de checkout não é recomendado, já que isto
vai fazer com que o @sc{cvs} guarde uma cópia da senha
em texto em cada diretório criado.  Dê um @code{cvs
login} primeiro ao invés disto
(@pxref{Cliente de autenticação por senha}).

@c <en>The details of exactly what needs to be set up depend
@c <en>on how you are connecting to the server.
Os detalhes de exatamente o que precisa ser preparado
depende de como você está conectado ao seu servidor.

@c <en>If @var{method} is not specified, and the repository
@c <en>name contains @samp{:}, then the default is @code{ext}
@c <en>or @code{server}, depending on your platform; both are
@c <en>described in @ref{Connecting via rsh}.
Se @var{method} não está especificado, e se o nome do
repositório contém @samp{:}, então o padrão é
@code{ext} ou @code{server}, dependendo de sua
plataforma; ambos estão descritos em
@ref{Se conectando via rsh}.
@c Should we try to explain which platforms are which?
@c Platforms like unix and VMS, which only allow
@c privileged programs to bind to sockets <1024 lose on
@c :server:
@c Platforms like Mac and VMS, whose rsh program is
@c unusable or nonexistent, lose on :ext:
@c Platforms like OS/2 and NT probably could plausibly
@c default either way (modulo -b troubles).

@c FIXME: We need to have a better way of explaining
@c what method to use.  This presentation totally
@c obscures the fact that :ext: and CVS_RSH is the way to
@c use SSH, for example.  Plus it incorrectly implies
@c that you need an @code{rsh} binary on the client to use
@c :server:.
@c Also note that rsh not pserver is the right choice if you want
@c users to be able to create their own repositories
@c (because of the --allow-root related issues).
@menu
@c <en>* Server requirements::         Memory and other resources for servers
* Requisitos do servidor::         Memória e outros recursos para servidores
@c <en>* Connecting via rsh::          Using the @code{rsh} program to connect
* Se conectando via rsh::          Usando o programa @code{rsh} para se conectar
@c <en>* Password authenticated::      Direct connections using passwords
* Autenticação por senha::         Conexões diretas usando senhas
@c <en>* GSSAPI authenticated::        Direct connections using GSSAPI
* Autenticação GSSAPI::            Conexões diretas usando GSSAPI
@c <en>* Kerberos authenticated::      Direct connections with kerberos
* Autenticação kerberos::          Conexões diretas com kerberos
@c <en>* Connecting via fork::         Using a forked @code{cvs server} to connect
* Conectando via fork::         Usando um forked @code{cvs server} para conectar
@end menu

@c <en>@node Server requirements
@node Requisitos do servidor
@c <en>@subsection Server requirements
@subsection Requisitos do servidor

@c <en>The quick answer to what sort of machine is suitable as
@c <en>a server is that requirements are modest---a server
@c <en>with 32M of memory or even less can handle a fairly
@c <en>large source tree with a fair amount of activity.
A resposta rápida para que tipo de máquina é adequada
para um servidor é que os requisitos são modestos---um
servidor com 32M de memória ou até menos pode manipular
uma árvore de fontes realmente grande com uma boa
quantidade de atividade.
@c Say something about CPU speed too?  I'm even less sure
@c what to say on that subject...

@c <en>The real answer, of course, is more complicated.
@c <en>Estimating the known areas of large memory consumption
@c <en>should be sufficient to estimate memory requirements.
@c <en>There are two such areas documented here; other memory
@c <en>consumption should be small by comparison (if you find
@c <en>that is not the case, let us know, as described in
@c <en>@ref{BUGS}, so we can update this documentation).
A resposta real, obviamente, é mais complicada.  Estimar
as áreas conhecidas de grande consumo de memória deve
ser suficiente para estimar os requisitos de
memória.  Existem duas destas tais áreas documentadas
aqui; Outros consumos de memória devem ser pequenos
relativamente (se você notar que este não é o caso, nos
faça saber, como descrito em @ref{Paus}, assim
poderemos atualizar este documento).

@c <en>The first area of big memory consumption is large
@c <en>checkouts, when using the @sc{cvs} server.  The server
@c <en>consists of two processes for each client that it is
@c <en>serving.  Memory consumption on the child process
@c <en>should remain fairly small.  Memory consumption on the
@c <en>parent process, particularly if the network connection
@c <en>to the client is slow, can be expected to grow to
@c <en>slightly more than the size of the sources in a single
@c <en>directory, or two megabytes, whichever is larger.
A primeira área de grande consumo de memória são os
grandes checkouts, quando usando o servidor @sc{cvs}.
O servidor consiste de dois processos para cada cliente
que está servindo.  O consumo de memória no processo
filho deve permanecer pequeno.  O consumo de memória no
processo pai, perticularmente se a conexão de rede com
o cliente é pequena, pode crescer para algo um pouco
maior que o tamanho dos fontes num diretório, ou dois
megabytes, o que for maior.
@c "two megabytes" of course is SERVER_HI_WATER.  But
@c we don't mention that here because we are
@c documenting the default configuration of CVS.  If it
@c is a "standard" thing to change that value, it
@c should be some kind of run-time configuration.
@c
@c See cvsclient.texi for more on the design decision
@c to not have locks in place while waiting for the
@c client, which is what results in memory consumption
@c as high as this.

@c <en>Multiplying the size of each @sc{cvs} server by the
@c <en>number of servers which you expect to have active at
@c <en>one time should give an idea of memory requirements for
@c <en>the server.  For the most part, the memory consumed by
@c <en>the parent process probably can be swap space rather
@c <en>than physical memory.
Multiplicando o tamanho de cada servidor @sc{cvs} pelo
número de servidores que você espera ter ativos em cada
momento deve dar uma idéia dos requisitos de memória
para cada servidor.  Para a maior parte, a memória
consumida pelo processo pai pode provavelmente ser
espaço de troca ao invés de memória física.
@c Has anyone verified that notion about swap space?
@c I say it based pretty much on guessing that the
@c ->text of the struct buffer_data only gets accessed
@c in a first in, first out fashion, but I haven't
@c looked very closely.

@c What about disk usage in /tmp on the server?  I think that
@c it can be substantial, but I haven't looked at this
@c again and tried to figure it out ("cvs import" is
@c probably the worst case...).

@c <en>The second area of large memory consumption is
@c <en>@code{diff}, when checking in large files.  This is
@c <en>required even for binary files.  The rule of thumb is
@c <en>to allow about ten times the size of the largest file
@c <en>you will want to check in, although five times may be
@c <en>adequate.  For example, if you want to check in a file
@c <en>which is 10 megabytes, you should have 100 megabytes of
@c <en>memory on the machine doing the checkin (the server
@c <en>machine for client/server, or the machine running
@c <en>@sc{cvs} for non-client/server).  This can be swap
@c <en>space rather than physical memory.  Because the memory
@c <en>is only required briefly, there is no particular need
@c <en>to allow memory for more than one such checkin at a
@c <en>time.
A segunda área de grande consumo de memória é o
@code{diff}, quando trazendo grandes arquivos.  Isto é
preciso mesmo para arquivos binários.  A boa prática é
permitir cerca de dez vezes o tamanho do maior arquivo
que você vai devolver ao servidor, embora cinco vezes
seja adequado.  Por exemplo, se você quer devolver um
arquivo de 10 megabytes, você deve ter 100 megabytes of
memory na máquina fazendo a devolução (o servidor para
o caso cliente/servidor, ou a máquina rodando o
@sc{cvs} para não-cliente/servidor).  Esta memória pode
ser espaço de troca ao invés de memória física.  Já que
a memória é requerida apenas brevemente, não existe
necessidade especial para fornecer memória para mais
de uma devolução ao mesmo tempo.
@c The 5-10 times rule of thumb is from Paul Eggert for
@c GNU diff.  I don't think it is in the GNU diff
@c manual or anyplace like that.
@c
@c Probably we could be saying more about
@c non-client/server CVS.
@c I would guess for non-client/server CVS in an NFS
@c environment the biggest issues are the network and
@c the NFS server.

@c <en>Resource consumption for the client is even more
@c <en>modest---any machine with enough capacity to run the
@c <en>operating system in question should have little
@c <en>trouble.
O consumo de recursos no cliente é ainda mais
modesto---qualquer máquina com capacidade suficiente
para rodar o SO em questão não deve ter muitos
problemas.
@c Is that true?  I think the client still wants to
@c (bogusly) store entire files in memory at times.

@c <en>For information on disk space requirements, see
@c <en>@ref{Creating a repository}.
Para informações sobre requisitos de espaço em disco,
veja em @ref{Criando um repositório}.

@c <en>@node Connecting via rsh
@node Se conectando via rsh
@c <en>@subsection Connecting with rsh
@subsection Se conectando via rsh

@c <en>@cindex rsh
@cindex rsh
@c <en>@sc{cvs} uses the @samp{rsh} protocol to perform these
@c <en>operations, so the remote user host needs to have a
@c <en>@file{.rhosts} file which grants access to the local
@c <en>user. Note that the program that @sc{cvs} uses for this
@c <en>purpose may be specified using the @file{--with-rsh}
@c <en>flag to configure.
O @sc{cvs} usa o protocolo @samp{rsh} para realizar
estas operações, logo, a máquina do usuário remoto tem
que ter um arquivo @file{.rhosts} que dê acesso para o
usuário local.  Observe que o programa que o @sc{cvs}
usa para este objetivo deve ser especificado usando a
opção @file{--with-rsh} para configurar.

@c <en>For example, suppose you are the user @samp{mozart} on
@c <en>the local machine @samp{toe.example.com}, and the
@c <en>server machine is @samp{faun.example.org}.  On
@c <en>faun, put the following line into the file
@c <en>@file{.rhosts} in @samp{bach}'s home directory:
Por exemplo, suponha que você é o usuário @samp{mozart}
na máquina local @samp{toe.example.com}, e a máquina
servidora é @samp{faun.example.org}.  Em faun, ponha a
seguinte linha no arquivo @file{.rhosts} no diretório
pessoal de @samp{bach}:

@example
toe.example.com  mozart
@end example

@noindent
@c <en>Then test that @samp{rsh} is working with
E faça o teste para ver que o @samp{rsh} está
funcionando com

@example
rsh -l bach faun.example.org 'echo $PATH'
@end example

@c <en>@cindex CVS_SERVER, environment variable
@cindex CVS_SERVER, variável de ambiente
@c <en>Next you have to make sure that @code{rsh} will be able
@c <en>to find the server.  Make sure that the path which
@c <en>@code{rsh} printed in the above example includes the
@c <en>directory containing a program named @code{cvs} which
@c <en>is the server.  You need to set the path in
@c <en>@file{.bashrc}, @file{.cshrc}, etc., not @file{.login}
@c <en>or @file{.profile}.  Alternately, you can set the
@c <en>environment variable @code{CVS_SERVER} on the client
@c <en>machine to the filename of the server you want to use,
@c <en>for example @file{/usr/local/bin/cvs-1.6}.
A seguir você vai ter que se certificar que o
@code{rsh} vai ser capaz de acessar o servidor.
Verifique se o caminho que o @code{rsh} mostrou no
exemplo acima inclui o diretório contendo um programa
chamado @code{cvs} que está no servidor.  Você precisa
ajustar o caminho no @file{.bashrc}, @file{.cshrc},
etc., não no @file{.login} ou no @file{.profile}.
Alternativamente, você pode ajustar a variável de
ambiente @code{CVS_SERVER} na máquina cliente para o
nome do arquivo do servidor que você quer usar, por
exemplo @file{/usr/local/bin/cvs-1.6}.
@c FIXME: there should be a way to specify the
@c program in CVSROOT, not CVS_SERVER, so that one can use
@c different ones for different roots.  e.g. ":server;cvs=cvs-1.6:"
@c instead of ":server:".

@c <en>There is no need to edit @file{inetd.conf} or start a
@c <en>@sc{cvs} server daemon.
Não há necessidade de se editar o @file{inetd.conf} ou
iniciar um daemon (serviço) servidor de @sc{cvs}.

@c <en>@cindex :server:, setting up
@cindex :servidor:, ajustando
@c <en>@cindex :ext:, setting up
@cindex :ext:, ajustando
@c <en>@cindex Kerberos, using kerberized rsh
@cindex Kerberos, usando rsh kerberizado
@c <en>@cindex SSH (rsh replacement)
@cindex SSH (substituto do rsh)
@c <en>@cindex rsh replacements (Kerberized, SSH, &c)
@cindex Substitutos do rsh (Kerberizado, SSH, &c)
@c <en>There are two access methods that you use in @code{CVSROOT}
@c <en>for rsh.  @code{:server:} specifies an internal rsh
@c <en>client, which is supported only by some @sc{cvs} ports.
@c <en>@code{:ext:} specifies an external rsh program.  By
@c <en>default this is @code{rsh} (unless otherwise specified
@c <en>by the @file{--with-rsh} flag to configure) but you may set the
@c <en>@code{CVS_RSH} environment variable to invoke another
@c <en>program which can access the remote server (for
@c <en>example, @code{remsh} on HP-UX 9 because @code{rsh} is
@c <en>something different).  It must be a program which can
@c <en>transmit data to and from the server without modifying
@c <en>it; for example the Windows NT @code{rsh} is not
@c <en>suitable since it by default translates between CRLF
@c <en>and LF.  The OS/2 @sc{cvs} port has a hack to pass @samp{-b}
@c <en>to @code{rsh} to get around this, but since this could
@c <en>potentially cause problems for programs other than the
@c <en>standard @code{rsh}, it may change in the future.  If
@c <en>you set @code{CVS_RSH} to @code{SSH} or some other rsh
@c <en>replacement, the instructions in the rest of this
@c <en>section concerning @file{.rhosts} and so on are likely
@c <en>to be inapplicable; consult the documentation for your rsh
@c <en>replacement.
Existem dois métodos de acesso que você pode usar no
@code{CVSROOT} para rsh.  @code{:server:} especifica um
cliente rsh interno, que é suportado apenas por
alguns portes do @sc{cvs}.  @code{:ext:} especifica um
programa rsh externo.  Por padrão é o @code{rsh} (a
menos que se especifique o contrário pela opção
@file{--with-rsh}) mas você pode ajustar a variável de
ambiente @code{CVS_RSH} para invocar outro programa que
pode acessar o servidor remoto (por exemplo,
@code{remsh} num HP-UX 9 já que o @code{rsh} é de certa
forma diferente).  Deve ser um programa que transmita
dados de e para o servidor sem modificar nada; por
exemplo, o @code{rsh} do Windows NT não é adequado já
que por padrão ele permuta CRLF com LF.  O porte do
@sc{cvs} para OS/2 tem um ???hack??? para passar
@samp{-b} para o @code{rsh} para contornar isso, mas
já que isso pode potencialmente causar problemas para
outros programas que não sejam o @code{rsh} padrão,
isso deve mudar no futuro.  Se você ajustar o
@code{CVS_RSH} para @code{SSH} ou algum outro
substituto do rsh, as instruções no restante desta seção a
respeito do arquivo @file{.rhosts} e outros
provavelmente não se aplicarão; consulte a documentação
do seu substituto do rsh.
@c FIXME: there should be a way to specify the
@c program in CVSROOT, not CVS_RSH, so that one can use
@c different ones for different roots.  e.g. ":ext;rsh=remsh:"
@c instead of ":ext:".
@c See also the comment in src/client.c for rationale
@c concerning "rsh" being the default and never
@c "remsh".

@c <en>Continuing our example, supposing you want to access
@c <en>the module @file{foo} in the repository
@c <en>@file{/usr/local/cvsroot/}, on machine
@c <en>@file{faun.example.org}, you are ready to go:
Continuando nosso exemplo, supondo que você quer
acessar o módulo @file{foo} no repositório
@file{/usr/local/cvsroot/}, da máquina
@file{faun.example.org}, você está pronto para seguir:

@example
cvs -d :ext:bach@@faun.example.org:/usr/local/cvsroot checkout foo
@end example

@noindent
@c <en>(The @file{bach@@} can be omitted if the username is
@c <en>the same on both the local and remote hosts.)
(O @file{bach@@} pode ser omitido se o nome de usuário
é o mesmo tanto no servidor como no cliente.)

@c Should we mention "rsh host echo hi" and "rsh host
@c cat" (the latter followed by typing text and ^D)
@c as troubleshooting techniques?  Probably yes
@c (people tend to have trouble setting this up),
@c but this kind of thing can be hard to spell out.

@c <en>@node Password authenticated
@node Autenticação por senha
@c <en>@subsection Direct connection with password authentication
@subsection Conexões diretas com autenticação por senha

@c <en>The @sc{cvs} client can also connect to the server
@c <en>using a password protocol.  This is particularly useful
@c <en>if using @code{rsh} is not feasible (for example,
@c <en>the server is behind a firewall), and Kerberos also is
@c <en>not available.
O cliente @sc{cvs} também pode se conectar ao servidor
usando um protocolo de senha.  Isto é particularmente
útil se não se pode usar o @code{rsh} (por exemplo, se
o servidor está atrás de um firewall), e o Kerberos
também não está disponível.

@c <en>        To use this method, it is necessary to make
@c <en>some adjustments on both the server and client sides.
        Para usar este método é necessário fazer
ajustes tanto do lado do cliente como no do servidor.

@menu
@c <en>* Password authentication server::     Setting up the server
* Servidor de autenticação por senha::     Ajustando o servidor
@c <en>* Password authentication client::     Using the client
* Cliente de autenticação por senha::     Usando o cliente
@c <en>* Password authentication security::   What this method does and does not do
* Segurança com autenticação por senha::   O que este método faz e o que ele não faz
@end menu

@c <en>@node Password authentication server
@node Servidor de autenticação por senha
@c <en>@subsubsection Setting up the server for password authentication
@subsubsection Ajustando o servidor para autenticação por senha

@c <en>First of all, you probably want to tighten the
@c <en>permissions on the @file{$CVSROOT} and
@c <en>@file{$CVSROOT/CVSROOT} directories.  See @ref{Password
@c <en>authentication security}, for more details.
Antes de tudo, você provavelmente vai querer amarrar as
permissões nos diretórios @file{$CVSROOT} e
@file{$CVSROOT/CVSROOT}.  Veja em
@ref{Segurança com autenticação por senha}
para mais informações.

@c <en>@cindex pserver (subcommand)
@cindex pserver (subcomando)
@c <en>@cindex Remote repositories, port specification
@cindex Repositórios remotos, especificação de porta
@c <en>@cindex Repositories, remote, port specification
@cindex Repositórios, remotos, especificação de porta
@c <en>@cindex Client/Server Operation, port specification
@cindex Operação cliente/Servidor, especificação de porta
@c <en>@cindex pserver (client/server connection method), port specification
@cindex pserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex kserver (client/server connection method), port specification
@cindex kserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex gserver (client/server connection method), port specification
@cindex gserver (método de conexão cliente/servidor), especificação de porta
@c <en>@cindex port, specifying for remote repositories
@cindex porta, especificação para repositórios remotos
@c <en>@cindex Password server, setting up
@cindex Servidor por senha, ajustando
@c <en>@cindex Authenticating server, setting up
@cindex Servidor por autenticação, ajustando
@c <en>@cindex inetd, configuring for pserver
@cindex inetd, configurando para pserver
@c <en>@cindex xinetd, configuring for pserver
@cindex xinetd, configurando para pserver
@c FIXME: this isn't quite right regarding port
@c numbers; CVS looks up "cvspserver" in
@c /etc/services (on unix, but what about non-unix?).
@c <en>On the server side, the file @file{/etc/inetd.conf}
@c <en>needs to be edited so @code{inetd} knows to run the
@c <en>command @code{cvs pserver} when it receives a
@c <en>connection on the right port.  By default, the port
@c <en>number is 2401; it would be different if your client
@c <en>were compiled with @code{CVS_AUTH_PORT} defined to
@c <en>something else, though.  This can also be specified in the CVSROOT variable
@c <en>(@pxref{Remote repositories}) or overridden with the CVS_CLIENT_PORT
@c <en>environment variable (@pxref{Environment variables}).
No lado do servidor, o arquivo @file{/etc/inetd.conf}
precisa ser editado para que o @code{inetd} saiba rodar
o comando @code{cvs pserver} quando ele recebe uma
conexão pela porta certa.  Por padrão, a porta de
número 2401; entretanto, isto pode ser diferente se seu
cliente foi compilado com @code{CVS_AUTH_PORT} definido
para outra coisa.  Esta porta também pode ser
especificada na variável CVSROOT
(@pxref{Repositórios remotos}) ou sobreescrita com a variável de
ambiente CVS_CLIENT_PORT (@pxref{Variáveis de ambiente}).

@c <en>        If your @code{inetd} allows raw port numbers in
@c <en>@file{/etc/inetd.conf}, then the following (all on a
@c <en>single line in @file{inetd.conf}) should be sufficient:
        Se seu @code{inetd} permite ???raw port
numbers??? no @file{/etc/inetd.conf}, então o seguinte
(tudo na mesma linha do @file{inetd.conf}) deve ser suficiente:

@example
2401  stream  tcp  nowait  root  /usr/local/bin/cvs
cvs -f --allow-root=/usr/cvsroot pserver
@end example

@noindent
@c <en>(You could also use the
@c <en>@samp{-T} option to specify a temporary directory.)
(Você pode usar também a opção @samp{-T} para
especificar um diretório temporário.)

@c <en>The @samp{--allow-root} option specifies the allowable
@c <en>@sc{cvsroot} directory.  Clients which attempt to use a
@c <en>different @sc{cvsroot} directory will not be allowed to
@c <en>connect.  If there is more than one @sc{cvsroot}
@c <en>directory which you want to allow, repeat the option.
@c <en>(Unfortunately, many versions of @code{inetd} have very small
@c <en>limits on the number of arguments and/or the total length
@c <en>of the command.  The usual solution to this problem is
@c <en>to have @code{inetd} run a shell script which then invokes
@c <en>@sc{cvs} with the necessary arguments.)
A opção @samp{--allow-root} especifica o diretório
@sc{cvsroot} permitido.  Clientes que tentem usar um
diretório @sc{cvsroot} diferente não conseguirão se
conectar.  Se você quer permitir mais de um diretório
@sc{cvsroot}, repita a opção.
(Infelismente, muitas versões do @code{inetd} têm um
limite muito baixo do número de argumentos e/ou do
comprimento total do comando.  A solução usual para
este problema é fazer o @code{inetd} rodar um script de
shell que invoque o @sc{cvs} com os argumentos
necessários.)

@c <en>        If your @code{inetd} wants a symbolic service
@c <en>name instead of a raw port number, then put this in
@c <en>@file{/etc/services}:
        Se seu @code{inetd} precisa de um nome
simbólico de serviço ao invés de um número de porta,
ponha em @file{/etc/services}:

@example
cvspserver      2401/tcp
@end example

@noindent
@c <en>and put @code{cvspserver} instead of @code{2401} in @file{inetd.conf}.
e ponha @code{cvspserver} no lugar de @code{2401} no @file{inetd.conf}.

@c <en>If your system uses @code{xinetd} instead of @code{inetd},
@c <en>the procedure is slightly different.
@c <en>Create a file called @file{/etc/xinetd.d/cvspserver} containing the following:
Se seu sistema usa @code{xinetd} no lugar de @code{inetd},
o procedimento é um pouco diferente.  Crie um arquivo
chamado @file{/etc/xinetd.d/cvspserver} contendo o seguinte:

@example
service cvspserver
@{
   port        = 2401
   socket_type = stream
   protocol    = tcp
   wait        = no
   user        = root
   passenv     = PATH
   server      = /usr/local/bin/cvs
   server_args = -f --allow-root=/usr/cvsroot pserver
@}
@end example

@noindent
@c <en>(If @code{cvspserver} is defined in @file{/etc/services}, you can omit
@c <en>the @code{port} line.)
(Se @code{cvspserver} é definido no
@file{/etc/services}, você pode omitir a linha @code{port}.)

@c <en>        Once the above is taken care of, restart your
@c <en>@code{inetd}, or do whatever is necessary to force it
@c <en>to reread its initialization files.
        Uma vez que as instruções acima foram seguidas,
reinicie seu @code{inetd}, ou faça o que for necessário
para forçá-lo a reler seus arquivos de inicialização.

@c <en>If you are having trouble setting this up, see
@c <en>@ref{Connection}.
Se você enfrentar problemas, veja em @ref{Conexão}.

@c <en>@cindex CVS passwd file
@cindex Arquivo passwd do CVS
@c <en>@cindex passwd (admin file)
@cindex passwd (arquivo administrativo)
@c <en>Because the client stores and transmits passwords in
@c <en>cleartext (almost---see @ref{Password authentication
@c <en>security}, for details), a separate @sc{cvs} password
@c <en>file is generally used, so people don't compromise
@c <en>their regular passwords when they access the
@c <en>repository.  This file is
@c <en>@file{$CVSROOT/CVSROOT/passwd} (@pxref{Intro
@c <en>administrative files}).  It uses a colon-separated
@c <en>format, similar to @file{/etc/passwd} on Unix systems,
@c <en>except that it has fewer fields: @sc{cvs} username,
@c <en>optional password, and an optional system username for
@c <en>@sc{cvs} to run as if authentication succeeds.  Here is
@c <en>an example @file{passwd} file with five entries:
Como o cliente guarda e transmite as senhas em texto simples
(praticamente---veja @ref{Segurança com autenticação por senha}
para detalhes), um arquivo de senhas do @sc{cvs} é
geralmente usado, de forma que as pessoas nao
comprometam suas senhas regulares quando acessam o
repositório.  Este arquivo é o
@file{$CVSROOT/CVSROOT/passwd} (@pxref{Intro aos
arquivos administrativos}).  Ele usa um formato
separado por dois pontos, similar ao do
@file{/etc/passwd} dos sistemas Unix, exceto que este
tem menos campos: nome do usuário @sc{cvs}, senha
opcional, e um nome de usuário de sistema opcional para
o @sc{cvs} rodar como ele se ocorrer a autenticação.
Aqui está um exemplo de arquivo @file{passwd} com cinco
entradas:

@example
anonymous:
bach:ULtgRLXo7NRxs
spwang:1sOp854gDF3DY
melissa:tGX1fS8sun6rY:pubcvs
qproj:XR4EZcEs0szik:pubcvs
@end example

@noindent
@c <en>(The passwords are encrypted according to the standard
@c <en>Unix @code{crypt()} function, so it is possible to
@c <en>paste in passwords directly from regular Unix
@c <en>@file{/etc/passwd} files.)
(As senhas são criptografadas de acordo com a função
Unix @code{crypt()} padrão, portanto é possível copiar
senhas diretamente de arquivos @file{/etc/passwd}
normais do Unix.)

@c <en>The first line in the example will grant access to any
@c <en>@sc{cvs} client attempting to authenticate as user
@c <en>@code{anonymous}, no matter what password they use,
@c <en>including an empty password.  (This is typical for
@c <en>sites granting anonymous read-only access; for
@c <en>information on how to do the "read-only" part, see
@c <en>@ref{Read-only access}.)
A primeira linha no exemplo vai dar acesso a qualquer
cliente @sc{cvs} que tente se autenticar como o usuário
@code{anonymous} (anônimo), qualquer que seja a senha
que ele esteja usando, até mesmo uma senha vazia.
(Isto é típico de sítios que dão acesso somente-leitura
anônimo; para informações sobre como fazer a parte
"somente-leitura", veja em @ref{Acesso somente-leitura}.)

@c <en>The second and third lines will grant access to
@c <en>@code{bach} and @code{spwang} if they supply their
@c <en>respective plaintext passwords.
As segunda e terceira linhas vão fornecer acesso a
@code{bach} e @code{spwang} se eles fornecerem suas
respectivas senhas em texto simples.

@c <en>@cindex User aliases
@cindex User aliases
@c <en>The fourth line will grant access to @code{melissa}, if
@c <en>she supplies the correct password, but her @sc{cvs}
@c <en>operations will actually run on the server side under
@c <en>the system user @code{pubcvs}.  Thus, there need not be
@c <en>any system user named @code{melissa}, but there
@c <en>@emph{must} be one named @code{pubcvs}.
A quarta linha vai dar acesso a @code{melissa}, se ela
fornecer a senha correta, mas suas opareções no
@sc{cvs} vão ser rodadas, na verdade, como o usuário de
sistema @code{pubcvs} no lado do servidor.  Logo, não
há a necessidade de haver qualquer usuário chamado
@code{melissa}, mas @emph{tem que} haver um chamado
@code{pubcvs}.

@c <en>The fifth line shows that system user identities can be
@c <en>shared: any client who successfully authenticates as
@c <en>@code{qproj} will actually run as @code{pubcvs}, just
@c <en>as @code{melissa} does.  That way you could create a
@c <en>single, shared system user for each project in your
@c <en>repository, and give each developer their own line in
@c <en>the @file{$CVSROOT/CVSROOT/passwd} file.  The @sc{cvs}
@c <en>username on each line would be different, but the
@c <en>system username would be the same.  The reason to have
@c <en>different @sc{cvs} usernames is that @sc{cvs} will log their
@c <en>actions under those names: when @code{melissa} commits
@c <en>a change to a project, the checkin is recorded in the
@c <en>project's history under the name @code{melissa}, not
@c <en>@code{pubcvs}.  And the reason to have them share a
@c <en>system username is so that you can arrange permissions
@c <en>in the relevant area of the repository such that only
@c <en>that account has write-permission there.
A quinta linha mostra que identidades de usuários de
sistema podem ser compartilhadas: qualquer cliente que
se autentique com sucesso como @code{qproj} vai na
verdade rodar como @code{pubcvs}, da mesma forma que
@code{melissa} faz.  Desta forma você pode criar um
único e compartilhado usuário de sistema para cada
projeto no seu repositório, e dar a cada desenvolvedor
sua própria linha no arquivo
@file{$CVSROOT/CVSROOT/passwd}.  O nome de usuário do
@sc{cvs} em cada linha vai ser diferente, mas o usuário
de sistema vai ser o mesmo.  A razão para se ter
diferentes nomes de usuários do @sc{cvs} é que o
@sc{cvs} vai registrar suas ações sob estes nomes:
quando @code{melissa} submete (commit) uma mudança ao
projeto, o checkin é gravado no histórico do projeto em
nome de @code{melissa}, não de @code{pubcvs}.  E a
razão para tê-los compartilhando um usuário de sistema
é que você pode ajeitar as permissões da área relevante
do repositório de forma que apenas aquela conta tenha
permissão de leitura lá.

@c <en>If the system-user field is present, all
@c <en>password-authenticated @sc{cvs} commands run as that
@c <en>user; if no system user is specified, @sc{cvs} simply
@c <en>takes the @sc{cvs} username as the system username and
@c <en>runs commands as that user.  In either case, if there
@c <en>is no such user on the system, then the @sc{cvs}
@c <en>operation will fail (regardless of whether the client
@c <en>supplied a valid password).
Se o campo do usuário de sistema está presente, todos
os comandos do @sc{cvs} com autenticação por senha
rodarão como aquele usuário; se nenhum usuário é
especificado, o @sc{cvs} simplesmente vai usar o nome
de usuário do @sc{cvs} como o nome de usuário de
sistema e rodar os comandos como este usuário.  Em
qualquer caso, se não existir tal usuário no sistema, a
operação do @sc{cvs} vai falhar (independente do
cliente ter fornecido uma senha válida).

@c <en>The password and system-user fields can both be omitted
@c <en>(and if the system-user field is omitted, then also
@c <en>omit the colon that would have separated it from the
@c <en>encrypted password).  For example, this would be a
@c <en>valid @file{$CVSROOT/CVSROOT/passwd} file:
Os campos de senha e usuário de sistema podem ser ambos
omitidos (e se o campo de usuário de sistema for
omitido, então a vírgula que o separava da senha
criptografada também pode ser omitida).  Por exemplo,
isto pode ser um arquivo @file{$CVSROOT/CVSROOT/passwd} válido:

@example
anonymous::pubcvs
fish:rKa5jzULzmhOo:kfogel
sussman:1sOp854gDF3DY
@end example

@noindent
@c <en>When the password field is omitted or empty, then the
@c <en>client's authentication attempt will succeed with any
@c <en>password, including the empty string.  However, the
@c <en>colon after the @sc{cvs} username is always necessary,
@c <en>even if the password is empty.
Quando o campo senha não existe ou é vazio, então uma
tentativa de autenticação do cliente vai funcionar
qualquer que seja a senha, inclusive a senha vazia.
Entretanto, o dois pontos antes do nome de usuário do
@sc{cvs} é sempre necessário, mesmo se a senha for vazia.

@c <en>@sc{cvs} can also fall back to use system authentication.
@c <en>When authenticating a password, the server first checks
@c <en>for the user in the @file{$CVSROOT/CVSROOT/passwd}
@c <en>file.  If it finds the user, it will use that entry for
@c <en>authentication as described above.  But if it does not
@c <en>find the user, or if the @sc{cvs} @file{passwd} file
@c <en>does not exist, then the server can try to authenticate
@c <en>the username and password using the operating system's
@c <en>user-lookup routines (this "fallback" behavior can be
@c <en>disabled by setting @code{SystemAuth=no} in the
@c <en>@sc{cvs} @file{config} file, @pxref{config}).
O @sc{cvs} também pode recorrer à autenticação do
sistema.  Quando autenticando uma senha, o servidor
primeiro procura pelo usuário no arquivo
@file{$CVSROOT/CVSROOT/passwd}.  Se ele encontra o
usuário, ele vai usar aquela entrada para autenticar
como descrito acima.  Mas se o usuário não for
encontrado, ou se o arquivo @file{passwd} do  @sc{cvs}
não existe, então o servidor pode tentar autenticar o
nome de usuário e a senha usando as rotinas de
???user-lookup??? do sistema operacional (Este
comportamento "alternativo" pode ser desabilitado ajustando
o @code{SystemAuth=no} no arquivo @file{config} do
@sc{cvs}, @pxref{config}).

@c <en>The default fallback behaviour is to look in 
@c <en>@file{/etc/passwd} for this system password unless your
@c <en>system has PAM (Pluggable Authentication Modules)
@c <en>and your @sc{cvs} server executable was configured to
@c <en>use it at compile time (using @code{./configure --enable-pam} - see the
@c <en>INSTALL file for more).  In this case, PAM will be consulted instead.
@c <en>This means that @sc{cvs} can be configured to use any password
@c <en>authentication source PAM can be configured to use (possibilities
@c <en>include a simple UNIX password, NIS, LDAP, and others) in its
@c <en>global configuration file (usually @file{/etc/pam.conf}
@c <en>or possibly @file{/etc/pam.d/cvs}).  See your PAM documentation
@c <en>for more details on PAM configuration.
O comportamento alternativo é procurar no
@file{/etc/passwd} por este usuário de sistema a menos
que seu sistema tenha PAM (Pluggable Authentication
Modules) e seu servidor do @sc{cvs} executável foi
configurado para usar PAM em tempo de compilação
(usando @code{./configure --enable-pam} - veja no
arquivo INSTALL para saber mais).  Neste caso, PAM é
que vai autenticar.  Isto significa que o @sc{cvs} pode
ser configurado para usar qualquer fonte de
autenticação por senha que PAM possa ser configurada
para usar (as possibilidades incluem senha simples de
UNIX, NIS, LDAP, e outras) no seu arquivo de
configuração global (em geral @file{/etc/pam.conf}
ou possivelmente @file{/etc/pam.d/cvs}).  Veja em sua
documentação do PAM para mais detalhes sobre a
configuração do PAM.

@c <en>Note that PAM is an experimental feature in @sc{cvs} and feedback is
@c <en>encouraged.  Please send a mail to one of the @sc{cvs} mailing lists
@c <en>(@code{info-cvs@@nongnu.org} or @code{bug-cvs@@nongnu.org}) if you use the 
@c <en>@sc{cvs} PAM support.
Observe que PAM é uma funcionalidade experimental no
@sc{cvs} e feedback é encorajado.  Por favor, mande
e-mail para uma das listas do @sc{cvs}
(@code{info-cvs@@nongnu.org} ou @code{bug-cvs@@nongnu.org})
se você usa o suporte a PAM do @sc{cvs}.  As listas são
em inglês.

@c <en>@strong{WARNING: Using PAM gives the system administrator much more 
@c <en>flexibility about how @sc{cvs} users are authenticated but 
@c <en>no more security than other methods.  See below for more.} 
@strong{ATENÇÃO: Usar PAM dá ao administrador do
sistema muito mais flexibilidade sobre como os usuários
do @sc{cvs} são autenticados mas não dá mais segurança
que outros métodos.  Veja abaixo mais detalhes.} 

@c <en>CVS needs an "auth" and "account" module in the 
@c <en>PAM configuration file. A typical PAM configuration 
@c <en>would therefore have the following lines 
@c <en>in @file{/etc/pam.conf} to emulate the standard @sc{cvs} 
@c <en>system @file{/etc/passwd} authentication:
CVS precisa de um módulo "auth" e "account" no arquivo
de configuração PAM.  Uma configuração PAM típica deve
portanto ter as seguintes linhas no
@file{/etc/pam.conf} para simular a autenticação
@file{/etc/passwd} do sistema @sc{cvs} padrão:

@example
cvs	auth	    required	pam_unix.so
cvs	account	    required	pam_unix.so
@end example

@c <en>The the equivalent @file{/etc/pam.d/cvs} would contain
O @file{/etc/pam.d/cvs} equivalente deve conter

@example
auth	    required	pam_unix.so
account	    required	pam_unix.so
@end example

@c <en>Some systems require a full path to the module so that
@c <en>@file{pam_unix.so} (Linux) would become something like 
@c <en>@file{/usr/lib/security/$ISA/pam_unix.so.1} (Sun Solaris).
@c <en>See the @file{contrib/pam} subdirectory of the @sc{cvs}
@c <en>source distribution for further example configurations.
Alguns sistemas necessitam de um caminho completo para
o módulo de forma que @file{pam_unix.so} (Linux) vai se
tornar algo do tipo
@file{/usr/lib/security/$ISA/pam_unix.so.1} (Sun
Solaris).  Veja o subdiretório @file{contrib/pam} da
distribuição em código fonte do @sc{cvs} para mais
exemplos de configuração.

@c <en>The PAM service name given above as "cvs" is just
@c <en>the service name in the default configuration amd can be
@c <en>set using
@c <en>@code{./configure --with-hardcoded-pam-service-name=<pam-service-name>}
@c <en>before compiling.  @sc{cvs} can also be configured to use whatever
@c <en>name it is invoked as as its PAM service name using
@c <en>@code{./configure --without-hardcoded-pam-service-name}, but this
@c <en>feature should not be used if you may not have control of the name
@c <en>@sc{cvs} will be invoked as.
O nome de serviço PAM dado abaixo como "cvs" é apenas o
nome do serviço na configuração padrão e pode ser
mudado usando
@code{./configure --with-hardcoded-pam-service-name=<pam-service-name>}
antes de compilar.  ??? @sc{cvs} can also be configured to use whatever
name it is invoked as as its PAM service name using
@code{./configure
--without-hardcoded-pam-service-name}???, mas esta
característica não deve ser usada se você não tiver
controle do nome com o qual o @sc{cvs} será chamado.

@c <en>Be aware, also, that falling back to system
@c <en>authentication might be a security risk: @sc{cvs}
@c <en>operations would then be authenticated with that user's
@c <en>regular login password, and the password flies across
@c <en>the network in plaintext.  See @ref{Password
@c <en>authentication security} for more on this.
@c <en>This may be more of a problem with PAM authentication
@c <en>because it is likely that the source of the system 
@c <en>password is some central authentication service like
@c <en>LDAP which is also used to authenticate other services.
Esteja avisado, além disso, que recorrer a autenticação
do sistema pode ser um risco de segurança: as operações
do @sc{cvs} deveram ser autenticadas com a senha do
usuário regular, e a senha vai passar pela rede em
texto plano.  Veja em @ref{Segurança com autenticação por senha}
para saber mais.  Isto pode ser um problema a mais com
autenticação PAM por que é provável que a fonte do
sistema de senhas é algum serviço de autenticação
central como o LDAP, que é usado para autenticar outros
serviços.

@c <en>On the other hand, PAM makes it very easy to change your password
@c <en>regularly.  If they are given the option of a one-password system for
@c <en>all of their activities, users are often more willing to change their
@c <en>password on a regular basis.
Por outro lado, PAM faz com que seja fácil mudar a
senha regularmente.  Se os usuários têm um sistema de
senha única, são mais fáceis de convencer a trocar de
senha regularmente.

@c <en>In the non-PAM configuration where the password is stored in the
@c <en>@file{CVSROOT/passwd} file, it is difficult to change passwords on a
@c <en>regular basis since only administrative users (or in some cases
@c <en>processes that act as an administrative user) are typicaly given
@c <en>access to modify this file.  Either there needs to be some
@c <en>hand-crafted web page or set-uid program to update the file, or the
@c <en>update needs to be done by submitting a request to an administrator to
@c <en>perform the duty by hand.  In the first case, having to remember to
@c <en>update a separate password on a periodic basis can be difficult.  In
@c <en>the second case, the manual nature of the change will typically mean
@c <en>that the password will not be changed unless it is absolutely
@c <en>necessary.
Numa configuração não-PAM, onde a senha é guardada no
arquivo @file{CVSROOT/passwd}, é difícil mudar as
senhas regularmente já que apenas usuários
administradores (ou em alguns casos, processos que agem
como usuários administradores) têm acesso de escrita ao
arquivo.  ???Either there needs to be some
hand-crafted web page or set-uid program to update the file, or the
update needs to be done by submitting a request to an administrator to
perform the duty by hand???.  No primeiro caso, ter que
lembrar de uma senha a parte periodicamente pode ser
difícil.  No segundo caso, a natureza manual da mudança
vai significar que a senha não vai ser mudada até que
seja absolutamente necessário.

@c <en>Note that PAM administrators should probably avoid configuring
@c <en>one-time-passwords (OTP) for @sc{cvs} authentication/authorization.  If
@c <en>OTPs are desired, the administrator may wish to encourage the use of
@c <en>one of the other Client/Server access methods.  See the section on
@c <en>@pxref{Remote repositories} for a list of other methods.
Observe que os administradores do PAM vão evitar
configurar one-time-passwords (OTP) para
autenticação/autorização do @sc{cvs}.  Se os OTPs são
desejados, o administrador vai querer encorajar o uso
de um dos outros métodos de acesso cliente/servidor.
Veja a seção em @pxref{Repositórios remotos} para uma
lista de outros métodos.

@c <en>Right now, the only way to put a password in the
@c <en>@sc{cvs} @file{passwd} file is to paste it there from
@c <en>somewhere else.  Someday, there may be a @code{cvs
@c <en>passwd} command.
Por agora, a única forma de botar uma senha no arquivo
@file{passwd} do @sc{cvs} é colar de algum outro lugar.
Algum dia vai haver um comando @code{cvs passwd}.

@c <en>Unlike many of the files in @file{$CVSROOT/CVSROOT}, it
@c <en>is normal to edit the @file{passwd} file in-place,
@c <en>rather than via @sc{cvs}.  This is because of the
@c <en>possible security risks of having the @file{passwd}
@c <en>file checked out to people's working copies.  If you do
@c <en>want to include the @file{passwd} file in checkouts of
@c <en>@file{$CVSROOT/CVSROOT}, see @ref{checkoutlist}.
Ao contrário da maioria dos arquivos no
@file{$CVSROOT/CVSROOT}, é normal editar o arquivo
@file{passwd} in loco, ao invés de pelo @sc{cvs}.  Isto
é devido a possíveis riscos de segurança ao se ter
cópias do arquivo @file{passwd} baixadas para o
diretório de trabalho das pessoas.  Se você quer
incluir o arquivo @file{passwd} nos checkouts de
@file{$CVSROOT/CVSROOT}, veja em @ref{checkoutlist}.

@c We might also suggest using the @code{htpasswd} command
@c from freely available web servers as well, but that
@c would open up a can of worms in that the users next
@c questions are likely to be "where do I get it?" and
@c "how do I use it?"
@c Also note that htpasswd, at least the version I had,
@c likes to clobber the third field.

@c <en>@node Password authentication client
@node Cliente de autenticação por senha
@c <en>@subsubsection Using the client with password authentication
@subsubsection Usando o cliente com autenticação por senha
@c <en>@cindex Login (subcommand)
@cindex Login (subcomando)
@c <en>@cindex Password client, using
@cindex Cliente por senha, usando
@c <en>@cindex Authenticated client, using
@cindex Cliente autenticado, usando
@c <en>@cindex :pserver:, setting up
@cindex :pserver:, ajustando
@c <en>To run a @sc{cvs} command on a remote repository via
@c <en>the password-authenticating server, one specifies the
@c <en>@code{pserver} protocol, optional username, repository host, an
@c <en>optional port number, and path to the repository.  For example:
Para rodar um comando @sc{cvs} num repositório remoto
via servidor de autenticação por senha, deve-se
espedificar o protocolo @code{pserver}, um nome de
usuário opcional, a máquina do repositório, uma porta
opcional, e o caminho para o repositório.  Por exemplo:

@example
cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj
@end example

@noindent
@c <en>or
or

@example
CVSROOT=:pserver:bach@@faun.example.org:2401/usr/local/cvsroot
cvs checkout someproj
@end example

@c <en>However, unless you're connecting to a public-access
@c <en>repository (i.e., one where that username doesn't
@c <en>require a password), you'll need to supply a password or @dfn{log in} first.
@c <en>Logging in verifies your password with the repository and stores it in a file.
@c <en>It's done with the @code{login} command, which will
@c <en>prompt you interactively for the password if you didn't supply one as part of
@c <en>@var{$CVSROOT}:
Entretanto, a menos que você esteja conectado a um
repositório de acesso público (i.e., um daqueles que o
usuário não precisa de senha), você vai precisar
fornecer uma senha ou @dfn{se logar} antes.  Ao se
logar, a sua senha é comparada com a do repositório e
guardada num arquivo.  Isto é feito com o comando
@code{login}, que vai pedir a sua senha interativamente
se você não forneceu ela como parte do @var{$CVSROOT}:

@example
cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot login
CVS password:
@end example

@noindent
@c <en>or
or

@example
cvs -d :pserver:bach:p4ss30rd@@faun.example.org:/usr/local/cvsroot login
@end example

@c <en>After you enter the password, @sc{cvs} verifies it with
@c <en>the server.  If the verification succeeds, then that
@c <en>combination of username, host, repository, and password
@c <en>is permanently recorded, so future transactions with
@c <en>that repository won't require you to run @code{cvs
@c <en>login}.  (If verification fails, @sc{cvs} will exit
@c <en>complaining that the password was incorrect, and
@c <en>nothing will be recorded.)
Depois de fornecer a senha, o @sc{cvs} a verifica no
servidor.   Se a verificação procede, então esta
combinação de usuário, máquina, repositório e senha é
gravada permanentemente de forma que futuras transações
com este repositório não vão requerer a execução de
@code{cvs login}.  (Se a verificação falhar, @sc{cvs}
vai sair avisando que a senha está incorreta e nada vai
ser gravado.)

@c <en>The records are stored, by default, in the file
@c <en>@file{$HOME/.cvspass}.  That file's format is
@c <en>human-readable, and to a degree human-editable, but
@c <en>note that the passwords are not stored in
@c <en>cleartext---they are trivially encoded to protect them
@c <en>from "innocent" compromise (i.e., inadvertent viewing
@c <en>by a system administrator or other non-malicious
@c <en>person).
A gravação é feita, por padrão, no arquivo
@file{$HOME/.cvspass}.  O arquivo tem formato
legível, e num certo nível, editável, mas observe que
as senhas não são guardadas em texto plano---elas são
codificadas trivialmente para proteger contra
???compromise??? "inocente" (i.e., um administrador
desavisado dar uma olhada ou outra pessoa sem segundas
intenções).

@c <en>@cindex CVS_PASSFILE, environment variable
@c <en>You can change the default location of this file by
@c <en>setting the @code{CVS_PASSFILE} environment variable.
@c <en>If you use this variable, make sure you set it
@c <en>@emph{before} @code{cvs login} is run.  If you were to
@c <en>set it after running @code{cvs login}, then later
@c <en>@sc{cvs} commands would be unable to look up the
@c <en>password for transmission to the server.
@cindex CVS_PASSFILE, variável de ambiente
Você pode  mudar o local padrão deste arquivo ajustando
a variável de ambiente @code{CVS_PASSFILE}.  Se você
usar esta variável, certifique-se de fazer isto
@emph{antes} de rodar @code{cvs login}.  Se você fizer
isto depois de rodar o @code{cvs login}, então mais
tarde os comandos do @sc{cvs} vão ser incapazes de
encontrar a senha para mandar para o servidor.
  
@c <en>Once you have logged in, all @sc{cvs} commands using
@c <en>that remote repository and username will authenticate
@c <en>with the stored password.  So, for example
Uma vez que você esteja autenticado, todos os comandos
do @sc{cvs} que usam o repositório remoto e senha vão
se autenticar com a senha armazenada.  Então, por exemplo
  
@example
cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot checkout foo
@end example

@c <en>@noindent
@c <en>should just work (unless the password changes on the
@c <en>server side, in which case you'll have to re-run
@c <en>@code{cvs login}).
@noindent
vai funcionar (a menos que a senha mude no servidor,
onde neste caso você vai ter que rodar de novo
@code{cvs login}).

@c <en>Note that if the @samp{:pserver:} were not present in
@c <en>the repository specification, @sc{cvs} would assume it
@c <en>should use @code{rsh} to connect with the server
@c <en>instead (@pxref{Connecting via rsh}).
Observe que se o @samp{:pserver:} não estiver presente
na especificação do repositório, o @sc{cvs} vai assumir
que deve usar o @code{rsh} para se conectar com o
servidor, neste caso (@pxref{Se conectando via rsh}).

@c <en>Of course, once you have a working copy checked out and
@c <en>are running @sc{cvs} commands from within it, there is
@c <en>no longer any need to specify the repository
@c <en>explicitly, because @sc{cvs} can deduce the repository
@c <en>from the working copy's @file{CVS} subdirectory.
É claro que, uma vez que você tenha uma cópia de
trabalho baixada e está rodando comandos @sc{cvs} de
dentro dela, não existe mais a necessidade de
explicitar o repositório, já que o @sc{cvs} pode
deduzir o repositório a partir do subdiretório
@file{CVS} da cópia de trabalho.

@c FIXME: seems to me this needs somewhat more
@c explanation.
@c <en>@cindex Logout (subcommand)
@c <en>The password for a given remote repository can be
@c <en>removed from the @code{CVS_PASSFILE} by using the
@c <en>@code{cvs logout} command.
@cindex Logout (subcomando)
A senha para um dado repositório remoto pode ser
removida do @code{CVS_PASSFILE} usando o comando
@code{cvs logout}.

@c <en>@node Password authentication security
@node Segurança com autenticação por senha
@c <en>@subsubsection Security considerations with password authentication
@subsubsection Considerações de segurança com autenticação por senha

@c <en>@cindex Security, of pserver
@cindex Segurança com pserver
@c <en>The passwords are stored on the client side in a
@c <en>trivial encoding of the cleartext, and transmitted in
@c <en>the same encoding.  The encoding is done only to
@c <en>prevent inadvertent password compromises (i.e., a
@c <en>system administrator accidentally looking at the file),
@c <en>and will not prevent even a naive attacker from gaining
@c <en>the password.
As senhas são guardadas no cliente com uma codificação
trivial de texto, e transmitidas na mesma codificação.
Esta codificação é feita apenas para prevenir uma
quebra de segredo inadvertida (i.e., um administrador
de sistema acidentalmente olhar o arquivo), e não
evita nem mesmo que um atacante ingênuo consiga a
senha.

@c FIXME: The bit about "access to the repository
@c implies general access to the system is *not* specific
@c to pserver; it applies to kerberos and SSH and
@c everything else too.  Should reorganize the
@c documentation to make this clear.
@c <en>The separate @sc{cvs} password file (@pxref{Password
@c <en>authentication server}) allows people
@c <en>to use a different password for repository access than
@c <en>for login access.  On the other hand, once a user has
@c <en>non-read-only
@c <en>access to the repository, she can execute programs on
@c <en>the server system through a variety of means.  Thus, repository
@c <en>access implies fairly broad system access as well.  It
@c <en>might be possible to modify @sc{cvs} to prevent that,
@c <en>but no one has done so as of this writing.
O arquivo de senhas do @sc{cvs} em separado
(@pxref{Servidor de autenticação por senha}) permite
que as pessoas usem uma senha de acesso ao repositório
deferente da senha de login.  Por outro lado, uma vez
que um usuário tenha acesso maior que somente-leitura,
ele pode executar programas no sistema do servidor de
várias formas.  Então, o acesso ao repositório implica
acesso ao sistema como um todo.  É possível modificar o
@sc{cvs} para evitar isto, mas até agora ninguem agiu
neste sentido.
@c OpenBSD uses chroot() and copies the repository to
@c provide anonymous read-only access (for details see
@c http://www.openbsd.org/anoncvs.shar).  While this
@c closes the most obvious holes, I'm not sure it
@c closes enough holes to recommend it (plus it is
@c *very* easy to accidentally screw up a setup of this
@c type).

@c <en>Note that because the @file{$CVSROOT/CVSROOT} directory
@c <en>contains @file{passwd} and other files which are used
@c <en>to check security, you must control the permissions on
@c <en>this directory as tightly as the permissions on
@c <en>@file{/etc}.  The same applies to the @file{$CVSROOT}
@c <en>directory itself and any directory
@c <en>above it in the tree.  Anyone who has write access to
@c <en>such a directory will have the ability to become any
@c <en>user on the system.  Note that these permissions are
@c <en>typically tighter than you would use if you are not
@c <en>using pserver.
observe que já que o diretório @file{$CVSROOT/CVSROOT}
contém o arquivo @file{passwd} e outros arquivos que
são usados para verificações de segurança, você deve
controlar as permissões neste diretório com o mesmo
cuidado que tem com as permissões em @file{/etc}.  O
mesmo se aplica ao próprio diretório @file{$CVSROOT} e
qualquer diretório acima dele na árvore de diretórios.
Qualquer pessoas que tenha permissão de escrita a algum
destes diretórios vai ter a habilidade de se tornar
qualquer usuário do sistema.  Observe que estas
permissões são em geral mais rígidas que as que você
usaria se você não estivesse usando o pserver.
@c TODO: Would be really nice to document/implement a
@c scheme where the CVS server can run as some non-root
@c user, e.g. "cvs".  CVSROOT/passwd would contain a
@c bunch of entries of the form foo:xxx:cvs (or the "cvs"
@c would be implicit).  This would greatly reduce
@c security risks such as those hinted at in the
@c previous paragraph.  I think minor changes to CVS
@c might be required but mostly this would just need
@c someone who wants to play with it, document it, &c.

@c <en>In summary, anyone who gets the password gets
@c <en>repository access (which may imply some measure of general system
@c <en>access as well).  The password is available to anyone
@c <en>who can sniff network packets or read a protected
@c <en>(i.e., user read-only) file.  If you want real
@c <en>security, get Kerberos.
Resumindo, qualquer um que consiga as senhas vai ter
acesso ao repositório (que implica de certa forma
acesso ao sistema em geral).  A senha está disponível
para qualquer um que possa ???sniff??? pacotes de rede
ou ler um arquivo protegido (i.e., somente-leitura para
usuários).  Se você quer segurança real, use Kerberos.

@c <en>@node GSSAPI authenticated
@node Autenticação GSSAPI
@c <en>@subsection Direct connection with GSSAPI
@subsection Conexão direta com GSSAPI

@c <en>@cindex GSSAPI
@cindex GSSAPI
@c <en>@cindex Security, GSSAPI
@cindex Segurança, GSSAPI
@c <en>@cindex :gserver:, setting up
@cindex :gserver:, ajustando
@c <en>@cindex Kerberos, using :gserver:
@cindex Kerberos, usando :gserver:
@c <en>GSSAPI is a generic interface to network security
@c <en>systems such as Kerberos 5.
@c <en>If you have a working GSSAPI library, you can have
@c <en>@sc{cvs} connect via a direct @sc{tcp} connection,
@c <en>authenticating with GSSAPI.
GSSAPI é uma interface genérica para sistemas de
segurança em rede como o Kerberos 5.  Se você tem uma
biblioteca GSSAPI funcionando, você pode ter seu
@sc{cvs} conectado via uma conexão @sc{tcp} direta, se
autenticando com GSSAPI.

@c <en>To do this, @sc{cvs} needs to be compiled with GSSAPI
@c <en>support; when configuring @sc{cvs} it tries to detect
@c <en>whether GSSAPI libraries using kerberos version 5 are
@c <en>present.  You can also use the @file{--with-gssapi}
@c <en>flag to configure.
Para isto, o @sc{cvs} precisa ter sido compilado com
suporte a GSSAPI; quando você estiver configurando o
@sc{cvs} ele vai tentar detectar se as bibliotecas
GSSAPI usando kerberos versão 5 estão presentes.  Você
também pode configurar isto com opção @file{--with-gssapi}.

@c <en>The connection is authenticated using GSSAPI, but the
@c <en>message stream is @emph{not} authenticated by default.
@c <en>You must use the @code{-a} global option to request
@c <en>stream authentication.
A conexão é autenticada usando GSSAPI, mas o fluxo de
mensagem @emph{não é} autenticado por padrão.  Você deve
usar a opção global @code{-a} para pedir autenticação
de fluxo.

@c <en>The data transmitted is @emph{not} encrypted by
@c <en>default.  Encryption support must be compiled into both
@c <en>the client and the server; use the
@c <en>@file{--enable-encrypt} configure option to turn it on.
@c <en>You must then use the @code{-x} global option to
@c <en>request encryption.
Os dados transmitidos @emph{não} são criptografados por
padrão.  Suporte a criptografia deve ser compilado
tanto no cliente quanto no servidor; use a opção de
configuração @file{--enable-encrypt} para ativar isto.
Com isto você deve usar a opção global @code{-x} para
pedir criptografia.

@c <en>GSSAPI connections are handled on the server side by
@c <en>the same server which handles the password
@c <en>authentication server; see @ref{Password authentication
@c <en>server}.  If you are using a GSSAPI mechanism such as
@c <en>Kerberos which provides for strong authentication, you
@c <en>will probably want to disable the ability to
@c <en>authenticate via cleartext passwords.  To do so, create
@c <en>an empty @file{CVSROOT/passwd} password file, and set
@c <en>@code{SystemAuth=no} in the config file
@c <en>(@pxref{config}).
Conexões GSSAPI são tratadas no lado servidor pelo
mesmo servidor que cuida de autenticação por senha;
veja em @ref{Servidor de autenticação por senha}.  Se
você está usando um mecanismo GSSAPI como o Kerberos,
que fornece autenticação forte, você vai provavelmente
querer impedir autenticação via senhas em texto plano.
Para tal, crie um arquivo de senha
@file{CVSROOT/passwd} vazio e faça @code{SystemAuth=no}
no arquivo config (@pxref{config}).

@c <en>The GSSAPI server uses a principal name of
@c <en>cvs/@var{hostname}, where @var{hostname} is the
@c <en>canonical name of the server host.  You will have to
@c <en>set this up as required by your GSSAPI mechanism.
O servidor GSSAPI usa um nome principal de
cvs/@var{hostname}, onde @var{hostname} é o nome
canônico da máquina servidora.  Você vai ter que
ajustar isto como é exigido pelo seu mecanismo GSSAPI.

@c <en>To connect using GSSAPI, use @samp{:gserver:}.  For
@c <en>example,
Para se conectar usando GSSAPI, use @samp{:gserver:}.  Por
exemplo,

@example
cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo
@end example

@c <en>@node Kerberos authenticated
@node Autenticação kerberos
@c <en>@subsection Direct connection with kerberos
@subsection Conexão direta com kerberos

@c <en>@cindex Kerberos, using :kserver:
@cindex Kerberos, usando :kserver:
@c <en>@cindex Security, kerberos
@cindex Segurança, kerberos
@c <en>@cindex :kserver:, setting up
@cindex :kserver:, ajustando
@c <en>The easiest way to use kerberos is to use the kerberos
@c <en>@code{rsh}, as described in @ref{Connecting via rsh}.
@c <en>The main disadvantage of using rsh is that all the data
@c <en>needs to pass through additional programs, so it may be
@c <en>slower.  So if you have kerberos installed you can
@c <en>connect via a direct @sc{tcp} connection,
@c <en>authenticating with kerberos.
A forma mais fácil de usar kerberos é usar o @code{rsh}
kerberos, como descrito em @ref{Se conectando via
rsh}.  A principal desvantagem de usar rsh é que todos
os dados precisam passar por outros programas, o que é
mais lento.  Portanto, se você tem kerberos instalado,
você pode se conectar via conexão @sc{tcp} direta,
autenticando com kerberos.

@c <en>This section concerns the kerberos network security
@c <en>system, version 4.  Kerberos version 5 is supported via
@c <en>the GSSAPI generic network security interface, as
@c <en>described in the previous section.
Esta seção diz respeito ao sistema de segurança de rede
kerberos (kerberos network security system), versão 4.
Kerberos versão 5 é suportado pela interface de
segurança de rede genérica GSSAPI, como descrito na
seção anterior.

@c <en>To do this, @sc{cvs} needs to be compiled with kerberos
@c <en>support; when configuring @sc{cvs} it tries to detect
@c <en>whether kerberos is present or you can use the
@c <en>@file{--with-krb4} flag to configure.
Para isto, o @sc{cvs}  precisa ter sido compilado com
suporte a kerberos; quando você estiver configurando o
@sc{cvs} ele vai tentar detectar se as bibliotecas
kerberos estão presentes ou você pode configurar isto
com a opção @file{--with-krb4}.

@c <en>The data transmitted is @emph{not} encrypted by
@c <en>default.  Encryption support must be compiled into both
@c <en>the client and server; use the
@c <en>@file{--enable-encryption} configure option to turn it
@c <en>on.  You must then use the @code{-x} global option to
@c <en>request encryption.
Os dados transmitidos @emph{não} são criptografados por
padrão.  Suporte a criptografia deve ser compilado
tanto no cliente quanto no servidor; use a opção de
configuração @file{--enable-encryption} para ativar
isto.  Você deve então usar a opção global @code{-x}
para pedir criptografia.

@c <en>@cindex CVS_CLIENT_PORT
@cindex CVS_CLIENT_PORT
@c <en>You need to edit @file{inetd.conf} on the server
@c <en>machine to run @code{cvs kserver}.  The client uses
@c <en>port 1999 by default; if you want to use another port
@c <en>specify it in the @code{CVSROOT} (@pxref{Remote repositories})
@c <en>or the @code{CVS_CLIENT_PORT} environment variable
@c <en>(@pxref{Environment variables}) on the client.
Você precisa editar o @file{inetd.conf} no servidor
para rodar @code{cvs kserver}.  O cliente usa a porta
1999 por padrão; se você quer usar outra porta
especifique ela no @code{CVSROOT} (@pxref{Repositórios remotos})
ou na variável de ambiente @code{CVS_CLIENT_PORT}
(@pxref{Variáveis de ambiente}) no cliente.

@c <en>@cindex kinit
@cindex kinit
@c <en>When you want to use @sc{cvs}, get a ticket in the
@c <en>usual way (generally @code{kinit}); it must be a ticket
@c <en>which allows you to log into the server machine.  Then
@c <en>you are ready to go:
Quando você quiser usar o @sc{cvs}, pegue um tíquete da
forma usual (geralmente @code{kinit}); ele pode ser um
tíquete que te permite se autenticar na máquina
servidora.  Então você estará pronto para seguir:

@example
cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo
@end example

@c <en>Previous versions of @sc{cvs} would fall back to a
@c <en>connection via rsh; this version will not do so.
Versões anteriores do @sc{cvs} podem recair numa
conexão via rsh; esta versão não vai fazer isso.

@c <en>@node Connecting via fork
@node Conectando via fork
@c <en>@subsection Connecting with fork
@subsection Conectando via fork

@c <en>@cindex fork, access method
@cindex fork, método de acesso
@c <en>@cindex :fork:, setting up
@cindex :fork:, ajustando
@c <en>This access method allows you to connect to a
@c <en>repository on your local disk via the remote protocol.
@c <en>In other words it does pretty much the same thing as
@c <en>@code{:local:}, but various quirks, bugs and the like are
@c <en>those of the remote @sc{cvs} rather than the local
@c <en>@sc{cvs}.
Este método de acesso permite a você conectar a um
repositório no seu disco local via um protocolo
remoto.  Em outras palavras, ele faz praticamente a
mesma coisa que @code{:local:}, mas várias peduliaridades, paus
e coisas do gênero são os mesmos do @sc{cvs} remoto ao
invés do @sc{cvs} local.

@c <en>For day-to-day operations you might prefer either
@c <en>@code{:local:} or @code{:fork:}, depending on your
@c <en>preferences.  Of course @code{:fork:} comes in
@c <en>particularly handy in testing or
@c <en>debugging @code{cvs} and the remote protocol.
@c <en>Specifically, we avoid all of the network-related
@c <en>setup/configuration, timeouts, and authentication
@c <en>inherent in the other remote access methods but still
@c <en>create a connection which uses the remote protocol.
Para trabalhar no dia-a-dia você vai preferir ou o
@code{:local:} ou o @code{:fork:}, dependendo de suas
preferências.  É claro que @code{:fork:} é bastante
útil em testes ou depuração do @code{cvs} e o protocolo
remoto.  Especificamente, nós evitamos todas as
configurações/ajustes relacionados a redes, sessões
expirando e autenticação inerentes de métodos de acesso
remoto mas ainda assim criamos uma conexão que usa o
protocolo remoto.

@c <en>To connect using the @code{fork} method, use
@c <en>@samp{:fork:} and the pathname to your local
@c <en>repository.  For example:
Para se conectar usando o método @code{fork}, use
@samp{:fork:} e o caminho para seu repositório local.
Por exemplo:

@example
cvs -d :fork:/usr/local/cvsroot checkout foo
@end example

@c <en>@cindex CVS_SERVER, and :fork:
@cindex CVS_SERVER, and :fork:
@c <en>As with @code{:ext:}, the server is called @samp{cvs}
@c <en>by default, or the value of the @code{CVS_SERVER}
@c <en>environment variable.
Assim como com @code{:ext:}, o servidor é chamado
@samp{cvs} por padrão, ou o valor da variável de
ambiente @code{CVS_SERVER}.

@c ---------------------------------------------------------------------
@c <en>@node Read-only access
@node Acesso somente-leitura
@c <en>@section Read-only repository access
@section Acesso somente-leitura ao repositório
@c <en>@cindex Read-only repository access
@cindex Acesso somente-leitura ao repositório
@c <en>@cindex readers (admin file)
@cindex readers (arquivo administrativo)
@c <en>@cindex writers (admin file)
@cindex writers (arquivo administrativo)

@c <en>        It is possible to grant read-only repository
@c <en>access to people using the password-authenticated
@c <en>server (@pxref{Password authenticated}).  (The
@c <en>other access methods do not have explicit support for
@c <en>read-only users because those methods all assume login
@c <en>access to the repository machine anyway, and therefore
@c <en>the user can do whatever local file permissions allow
@c <en>her to do.)
        É possível permitir acesso somente-leitura ao
repositório a pessoas usando o servidor de autenticação
por senha (@pxref{Autenticação por senha}).  (Os outros
métodos de acesso não tem suporte explícito para
somente-leitura de usuários, já que todos estes métodos
assumem acesso por login à máquina do repositório de
qualquer forma, e portanto o usuário pode fazer o que
as permissões de arquivos locais permitirem.)

@c <en>        A user who has read-only access can do only
@c <en>those @sc{cvs} operations which do not modify the
@c <en>repository, except for certain ``administrative'' files
@c <en>(such as lock files and the history file).  It may be
@c <en>desirable to use this feature in conjunction with
@c <en>user-aliasing (@pxref{Password authentication server}).
Um usuário que tem acesso somente-leitura pode realizar
apenas as operações do @sc{cvs} que não modificam o
repositório, exceto alguns arquivos ``administrativos''
(tais como arquivos de trava e o arquivo history).
Pode ser desejável usar esta habilidade em conjunto com
???``user-aliasing''??? (@pxref{Servidor de autenticação por
senha}).

@c <en>Unlike with previous versions of @sc{cvs}, read-only
@c <en>users should be able merely to read the repository, and
@c <en>not to execute programs on the server or otherwise gain
@c <en>unexpected levels of access.  Or to be more accurate,
@c <en>the @emph{known} holes have been plugged.  Because this
@c <en>feature is new and has not received a comprehensive
@c <en>security audit, you should use whatever level of
@c <en>caution seems warranted given your attitude concerning
@c <en>security.
Ao contrário de versões anteriores do @sc{cvs},
usuários somente-leitura são capazes de simplesmente
ler o repositório, e não de executar programas no
servidor ou ainda conseguir níveis de acessos extras.
Ou, para ser mais preciso, os papéis @emph{conhecidos}
foram ???plugged???.  Pelo fato de esta característica
ser nova e ainda não ter recebido uma auditoria de
segurança abrangente, você deve usar quaisquer níveis
de precaução que pareçam seguros de acordo com a sua
forma de agir com respeito a segurança.

@c <en>        There are two ways to specify read-only access
@c <en>for a user: by inclusion, and by exclusion.
        Existem duas formas de estabelecer acesso
somente-leitura para um usuário: por inclusão ou por exclusão.

@c <en>        "Inclusion" means listing that user
@c <en>specifically in the @file{$CVSROOT/CVSROOT/readers}
@c <en>file, which is simply a newline-separated list of
@c <en>users.  Here is a sample @file{readers} file:
        "Inclusão" significa botar aquele usuário
específico no arquivo @file{$CVSROOT/CVSROOT/readers},
que é simplesmente uma lista de usuários separados por
quebra de linha.  Aqui está um exemplo do @file{readers}:

@example
melissa
splotnik
jrandom
@end example

@noindent
@c <en>        (Don't forget the newline after the last user.)
        (Não esqueça a quebra de linha depois do último
usuário.)

@c <en>        "Exclusion" means explicitly listing everyone
@c <en>who has @emph{write} access---if the file
        "Exclusão" significa listar explicitamente
todos que têm acesso de @emph{escrita}---se o arquivo

@example
$CVSROOT/CVSROOT/writers
@end example

@noindent
@c <en>exists, then only
@c <en>those users listed in it have write access, and
@c <en>everyone else has read-only access (of course, even the
@c <en>read-only users still need to be listed in the
@c <en>@sc{cvs} @file{passwd} file).  The
@c <en>@file{writers} file has the same format as the
@c <en>@file{readers} file.
existe, então apenas os usuários que constam nele teram
acesso de escrita, e qualquer outra pessoa acesso
somente-leitura (obviamente, mesmo os usuários
somente-leitura devem ainda ser listados no arquivo
@file{passwd} do @sc{cvs}).  O arquivo @file{writers}
tem o mesmo formato do arquivo @file{readers}.

@c <en>        Note: if your @sc{cvs} @file{passwd}
@c <en>file maps cvs users onto system users (@pxref{Password
@c <en>authentication server}), make sure you deny or grant
@c <en>read-only access using the @emph{cvs} usernames, not
@c <en>the system usernames.  That is, the @file{readers} and
@c <en>@file{writers} files contain cvs usernames, which may
@c <en>or may not be the same as system usernames.
        Observação: se seu arquivo @file{passwd} do
@sc{cvs} associa usuários do cvs com usuários do
sistema (@pxref{Servidor de autenticação por
senha}), certifique-se de que você esteja
negando ou fornecendo acesso somente-leitura usando os
usuários @emph{do cvs}, e não os do sistema.  Ou seja,
os arquivos @file{readers} e @file{writers} contêm
nomes de usuários do cvs, que não necessáriamente têm o
mesmo nome que usuários do sistema.

@c <en>        Here is a complete description of the server's
@c <en>behavior in deciding whether to grant read-only or
@c <en>read-write access:
        Here is a complete description of the server's
behavior in deciding whether to grant read-only or
read-write access:

@c <en>        If @file{readers} exists, and this user is
@c <en>listed in it, then she gets read-only access.  Or if
@c <en>@file{writers} exists, and this user is NOT listed in
@c <en>it, then she also gets read-only access (this is true
@c <en>even if @file{readers} exists but she is not listed
@c <en>there).  Otherwise, she gets full read-write access.
        If @file{readers} exists, and this user is
listed in it, then she gets read-only access.  Or if
@file{writers} exists, and this user is NOT listed in
it, then she also gets read-only access (this is true
even if @file{readers} exists but she is not listed
there).  Otherwise, she gets full read-write access.

@c <en>        Of course there is a conflict if the user is
@c <en>listed in both files.  This is resolved in the more
@c <en>conservative way, it being better to protect the
@c <en>repository too much than too little: such a user gets
@c <en>read-only access.
        Of course there is a conflict if the user is
listed in both files.  This is resolved in the more
conservative way, it being better to protect the
repository too much than too little: such a user gets
read-only access.

@c <en>@node Server temporary directory
@node Diretório temporário do servidor
@c <en>@section Temporary directories for the server
@section Temporary directories for the server
@c <en>@cindex Temporary directories, and server
@cindex Temporary directories, and server
@c <en>@cindex Server, temporary directories
@cindex Server, temporary directories

@c <en>While running, the @sc{cvs} server creates temporary
@c <en>directories.  They are named
While running, the @sc{cvs} server creates temporary
directories.  They are named

@example
cvs-serv@var{pid}
@end example

@noindent
@c <en>where @var{pid} is the process identification number of
@c <en>the server.
@c <en>They are located in the directory specified by 
@c <en>the @samp{-T} global option (@pxref{Global options}), 
@c <en>the @code{TMPDIR} environment variable (@pxref{Environment variables}), 
@c <en>or, failing that, @file{/tmp}.
where @var{pid} is the process identification number of
the server.
They are located in the directory specified by 
the @samp{-T} global option (@pxref{Opções globais}), 
the @code{TMPDIR} environment variable (@pxref{Variáveis de ambiente}), 
or, failing that, @file{/tmp}.

@c <en>In most cases the server will remove the temporary
@c <en>directory when it is done, whether it finishes normally
@c <en>or abnormally.  However, there are a few cases in which
@c <en>the server does not or cannot remove the temporary
@c <en>directory, for example:
In most cases the server will remove the temporary
directory when it is done, whether it finishes normally
or abnormally.  However, there are a few cases in which
the server does not or cannot remove the temporary
directory, for example:

@itemize @bullet
@item
@c <en>If the server aborts due to an internal server error,
@c <en>it may preserve the directory to aid in debugging
If the server aborts due to an internal server error,
it may preserve the directory to aid in debugging

@item
@c <en>If the server is killed in a way that it has no way of
@c <en>cleaning up (most notably, @samp{kill -KILL} on unix).
If the server is killed in a way that it has no way of
cleaning up (most notably, @samp{kill -KILL} on unix).

@item
@c <en>If the system shuts down without an orderly shutdown,
@c <en>which tells the server to clean up.
If the system shuts down without an orderly shutdown,
which tells the server to clean up.
@end itemize

@c <en>In cases such as this, you will need to manually remove
@c <en>the @file{cvs-serv@var{pid}} directories.  As long as
@c <en>there is no server running with process identification
@c <en>number @var{pid}, it is safe to do so.
In cases such as this, you will need to manually remove
the @file{cvs-serv@var{pid}} directories.  As long as
there is no server running with process identification
number @var{pid}, it is safe to do so.

@c ---------------------------------------------------------------------
@c <en>@node Starting a new project
@node Começando um novo projeto
@c <en>@chapter Starting a project with CVS
@chapter Começando um projeto com o CVS
@c <en>@cindex Starting a project with CVS
@cindex Começando um projeto com CVS
@c <en>@cindex Creating a project
@cindex Criando um projeto

@comment --moduledb--
@c <en>Because renaming files and moving them between
@c <en>directories is somewhat inconvenient, the first thing
@c <en>you do when you start a new project should be to think
@c <en>through your file organization.  It is not impossible
@c <en>to rename or move files, but it does increase the
@c <en>potential for confusion and @sc{cvs} does have some
@c <en>quirks particularly in the area of renaming
@c <en>directories.  @xref{Moving files}.
Já que renomear e mover arquivos entre diretórios é um
tanto quanto inconveniente, a primeira coisa a fazer
quando você começa um novo projeto deve ser ponderar a
respeito da organização dos arquivos.  Não é impossível
renomear ou mover arquivos, mas isto aumenta as chances
de erro e o @sc{cvs} tem algumas idiossincrasias em
especial quanto a renomear diretórios.  @xref{Movendo arquivos}.

@c <en>What to do next depends on the situation at hand.
O que fazer depende da situação em que você está.

@menu
@c <en>* Setting up the files::        Getting the files into the repository
* Ajustando os arquivos::      Botando os arquivos no repositório
@c <en>* Defining the module::         How to make a module of the files
* Definindo o módulo::         How to make a module of the files
@end menu
@c -- File permissions!

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Setting up the files
@node Ajustando os arquivos
@c <en>@section Setting up the files
@section Ajustando os arquivos

@c <en>The first step is to create the files inside the repository.  This can
@c <en>be done in a couple of different ways.
O primeiro passo é criar os arquivos dentro do
repositório.  Isto pode ser feito de algumas maneiras diferentes.

@c -- The contributed scripts
@menu
@c <en>* From files::                  This method is useful with old projects
@c <en>                                where files already exists.
* De arquivos::                              Este método é útil para projetos
                                             antigos cujos arquivos já existem.
@c <en>* From other version control systems::  Old projects where you want to
@c <en>                                        preserve history from another system.
* De outros sistemas de controle de versão:: Projetos antigos onde você quer
                                             preservar o histórico de outro sistema.
@c <en>* From scratch::                Creating a directory tree from scratch.
* Do zero::                                  Criando uma árvore de diretórios
                                             do zero.
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c <en>@node From files
@node De arquivos
@c <en>@subsection Creating a directory tree from a number of files
@subsection Criando uma árvore de diretórios de uma quantidade de arquivos
@c <en>@cindex Importing files
@cindex Importando arquivos

@c <en>When you begin using @sc{cvs}, you will probably already have several
@c <en>projects that can be
@c <en>put under @sc{cvs} control.  In these cases the easiest way is to use the
@c <en>@code{import} command.  An example is probably the easiest way to
@c <en>explain how to use it.  If the files you want to install in
@c <en>@sc{cvs} reside in @file{@var{wdir}}, and you want them to appear in the
@c <en>repository as @file{$CVSROOT/yoyodyne/@var{rdir}}, you can do this:
Quando você começa a usar o @sc{cvs}, provavelmente vai
ter vários projetos que podem ser postos sob controle
do @sc{cvs}.  Nestes casos a forma mais fácil é usar o
comando @code{import}.  Um exemplo é provavelmente a
forma mais fácil de explicar como se usa o
@code{import}.  Se os arquivos que você quer instalar
no @sc{cvs} estão em @file{@var{wdir}}, e você quer que
eles estejam no repositório
@file{$CVSROOT/yoyodyne/@var{rdir}}, você pode fazer isto:

@example
$ cd @var{wdir}
$ cvs import -m "Imported sources" yoyodyne/@var{rdir} yoyo start
@end example

@c <en>Unless you supply a log message with the @samp{-m}
@c <en>flag, @sc{cvs} starts an editor and prompts for a
@c <en>message.  The string @samp{yoyo} is a @dfn{vendor tag},
@c <en>and @samp{start} is a @dfn{release tag}.  They may fill
@c <en>no purpose in this context, but since @sc{cvs} requires
@c <en>them they must be present.  @xref{Tracking sources}, for
@c <en>more information about them.
A menos que você forneca uma mensagem de log (registro)
com a opção @samp{-m}, o @sc{cvs} vai iniciar um editor
e esperar uma mensagem.  A string @samp{yoyo} é uma
@dfn{etiqueta de fornecedor} (vendor tag), e
@samp{start} é uma @dfn{etiqueta de release} (release
tag).  Eles podem não fazer sentido neste contexto, mas
já que o @sc{cvs} exige, elas devem estar presentes.
@xref{Acompanhando fontes}, para mais informações sobre
isto.

@c <en>You can now verify that it worked, and remove your
@c <en>original source directory.
Você agora pode verificar se está funcionando, e então
apagar seu diretório do código fonte original.
@c FIXME: Need to say more about "verify that it
@c worked".  What should the user look for in the output
@c from "diff -r"?

@example
$ cd ..
@c <en>$ cvs checkout yoyodyne/@var{rdir}       # @r{Explanation below}
$ cvs checkout yoyodyne/@var{rdir}       # @r{Explanation below}
$ diff -r @var{wdir} yoyodyne/@var{rdir}
$ rm -r @var{wdir}
@end example

@noindent
@c <en>Erasing the original sources is a good idea, to make sure that you do
@c <en>not accidentally edit them in @var{wdir}, bypassing @sc{cvs}.
@c <en>Of course, it would be wise to make sure that you have
@c <en>a backup of the sources before you remove them.
Erasing the original sources is a good idea, to make sure that you do
not accidentally edit them in @var{wdir}, bypassing @sc{cvs}.
Of course, it would be wise to make sure that you have
a backup of the sources before you remove them.

@c <en>The @code{checkout} command can either take a module
@c <en>name as argument (as it has done in all previous
@c <en>examples) or a path name relative to @code{$CVSROOT},
@c <en>as it did in the example above.
The @code{checkout} command can either take a module
name as argument (as it has done in all previous
examples) or a path name relative to @code{$CVSROOT},
as it did in the example above.

@c <en>It is a good idea to check that the permissions
@c <en>@sc{cvs} sets on the directories inside @code{$CVSROOT}
@c <en>are reasonable, and that they belong to the proper
@c <en>groups.  @xref{File permissions}.
It is a good idea to check that the permissions
@sc{cvs} sets on the directories inside @code{$CVSROOT}
are reasonable, and that they belong to the proper
groups.  @xref{Permissões de arquivos}.

@c <en>If some of the files you want to import are binary, you
@c <en>may want to use the wrappers features to specify which
@c <en>files are binary and which are not.  @xref{Wrappers}.
If some of the files you want to import are binary, you
may want to use the wrappers features to specify which
files are binary and which are not.  @xref{Wrappers}.

@c The node name is too long, but I am having trouble
@c thinking of something more concise.
@c <en>@node From other version control systems
@node De outros sistemas de controle de versão
@c <en>@subsection Creating Files From Other Version Control Systems
@subsection Criando os Arquivos de Outros Sistemas de Controle de Versões
@c <en>@cindex Importing files, from other version control systems
@cindex Outros Sistemas de Controle de Versões, Importando Arquivos de

@c <en>If you have a project which you are maintaining with
@c <en>another version control system, such as @sc{rcs}, you
@c <en>may wish to put the files from that project into
@c <en>@sc{cvs}, and preserve the revision history of the
@c <en>files.
If you have a project which you are maintaining with
another version control system, such as @sc{rcs}, you
may wish to put the files from that project into
@sc{cvs}, and preserve the revision history of the
files.

@table @asis
@cindex RCS, importing files from
@cindex RCS, importing files from
@item From RCS
@item From RCS
@c <en>If you have been using @sc{rcs}, find the @sc{rcs}
@c <en>files---usually a file named @file{foo.c} will have its
@c <en>@sc{rcs} file in @file{RCS/foo.c,v} (but it could be
@c <en>other places; consult the @sc{rcs} documentation for
@c <en>details).  Then create the appropriate directories in
@c <en>@sc{cvs} if they do not already exist.  Then copy the
@c <en>files into the appropriate directories in the @sc{cvs}
@c <en>repository (the name in the repository must be the name
@c <en>of the source file with @samp{,v} added; the files go
@c <en>directly in the appropriate directory of the repository,
@c <en>not in an @file{RCS} subdirectory).  This is one of the
@c <en>few times when it is a good idea to access the @sc{cvs}
@c <en>repository directly, rather than using @sc{cvs}
@c <en>commands.  Then you are ready to check out a new
@c <en>working directory.
If you have been using @sc{rcs}, find the @sc{rcs}
files---usually a file named @file{foo.c} will have its
@sc{rcs} file in @file{RCS/foo.c,v} (but it could be
other places; consult the @sc{rcs} documentation for
details).  Then create the appropriate directories in
@sc{cvs} if they do not already exist.  Then copy the
files into the appropriate directories in the @sc{cvs}
repository (the name in the repository must be the name
of the source file with @samp{,v} added; the files go
directly in the appropriate directory of the repository,
not in an @file{RCS} subdirectory).  This is one of the
few times when it is a good idea to access the @sc{cvs}
repository directly, rather than using @sc{cvs}
commands.  Then you are ready to check out a new
working directory.
@c Someday there probably should be a "cvs import -t
@c rcs" or some such.  It could even create magic
@c branches.  It could also do something about the case
@c where the RCS file had a (non-magic) "0" branch.

@c <en>The @sc{rcs} file should not be locked when you move it
@c <en>into @sc{cvs}; if it is, @sc{cvs} will have trouble
@c <en>letting you operate on it.
The @sc{rcs} file should not be locked when you move it
into @sc{cvs}; if it is, @sc{cvs} will have trouble
letting you operate on it.
@c What is the easiest way to unlock your files if you
@c have them locked?  Especially if you have a lot of them?
@c This is a CVS bug/misfeature; importing RCS files
@c should ignore whether they are locked and leave them in
@c an unlocked state.  Yet another reason for a separate
@c "import RCS file" command.

@c How many is "many"? Or do they just import RCS files?
@c <en>@item From another version control system
@item From another version control system
@c <en>Many version control systems have the ability to export
@c <en>@sc{rcs} files in the standard format.  If yours does,
@c <en>export the @sc{rcs} files and then follow the above
@c <en>instructions.
Many version control systems have the ability to export
@sc{rcs} files in the standard format.  If yours does,
export the @sc{rcs} files and then follow the above
instructions.

@c <en>Failing that, probably your best bet is to write a
@c <en>script that will check out the files one revision at a
@c <en>time using the command line interface to the other
@c <en>system, and then check the revisions into @sc{cvs}.
@c <en>The @file{sccs2rcs} script mentioned below may be a
@c <en>useful example to follow.
Failing that, probably your best bet is to write a
script that will check out the files one revision at a
time using the command line interface to the other
system, and then check the revisions into @sc{cvs}.
The @file{sccs2rcs} script mentioned below may be a
useful example to follow.

@c <en>@cindex SCCS, importing files from
@cindex SCCS, importing files from
@c <en>@item From SCCS
@item From SCCS
@c <en>There is a script in the @file{contrib} directory of
@c <en>the @sc{cvs} source distribution called @file{sccs2rcs}
@c <en>which converts @sc{sccs} files to @sc{rcs} files.
@c <en>Note: you must run it on a machine which has both
@c <en>@sc{sccs} and @sc{rcs} installed, and like everything
@c <en>else in contrib it is unsupported (your mileage may
@c <en>vary).
There is a script in the @file{contrib} directory of
the @sc{cvs} source distribution called @file{sccs2rcs}
which converts @sc{sccs} files to @sc{rcs} files.
Note: you must run it on a machine which has both
@sc{sccs} and @sc{rcs} installed, and like everything
else in contrib it is unsupported (your mileage may
vary).

@c <en>@cindex PVCS, importing files from
@cindex PVCS, importing files from
@c <en>@item From PVCS
@item From PVCS
@c <en>There is a script in the @file{contrib} directory of
@c <en>the @sc{cvs} source distribution called @file{pvcs_to_rcs}
@c <en>which converts @sc{pvcs} archives to @sc{rcs} files.
@c <en>You must run it on a machine which has both
@c <en>@sc{pvcs} and @sc{rcs} installed, and like everything
@c <en>else in contrib it is unsupported (your mileage may
@c <en>vary).  See the comments in the script for details.
There is a script in the @file{contrib} directory of
the @sc{cvs} source distribution called @file{pvcs_to_rcs}
which converts @sc{pvcs} archives to @sc{rcs} files.
You must run it on a machine which has both
@sc{pvcs} and @sc{rcs} installed, and like everything
else in contrib it is unsupported (your mileage may
vary).  See the comments in the script for details.
@end table
@c CMZ and/or PATCHY were systems that were used in the
@c high energy physics community (especially for
@c CERNLIB).  CERN has replaced them with CVS, but the
@c CAR format seems to live on as a way to submit
@c changes.  There is a program car2cvs which converts
@c but I'm not sure where one gets a copy.
@c Not sure it is worth mentioning here, since it would
@c appear to affect only one particular community.
@c Best page for more information is:
@c http://wwwcn1.cern.ch/asd/cvs/index.html
@c See also:
@c http://ecponion.cern.ch/ecpsa/cernlib.html

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c <en>@node From scratch
@node Do zero
@c <en>@subsection Creating a directory tree from scratch
@subsection Criando uma árvore de diretórios do zero

@c Also/instead should be documenting
@c $ cvs co -l .
@c $ mkdir tc
@c $ cvs add tc
@c $ cd tc
@c $ mkdir man
@c $ cvs add man
@c etc.
@c Using import to create the directories only is
@c probably a somewhat confusing concept.
@c <en>For a new project, the easiest thing to do is probably
@c <en>to create an empty directory structure, like this:
For a new project, the easiest thing to do is probably
to create an empty directory structure, like this:

@example
$ mkdir tc
$ mkdir tc/man
$ mkdir tc/testing
@end example

@c <en>After that, you use the @code{import} command to create
@c <en>the corresponding (empty) directory structure inside
@c <en>the repository:
After that, you use the @code{import} command to create
the corresponding (empty) directory structure inside
the repository:

@example
$ cd tc
@c <en>$ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start
$ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start
@end example

@c <en>Then, use @code{add} to add files (and new directories)
@c <en>as they appear.
Then, use @code{add} to add files (and new directories)
as they appear.

@c <en>Check that the permissions @sc{cvs} sets on the
@c <en>directories inside @code{$CVSROOT} are reasonable.
Check that the permissions @sc{cvs} sets on the
directories inside @code{$CVSROOT} are reasonable.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Defining the module
@node Definindo o módulo
@c <en>@section Defining the module
@section Definindo o módulo
@c <en>@cindex Defining a module
@cindex Defining a module
@c <en>@cindex Editing the modules file
@cindex Editing the modules file
@c <en>@cindex Module, defining
@cindex Module, defining
@c <en>@cindex Modules file, changing
@cindex Modules file, changing

@c <en>The next step is to define the module in the
@c <en>@file{modules} file.  This is not strictly necessary,
@c <en>but modules can be convenient in grouping together
@c <en>related files and directories.
The next step is to define the module in the
@file{modules} file.  This is not strictly necessary,
but modules can be convenient in grouping together
related files and directories.

@c <en>In simple cases these steps are sufficient to define a module.
In simple cases these steps are sufficient to define a module.

@enumerate
@item
@c <en>Get a working copy of the modules file.
Get a working copy of the modules file.

@example
$ cvs checkout CVSROOT/modules
$ cd CVSROOT
@end example

@item
@c <en>Edit the file and insert a line that defines the module.  @xref{Intro
@c <en>administrative files}, for an introduction.  @xref{modules}, for a full
@c <en>description of the modules file.  You can use the
@c <en>following line to define the module @samp{tc}:
Edit the file and insert a line that defines the module.
@xref{Intro aos arquivos administrativos}, for an
introduction.  @xref{modules}, for a full description
of the modules file.  You can use the following line to
define the module @samp{tc}:

@example
tc   yoyodyne/tc
@end example

@item
@c <en>Commit your changes to the modules file.
Commit your changes to the modules file.

@example
@c <en>$ cvs commit -m "Added the tc module." modules
$ cvs commit -m "Added the tc module." modules
@end example

@item
@c <en>Release the modules module.
Release the modules module.

@example
$ cd ..
$ cvs release -d CVSROOT
@end example
@end enumerate

@c ---------------------------------------------------------------------
@c <en>@node Revisions
@node Revisões
@c <en>@chapter Revisions
@chapter Revisões

@comment <en>For many uses of @sc{cvs}, one doesn't need to worry
@comment <en>too much about revision numbers; @sc{cvs} assigns
@comment <en>numbers such as @code{1.1}, @code{1.2}, and so on, and
@comment <en>that is all one needs to know.  However, some people
@comment <en>prefer to have more knowledge and control concerning
@comment <en>how @sc{cvs} assigns revision numbers.
Para muitos usos do @sc{cvs}, não é necessário se
preocupar com o número de revisões; o @sc{cvs} atribui
números tais como @code{1.1}, @code{1.2} e por aí vai,
e isto é tudo que se precisa saber.  Entretanto,
Algumas pessoas preferem ter mais conhecimento e
controle a respeito de como o @sc{cvs} atribui números
de revisão.

@c <en>If one wants to keep track of a set of revisions
@c <en>involving more than one file, such as which revisions
@c <en>went into a particular release, one uses a @dfn{tag},
@c <en>which is a symbolic revision which can be assigned to a
@c <en>numeric revision in each file.
Se você quiser marcar um conjunto de revisões
envolvendo mais de um arquivo, tais como as revisões
que integram uma release, pode usar uma @dfn{etiqueta} (tag),
que é uma revisão simbólica que pode ser associada a uma
revisão numérica em cada um dos arquivos.

@menu
@c <en>* Revision numbers::            The meaning of a revision number
* Números de revisão::            O significado dos números de revisão
@c <en>* Versions revisions releases::  Terminology used in this manual
* Versões revisões releases::  Terminologia usada neste manual
@c <en>* Assigning revisions::         Assigning revisions
* Atribuindo revisões::         Atribuindo revisões
@c <en>* Tags::                        Tags--Symbolic revisions
* Etiquetas::                        Etiquetas (Tags)--Revisões Simbólicas
@c <en>* Tagging the working directory::  The cvs tag command
* Etiquetando o diretório de trabalho::  O comando cvs tag
@c <en>* Tagging by date/tag::         The cvs rtag command
* Etiquetando por data/etiqueta::         O comando cvs rtag
@c <en>* Modifying tags::              Adding, renaming, and deleting tags
* Modificando etiquetas::              Adicionando, renomeando e apagando etiquetas
@c <en>* Tagging add/remove::          Tags with adding and removing files
* Etiquetando adicionados/removidos::  Etiquetas com arquivos adicionados e removidos
@c <en>* Sticky tags::                 Certain tags are persistent
* Etiquetas adesivas::          Certas etiquetas são persistentes
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Revision numbers
@node Números de revisão
@c <en>@section Revision numbers
@section Números de revisão
@c <en>@cindex Revision numbers
@cindex Números de revisão
@c <en>@cindex Revision tree
@cindex Árvore de revisão
@c <en>@cindex Linear development
@cindex Desenvolvimento linear
@c <en>@cindex Number, revision-
@cindex Revisão, número de
@c <en>@cindex Decimal revision number
@cindex Número de revisão decimal
@c <en>@cindex Branch number
@cindex Número de ramo
@c <en>@cindex Number, branch
@cindex Ramo, número de

@c <en>Each version of a file has a unique @dfn{revision
@c <en>number}.  Revision numbers look like @samp{1.1},
@c <en>@samp{1.2}, @samp{1.3.2.2} or even @samp{1.3.2.2.4.5}.
@c <en>A revision number always has an even number of
@c <en>period-separated decimal integers.  By default revision
@c <en>1.1 is the first revision of a file.  Each successive
@c <en>revision is given a new number by increasing the
@c <en>rightmost number by one.  The following figure displays
@c <en>a few revisions, with newer revisions to the right.
Cada versão de um arquivo tem um @dfn{número de
revisão} único.  Números de revisão são coisas do tipo
@samp{1.1}, @samp{1.2}, @samp{1.3.2.2} ou até mesmo
@samp{1.3.2.2.4.5}.  Um número de revisão sempre tem uma
quantidade par de números inteiros na base dez
separados por ponto.  Por padrão, a revisão 1.1 é a
primeira revisão de um arquivo.  Cada revisão sucessiva
ganha um novo número somando um ao número mais a
direita.  A figura a seguir mostra mostra algumas
revisões, com a revisão mais nova mais à direita.

@example
       +-----+    +-----+    +-----+    +-----+    +-----+
       ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
       +-----+    +-----+    +-----+    +-----+    +-----+
@end example

@c <en>It is also possible to end up with numbers containing
@c <en>more than one period, for example @samp{1.3.2.2}.  Such
@c <en>revisions represent revisions on branches
@c <en>(@pxref{Branching and merging}); such revision numbers
@c <en>are explained in detail in @ref{Branches and
@c <en>revisions}.
Também é possível ter números com mais de um ponto, por
exemplo @samp{1.3.2.2}.  Tais revisões representam
revisões em ramos (@pxref{Ramificando e mesclando});
estes números de revisão são explicados em detalhes em
@ref{Ramos e revisões}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Versions revisions releases
@node Versões revisões releases
@c <en>@section Versions, revisions and releases
@section Versões, revisões e releases
@c <en>@cindex Revisions, versions and releases
@cindex Revisões, versões e releases
@c <en>@cindex Versions, revisions and releases
@cindex Versões, revisões e releases
@c <en>@cindex Releases, revisions and versions
@cindex Releases, revisões e versões

@c <en>A file can have several versions, as described above.
@c <en>Likewise, a software product can have several versions.
@c <en>A software product is often given a version number such
@c <en>as @samp{4.1.1}.
Um arquivo pode ter várias versões, como descrito
acima.  Da mesma forma, um produto de software também
pode ter várias versões.  Frequentemente um produto de
software recebe um número de versão, tal como @samp{4.1.1}.

@c <en>Versions in the first sense are called @dfn{revisions}
@c <en>in this document, and versions in the second sense are
@c <en>called @dfn{releases}.  To avoid confusion, the word
@c <en>@dfn{version} is almost never used in this document.
Versões, neste documento são chamadas, principalmente,
de @dfn{revisões} , e também de @dfn{releases}.  Para evitar
confusão, o termo @dfn{versão} praticamente não é usado
neste documento.

@c <en>@node Assigning revisions
@node Atribuindo revisões
@c <en>@section Assigning revisions
@section Atribuindo revisões

@c We avoid the "major revision" terminology.  It seems
@c like jargon.  Hopefully "first number" is clear enough.
@c
@c Well, in the context of software release numbers,
@c "major" and "minor" release or version numbers are
@c documented in at least the GNU Coding Standards, but I'm
@c still not sure I find that a valid reason to apply the
@c terminology to RCS revision numbers.  "First", "Second",
@c "subsequent", and so on is almost surely clearer,
@c especially to a novice reader. -DRP
@c <en>By default, @sc{cvs} will assign numeric revisions by
@c <en>leaving the first number the same and incrementing the
@c <en>second number.  For example, @code{1.1}, @code{1.2},
@c <en>@code{1.3}, etc.
Por padrão, @sc{cvs} vai atribuir revisões numéricas
mantendo o primeiro número e aumentando o segundo.  Por
exemplo, @code{1.1}, @code{1.2}, @code{1.3}, etc.

@c <en>When adding a new file, the second number will always
@c <en>be one and the first number will equal the highest
@c <en>first number of any file in that directory.  For
@c <en>example, the current directory contains files whose
@c <en>highest numbered revisions are @code{1.7}, @code{3.1},
@c <en>and @code{4.12}, then an added file will be given the
@c <en>numeric revision @code{4.1}.
Quando um novo arquivo é adicionado, o segundo número
vai ser sempre o um e o primeiro número vai ser igual
ao maior primeiro número de qualquer arquivo no
diretório.  Por exemplo, se o diretório atual contiver
arquivos os quais o maior número de revisão seram
@code{1.7}, @code{3.1} e @code{4.12}, então um arquivo
adicionado vai receber a revisão numérica @code{4.1}.

@c This is sort of redundant with something we said a
@c while ago.  Somewhere we need a better way of
@c introducing how the first number can be anything
@c except "1", perhaps.  Also I don't think this
@c presentation is clear on why we are discussing releases
@c and first numbers of numeric revisions in the same
@c breath.
@c <en>Normally there is no reason to care
@c <en>about the revision numbers---it is easier to treat them
@c <en>as internal numbers that @sc{cvs} maintains, and tags
@c <en>provide a better way to distinguish between things like
@c <en>release 1 versus release 2 of your product
@c <en>(@pxref{Tags}).  However, if you want to set the
@c <en>numeric revisions, the @samp{-r} option to @code{cvs
@c <en>commit} can do that.  The @samp{-r} option implies the
@c <en>@samp{-f} option, in the sense that it causes the
@c <en>files to be committed even if they are not modified.
Normalmente não há razão para se preocupar com números
de revisão---é melhor tratá-los como numeração interna
que o @sc{cvs} mantém, e etiquetas (tags) fornecem uma
forma melhor de distinguir entre coisas tais como
release 1 e release 2 de seu produto
(@pxref{Etiquetas}).  Entretando, se você quiser
ajustar as revisões numéricas, a opção @samp{-r} do
@code{cvs commit} pode fazer isto.  A opção @samp{-r}
implica na opção @samp{-f}, no sentido de que ela faz
com que os arquivos sejam submetidos mesmo caso eles
não estejam modificados.

@c <en>For example, to bring all your files up to
@c <en>revision 3.0 (including those that haven't changed),
@c <en>you might invoke:
Por exemplo, para subir todos os arquivos para a
revisão 3.0 (inclusive os que não sofreram mudanças),
você deve invocar:

@example
$ cvs commit -r 3.0
@end example

@c <en>Note that the number you specify with @samp{-r} must be
@c <en>larger than any existing revision number.  That is, if
@c <en>revision 3.0 exists, you cannot @samp{cvs commit
@c <en>-r 1.3}.  If you want to maintain several releases in
@c <en>parallel, you need to use a branch (@pxref{Branching and merging}).
Observe que o número que você especificar com a opção
@samp{-r} deve ser maior que qualquer número de revisão
existente.  Ou seja, se a revisão 3.0 existe, você não
pode fazer @samp{cvs commit -r 1.3}.  Se você quiser
manter várias releases em paralelo, você deve usar um ramo
(@pxref{Ramificando e mesclando}).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Tags
@node Etiquetas
@c <en>@section Tags--Symbolic revisions
@section Etiquetas (Tags)--Revisões simbólicas
@c <en>@cindex Tags
@cindex Etiquetas

@c <en>The revision numbers live a life of their own.  They
@c <en>need not have anything at all to do with the release
@c <en>numbers of your software product.  Depending
@c <en>on how you use @sc{cvs} the revision numbers might change several times
@c <en>between two releases.  As an example, some of the
@c <en>source files that make up @sc{rcs} 5.6 have the following
@c <en>revision numbers:
Os números de revisão tem uma vida a parte.  Eles não
precisam ter nada a ver com os números de release de
seu produto de software.  Dependendo de como você usa o
@sc{cvs}, os números de revisão podem mudar várias
vezes entre duas releases.  Como um exemplo, alguns dos
arquivos fonte do @sc{rcs} 5.6 tinham os seguintes
números de revisão:
@c <en>@cindex RCS revision numbers
@cindex números de revisão do RCS

@example
ci.c            5.21
co.c            5.9
ident.c         5.3
rcs.c           5.12
rcsbase.h       5.11
rcsdiff.c       5.10
rcsedit.c       5.11
rcsfcmp.c       5.9
rcsgen.c        5.10
rcslex.c        5.11
rcsmap.c        5.2
rcsutil.c       5.10
@end example

@c <en>@cindex tag (subcommand), introduction
@cindex tag (subcomando), introdução
@c <en>@cindex Tags, symbolic name
@cindex Etiquetas, nome simbólico
@c <en>@cindex Symbolic name (tag)
@cindex Nome simbólico (etiqueta)
@c <en>@cindex Name, symbolic (tag)
@cindex Simbólico, nome (etiqueta)
@c <en>@cindex HEAD, as reserved tag name
@cindex HEAD, nome de etiqueta reservado
@c <en>@cindex BASE, as reserved tag name
@cindex BASE, nome de etiqueta reservado
@c <en>You can use the @code{tag} command to give a symbolic name to a
@c <en>certain revision of a file.  You can use the @samp{-v} flag to the
@c <en>@code{status} command to see all tags that a file has, and
@c <en>which revision numbers they represent.  Tag names must
@c <en>start with an uppercase or lowercase letter and can
@c <en>contain uppercase and lowercase letters, digits,
@c <en>@samp{-}, and @samp{_}.  The two tag names @code{BASE}
@c <en>and @code{HEAD} are reserved for use by @sc{cvs}.  It
@c <en>is expected that future names which are special to
@c <en>@sc{cvs} will be specially named, for example by
@c <en>starting with @samp{.}, rather than being named analogously to
@c <en>@code{BASE} and @code{HEAD}, to avoid conflicts with
@c <en>actual tag names.
Você pode usar o comando @code{tag} para dar um nome
simbólico para uma certa revisão de um arquivo.  Você
pode usar a opção @samp{-v} com o comando @code{status}
para ver todas as etiquetas que um arquivo possui, e
que números de revisão elas representam.  Nomes de
etiqueta devem começar com letra maiúscula ou minúscula
e pode conter letras maiúsculas e minúsculas, dígitos,
@samp{-} e @samp{_}.  Os dois nomes de etiqueta
@code{BASE} e @code{HEAD} são reservados para o
@sc{cvs}.  É esperado que nomes futuros que sejam
especiais para o @sc{cvs} recebam nomes especiais, por
exemplo começando com @samp{.}, sendo então nomeados de
forma análoga a @code{BASE} e @code{HEAD}, para evitar
conflitos com os nomes de etiqueta atuais.
@c Including a character such as % or = has also been
@c suggested as the naming convention for future
@c special tag names.  Starting with . is nice because
@c that is not a legal tag name as far as RCS is concerned.
@c FIXME: CVS actually accepts quite a few characters
@c in tag names, not just the ones documented above
@c (see RCS_check_tag).  RCS
@c defines legitimate tag names by listing illegal
@c characters rather than legal ones.  CVS is said to lose its
@c mind if you try to use "/" (try making such a tag sticky
@c and using "cvs status" client/server--see remote
@c protocol format for entries line for probable cause).
@c TODO: The testsuite
@c should test for whatever are documented above as
@c officially-OK tag names, and CVS should at least reject
@c characters that won't work, like "/".

@c <en>You'll want to choose some convention for naming tags,
@c <en>based on information such as the name of the program
@c <en>and the version number of the release.  For example,
@c <en>one might take the name of the program, immediately
@c <en>followed by the version number with @samp{.} changed to
@c <en>@samp{-}, so that @sc{cvs} 1.9 would be tagged with the name
@c <en>@code{cvs1-9}.  If you choose a consistent convention,
@c <en>then you won't constantly be guessing whether a tag is
@c <en>@code{cvs-1-9} or @code{cvs1_9} or what.  You might
@c <en>even want to consider enforcing your convention in the
@c <en>@file{taginfo} file (@pxref{taginfo}).
Você vai querer definir algumas convenções para nomear
etiquetas, baseado em informações tais como nome do
programa e número da versão da release.  Por exemplo,
algume pode pegar o nome do programa, seguindo pelo
número de versão com o @samp{.} trocado por @samp{-},
de forma que o @sc{cvs} 1.9 seja etiquetado com o nome
de @code{cvs1-9}.  Se você escolhe uma convenção
consistente, você não vai precisar ficar constantemente
adivinhando se a etiqueta é @code{cvs-1-9} ou
@code{cvs1_9} ou sei lá o que.  Você pode até mesmo
considerar reforçar esta convenção no arquivo
@file{taginfo} (@pxref{taginfo}).
@c Might be nice to say more about using taginfo this
@c way, like giving an example, or pointing out any particular
@c issues which arise.

@c <en>@cindex Adding a tag
@cindex Adicionando uma etiqueta
@c <en>@cindex Tags, example
@cindex Etiquetas, exemplo
@c <en>The following example shows how you can add a tag to a
@c <en>file.  The commands must be issued inside your working
@c <en>directory.  That is, you should issue the
@c <en>command in the directory where @file{backend.c}
@c <en>resides.
O exemplo seguinte mostra como você pode adicionar uma
etiqueta a um arquivo.  Os comandos devem ser
executados de dentro do seu diretório de trabalho.  Ou
seja, você deve executar o comando no diretório onde @file{backend.c}
fica.

@example
$ cvs tag rel-0-4 backend.c
T backend.c
$ cvs status -v backend.c
===================================================================
File: backend.c         Status: Up-to-date

    Version:            1.4     Tue Dec  1 14:39:01 1992
    RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
    Sticky Tag:         (none)
    Sticky Date:        (none)
    Sticky Options:     (none)

    Existing Tags:
        rel-0-4                     (revision: 1.4)

@end example

@c <en>For a complete summary of the syntax of @code{cvs tag},
@c <en>including the various options, see @ref{Invoking CVS}.
Para um resumo completo da sintaxe de @code{cvs tag},
incluindo as várias opções, veja em @ref{Chamando o CVS}.

@c <en>There is seldom reason to tag a file in isolation.  A more common use is
@c <en>to tag all the files that constitute a module with the same tag at
@c <en>strategic points in the development life-cycle, such as when a release
@c <en>is made.
Existem poucas razões para etiquetar um arquivo em
separado.  Um uso mais comum é etiquetar todos os
arquivos que fazem parte de um módulo com a mesma
etiqueta em momentos estratégicos do ciclo de vida do
desenvolvimento, como por exemplo, quando fica pronta
uma release.

@example
$ cvs tag rel-1-0 .
cvs tag: Tagging .
T Makefile
T backend.c
T driver.c
T frontend.c
T parser.c
@end example

@noindent
@c <en>(When you give @sc{cvs} a directory as argument, it generally applies the
@c <en>operation to all the files in that directory, and (recursively), to any
@c <en>subdirectories that it may contain.  @xref{Recursive behavior}.)
(Quando você passa um diretório para o @sc{cvs} como
argumento, ele geralmente realiza a operação em todos
os arquivos do diretório e (recursivamente) a todo
subdiretório que ele contenha.
@xref{Comportamento recursivo}.)

@c <en>@cindex Retrieving an old revision using tags
@cindex Retrieving an old revision using tags
@c <en>@cindex Tags, retrieving old revisions
@cindex Tags, retrieving old revisions
@c <en>The @code{checkout} command has a flag, @samp{-r}, that lets you check out
@c <en>a certain revision of a module.  This flag makes it easy to
@c <en>retrieve the sources that make up release 1.0 of the module @samp{tc} at
@c <en>any time in the future:
O comando @code{checkout} tem uma opção, @samp{-r}, que
permite pegar uma certa revisão de um módulo.  Esta
opção torna fácil recuperar as ontes que fizeram parte
da release 1.0 do módulo @samp{tc} a qualquer momento
no futuro:

@example
$ cvs checkout -r rel-1-0 tc
@end example

@noindent
@c <en>This is useful, for instance, if someone claims that there is a bug in
@c <en>that release, but you cannot find the bug in the current working copy.
Isto pode ser útil, por exemplo, se alguem afirma que
tem um pau naquela versão, mas você não acha o pau na
cópia de trabalho mais recente.

@c <en>You can also check out a module as it was at any given date.
@c <en>@xref{checkout options}.  When specifying @samp{-r} to
@c <en>any of these commands, you will need beware of sticky
@c <en>tags; see @ref{Sticky tags}.
Você também pode pegar um módulo do jeito que ele
estava em qualquer data.  @xref{checkout options}.
Quando usar @samp{-r} em qualquer destes comandos, você
vai precisar estar atento às etiquetas adesivas; veja
em @ref{Etiquetas adesivas}.

@c <en>When you tag more than one file with the same tag you
@c <en>can think about the tag as "a curve drawn through a
@c <en>matrix of filename vs. revision number."  Say we have 5
@c <en>files with the following revisions:
Quando você etiqueta mais de um arquivo com a mesma
etiqueta você pode pensar na etiqueta como "uma curva
desenhada ao longo da matriz de nomes de arquivo por
números de revisão".  Digamos que temos 5 arquivos com
as seguintes revisões:

@example
@group
        file1   file2   file3   file4   file5

        1.1     1.1     1.1     1.1  /--1.1*      <-*-  TAG
        1.2*-   1.2     1.2    -1.2*-
        1.3  \- 1.3*-   1.3   / 1.3
        1.4          \  1.4  /  1.4
                      \-1.5*-   1.5
                        1.6
@end group
@end example

@c <en>At some time in the past, the @code{*} versions were tagged.
@c <en>You can think of the tag as a handle attached to the curve
@c <en>drawn through the tagged revisions.  When you pull on
@c <en>the handle, you get all the tagged revisions.  Another
@c <en>way to look at it is that you "sight" through a set of
@c <en>revisions that is "flat" along the tagged revisions,
@c <en>like this:
Em algum momento no passado, as versões com @code{*}
foram etiquetadas.  Você pode pensar na etiqueta como
uma alça presa à curva que passa pelas revisões
marcadas.  Quando você puxa a alça, vem as revisões
etiquetadas.  outra maneira de perceber isto é ver
através de um conjunto de revisões que foram alinhadas
pelas revisões etiquetadas, como isto:

@example
@group
        file1   file2   file3   file4   file5

                        1.1
                        1.2
                1.1     1.3                       _
        1.1     1.2     1.4     1.1              /
        1.2*----1.3*----1.5*----1.2*----1.1*    (--- <--- Look here
        1.3             1.6     1.3              \_
        1.4                     1.4
                                1.5
@end group
@end example

@c <en>@node Tagging the working directory
@node Etiquetando o diretório de trabalho
@c <en>@section Specifying what to tag from the working directory
@section Especificando o que etiquetar no diretório de trabalho

@c <en>@cindex tag (subcommand)
@cindex tag (subcomando)
@c <en>The example in the previous section demonstrates one of
@c <en>the most common ways to choose which revisions to tag.
@c <en>Namely, running the @code{cvs tag} command without
@c <en>arguments causes @sc{cvs} to select the revisions which
@c <en>are checked out in the current working directory.  For
@c <en>example, if the copy of @file{backend.c} in working
@c <en>directory was checked out from revision 1.4, then
@c <en>@sc{cvs} will tag revision 1.4.  Note that the tag is
@c <en>applied immediately to revision 1.4 in the repository;
@c <en>tagging is not like modifying a file, or other
@c <en>operations in which one first modifies the working
@c <en>directory and then runs @code{cvs commit} to transfer
@c <en>that modification to the repository.
O exemplo na seção anterior  demonstra uma das formas
mais comuns de escolher que revisões etiquetar.  A
saber, rodando o comando @code{cvs tag} sem argumentos
faz com que o @sc{cvs} selecione as revisões que estão
presentes no diretório de trabalho atual.  Por exemplo,
se a cópia do arquivo @file{backend.c} no diretório de
trabalho foi pega da revisão 1.4, então o @sc{cvs} vai
etiquetar a revisão 1.4.  Observe que a etiqueta é
aplicada na revisão 1.4 no repositório imediatamente;
Etiquetar não funciona como modificar arquivos ou
outras operações nas quais primeiros você modifica o
diretório de trabalho e então roda o @code{cvs commit}
para mandar as modificações para o repositório.

@c <en>One potentially surprising aspect of the fact that
@c <en>@code{cvs tag} operates on the repository is that you
@c <en>are tagging the checked-in revisions, which may differ
@c <en>from locally modified files in your working directory.
@c <en>If you want to avoid doing this by mistake, specify the
@c <en>@samp{-c} option to @code{cvs tag}.  If there are any
@c <en>locally modified files, @sc{cvs} will abort with an
@c <en>error before it tags any files:
Um aspecto potencialmente confuso no fato de o comando
@code{cvs tag} operar no repositório é que você está
etiquetando revisões devolvidas, que podem diferir de
arquivos localmente modificados no seu diretório de
trabalho.  Se você quer evitar fazer isto por engano,
use a opção @samp{-c} no @code{cvs tag}.  Se existe
qualquer arquivo localmente modificado, o @sc{cvs} vai
abortar com erro antes de etiquetar qualquer arquivo:

@example
$ cvs tag -c rel-0-4
cvs tag: backend.c is locally modified
cvs [tag aborted]: correct the above errors first!
@end example

@c <en>@node Tagging by date/tag
@node Etiquetando por data/etiqueta
@c <en>@section Specifying what to tag by date or revision
@section Especificando o que etiquetar por data ou revisão
@c <en>@cindex rtag (subcommand)
@cindex rtag (subcomando)

@c <en>The @code{cvs rtag} command tags the repository as of a
@c <en>certain date or time (or can be used to tag the latest
@c <en>revision).  @code{rtag} works directly on the
@c <en>repository contents (it requires no prior checkout and
@c <en>does not look for a working directory).
O comando @code{cvs rtag} etiqueta o repositório em uma
certa data ou hora (ou pode ser usado para etiquetar a
última revisão).  @code{rtag} trabalha diretamente no
repositório (não requer um checkout e não procura por
um diretório de trabalho).

@c <en>The following options specify which date or revision to
@c <en>tag.  See @ref{Common options}, for a complete
@c <en>description of them.
As seguintes opções especificam que data ou revisão
etiquetar.  Veja em @ref{Opções comuns}, para uma
descrição completa delas.

@table @code
@c <en>@item -D @var{data}
@item -D @var{data}
@c <en>Tag the most recent revision no later than @var{date}.
Etiqueta a revisão mais recente que seja anterior a @var{data}.

@c <en>@item -f
@item -f
@c <en>Only useful with the @samp{-D @var{date}} or @samp{-r @var{tag}}
@c <en>flags.  If no matching revision is found, use the most
@c <en>recent revision (instead of ignoring the file).
Útil apenas em conjunto com @samp{-D @var{data}} ou
@samp{-r @var{etiqueta}}.  Se não encontrar uma revisã
casando com o padrão, usar a revisão mais recente (ao
invés de ignorar o arquivo).

@c <en>@item -r @var{tag}
@item -r @var{etiqueta}
@c <en>Only tag those files that contain existing tag @var{tag}.
Etiqueta apenas os arquivos que contém a etiqueta
@var{etiqueta} existente.
@end table

@c <en>The @code{cvs tag} command also allows one to specify
@c <en>files by revision or date, using the same @samp{-r},
@c <en>@samp{-D}, and @samp{-f} options.  However, this
@c <en>feature is probably not what you want.  The reason is
@c <en>that @code{cvs tag} chooses which files to tag based on
@c <en>the files that exist in the working directory, rather
@c <en>than the files which existed as of the given tag/date.
@c <en>Therefore, you are generally better off using @code{cvs
@c <en>rtag}.  The exceptions might be cases like:
O comando @code{cvs tag} também permite que você
especifique arquivos por revisão ou data, usando as
mesmas opções @samp{-r}, @samp{-D} e @samp{-f}.
Entretanto, este característica não é provavelmente o
que você quer.  A razão é que o @code{cvs tag} escolhe
que arquivos etiquetar baseado nos arquivos que existem
no diretório de trabalho, ao invés de arquivos que
existem na dada etiqueta/data.  Portanto, você é
geralmente ???better off??? usar @code{cvs rtag}.  As
exceções devem ser casos como:

@example
cvs tag -r 1.4 stable backend.c
@end example

@c <en>@node Modifying tags
@node Modificando etiquetas
@c <en>@section Deleting, moving, and renaming tags
@section Apagando, movendo e renomeando etiquetas

@c Also see:
@c  "How do I move or rename a magic branch tag?"
@c in the FAQ (I think the issues it talks about still
@c apply, but this could use some sanity.sh work).

@c <en>Normally one does not modify tags.  They exist in order
@c <en>to record the history of the repository and so deleting
@c <en>them or changing their meaning would, generally, not be
@c <en>what you want.
Normalmente não se modificam etiquetas.  Elas existem
para registrar o histórico do repositório e, portanto,
apagá-las ou alterar o significado delas não é, em
geral, o que você quer.

@c <en>However, there might be cases in which one uses a tag
@c <en>temporarily or accidentally puts one in the wrong
@c <en>place.  Therefore, one might delete, move, or rename a
@c <en>tag.
Entretanto, podem haver casos nos quais alguem usa a
etiqueta temporariamente ou bota no lugar errado por
acidente.  Logo, é possível apagar, mover, ou renomear
uma etiqueta.

@noindent
@c <en>@strong{WARNING: the commands in this section are
@c <en>dangerous; they permanently discard historical
@c <en>information and it can be difficult or impossible to
@c <en>recover from errors.  If you are a @sc{cvs}
@c <en>administrator, you may consider restricting these
@c <en>commands with the @file{taginfo} file (@pxref{taginfo}).}
@strong{ATENÇÃO: os comandos nesta seção são perigosos;
eles apagam permanentemente informações históricas e
pode ser difícil ou impossível recuperar tais
informações em caso de erro.  Se você é um
administrador do @sc{cvs}, você deve considerar
restringir estes comandos com o arquivo @file{taginfo}
(@pxref{taginfo}).}

@c <en>@cindex Deleting tags
@cindex Apagando etiquetas
@c <en>@cindex Deleting branch tags
@cindex Apagando etiquetas de ramos
@c <en>@cindex Removing tags
@cindex Removendo etiquetas
@c <en>@cindex Removing branch tags
@cindex Removendo etiquetas de ramos
@c <en>@cindex Tags, deleting
@cindex Etiquetas, apagando
@c <en>@cindex Branch tags, deleting
@cindex Etiquetas de ramos, apagando
@c <en>To delete a tag, specify the @samp{-d} option to either
@c <en>@code{cvs tag} or @code{cvs rtag}.  For example:
Para apagar uma etiqueta, especifique a opção @samp{-d}
tanto para @code{cvs tag} quanto para @code{cvs rtag}.  Por exemplo:

@example
cvs rtag -d rel-0-4 tc
@end example

@noindent
@c <en>deletes the non-branch tag @code{rel-0-4} from the module @code{tc}.
@c <en>In the event that branch tags are encountered within the repository
@c <en>with the given name, a warning message will be issued and the branch 
@c <en>tag will not be deleted.  If you are absolutely certain you know what
@c <en>you are doing, the @code{-B} option may be specified to allow deletion
@c <en>of branch tags.  In that case, any non-branch tags encountered will
@c <en>trigger warnings and will not be deleted.
apaga a etiqueta ???non-branch??? @code{rel-0-4} do
módulo @code{tc}.  No caso de etiquetas de ramos serem
encontradas no repositório com o nome dado, uma
mensagem de aviso vai ser mostrada e a etiqueta de ramo
não vai ser apagada.  Se você está absolutamente certo
de que sabe o que está fazendo, a opção @code{-B} pode
ser especificada para permitir que se apague as
etiquetas de ramos.  Neste caso, qualquer etiqueta
???non-branch??? encontrada vai disparar avisos e não
vai ser apagada.

@noindent
@c <en>@strong{WARNING: Moving branch tags is very dangerous!  If you think
@c <en>you need the @code{-B} option, think again and ask your @sc{cvs}
@c <en>administrator about it (if that isn't you).  There is almost certainly
@c <en>another way to accomplish what you want to accomplish.}
@strong{ATENÇÃO: Mover etiquetas de ramos é muito
perigoso!  Se você pensa que precisa da opção
@code{-B}, pense duas vezes e pergunte a seu
administrador do @sc{cvs} sobre ela (se não for você).
É quase certo que existe outra forma de alcançar o seu objetivo.}

@c <en>@cindex Moving tags
@cindex Movendo etiquetas
@c <en>@cindex Moving branch tags
@cindex Movendo etiquetas de ramos
@c <en>@cindex Tags, moving
@cindex Etiquetas, movendo
@c <en>@cindex Branch tags, moving
@cindex Etiquetas de ramos, movendo
@c <en>When we say @dfn{move} a tag, we mean to make the same
@c <en>name point to different revisions.  For example, the
@c <en>@code{stable} tag may currently point to revision 1.4
@c <en>of @file{backend.c} and perhaps we want to make it
@c <en>point to revision 1.6.  To move a non-branch tag, specify the
@c <en>@samp{-F} option to either @code{cvs tag} or @code{cvs
@c <en>rtag}.  For example, the task just mentioned might be
@c <en>accomplished as:
Quando falamos em @dfn{mover} uma etiqueta, queremos
dizer fazer com que o mesmo nome aponte para diferentes
revisões.  Por exemplo, a etiqueta @code{stable} pode
atualmente apontar para a revisão 1.4 do arquivo
@file{backend.c} e talvez nós queiramos fazé-la apontar
para a revisão 1.6.  Para mover uma etiqueta
???non-branch???, Use a opção @samp{-F} tanto com o
@code{cvs tag} oquanto com o @code{cvs rtag}.  Por
exemplo, esta mudança pode ser alcançada com:

@example
cvs tag -r 1.6 -F stable backend.c
@end example

@noindent
@c <en>If any branch tags are encountered in the repository 
@c <en>with the given name, a warning is issued and the branch
@c <en>tag is not disturbed.  If you are absolutely certain you
@c <en>wish to move the branch tag, the @code{-B} option may be specified.
@c <en>In that case, non-branch tags encountered with the given
@c <en>name are ignored with a warning message.
Se alguma etiqueta de ramo for encontrada no
repositório com o nome dado, um aviso é mostrado e a
etiqueta de ramo não é alterada.  Se você está
absolutamente certo de que você quer mover a etiquta de
ramo, a opção @code{-B} pode ser especificada.  Neste
caso, etiquetas ???non-branch??? encontradas com o nome
dado serão ignoradas com uma mensagem de aviso.

@noindent
@c <en>@strong{WARNING: Moving branch tags is very dangerous!  If you think you
@c <en>need the @code{-B} option, think again and ask your @sc{cvs}
@c <en>administrator about it (if that isn't you).  There is almost certainly
@c <en>another way to accomplish what you want to accomplish.}
@strong{ATENÇÃO: Mover etiquetas de ramos é muito
perigoso!  Se você pensa que precisa da opção
@code{-B}, pense duas vezes e pergunte a seu
administrador do @sc{cvs} sobre ela (se não for você).
É quase certo que existe outra forma de alcançar o seu objetivo.}

@c <en>@cindex Renaming tags
@cindex Renomeando etiquetas
@c <en>@cindex Tags, renaming
@cindex Etiquetas, renomeando
@c <en>When we say @dfn{rename} a tag, we mean to make a
@c <en>different name point to the same revisions as the old
@c <en>tag.  For example, one may have misspelled the tag name
@c <en>and want to correct it (hopefully before others are
@c <en>relying on the old spelling).  To rename a tag, first
@c <en>create a new tag using the @samp{-r} option to
@c <en>@code{cvs rtag}, and then delete the old name.  (Caution:
@c <en>this method will not work with branch tags.) 
@c <en>This leaves the new tag on exactly the 
@c <en>same files as the old tag.  For example:
Quando falamos em @dfn{renomear} uma etiqueta, queremos
dizer fazer com que um nome diferente aponte para para
as mesmas revisões que a etiqueta antiga.  Por exemplo,
alguem pode ter digitado errado o nome de uma etiqueta
e quer corrigir isto (de preferência antes que outros
caiam no mesmo erro).  Para renomear uma etiqueta,
primeiro crie uma nova etiqueta usando a opção
@samp{-r} para o @code{cvs rtag}, e então apague o nome
antigo.  (Cuidado: este método não vai funcionar com
etiquetas de ramos).  Isto deixa a nova etiqueta
exatamente nos mesmos arquivos que a etiqueta antiga.
Por exemplo:

@example
cvs rtag -r old-name-0-4 rel-0-4 tc
cvs rtag -d old-name-0-4 tc
@end example

@c <en>@node Tagging add/remove
@node Etiquetando adicionados/removidos
@c <en>@section Tagging and adding and removing files
@section Etiquetando e adicionando e removendo arquivos

@c <en>The subject of exactly how tagging interacts with
@c <en>adding and removing files is somewhat obscure; for the
@c <en>most part @sc{cvs} will keep track of whether files
@c <en>exist or not without too much fussing.  By default,
@c <en>tags are applied to only files which have a revision
@c <en>corresponding to what is being tagged.  Files which did
@c <en>not exist yet, or which were already removed, simply
@c <en>omit the tag, and @sc{cvs} knows to treat the absence
@c <en>of a tag as meaning that the file didn't exist as of
@c <en>that tag.
O tema a respeito de como exatamente etiquetas
interagem com arquivos adicionados e removidos é de
certa forma obscuro; Normalmente, o @sc{cvs} vai
verificar quais arquivos existem ou não sem muita
confusão.  Por padrão, etiquetas são aplicadas apenas a
arquivos que tenham uma revisão correspondendo ao que
está sendo etiquetado.  Arquivos que ainda não existem,
ou que já foram removidos, simplesmente omitem a
etiqueta, e o @sc{cvs} trata a ausência de uma
etiqueta como significando que o arquivo não existia na
criação da etiqueta.

@c <en>However, this can lose a small amount of information.
@c <en>For example, suppose a file was added and then removed.
@c <en>Then, if the tag is missing for that file, there is no
@c <en>way to know whether the tag refers to the time before
@c <en>the file was added, or the time after it was removed.
@c <en>If you specify the @samp{-r} option to @code{cvs rtag},
@c <en>then @sc{cvs} tags the files which have been removed,
@c <en>and thereby avoids this problem.  For example, one
@c <en>might specify @code{-r HEAD} to tag the head.
Entretanto, Isto pode perder uma pequena quantidade de
informação.  Por exemplo, suponha que um arquivo foi
adicionado e então removido.  Então, se a etiqueta está
faltando para aquele arquivo, não há como se descobrir
se a data da etiqueta é posterior à adição ou anterior
à remoção do arquivo.  Se você usa a opção @samp{-r}
para @code{cvs rtag}, então o @sc{cvs} etiqueta os
arquivos que foram removidos, e portanto remove este
problema.  Por exemplo, alguem pode especificar @code{-r
HEAD} para etiquetar a head.

@c <en>On the subject of adding and removing files, the
@c <en>@code{cvs rtag} command has a @samp{-a} option which
@c <en>means to clear the tag from removed files that would
@c <en>not otherwise be tagged.  For example, one might
@c <en>specify this option in conjunction with @samp{-F} when
@c <en>moving a tag.  If one moved a tag without @samp{-a},
@c <en>then the tag in the removed files might still refer to
@c <en>the old revision, rather than reflecting the fact that
@c <en>the file had been removed.  I don't think this is
@c <en>necessary if @samp{-r} is specified, as noted above.
A respeito de adicionar e remover arquivos, o comando
@code{cvs rtag} tem a opção @samp{-a} que significa
limpar a etiqueta de arquivos removidos que ???would
not otherwise be tagged???.  Por exemplo, alguem pode
especificar esta opção em conjunto com @samp{-F} quando
mover uma etiqueta.  Se alguem mover uma etiqueta sem o
@samp{-a}, então a etiqueta nos arquivos removidos vai
continuar fazendo referência à revisão antiga, Ao invés
de refletir o fato de que o arquivo foi removido.  Eu
não acho que isto seja necessário se @samp{-r} é
especificado, como falado acima.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Sticky tags
@node Etiquetas adesivas
@c <en>@section Sticky tags
@section Etiquetas adesivas
@c <en>@cindex Sticky tags
@cindex Etiquetas adesivas
@c <en>@cindex Tags, sticky
@cindex Adesivas, etiquetas

@c A somewhat related issue is per-directory sticky
@c tags (see comment at CVS/Tag in node Working
@c directory storage); we probably want to say
@c something like "you can set a sticky tag for only
@c some files, but you don't want to" or some such.

@c <en>Sometimes a working copy's revision has extra data
@c <en>associated with it, for example it might be on a branch
@c <en>(@pxref{Branching and merging}), or restricted to
@c <en>versions prior to a certain date by @samp{checkout -D}
@c <en>or @samp{update -D}.  Because this data persists --
@c <en>that is, it applies to subsequent commands in the
@c <en>working copy -- we refer to it as @dfn{sticky}.
Algumas vezes, um cópia de tabalho de uma revisão tem
dados extra associados a ela, por exemplo, ela pode
estar num ramo (@pxref{Ramificando e mesclando}), ou
restrita a uma versão anterior a uma certa data por
@samp{checkout -D} ou @samp{update -D}.  Já que este
dado persiste -- ou seja, ele se aplica a comandos
subseqüentes na cópia de trabalho -- nós o chamamos de
@dfn{adesivos}.

@c <en>Most of the time, stickiness is an obscure aspect of
@c <en>@sc{cvs} that you don't need to think about.  However,
@c <en>even if you don't want to use the feature, you may need
@c <en>to know @emph{something} about sticky tags (for
@c <en>example, how to avoid them!).
Na maioria das vezes, ser adesivo é um aspecto obscuro
do @sc{cvs} que você não precisa saber a respeito.
Entretanto, mesmo se você não quiser usar esta
habilidade, você  vai precisar saber @emph{alguma
coisa} sobre etiquetas adesivas (sticky tags) (por
exemplo, como evitá-las!).

@c <en>You can use the @code{status} command to see if any
@c <en>sticky tags or dates are set:
Você pode usar o comando @code{status} para ver se
alguma etiqueta ou data adesiva estão ligadas:

@example
$ cvs status driver.c
===================================================================
File: driver.c          Status: Up-to-date

    Version:            1.7.2.1 Sat Dec  5 19:35:03 1992
    RCS Version:        1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
    Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
    Sticky Date:        (none)
    Sticky Options:     (none)

@end example

@c <en>@cindex Resetting sticky tags
@cindex Zerando etiquetas adesivas
@c <en>@cindex Sticky tags, resetting
@cindex Etiquetas adesivas, zerando
@c <en>@cindex Deleting sticky tags
@cindex Apagando etiquetas adesivas
@c <en>The sticky tags will remain on your working files until
@c <en>you delete them with @samp{cvs update -A}.  The
@c <en>@samp{-A} option merges local changes into the version of the
@c <en>file from the head of the trunk, removing any sticky tags,
@c <en>dates, or options.  See @ref{update} for more on the operation
@c <en>of @code{cvs update}.
As etiquetas adesivas vão permanecer nos seus arquivos
de trabalho até que você apague elas com @samp{cvs
update -A}.  A opção @samp{-A} mescla as alterações
locais na versão do arquivo na cabeça (head) do tronco,
removendo qualquer etiqueta, data ou opção adesiva.
Veja em @ref{update} para mais a respeito desta
operação do @code{cvs update}.

@c <en>@cindex Sticky date
@cindex Data adesiva
@c <en>The most common use of sticky tags is to identify which
@c <en>branch one is working on, as described in
@c <en>@ref{Accessing branches}.  However, non-branch
@c <en>sticky tags have uses as well.  For example,
@c <en>suppose that you want to avoid updating your working
@c <en>directory, to isolate yourself from possibly
@c <en>destabilizing changes other people are making.  You
@c <en>can, of course, just refrain from running @code{cvs
@c <en>update}.  But if you want to avoid updating only a
@c <en>portion of a larger tree, then sticky tags can help.
@c <en>If you check out a certain revision (such as 1.4) it
@c <en>will become sticky.  Subsequent @code{cvs update}
@c <en>commands will
@c <en>not retrieve the latest revision until you reset the
@c <en>tag with @code{cvs update -A}.  Likewise, use of the
@c <en>@samp{-D} option to @code{update} or @code{checkout}
@c <en>sets a @dfn{sticky date}, which, similarly, causes that
@c <en>date to be used for future retrievals.
O uso mais comum de etiquetas adesivas é identificar em
que ramo se está trabalhando, como descrito em
@ref{Acessando ramos}.  Entretanto, etiquetas adesivas
em ???non-branch??? também têm seu uso.  Por exemplo,
suponha que você quer evitar atualizar seu diretório de
trabalho, para se isolar de mudanças que outras pessoas
estão fazendo que possam que possam desestabilizar seu
trabalho.  Você pode, claro, simplesmente não rodar o @code{cvs
update}.  Mas se você quer evitar atualizar (fazer
update) apenas uma parte de uma grande árvore, então
etiquetas adesivas podem ajudar.  Se você pega uma certa
revsão (como a 1.4) ela vai se tornar adesiva.
comandos @code{cvs update} subsequentes não vão trazer
a revisão mais nova até que você limpe a etiqueta com os
comandos @code{cvs update -A}.  Da mesma forma, o uso da
opção @samp{-D} em @code{update} ou @code{checkout}
define uma @dfn{data adesiva}, que, similarmente, faz
com que a data seja usada para futuras ???retrievals???.

@c <en>People often want to retrieve an old version of
@c <en>a file without setting a sticky tag.  This can
@c <en>be done with the @samp{-p} option to @code{checkout} or
@c <en>@code{update}, which sends the contents of the file to
@c <en>standard output.  For example:
É normal as pessoas quererem recuperar uma versão
antiga de um arquivo sem definir uma etiqueta adesiva.
Isto pode ser feito com a opção @samp{-p} no
@code{checkout} ou @code{update}, que manda o conteúdo
do arquivo para a saída padrão.  Por exemplo:
@example
$ cvs update -p -r 1.1 file1 >file1
===================================================================
Checking out file1
RCS:  /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
VERS: 1.1
***************
$
@end example

@c <en>However, this isn't the easiest way, if you are asking
@c <en>how to undo a previous checkin (in this example, put
@c <en>@file{file1} back to the way it was as of revision
@c <en>1.1).  In that case you are better off using the
@c <en>@samp{-j} option to @code{update}; for further
@c <en>discussion see @ref{Merging two revisions}.
Entretanto, esta não é a forma mais fácil, se você está
querendo desfazer um envio anterior (neste exemplo,
devolver o arquivo @file{file1} ao que ele era na
revisão 1.1).  Neste caso é melhor usar a opção
@samp{-j} com o @code{update}; Para maiores detalhes,
veja em @ref{Mesclando duas revisões}.

@c ---------------------------------------------------------------------
@c <en>@node Branching and merging
@node Ramificando e mesclando
@c <en>@chapter Branching and merging
@chapter Ramificando e mesclando
@c <en>@cindex Branching
@cindex Ramificando
@c <en>@cindex Merging
@cindex Mesclando
@c <en>@cindex Copying changes
@cindex Copying changes
@c <en>@cindex Main trunk and branches
@cindex Tronco principal e ramos
@c <en>@cindex Revision tree, making branches
@cindex Revision tree, making branches
@c <en>@cindex Branches, copying changes between
@cindex Branches, copying changes between
@c <en>@cindex Changes, copying between branches
@cindex Changes, copying between branches
@c <en>@cindex Modifications, copying between branches
@cindex Modifications, copying between branches

@c <en>@sc{cvs} allows you to isolate changes onto a separate
@c <en>line of development, known as a @dfn{branch}.  When you
@c <en>change files on a branch, those changes do not appear
@c <en>on the main trunk or other branches.
O @sc{cvs} permite isolar mudanças em uma linha de
desenvolvimento separada, chamada de @dfn{ramo}.
Quando você muda os arquivos de um ramo, aquelas
mudanças não aparecem no tronco principal ou em outros ramos.

@c <en>Later you can move changes from one branch to another
@c <en>branch (or the main trunk) by @dfn{merging}.  Merging
@c <en>involves first running @code{cvs update -j}, to merge
@c <en>the changes into the working directory.
@c <en>You can then commit that revision, and thus effectively
@c <en>copy the changes onto another branch.
Mais tarde você pode mover as mudanças de um ramo para
outro (ou para o tronco principal) com uma
@dfn{mesclagem}.  Mesclar é primeiro rodar um @code{cvs
update -j}, para mesclar as mudanças no seu diretório
de trabalho.  Depois efetivar (commit) esta revisão, e
finalmente fazer a efetiva destas mudanças de um ramo
para outro.

@menu
@c <en>* Branches motivation::         What branches are good for
* Motivação para ramos::              Para que ramos são bons
@c <en>* Creating a branch::           Creating a branch
* Criando um ramo::                   Criando um ramo
@c <en>* Accessing branches::          Checking out and updating branches
* Acessando ramos::                   Pegando e devolvendo ramos
@c <en>* Branches and revisions::      Branches are reflected in revision numbers
* Ramos e revisões::                  Ramificar se reflete nos números de revisão
@c <en>* Magic branch numbers::        Magic branch numbers
* Números de ramos mágicos::          Magic branch numbers
@c <en>* Merging a branch::            Merging an entire branch
* Mesclando um ramo::                 Mesclando um ramo inteiro
@c <en>* Merging more than once::      Merging from a branch several times
* Mesclando mais de uma vez::         Mesclando a partir de um ramo várias vezes
@c <en>* Merging two revisions::       Merging differences between two revisions
* Mesclando duas revisões::           Mesclando diferenças entre duas revisões
@c <en>* Merging adds and removals::   What if files are added or removed?
* Mesclando adicionados e removidos:: E se arquivos forem adicionados ou removidos?
@c <en>* Merging and keywords::        Avoiding conflicts due to keyword substitution
* Mesclagem e palavras-chave::        Evitando conflitos devido a substituição de palavras-chave
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Branches motivation
@node Motivação para ramos
@c <en>@section What branches are good for
@section Para que ramos são bons
@c <en>@cindex Branches motivation
@cindex Motivação para ramos
@c <en>@cindex What branches are good for
@cindex Para que ramos são bons
@c <en>@cindex Motivation for branches
@cindex Motivation for branches

@c FIXME: this node mentions one way to use branches,
@c but it is by no means the only way.  For example,
@c the technique of committing a new feature on a branch,
@c until it is ready for the main trunk.  The whole
@c thing is generally speaking more akin to the
@c "Revision management" node although it isn't clear to
@c me whether policy matters should be centralized or
@c distributed throughout the relevant sections.
@c <en>Suppose that release 1.0 of tc has been made.  You are continuing to
@c <en>develop tc, planning to create release 1.1 in a couple of months.  After a
@c <en>while your customers start to complain about a fatal bug.  You check
@c <en>out release 1.0 (@pxref{Tags}) and find the bug
@c <en>(which turns out to have a trivial fix).  However, the current revision
@c <en>of the sources are in a state of flux and are not expected to be stable
@c <en>for at least another month.  There is no way to make a
@c <en>bugfix release based on the newest sources.
Suponha que a release 1.0 de tc está pronta.  Você está
continua desenvolvendo tc, e planeja lançar a release
1.1 em alguns meses.  Depois de um tempo seus
consumidores começam a reclamar de um erro fatal.  Você
baixa a release 1.0 (@pxref{Etiquetas}) e encontra o
erro (que tem um conserto fácil).  Entretanto, a
revisão atual dos fontes está num estado do fluxo de
desenvolvimento que você não espera que estaja estável
em pelo menos um mês.  Não tem jeito de lançar uma
release baseada nos fontes mais novos.

@c <en>The thing to do in a situation like this is to create a @dfn{branch} on
@c <en>the revision trees for all the files that make up
@c <en>release 1.0 of tc.  You can then make
@c <en>modifications to the branch without disturbing the main trunk.  When the
@c <en>modifications are finished you can elect to either incorporate them on
@c <en>the main trunk, or leave them on the branch.
O que se há para fazer numa situação como esta é criar
um @dfn{ramo} na árvore de revisões para todos os
arquivos que integram a release 1.0 de tc.  Você pode
então fazer modificações no ramo sem perturbar o tronco
principal.  Quando as modificações terminarem você pode
decidir se incorporam elas ao tronco ou deixa elas no ramo.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Creating a branch
@node Criando um ramo
@c <en>@section Creating a branch
@section Criando um ramo
@c <en>@cindex Creating a branch
@cindex Criando um ramo
@c <en>@cindex Branch, creating a
@cindex Ramo, criando um
@c <en>@cindex tag (subcommand), creating a branch using
@cindex tag (subcomando), criando um ramo usando
@c <en>@cindex rtag (subcommand), creating a branch using
@cindex rtag (subcomando), criando um ramo usando

@c <en>You can create a branch with @code{tag -b}; for
@c <en>example, assuming you're in a working copy:
Você pode criar um ramo com @code{tag -b}; por exemplo,
supondo que você está numa cópia de trabalho:

@example
$ cvs tag -b rel-1-0-patches
@end example

@c FIXME: we should be more explicit about the value of
@c having a tag on the branchpoint.  For example
@c "cvs tag rel-1-0-patches-branchpoint" before
@c the "cvs tag -b".  This points out that
@c rel-1-0-patches is a pretty awkward name for
@c this example (more so than for the rtag example
@c below).

@c <en>This splits off a branch based on the current revisions
@c <en>in the working copy, assigning that branch the name
@c <en>@samp{rel-1-0-patches}.
Isto inicia um ramo baseado nas revisões atuais na
cópia de trabalho, dando a este ramo o nome
@samp{rel-1-0-patches}.

@c <en>It is important to understand that branches get created
@c <en>in the repository, not in the working copy.  Creating a
@c <en>branch based on current revisions, as the above example
@c <en>does, will @emph{not} automatically switch the working
@c <en>copy to be on the new branch.  For information on how
@c <en>to do that, see @ref{Accessing branches}.
É importante entender que ramos são criados no
repositório, e não na cópia de tarbalho.  Criar um ramo
baseado nas revisões atuais, como no exemplo acima,
@emph{Não} vai mudar automaticamente a cópia de
trabalho para o novo ramo.  Para informações sobre
como fazer isto, veja em @ref{Acessando ramos}.

@c <en>You can also create a branch without reference to any
@c <en>working copy, by using @code{rtag}:
Você também pode criar um ramo sem referência a
qualquer cópia de trabalho usando @code{rtag}:

@example
$ cvs rtag -b -r rel-1-0 rel-1-0-patches tc
@end example

@c <en>@samp{-r rel-1-0} says that this branch should be
@c <en>rooted at the revision that
@c <en>corresponds to the tag @samp{rel-1-0}.  It need not
@c <en>be the most recent revision -- it's often useful to
@c <en>split a branch off an old revision (for example, when
@c <en>fixing a bug in a past release otherwise known to be
@c <en>stable).
@samp{-r rel-1-0} diz que este ramo deve ser iniciado
na revisão que corresponde à etiqueta (tag)
@samp{rel-1-0}.  Não precisa ser a revisão mais recente
-- é útil às vezes separar um ramo a partir de uma
revisão antiga (por exemplo, quando se está consertando
um erro numa release anterior que se pensava estar
estável).

@c <en>As with @samp{tag}, the @samp{-b} flag tells
@c <en>@code{rtag} to create a branch (rather than just a
@c <en>symbolic revision name).  Note that the numeric
@c <en>revision number that matches @samp{rel-1-0} will
@c <en>probably be different from file to file.
Assim como no @samp{tag}, a opção @samp{-b} diz ao
@code{rtag} para criar um ramo (ao invés de
simplesmente um nome de revisão simbólico).  Observe
que o número de revisão simbólico que casa com
@samp{rel-1-0} provavelmente ser diferente de arquivo
para arquivo.

@c <en>So, the full effect of the command is to create a new
@c <en>branch -- named @samp{rel-1-0-patches} -- in module
@c <en>@samp{tc}, rooted in the revision tree at the point tagged
@c <en>by @samp{rel-1-0}.
Então, O efeito total do comando é criar um novo ramo
-- chamado @samp{rel-1-0-patches} -- no módulo
@samp{tc}, partindo da árvore de revisão no ponto
etiquetado como @samp{rel-1-0}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Accessing branches
@node Acessando ramos
@c <en>@section Accessing branches
@section Acessando ramos
@c <en>@cindex Check out a branch
@cindex Check out a branch
@c <en>@cindex Retrieve a branch
@cindex Retrieve a branch
@c <en>@cindex Access a branch
@cindex Access a branch
@c <en>@cindex Identifying a branch
@cindex Identifying a branch
@c <en>@cindex Branch, check out
@cindex Branch, check out
@c <en>@cindex Branch, retrieving
@cindex Branch, retrieving
@c <en>@cindex Branch, accessing
@cindex Branch, accessing
@c <en>@cindex Branch, identifying
@cindex Branch, identifying

@c <en>You can retrieve a branch in one of two ways: by
@c <en>checking it out fresh from the repository, or by
@c <en>switching an existing working copy over to the branch.
Você pode recuperar um ramo de duas formas: pegando um
cópia zerada dele do repositório, ou alternando de uma
cópia de trabalho já existente para o ramo.

@c <en>To check out a branch from the repository, invoke
@c <en>@samp{checkout} with the @samp{-r} flag, followed by
@c <en>the tag name of the branch (@pxref{Creating a branch}):
Para pegar um ramo do repositório, chame o
@samp{checkout} com a opção @samp{-r}, seguida pelo
nome da etiqueta do ramo (@pxref{Criando um ramo}):

@example
$ cvs checkout -r rel-1-0-patches tc
@end example

@c <en>Or, if you already have a working copy, you can switch
@c <en>it to a given branch with @samp{update -r}:
Ou, se você já tem uma cópia de trabalho, você pode
alternar dela para um dado ramo com @samp{update -r}:

@example
$ cvs update -r rel-1-0-patches tc
@end example

@noindent
@c <en>or equivalently:
ou equivalentemente:

@example
$ cd tc
$ cvs update -r rel-1-0-patches
@end example

@c <en>It does not matter if the working copy was originally
@c <en>on the main trunk or on some other branch -- the above
@c <en>command will switch it to the named branch.  And
@c <en>similarly to a regular @samp{update} command,
@c <en>@samp{update -r} merges any changes you have made,
@c <en>notifying you of conflicts where they occur.
Não importa se a cópia de tabalho estava originalmente
no tronco principal ou em algum outro ramo -- o comando
acima vai alternar ela para o ramo dado.  E
similarmente ao comando @samp{update} normal,
@samp{update -r} mescla quaisquer mudanças que você
tenha feito, notificando você sobre conflitos onde eles
ocorrerem.

@c <en>Once you have a working copy tied to a particular
@c <en>branch, it remains there until you tell it otherwise.
@c <en>This means that changes checked in from the working
@c <en>copy will add new revisions on that branch, while
@c <en>leaving the main trunk and other branches unaffected.
Uma vez que você tenha uma cópia de trabalho referente
a um dado, ela continua no ramo até que se diga o
contrário.  Isto significa que mudanças inseridas a
partir da cópia de trabalho vão adicionar novas
revisões naquele ramo, enquanto que não afeta o tronco
principal nem os outros ramos.

@c <en>@cindex Branches, sticky
@cindex Ramos, adesivos
@c <en>To find out what branch a working copy is on, you can
@c <en>use the @samp{status} command.  In its output, look for
@c <en>the field named @samp{Sticky tag} (@pxref{Sticky tags})
@c <en>-- that's @sc{cvs}'s way of telling you the branch, if
@c <en>any, of the current working files:
Para saber em qual ramo uma cópia de trabalho está,
você precisa usar o comando @samp{status}.  Na saída do
comando procure pelo campo chamado @samp{Sticky tag}
(etiqueta adesiva) (@pxref{Etiquetas adesivas})
-- esta é a forma do @sc{cvs} de dizer a você o ramo,
se é que se está num, dos arquivos de trabalho atuais:

@example
$ cvs status -v driver.c backend.c
===================================================================
File: driver.c          Status: Up-to-date

    Version:            1.7     Sat Dec  5 18:25:54 1992
    RCS Version:        1.7     /u/cvsroot/yoyodyne/tc/driver.c,v
    Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
    Sticky Date:        (none)
    Sticky Options:     (none)

    Existing Tags:
        rel-1-0-patches             (branch: 1.7.2)
        rel-1-0                     (revision: 1.7)

===================================================================
File: backend.c         Status: Up-to-date

    Version:            1.4     Tue Dec  1 14:39:01 1992
    RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
    Sticky Tag:         rel-1-0-patches (branch: 1.4.2)
    Sticky Date:        (none)
    Sticky Options:     (none)

    Existing Tags:
        rel-1-0-patches             (branch: 1.4.2)
        rel-1-0                     (revision: 1.4)
        rel-0-4                     (revision: 1.4)

@end example

@c <en>Don't be confused by the fact that the branch numbers
@c <en>for each file are different (@samp{1.7.2} and
@c <en>@samp{1.4.2} respectively).  The branch tag is the
@c <en>same, @samp{rel-1-0-patches}, and the files are
@c <en>indeed on the same branch.  The numbers simply reflect
@c <en>the point in each file's revision history at which the
@c <en>branch was made.  In the above example, one can deduce
@c <en>that @samp{driver.c} had been through more changes than
@c <en>@samp{backend.c} before this branch was created.
Não se confunda pelo fato de que os números de ramo de
cada arquivo serem diferentes (@samp{1.7.2} e
@samp{1.4.2} respectivamente).  A etiqueta do ramo é a
mesma, @samp{rel-1-0-patches}, e os arquivos estão na
verdade no mesmo ramo.  Os números simplesmente
refletem o ponto em que cada arquivo estava no
histórico de revisão quando o ramo foi criado.  No
exemplo acima, pode-se deduzir que @samp{driver.c}
tinha tido mais alterações que @samp{backend.c} antes
do ramo ter sido criado.

@c <en>See @ref{Branches and revisions} for details about how
@c <en>branch numbers are constructed.
Veja em @ref{Ramos e revisões} para detalhes a respeito
de como números de ramos são criados.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Branches and revisions
@node Ramos e revisões
@c <en>@section Branches and revisions
@section Ramos e revisões
@c <en>@cindex Branch number
@cindex Número de ramo
@c <en>@cindex Number, branch
@cindex Ramo, número de
@c <en>@cindex Revision numbers (branches)
@cindex Números de revisão (ramos)

@c <en>Ordinarily, a file's revision history is a linear
@c <en>series of increments (@pxref{Revision numbers}):
Normalmente, um histórico da revisão do arquivo é uma
séria linear de incrementos (@pxref{Números de
revisão}):

@example
       +-----+    +-----+    +-----+    +-----+    +-----+
       ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
       +-----+    +-----+    +-----+    +-----+    +-----+
@end example

@c <en>However, @sc{cvs} is not limited to linear development.  The
@c <en>@dfn{revision tree} can be split into @dfn{branches},
@c <en>where each branch is a self-maintained line of
@c <en>development.  Changes made on one branch can easily be
@c <en>moved back to the main trunk.
Entretanto, o @sc{cvs} não está limitado a
desenvolvimento linear.  A @dfn{árvore de revisões}
pode ser separada em @dfn{ramos},
onde cada ramo é uma linha de desenvolvimento que se
mantém.  Mudanças feitas em um ramo podem ser facilmente
movidas para o tronco principal.

@c <en>Each branch has a @dfn{branch number}, consisting of an
@c <en>odd number of period-separated decimal integers.  The
@c <en>branch number is created by appending an integer to the
@c <en>revision number where the corresponding branch forked
@c <en>off.  Having branch numbers allows more than one branch
@c <en>to be forked off from a certain revision.
Cada ramo tem um @dfn{número de ramo}, formado por uma
quantidade ímpar de números inteiros decimais separados
por ponto.  O número do ramo é criado anexando um
inteiro ao número de revisão de onde o ramo
correpondente saiu.  Com números de ramo é possível se
ter mais de uma ramificação partindo de uma certa revisão.

@need 3500
@c <en>All revisions on a branch have revision numbers formed
@c <en>by appending an ordinal number to the branch number.
@c <en>The following figure illustrates branching with an
@c <en>example.
Todas as revisões num ramo têm números de revisão
formados pela anexação de um número ordinal ao número
do ramo.  A figura seguinte ilustra a ramificação com um exemplo.

@example
@c This example used to have a 1.2.2.4 revision, which
@c might help clarify that development can continue on
@c 1.2.2.  Might be worth reinstating if it can be done
@c without overfull hboxes.
@group
                                                      +-------------+
                           Branch 1.2.2.3.2 ->        ! 1.2.2.3.2.1 !
                                                    / +-------------+
                                                   /
                                                  /
                 +---------+    +---------+    +---------+
Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
               / +---------+    +---------+    +---------+
              /
             /
+-----+    +-----+    +-----+    +-----+    +-----+
! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !  <- The main trunk
+-----+    +-----+    +-----+    +-----+    +-----+
                !
                !
                !   +---------+    +---------+    +---------+
Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
                    +---------+    +---------+    +---------+

@end group
@end example

@c --   However, at least for me the figure is not enough.  I suggest more
@c --   text to accompany it.  "A picture is worth a thousand words", so you
@c --   have to make sure the reader notices the couple of hundred words
@c --   *you* had in mind more than the others!

@c --   Why an even number of segments?  This section implies that this is
@c --   how the main trunk is distinguished from branch roots, but you never
@c --   explicitly say that this is the purpose of the [by itself rather
@c --   surprising] restriction to an even number of segments.

@c <en>The exact details of how the branch number is
@c <en>constructed is not something you normally need to be
@c <en>concerned about, but here is how it works: When
@c <en>@sc{cvs} creates a branch number it picks the first
@c <en>unused even integer, starting with 2.  So when you want
@c <en>to create a branch from revision 6.4 it will be
@c <en>numbered 6.4.2.  All branch numbers ending in a zero
@c <en>(such as 6.4.0) are used internally by @sc{cvs}
@c <en>(@pxref{Magic branch numbers}).  The branch 1.1.1 has a
@c <en>special meaning.  @xref{Tracking sources}.
Os detalhes exatos de como o número de ramo é
construído não são algo com os quais você precisa estar
preocupado, mas aqui vai como a coisa funciona: quando
o @sc{cvs} cria um número de ramo ele pega o primeiro
número par não usado, a partir de 2.  Logo, quando você
quer criar um ramo a partir da revisão 6.4 ele vai ser
numerado 6.4.2.  Todos os números de ramos terminados
com um zero (tal como 6.4.0) são usados internamente
pelo @sc{cvs} (@pxref{Números de ramos mágicos}).  O
ramo 1.1.1 tem um significado especial.
@xref{Acompanhando fontes}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Magic branch numbers
@node Números de ramos mágicos
@c <en>@section Magic branch numbers
@section Números de ramos mágicos

@c Want xref to here from "log"?

@c <en>This section describes a @sc{cvs} feature called
@c <en>@dfn{magic branches}.  For most purposes, you need not
@c <en>worry about magic branches; @sc{cvs} handles them for
@c <en>you.  However, they are visible to you in certain
@c <en>circumstances, so it may be useful to have some idea of
@c <en>how it works.
Esta seção descreve uma habilidade do @sc{cvs} chamada
@dfn{ramos mágicos}.  Para a maioria dos casos, você
não precisa se preocupar com os ramos mágicos; o
@sc{cvs} cuida deles para você.  Entretanto, eles
aparecem em algumas situações, sendo importante se ter
alguma idéia de como eles funcionam.

@c <en>Externally, branch numbers consist of an odd number of
@c <en>dot-separated decimal integers.  @xref{Revision
@c <en>numbers}.  That is not the whole truth, however.  For
@c <en>efficiency reasons @sc{cvs} sometimes inserts an extra 0
@c <en>in the second rightmost position (1.2.4 becomes
@c <en>1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
@c <en>on).
Externamente, números de ramos consistem de uma quantidade
ímpar de inteiros decimais separados por
ponto.  @xref{Números de revisão}.  Isto não é toda a
verdade, entretanto.  Por questões de eficiência, o
@sc{cvs} insere, em alguns momentos, um 0 extra na
segunda posição da direita para a esquerda (1.2.4 se torna
1.2.0.4, 8.9.10.11.12 se torna 8.9.10.11.0.12 e assim
por diante).

@c <en>@sc{cvs} does a pretty good job at hiding these so
@c <en>called magic branches, but in a few places the hiding
@c <en>is incomplete:
O @sc{cvs} faz um bom trabalho escondendo estes tais
ramos mágicos, mas em alguns lugares alguma coisa aparece:

@itemize @bullet
@ignore
@c This is in ignore as I'm taking their word for it,
@c that this was fixed
@c a long time ago.  But before deleting this
@c entirely, I'd rather verify it (and add a test
@c case to the testsuite).
@item
@c <en>The magic branch can appear in the output from
@c <en>@code{cvs status} in vanilla @sc{cvs} 1.3.  This is
@c <en>fixed in @sc{cvs} 1.3-s2.
The magic branch can appear in the output from
@code{cvs status} in vanilla @sc{cvs} 1.3.  This is
fixed in @sc{cvs} 1.3-s2.

@end ignore
@item
@c <en>The magic branch number appears in the output from
@c <en>@code{cvs log}.
O número de ramo mágico aparece na saída do
@code{cvs log}.
@c What output should appear instead?

@item
@c <en>You cannot specify a symbolic branch name to @code{cvs
@c <en>admin}.
Você não pode especificar um nome de ramo simbólico
para o @code{cvs admin}.

@end itemize

@c Can CVS do this automatically the first time
@c you check something in to that branch?  Should
@c it?
@c <en>You can use the @code{admin} command to reassign a
@c <en>symbolic name to a branch the way @sc{rcs} expects it
@c <en>to be.  If @code{R4patches} is assigned to the branch
@c <en>1.4.2 (magic branch number 1.4.0.2) in file
@c <en>@file{numbers.c} you can do this:
Você pode usar o comando @code{admin} para reatribuir
um nome simbólico para um ramo da forma que o @sc{rcs}
espera que seja.  Se o @code{R4patches} está atribuído
para o ramo 1.4.2 (número de ramo mágico 1.4.0.2) no
arquivo @file{numbers.c} você pode fazer isto:

@example
$ cvs admin -NR4patches:1.4.2 numbers.c
@end example

@c <en>It only works if at least one revision is already
@c <en>committed on the branch.  Be very careful so that you
@c <en>do not assign the tag to the wrong number.  (There is
@c <en>no way to see how the tag was assigned yesterday).
Isto apenas funciona se pelo menos uma revisão já está
efetivada no ramo.  Seja bastante cuidadoso para não
atribuir a etiqueta ao número errado.  (Não existe
jeito de ver como a etiqueta estava atribuída ontem).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Merging a branch
@node Mesclando um ramo
@c <en>@section Merging an entire branch
@section Mesclando um ramo inteiro
@c <en>@cindex Merging a branch
@cindex Mesclando um ramo
@c <en>@cindex -j (merging branches)
@cindex -j (mesclando ramos)

@c <en>You can merge changes made on a branch into your working copy by giving
@c <en>the @samp{-j @var{branchname}} flag to the @code{update} subcommand.  With one
@c <en>@samp{-j @var{branchname}} option it merges the changes made between the
@c <en>greatest common ancestor (GCA) of the branch and the destination revision (in
@c <en>the simple case below the GCA is the point where the branch forked) and the
@c <en>newest revision on that branch into your working copy.
Você pode mesclar mudanças feitas num ramo em seu
diretório de trabalho passando a opção @samp{-j
@var{nome_do_ramo}} para o subcomando @code{update}.
Com uma opção @samp{-j @var{nome_do_ramo}} ele mescla
as mudançãs feitas entre o maior ancestral comum
(greatest common ancestor - GCA) do ramo e a revisão de
destino (no caso mais simples abaixo, o GCA é o ponto
onde o ramo bifurcou) e a nova revisão neste ramo na
sua cópia de trabalho.

@cindex Join
@c <en>The @samp{-j} stands for ``join''.
O @samp{-j} significa ``join'', ``juntar''.

@c <en>@cindex Branch merge example
@cindex Exemplo de mesclagem de ramo
@c <en>@cindex Example, branch merge
@cindex Mesclagem de ramo, exemplo
@c <en>@cindex Merge, branch example
@cindex Mesclagem, de ramo, exemplo
@c <en>Consider this revision tree:
Considere esta árvore de revisão:

@example
+-----+    +-----+    +-----+    +-----+
! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !      <- The main trunk
+-----+    +-----+    +-----+    +-----+
                !
                !
                !   +---------+    +---------+
Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
                    +---------+    +---------+
@end example

@noindent
@c <en>The branch 1.2.2 has been given the tag (symbolic name) @samp{R1fix}.  The
@c <en>following example assumes that the module @samp{mod} contains only one
@c <en>file, @file{m.c}.
O ramo 1.2.2 recebeu a etiqueta (nome simbólico)
@samp{R1fix}.  O exemplo seguinte assume que o módulo
@samp{mod} contém apenas um arquivo, @file{m.c}.

@example
$ cvs checkout mod               # @r{Retrieve the latest revision, 1.4}

$ cvs update -j R1fix m.c        # @r{Merge all changes made on the branch,}
                                 # @r{i.e. the changes between revision 1.2}
                                 # @r{and 1.2.2.2, into your working copy}
                                 # @r{of the file.}

$ cvs commit -m "Included R1fix" # @r{Create revision 1.5.}
@end example

@c <en>A conflict can result from a merge operation.  If that
@c <en>happens, you should resolve it before committing the
@c <en>new revision.  @xref{Conflicts example}.
Um conflito pode resultar de uma operação de mesclagem.
Se isto acontecer, você deve resolver isto antes de
efetivar a nova revisão.  @xref{Exemplo de conflitos}.

@c <en>If your source files contain keywords (@pxref{Keyword substitution}),
@c <en>you might be getting more conflicts than strictly necessary.  See
@c <en>@ref{Merging and keywords}, for information on how to avoid this.
Se seu código fonte contém palavras-chave
(@pxref{Substituição de palavra-chave}), você deve
obter mais conflitos que os ???strictly necessary???.
Veja em @ref{Mesclagem e palavras-chave}, para saber
como evitar isto.

@c <en>The @code{checkout} command also supports the @samp{-j @var{branchname}} flag.  The
@c <en>same effect as above could be achieved with this:
O comando @code{checkout} também suporta a opção
@samp{-j @var{branchname}}.  O mesmo efeito que o visto
logo acima pode ser obtido com isto:

@example
$ cvs checkout -j R1fix mod
$ cvs commit -m "Included R1fix"
@end example

@c <en>It should be noted that @code{update -j @var{tagname}} will also work but may
@c <en>not produce the desired result.  @xref{Merging adds and removals}, for more.
Observe que o @code{update -j @var{tagname}} também vai
funcionar mas pode não produzir o efeito desejado.
@xref{Mesclando adicionados e removidos}, para mais informações.

@c <en>@node Merging more than once
@node Mesclando mais de uma vez
@c <en>@section Merging from a branch several times
@section Mesclando a partir de um ramo várias vezes

@c <en>Continuing our example, the revision tree now looks
@c <en>like this:
Continuando nosso exemplo, a árvore de revisão agora
vai parecer com isto:

@example
+-----+    +-----+    +-----+    +-----+    +-----+
! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
+-----+    +-----+    +-----+    +-----+    +-----+
                !                           *
                !                          *
                !   +---------+    +---------+
Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
                    +---------+    +---------+
@end example

@noindent
@c <en>where the starred line represents the merge from the
@c <en>@samp{R1fix} branch to the main trunk, as just
@c <en>discussed.
Onde a linha de asteriscos representa a mescla entre o
ramo @samp{R1fix} e o tronco principal, como acabamos
de ver.

@c <en>Now suppose that development continues on the
@c <en>@samp{R1fix} branch:
Agora suponha que o desenvolvimento continua no ramo @samp{R1fix}:

@example
+-----+    +-----+    +-----+    +-----+    +-----+
! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
+-----+    +-----+    +-----+    +-----+    +-----+
                !                           *
                !                          *
                !   +---------+    +---------+    +---------+
Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
                    +---------+    +---------+    +---------+
@end example

@noindent
@c <en>and then you want to merge those new changes onto the
@c <en>main trunk.  If you just use the @code{cvs update -j
@c <en>R1fix m.c} command again, @sc{cvs} will attempt to
@c <en>merge again the changes which you have already merged,
@c <en>which can have undesirable side effects.
e então você quer mesclar as novas mudanças dentro do
tronco principal.  Se você usar simplesmente o comando
@code{cvs update -j R1fix m.c} de novo, o @sc{cvs} vai
tentar mesclar de novo as mudanças que você já mesclou,
o que pode gerar efeitos indesejados.

@c <en>So instead you need to specify that you only want to
@c <en>merge the changes on the branch which have not yet been
@c <en>merged into the trunk.  To do that you specify two
@c <en>@samp{-j} options, and @sc{cvs} merges the changes from
@c <en>the first revision to the second revision.  For
@c <en>example, in this case the simplest way would be
Então, ao invés disto, você precisa especificar que você
quer apenas mesclar no tronco as mudanças que ainda não
foram mescladas.  Para fazer isto você especifica duas
opções @samp{-j}, e o @sc{cvs} mescla as mudanças da
primeira revisão na segunda revisão.  Por exemplo,
neste caso a forma mais simples será

@example
cvs update -j 1.2.2.2 -j R1fix m.c    # @r{Merge changes from 1.2.2.2 to the}
                                      # @r{head of the R1fix branch}
@end example

@c <en>The problem with this is that you need to specify the
@c <en>1.2.2.2 revision manually.  A slightly better approach
@c <en>might be to use the date the last merge was done:
O problema com isto é que você precisa especificar a
revisão 1.2.2.2 manualmente.  Uma abordagem um pouco
melhor seria usar a data em que a última mesclagem foi
feita:

@example
cvs update -j R1fix:yesterday -j R1fix m.c
@end example

@c <en>Better yet, tag the R1fix branch after every merge into
@c <en>the trunk, and then use that tag for subsequent merges:
Ou ainda melhor, etiquete o ramo R1fix depois de cada
mesclagem no tronco, e então use a etiqueta para
mesclagens subseqüentes:

@example
cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Merging two revisions
@node Mesclando duas revisões
@c <en>@section Merging differences between any two revisions
@section Mesclando diferenças entre duas revisões quaisquer
@c <en>@cindex Merging two revisions
@cindex Mesclando duas revisões
@c <en>@cindex Revisions, merging differences between
@cindex Revisões, mesclando diferenças entre
@c <en>@cindex Differences, merging
@cindex Diferenças, mesclando

@c <en>With two @samp{-j @var{revision}} flags, the @code{update}
@c <en>(and @code{checkout}) command can merge the differences
@c <en>between any two revisions into your working file.
Com duas opções @samp{-j @var{revisão}}, o comando @code{update}
(e @code{checkout}) pode mesclar as diferenças entre
quaisquer duas revisões no arquivo do diretório de trabalho.

@c <en>@cindex Undoing a change
@cindex Desfazendo uma alteração
@c <en>@cindex Removing a change
@cindex Removendo uma alteração
@example
$ cvs update -j 1.5 -j 1.3 backend.c
@end example

@noindent
@c <en>will undo all changes made between revision
@c <en>1.3 and 1.5.  Note the order of the revisions!
vai desfazer todas as alterações feitas entre as
revisões 1.3 e 1.5.  Observe a ordem das revisões!

@c <en>If you try to use this option when operating on
@c <en>multiple files, remember that the numeric revisions will
@c <en>probably be very different between the various files.
@c <en>You almost always use symbolic
@c <en>tags rather than revision numbers when operating on
@c <en>multiple files.
Se você tentar usar esta opção quando estiver agindo em
vários arquivos, lembre-se que as revisões numéricas
provavelmente vão ser bastante diferentes nos vários
arquivos.  Você vai quase sempre usar etiquetas
simbólicas ao invés de números de revisão quando
estiver operando em vários arquivos.

@c <en>@cindex Restoring old version of removed file
@cindex Recuperando uma versão antiga de um arquivo removido
@c <en>@cindex Resurrecting old version of dead file
@cindex Ressucitando uma versão antiga de um arquivo morto
@c <en>Specifying two @samp{-j} options can also undo file
@c <en>removals or additions.  For example, suppose you have
@c <en>a file
@c <en>named @file{file1} which existed as revision 1.1, and
@c <en>you then removed it (thus adding a dead revision 1.2).
@c <en>Now suppose you want to add it again, with the same
@c <en>contents it had previously.  Here is how to do it:
Ao especificar duas opções @samp{-j} você pode também
desfazer uma remoção ou adição de arquivo.  Por
exemplo, suponhao que você tem um arquivo chamado
@file{file1} que existia numa revisão 1.1, e você
removeu ele (adicionando então uma revisão morta 1.2).
Agora suponha que você quer adicioná-lo novamente, com
o mesmo conteúdo que ele tinha anteriormente.  Aqui
está como fazer isto:

@example
$ cvs update -j 1.2 -j 1.1 file1
U file1
$ cvs commit -m test
Checking in file1;
/tmp/cvs-sanity/cvsroot/first-dir/file1,v  <--  file1
new revision: 1.3; previous revision: 1.2
done
$
@end example

@c <en>@node Merging adds and removals
@node Mesclando adicionados e removidos
@c <en>@section Merging can add or remove files
@section Mesclar pode adicionar ou remover arquivos

@c <en>If the changes which you are merging involve removing
@c <en>or adding some files, @code{update -j} will reflect
@c <en>such additions or removals.
Se as mudanças que você está mesclando envolvem remover
ou adicionar alguns arquivos, @code{update -j} vai
resultar em algumas adições ou remoções.

@c FIXME: This example needs a lot more explanation.
@c We also need other examples for some of the other
@c cases (not all--there are too many--as long as we present a
@c coherent general principle).
@c <en>For example:
Por exemplo:
@example
cvs update -A
touch a b c
cvs add a b c ; cvs ci -m "added" a b c
cvs tag -b branchtag
cvs update -r branchtag
touch d ; cvs add d
rm a ; cvs rm a
cvs ci -m "added d, removed a"
cvs update -A
cvs update -jbranchtag
@end example

@c <en>After these commands are executed and a @samp{cvs commit} is done,
@c <en>file @file{a} will be removed and file @file{d} added in the main branch.
Depois destes comandos terem sido executados e um
@samp{cvs commit} ser feito, o arquivo @file{a} vai ser
removido e o arquivo @file{d} adicionado no ramo principal.
@c (which was determined by trying it)

@c <en>Note that using a single static tag (@samp{-j @var{tagname}})
@c <en>rather than a dynamic tag (@samp{-j @var{branchname}}) to merge
@c <en>changes from a branch will usually not remove files which were removed on the
@c <en>branch since @sc{cvs} does not automatically add static tags to dead revisions.
@c <en>The exception to this rule occurs when
@c <en>a static tag has been attached to a dead revision manually.  Use the branch tag
@c <en>to merge all changes from the branch or use two static tags as merge endpoints
@c <en>to be sure that all intended changes are propagated in the merge.
Observe que ao se usar uma única etiqueta estática
(@samp{-j @var{tagname}}) ao invés de uma etiqueta
dinâmica (@samp{-j @var{branchname}}) para mesclar
mudanças a partir de um ramo normalmente não vai
remover arquivos que foram removidos do ramo, já que o
@sc{cvs} não adiona etiquetas estáticas a revisões
mortas.  A exceção a esta regra ocorre quando uma
etiqueta estática foi colocada numa revisão morta
manualmente.  Use a etiqueta do ramo para mesclar todas
as mudanças a partir do ramo ou use duas etiquetas
estáticas como limites da mescla para ter certeza que
todas as mudanças pretendidas vão ser propagadas na mesclagem.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Merging and keywords
@node Mesclagem e palavras-chave
@c <en>@section Merging and keywords
@section Mesclagem e palavras-chave
@c <en>@cindex Merging, and keyword substitution
@cindex Mesclagem, e substituição de palavra-chave
@c <en>@cindex Keyword substitution, and merging
@cindex Substituição de palavra-chave, e mesclagem
@c <en>@cindex -j (merging branches), and keyword substitution
@cindex -j (mesclando ramos), e substituição de palavra-chave
@c <en>@cindex -kk, to avoid conflicts during a merge
@cindex -kk, para evitar conflitos durante uma mesclagem

@c <en>If you merge files containing keywords (@pxref{Keyword
@c <en>substitution}), you will normally get numerous
@c <en>conflicts during the merge, because the keywords are
@c <en>expanded differently in the revisions which you are
@c <en>merging.
Se você mescla arquivos contendo palavras-chave
(@pxref{Substituição de palavra-chave}), você
normalmente vai ter muitos conflitos durante a
mesclagem, já que as palavras-chave são expandidas de
forma diferente nas revisões que você está mesclando.

@c <en>Therefore, you will often want to specify the
@c <en>@samp{-kk} (@pxref{Substitution modes}) switch to the
@c <en>merge command line.  By substituting just the name of
@c <en>the keyword, not the expanded value of that keyword,
@c <en>this option ensures that the revisions which you are
@c <en>merging will be the same as each other, and avoid
@c <en>spurious conflicts.
Portanto, você vai freqüentemente querer especificar a opção
@samp{-kk} (@pxref{Modos de substituição}) na linha de
comando do merge.  Simplesmente substituindo o nome da
palavra-chave, e não o valor expandido dela, vai
garantir que as revisões que você vai estar mesclando
???will be the same as each other???, e assim evitar
conflitos falsos.

@c <en>For example, suppose you have a file like this:
Por exemplo, suponha que você tenha um arquivo como este:

@example
       +---------+
      _! 1.1.2.1 !   <-  br1
     / +---------+
    /
   /
+-----+    +-----+
! 1.1 !----! 1.2 !
+-----+    +-----+
@end example

@noindent
@c <en>and your working directory is currently on the trunk
@c <en>(revision 1.2).  Then you might get the following
@c <en>results from a merge:
E seu diretório de trabalho está no momento no tronco
(revisão 1.2).  Então pode acontecer de você obter os
seguintes resultados de uma mescla:

@example
$ cat file1
key $@splitrcskeyword{}Revision: 1.2 $
. . .
$ cvs update -j br1
U file1
RCS file: /cvsroot/first-dir/file1,v
retrieving revision 1.1
retrieving revision 1.1.2.1
Merging differences between 1.1 and 1.1.2.1 into file1
rcsmerge: warning: conflicts during merge
$ cat file1
@asis{}<<<<<<< file1
key $@splitrcskeyword{}Revision: 1.2 $
@asis{}=======
key $@splitrcskeyword{}Revision: 1.1.2.1 $
@asis{}>>>>>>> 1.1.2.1
. . .
@end example

@c <en>What happened was that the merge tried to merge the
@c <en>differences between 1.1 and 1.1.2.1 into your working
@c <en>directory.  So, since the keyword changed from
@c <en>@code{Revision: 1.1} to @code{Revision: 1.1.2.1},
@c <en>@sc{cvs} tried to merge that change into your working
@c <en>directory, which conflicted with the fact that your
@c <en>working directory had contained @code{Revision: 1.2}.
O que aconteceu é que a mesclagem tentou mesclar as
diferenças entre 1.1 e 1.1.2.1 dentro de seu diretório
de trabalho.  Então, uma vez que a palavra-chave mudou
de @code{Revision: 1.1} para @code{Revision: 1.1.2.1},
o @sc{cvs} tentou mesclar esta mudança no seu diretório
de trabalho, o que gerou um conflito com o fato de seu
diretório de trabalho continha @code{Revision: 1.2}.

@c <en>Here is what happens if you had used @samp{-kk}:
Isto é o que aconteceria se você tivesse usado @samp{-kk}:

@example
$ cat file1
key $@splitrcskeyword{}Revision: 1.2 $
. . .
$ cvs update -kk -j br1
U file1
RCS file: /cvsroot/first-dir/file1,v
retrieving revision 1.1
retrieving revision 1.1.2.1
Merging differences between 1.1 and 1.1.2.1 into file1
$ cat file1
key $@splitrcskeyword{}Revision$
. . .
@end example

@c <en>What is going on here is that revision 1.1 and 1.1.2.1
@c <en>both expand as plain @code{Revision}, and therefore
@c <en>merging the changes between them into the working
@c <en>directory need not change anything.  Therefore, there
@c <en>is no conflict.
O que está acontecendo aqui é que ambas as revisões 1.1
e 1.1.2.1 expandem em um simples @code{Revision}, e
consequentemente, não há nenhuma mudança para mesclar entre elas no
diretório de trabalho.  Portanto, não há conflito.

@c <en>@strong{WARNING: In versions of @sc{cvs} prior to 1.12.2, there was a
@c <en>major problem with using @samp{-kk} on merges.  Namely, @samp{-kk}
@c <en>overrode any default keyword expansion mode set in the archive file in
@c <en>the repository.  This could, unfortunately for some users, cause data
@c <en>corruption in binary files (with a default keyword expansion mode set
@c <en>to @samp{-kb}).  Therefore, when a repository contained binary files,
@c <en>conflicts had to be dealt with manually rather than using @samp{-kk} in
@c <en>a merge command.}
@strong{WARNING: Em versões do @sc{cvs} anteriores à
1.12.2, existia um grande problema ao usar @samp{-kk}
em mesclagens.  A saber, @samp{-kk} sobreescrevia
qualquer modo de expansão de palavra-chave padrão
ajustado no arquivo do repositório.  Isto podia,
infelizmente para alguns usuários, corromper arquivos
binários (com um modo de expansão de palavra-chave
padrão em @samp{-kb}).  Portanto, quando um repositório
contém arquivos binários, conflitos têm que ser
tratados manualmente ao invés de serem tratados com
@samp{-kk} no comando de mescla.}

@c <en>In @sc{cvs} version 1.12.2 and later, the keyword expansion mode
@c <en>provided on the command line to any @sc{cvs} command no longer
@c <en>overrides the @samp{-kb} keyword expansion mode setting for binary
@c <en>files, though it will still override other default keyword expansion
@c <en>modes.  You can now safely merge using @samp{-kk} to avoid spurious conflicts
@c <en>on lines containing RCS keywords, even when your repository contains
@c <en>binary files.
Da versão 1.12.2 para frente do @sc{cvs}, a expansão
por palavra-chave disponível na linha de comando para
qualquer comando do @sc{cvs} não mais sobreescreve o
modo de expansão de palavra-chave @samp{-kb} para
arquivos binários, embora ainda sobreescreva os outros
modos de expansão de palavra-chave.  Você pode agora
mesclar com tranquilidade usando @samp{-kk} para evitar
conflitos falsos em linhas contendo palavras-chave do
RCS, mesmo quando seu repositório contém arquivos binários.

@c ---------------------------------------------------------------------
@c <en>@node Recursive behavior
@node Comportamento recursivo
@c <en>@chapter Recursive behavior
@chapter Comportamento recursivo
@c <en>@cindex Recursive (directory descending)
@cindex Recursivo (directory descending)
@c <en>@cindex Directory, descending
@cindex Directory, descending
@c <en>@cindex Descending directories
@cindex Descending directories
@c <en>@cindex Subdirectories
@cindex Subdiretórios

@c <en>Almost all of the subcommands of @sc{cvs} work
@c <en>recursively when you specify a directory as an
@c <en>argument.  For instance, consider this directory
@c <en>structure:
Quase todos os subcomandos do @sc{cvs} trabalham de
forma recursiva quando você passa um diretório como
argumento.  Por exemplo, considere esta estrutura:

@example
      @code{$HOME}
        |
        +--@t{tc}
        |   |
            +--@t{CVS}
@c <en>            |      (internal @sc{cvs} files)
            |      (internal @sc{cvs} files)
            +--@t{Makefile}
            +--@t{backend.c}
            +--@t{driver.c}
            +--@t{frontend.c}
            +--@t{parser.c}
            +--@t{man}
            |    |
            |    +--@t{CVS}
@c <en>            |    |  (internal @sc{cvs} files)
            |    |  (internal @sc{cvs} files)
            |    +--@t{tc.1}
            |
            +--@t{testing}
                 |
                 +--@t{CVS}
@c <en>                 |  (internal @sc{cvs} files)
                 |  (internal @sc{cvs} files)
                 +--@t{testpgm.t}
                 +--@t{test2.t}
@end example

@noindent
@c <en>If @file{tc} is the current working directory, the
@c <en>following is true:
Se @file{tc} é o diretório atual, então é verdade que:

@itemize @bullet
@item
@c <en>@samp{cvs update testing} is equivalent to
@samp{cvs update testing} é equivalente a

@example
cvs update testing/testpgm.t testing/test2.t
@end example

@item
@c <en>@samp{cvs update testing man} updates all files in the
@c <en>subdirectories
@samp{cvs update testing man} atualiza todos os
arquivos nos subdiretórios

@item
@c <en>@samp{cvs update .} or just @samp{cvs update} updates
@c <en>all files in the @code{tc} directory
@samp{cvs update .} ou simplesmente @samp{cvs update}
atualiza todos os arquivos no diretório @code{tc}
@end itemize

@c <en>If no arguments are given to @code{update} it will
@c <en>update all files in the current working directory and
@c <en>all its subdirectories.  In other words, @file{.} is a
@c <en>default argument to @code{update}.  This is also true
@c <en>for most of the @sc{cvs} subcommands, not only the
@c <en>@code{update} command.
Se nenhum argumento é dado ao @code{update} ele
atualiza todos os arquivos no diretório atual e nos
seus subdiretórios recursivamente.  Em outras palavras,
O @file{.} é um argumento padrão para o @code{update}.
O mesmo vale para a maioria dos subcomandos do
@sc{cvs}, e não apenas para o @code{update}.

@c <en>The recursive behavior of the @sc{cvs} subcommands can be
@c <en>turned off with the @samp{-l} option.
@c <en>Conversely, the @samp{-R} option can be used to force recursion if
@c <en>@samp{-l} is specified in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
O comportamento recursivo dos subcomandos do @sc{cvs}
pode ser desligado com a opção @samp{-l}.  De forma
oposta, a opção @samp{-R} pode ser usada para forçar a
recursão se o @samp{-l} estiver especificado no
@file{~/.cvsrc} (@pxref{~/.cvsrc}).

@example
$ cvs update -l         # @r{Don't update files in subdirectories}
@end example

@c ---------------------------------------------------------------------
@c <en>@node Adding and removing
@node Adicionando e removendo
@c <en>@chapter Adding, removing, and renaming files and directories
@chapter Adicionando, removendo e renomeando arquivos e diretórios

@c <en>In the course of a project, one will often add new
@c <en>files.  Likewise with removing or renaming, or with
@c <en>directories.  The general concept to keep in mind in
@c <en>all these cases is that instead of making an
@c <en>irreversible change you want @sc{cvs} to record the
@c <en>fact that a change has taken place, just as with
@c <en>modifying an existing file.  The exact mechanisms to do
@c <en>this in @sc{cvs} vary depending on the situation.
No decorrer de um projeto, normalmente se adicionam
arquivos.  Da mesma forma se remove e se renomeia.  E
tudo isto também para diretórios.  O conceito geral que
se deve ter em mente em todos estes casos é que ao
invés de fazer uma mudança irreversível você vai querer
que o @sc{cvs} registre o fato de que uma mudança
ocorreu, da mesma forma que é feito com a modificação
de um arquivo existente.  O mecanismo exato para se
fazer isto com o @sc{cvs} varia conforme o caso.

@menu
@c <en>* Adding files::                Adding files
* Adicionando arquivos::          Adicionando arquivos
@c <en>* Removing files::              Removing files
* Removendo arquivos::            Removendo arquivos
@c <en>* Removing directories::        Removing directories
* Removendo diretórios::          Removendo diretórios
@c <en>* Moving files::                Moving and renaming files
* Movendo arquivos::              Movendo e renomeando arquivos
@c <en>* Moving directories::          Moving and renaming directories
* Movendo diretórios::            Movendo e renomeando diretórios
@end menu

@c <en>@node Adding files
@node Adicionando arquivos
@c <en>@section Adding files to a directory
@section Adicionando arquivos a um diretório
@c <en>@cindex Adding files
@cindex Adicionando arquivos

@c <en>To add a new file to a directory, follow these steps.
Para adicionar um novo arquivo a um diretório, siga
estes passos.

@itemize @bullet
@item
@c <en>You must have a working copy of the directory.
@c <en>@xref{Getting the source}.
Você deve ter uma cópia de trabalho do diretório.
@xref{Obtendo os fontes}.

@item
@c <en>Create the new file inside your working copy of the directory.
Crie o novo arquivo dentro da cópia local do diretório.

@item
@c <en>Use @samp{cvs add @var{filename}} to tell @sc{cvs} that you
@c <en>want to version control the file.  If the file contains
@c <en>binary data, specify @samp{-kb} (@pxref{Binary files}).
Use @samp{cvs add @var{filename}} para dizer ao
@sc{cvs} que você quer fazer controle de versões no
arquivo.  Se o arquivo contém dados em binário,
especifique @samp{-kb} (@pxref{Arquivos binários}).

@item
@c <en>Use @samp{cvs commit @var{filename}} to actually check
@c <en>in the file into the repository.  Other developers
@c <en>cannot see the file until you perform this step.
Use @samp{cvs commit @var{filename}} para de fato
colocar o arquivo no repositório.  Outros
desenvolvedores não poderam ver o arquivo até que você
tenha feito isto.
@end itemize

@c <en>You can also use the @code{add} command to add a new
@c <en>directory.
Você também pode usar o comando @code{add} para
adicionar um novo diretório.
@c FIXCVS and/or FIXME: Adding a directory doesn't
@c require the commit step.  This probably can be
@c considered a CVS bug, but it is possible we should
@c warn people since this behavior probably won't be
@c changing right away.

@c <en>Unlike most other commands, the @code{add} command is
@c <en>not recursive.  You cannot even type @samp{cvs add
@c <en>foo/bar}!  Instead, you have to
Ao contrário da maioria dos outros comandos, o comando
@code{add} não é recursivo.  Você não pode sequer digitar @samp{cvs add
foo/bar}!  Ao invés disso, você tem que fazer
@c FIXCVS: This is, of course, not a feature.  It is
@c just that no one has gotten around to fixing "cvs add
@c foo/bar".

@example
$ cd foo
$ cvs add bar
@end example

@c <en>@cindex add (subcommand)
@cindex add (subcomando)
@c <en>@deffn Command {cvs add} [@code{-k} kflag] [@code{-m} message] files @dots{}
@deffn Comando {cvs add} [@code{-k} kflag] [@code{-m} mensagem] arquivos @dots{}

@c <en>Schedule @var{files} to be added to the repository.
@c <en>The files or directories specified with @code{add} must
@c <en>already exist in the current directory.  To add a whole
@c <en>new directory hierarchy to the source repository (for
@c <en>example, files received from a third-party vendor), use
@c <en>the @code{import} command instead.  @xref{import}.
Agenda @var{arquivos} para serem adicionados ao repositório.
Os arquivos ou diretórios especificados com @code{add}
já devem existir no diretório atual.  Para adicionar
toda uma estrutura de diretórios nova ao repositório
de fontes (por exemplo, arquivos recebidos de um
fornecedor terceiro), use o comando @code{import} ao
invés do @code{add}.  @xref{import}.

@c <en>The added files are not placed in the source repository
@c <en>until you use @code{commit} to make the change
@c <en>permanent.  Doing an @code{add} on a file that was
@c <en>removed with the @code{remove} command will undo the
@c <en>effect of the @code{remove}, unless a @code{commit}
@c <en>command intervened.  @xref{Removing files}, for an
@c <en>example.
Os arquivos adicionados não são colocados no
repositório de fontes até que você use o @code{commit}
para tornar a mudança permanente.  Aplicar um
@code{add} num arquivo que foi removido com o comando
@code{remove} vai desfazer o efeito do @code{remove}, a
menos que haja um @code{commit} entre os dois.
@xref{Removendo arquivos}, para um exemplo.

@c <en>The @samp{-k} option specifies the default way that
@c <en>this file will be checked out; for more information see
@c <en>@ref{Substitution modes}.
A opção @samp{-k} especifica a forma padrão como este
arquivo vai ser ???checked out???; para mais
informações veja @ref{Modos de substituição}.

@c As noted in BUGS, -m is broken client/server (Nov
@c 96).  Also see testsuite log2-* tests.
@c <en>The @samp{-m} option specifies a description for the
@c <en>file.  This description appears in the history log (if
@c <en>it is enabled, @pxref{history file}).  It will also be
@c <en>saved in the version history inside the repository when
@c <en>the file is committed.  The @code{log} command displays
@c <en>this description.  The description can be changed using
@c <en>@samp{admin -t}.  @xref{admin}.  If you omit the
@c <en>@samp{-m @var{description}} flag, an empty string will
@c <en>be used.  You will not be prompted for a description.
A opção @samp{-m} especifica uma descrição para o
arquivo.  Esta descrição aparece no registro histórico (history log)
(se este estiver habilitado, @pxref{arquivo history (histórico)}).
Ela também vai ser guardada no histórico de versões
dentro do repositório quando o arquivo é
???committed???.  O comando @code{log} mostra esta
descrição.  A descrição pode ser alterada usando-se
@samp{admin -t}.  @xref{admin}.  Se você omitir a opção
@samp{-m @var{description}}, uma string vazia vai ser
usada.  Não vai ser pedido a você uma descrição.
@end deffn

@c <en>For example, the following commands add the file
@c <en>@file{backend.c} to the repository:
Por exemplo, os seguintes comandos adicionam o arquivo
@file{backend.c} ao repositório:

@c This example used to specify
@c     -m "Optimizer and code generation passes."
@c to the cvs add command, but that doesn't work
@c client/server (see log2 in sanity.sh).  Should fix CVS,
@c but also seems strange to document things which
@c don't work...
@example
$ cvs add backend.c
$ cvs commit -m "Early version. Not yet compilable." backend.c
@end example

@c <en>When you add a file it is added only on the branch
@c <en>which you are working on (@pxref{Branching and merging}).  You can
@c <en>later merge the additions to another branch if you want
@c <en>(@pxref{Merging adds and removals}).
Quando você adiciona um arquivo ele é adicionado apenas
no ramo no qual você está trabalhando
(@pxref{Ramificando e mesclando}).  Você pode mais
tarde mesclar as adições a outro ramo se você quiser
(@pxref{Mesclando adicionados e removidos}).
@c Should we mention that earlier versions of CVS
@c lacked this feature (1.3) or implemented it in a buggy
@c way (well, 1.8 had many bugs in cvs update -j)?
@c Should we mention the bug/limitation regarding a
@c file being a regular file on one branch and a directory
@c on another?
@c FIXME: This needs an example, or several, here or
@c elsewhere, for it to make much sense.
@c Somewhere we need to discuss the aspects of death
@c support which don't involve branching, I guess.
@c Like the ability to re-create a release from a tag.

@c ---------------------------------------------------------------------
@c <en>@node Removing files
@node Removendo arquivos
@c <en>@section Removing files
@section Removendo arquivos
@c <en>@cindex Removing files
@cindex Removendo arquivos
@c <en>@cindex Deleting files
@cindex Apagando arquivos

@c FIXME: this node wants to be split into several
@c smaller nodes.  Could make these children of
@c "Adding and removing", probably (death support could
@c be its own section, for example, as could the
@c various bits about undoing mistakes in adding and
@c removing).
@c <en>Directories change.  New files are added, and old files
@c <en>disappear.  Still, you want to be able to retrieve an
@c <en>exact copy of old releases.
Diretórios mudam.  Novos arquivos são adicionados, e
arquivos velhos somem.  Ainda assim, você vai querer
poder recuperar uma cópia exata de releases antigas.

@c <en>Here is what you can do to remove a file,
@c <en>but remain able to retrieve old revisions:
Aqui está o que você pode fazer para remover um
arquivo, mas continuar sendo capaz de recuperar
revisões antigas dele:

@itemize @bullet
@c FIXME: should probably be saying something about
@c having a working directory in the first place.
@item
@c <en>Make sure that you have not made any uncommitted
@c <en>modifications to the file.  @xref{Viewing differences},
@c <en>for one way to do that.  You can also use the
@c <en>@code{status} or @code{update} command.  If you remove
@c <en>the file without committing your changes, you will of
@c <en>course not be able to retrieve the file as it was
@c <en>immediately before you deleted it.
Certifique-se de não ter feito nenhuma alteração que
falte fazer ???commit??? nele.  @xref{Vendo as diferenças},
para uma forma de fazer isto.  Você também pode usar o comando
@code{status} ou o @code{update}.  Se você remove o
arquivo sem fazer ???commit??? nas suas mudanças,
obviamente você não vai ser capaz de recuperar o
arquivo na forma como ele era imediatamente antes da remoção.

@item
@c <en>Remove the file from your working copy of the directory.
@c <en>You can for instance use @code{rm}.
Remova o arquivo da cópia local do seu diretório.
Você pode usar o @code{rm}, por exemplo.

@item
@c <en>Use @samp{cvs remove @var{filename}} to tell @sc{cvs} that
@c <en>you really want to delete the file.
Use @samp{cvs remove @var{filename}} para dizer ao
@sc{cvs} que você quer realmente apagar o arquivo.

@item
@c <en>Use @samp{cvs commit @var{filename}} to actually
@c <en>perform the removal of the file from the repository.
Use @samp{cvs commit @var{filename}} para realizar a
remoção de fato do arquivo do repositório.
@end itemize

@c FIXME: Somehow this should be linked in with a more
@c general discussion of death support.  I don't know
@c whether we want to use the term "death support" or
@c not (we can perhaps get by without it), but we do
@c need to discuss the "dead" state in "cvs log" and
@c related subjects.  The current discussion is
@c scattered around, and not xref'd to each other.
@c FIXME: I think this paragraph wants to be moved
@c later down, at least after the first example.
@c <en>When you commit the removal of the file, @sc{cvs}
@c <en>records the fact that the file no longer exists.  It is
@c <en>possible for a file to exist on only some branches and
@c <en>not on others, or to re-add another file with the same
@c <en>name later.  @sc{cvs} will correctly create or not create
@c <en>the file, based on the @samp{-r} and @samp{-D} options
@c <en>specified to @code{checkout} or @code{update}.
Quando você faz ???commit??? na remoção do arquivo, o
@sc{cvs} registra o fato de que o arquivo não existe
mais.  É possível para um arquivo existir apenas em
alguns ramos e não em outros, ou re-adicionar outro
arquivo com o mesmo nome depois.  O @sc{cvs} vai de
forma correta criar ou não criar o arquivo, baseado nas
opões @samp{-r} e @samp{-D} especificadas no
@code{checkout} ou no @code{update}.

@c FIXME: This style seems to clash with how we
@c document things in general.
@c <en>@cindex Remove (subcommand)
@cindex Remove (subcomando)
@c <en>@deffn Command {cvs remove} [options] files @dots{}
@deffn Comando {cvs remove} [options] files @dots{}

@c <en>Schedule file(s) to be removed from the repository
@c <en>(files which have not already been removed from the
@c <en>working directory are not processed).  This command
@c <en>does not actually remove the file from the repository
@c <en>until you commit the removal.  For a full list of
@c <en>options, see @ref{Invoking CVS}.
Prepara arquivo(s) para ser removido do reporitório
(arquivos que ainda não foram removidos do diretório de
trabalho não são processados).  Na verdade este comando
não remove o arquivo do repositório até que você faça
???commit??? no removido.  Para uma lista completa de
opções, veja em @ref{Chamando o CVS}.
@end deffn

@c <en>Here is an example of removing several files:
Aqui está um exemplo de remoção de vários arquivos:

@example
$ cd test
$ rm *.c
$ cvs remove
cvs remove: Removing .
cvs remove: scheduling a.c for removal
cvs remove: scheduling b.c for removal
cvs remove: use 'cvs commit' to remove these files permanently
$ cvs ci -m "Removed unneeded files"
cvs commit: Examining .
cvs commit: Committing .
@end example

@c <en>As a convenience you can remove the file and @code{cvs
@c <en>remove} it in one step, by specifying the @samp{-f}
@c <en>option.  For example, the above example could also be
@c <en>done like this:
Por conveniência você pode remover o arquivo e fazer @code{cvs
remove} nele de uma só vez, especificando a opção
@samp{-f}.  Por exemplo, o exemplo acima poderia ser
feito assim:

@example
$ cd test
$ cvs remove -f *.c
cvs remove: scheduling a.c for removal
cvs remove: scheduling b.c for removal
cvs remove: use 'cvs commit' to remove these files permanently
$ cvs ci -m "Removed unneeded files"
cvs commit: Examining .
cvs commit: Committing .
@end example

@c <en>If you execute @code{remove} for a file, and then
@c <en>change your mind before you commit, you can undo the
@c <en>@code{remove} with an @code{add} command.
Se você executa @code{remove} para um arquivo, e então
muda de idéia antes do ???commit???, você pode desfazer
o @code{remove} com um @code{add}.
@ignore
@c is this worth saying or not?  Somehow it seems
@c confusing to me.
@c <en>Of course,
@c <en>since you have removed your copy of file in the working
@c <en>directory, @sc{cvs} does not necessarily bring back the
@c <en>contents of the file from right before you executed
@c <en>@code{remove}; instead it gets the file from the
@c <en>repository again.
Obviamente, uma vez que você removeu a sua cópia local
do arquivo no diretório de trabalho, o @sc{cvs} não vai
trazer de volta necessariamente o conteúdo do arquivo
exatamente como estava antes do @code{remove}; No lugar
disto ele vai buscar o arquivo no repositório de novo.
@end ignore

@c FIXME: what if you change your mind after you commit
@c it?  (answer is also "cvs add" but we don't say that...).
@c We need some index entries for thinks like "undoing
@c removal" too.

@example
$ ls
CVS   ja.h  oj.c
$ rm oj.c
$ cvs remove oj.c
cvs remove: scheduling oj.c for removal
cvs remove: use 'cvs commit' to remove this file permanently
$ cvs add oj.c
U oj.c
cvs add: oj.c, version 1.1.1.1, resurrected
@end example

@c <en>If you realize your mistake before you run the
@c <en>@code{remove} command you can use @code{update} to
@c <en>resurrect the file:
Se você notar  o erro antes de rodar o comando
@code{remove} você pode usar o @code{update} para
resuscitar o arquivo:

@example
$ rm oj.c
$ cvs update oj.c
cvs update: warning: oj.c was lost
U oj.c
@end example

@c <en>When you remove a file it is removed only on the branch
@c <en>which you are working on (@pxref{Branching and merging}).  You can
@c <en>later merge the removals to another branch if you want
@c <en>(@pxref{Merging adds and removals}).
Quando você remove um arquivo ele é removido apenas do
ramo no qual você está trabalhando (@pxref{Ramificando
e mesclando}).  Você pode depois mesclar as remoções em
outro ramo se quiser
(@pxref{Mesclando adicionados e removidos}).

@c <en>@node Removing directories
@node Removendo diretórios
@c <en>@section Removing directories
@section Removendo diretórios
@c <en>@cindex Removing directories
@cindex Removendo diretórios
@c <en>@cindex Directories, removing
@cindex Diretórios, removendo

@c <en>In concept removing directories is somewhat similar to
@c <en>removing files---you want the directory to not exist in
@c <en>your current working directories, but you also want to
@c <en>be able to retrieve old releases in which the directory
@c <en>existed.
Conceitualmente, remover diretórios é num certo sentido
similar a remover arquivos---você quer que o diretório
não exista mais  no seu diretório de trabalho atual,
mas você também quer ser capaz de recuperar releases
antigas nas quais o diretório existe.

@c <en>The way that you remove a directory is to remove all
@c <en>the files in it.  You don't remove the directory
@c <en>itself; there is no way to do that.
@c <en>Instead you specify the @samp{-P} option to
@c <en>@code{cvs update} or @code{cvs checkout},
@c <en>which will cause @sc{cvs} to remove empty
@c <en>directories from working directories.
@c <en>(Note that @code{cvs export} always removes empty directories.)
@c <en>Probably the
@c <en>best way to do this is to always specify @samp{-P}; if
@c <en>you want an empty directory then put a dummy file (for
@c <en>example @file{.keepme}) in it to prevent @samp{-P} from
@c <en>removing it.
A forma de remover um diretório é removendo todos os
arquivos nele.  Você não remove o diretório mesmo; não
há jeito de fazer isto.  Ao invés disto você especifica
a opção @samp{-P} no @code{cvs update} ou no @code{cvs
checkout}, que vai fazer com que o @sc{cvs} remova
diretórios vazios de seus diretórios de
trabalho.  (Observe que o @code{cvs export} sempre
remove diretórios vazios.) Provavelmente, a melhor
maneira de fazer isto é sempre usar o @samp{-P}; se
você quiser manter um diretório vazio, ponha um arquivo
sem importância nele (por exemplo @file{.keepme}) para
evitar que o @samp{-P} apague o diretório.

@c I'd try to give a rationale for this, but I'm not
@c sure there is a particularly convincing one.  What
@c we would _like_ is for CVS to do a better job of version
@c controlling whether directories exist, to eliminate the
@c need for -P and so that a file can be a directory in
@c one revision and a regular file in another.
@c <en>Note that @samp{-P} is implied by the @samp{-r} or @samp{-D}
@c <en>options of @code{checkout}.  This way
@c <en>@sc{cvs} will be able to correctly create the directory
@c <en>or not depending on whether the particular version you
@c <en>are checking out contains any files in that directory.
Observe que o @samp{-P} está implícito nas opções
@samp{-r} ou @samp{-D} do @code{checkout}.  Desta forma
o @sc{cvs} vai ser capaz de criar ou não criar corretamente o
diretório dependendo de ter ou não algum arquivo na
versão que você está fazendo ???check out???.

@c ---------------------------------------------------------------------
@c <en>@node Moving files
@node Movendo arquivos
@c <en>@section Moving and renaming files
@section Movendo e renomeando arquivos
@c <en>@cindex Moving files
@cindex Movendo arquivos
@c <en>@cindex Renaming files
@cindex Renomeando arquivos
@c <en>@cindex Files, moving
@cindex Arquivos, movendo

@c <en>Moving files to a different directory or renaming them
@c <en>is not difficult, but some of the ways in which this
@c <en>works may be non-obvious.  (Moving or renaming a
@c <en>directory is even harder.  @xref{Moving directories}.).
Mover arquivos para um diretório diferente ou
renomeá-los não é difícil, mas algumas das formas de
faze-lo podem não ser óbvias.  (Mover ou renomear
diretórios é ainda mais difícil.  @xref{Movendo
diretórios}.).

@c <en>The examples below assume that the file @var{old} is renamed to
@c <en>@var{new}.
O exemplos abaixo assumem que o arquivo @var{antigo} foi
renomeado para @var{novo}.

@menu
@c <en>* Outside::                     The normal way to Rename
* Outside::                     A forma normal de renomear
@c <en>* Inside::                      A tricky, alternative way
* Inside::                      Uma forma ???tricky???, alternativa
@c <en>* Rename by copying::           Another tricky, alternative way
* Renomeando na base da cópia:: Outra forma ???tricky???, alternativa
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Outside
@node Outside
@c <en>@subsection The Normal way to Rename
@subsection A forma normal de renomear

@c More rename issues.  Not sure whether these are
@c worth documenting; I'm putting them here because
@c it seems to be as good a place as any to try to
@c set down the issues.
@c * "cvs annotate" will annotate either the new
@c file or the old file; it cannot annotate _each
@c line_ based on whether it was last changed in the
@c new or old file.  Unlike "cvs log", where the
@c consequences of having to select either the new
@c or old name seem fairly benign, this may be a
@c real advantage to having CVS know about renames
@c other than as a deletion and an addition.

@c <en>The normal way to move a file is to copy @var{old} to
@c <en>@var{new}, and then issue the normal @sc{cvs} commands
@c <en>to remove @var{old} from the repository, and add
@c <en>@var{new} to it.
A forma normal de mover um arquivo é copiar
@var{antigo} para @var{novo}, e então aplicar os
comandos normais do @sc{cvs} para, no repositório,
remover @var{antigo} e adicionar @var{novo}.
@c The following sentence is not true: one must cd into
@c the directory to run "cvs add".
@c  (Both @var{old} and @var{new} could
@c contain relative paths, for example @file{foo/bar.c}).

@example
$ mv @var{old} @var{new}
$ cvs remove @var{old}
$ cvs add @var{new}
$ cvs commit -m "Renamed @var{old} to @var{new}" @var{old} @var{new}
@end example

@c <en>This is the simplest way to move a file, it is not
@c <en>error-prone, and it preserves the history of what was
@c <en>done.  Note that to access the history of the file you
@c <en>must specify the old or the new name, depending on what
@c <en>portion of the history you are accessing.  For example,
@c <en>@code{cvs log @var{old}} will give the log up until the
@c <en>time of the rename.
Esta é a forma mais simples de mover um arquivo, não é
anti-falhas, e vai preservar o histórico do que foi
feito.  Observe que para acessar o histórico do arquivo
você vai precisar especificar o nome antigo ou o novo,
dependendo de que porção do histórico você vai estar
acessando.  Por exemplo, @code{cvs log @var{antigo}}
vai mostrar o registro (log) até o momento onde o
arquivo foi renomeado.

@c <en>When @var{new} is committed its revision numbers will
@c <en>start again, usually at 1.1, so if that bothers you,
@c <en>use the @samp{-r rev} option to commit.  For more
@c <en>information see @ref{Assigning revisions}.
Quando @var{novo} é ???committed??? seus números de
revisão vão recomeçar, normalmente em 1.1.  Portanto, se
isto te incomoda, lembre de usar a opção @samp{-r rev}
na hora do ???commit???.  Para mais informações veja em
@ref{Atribuindo revisões}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Inside
@node Inside
@c <en>@subsection Moving the history file
@subsection Movendo o arquivo com o histórico

@c <en>This method is more dangerous, since it involves moving
@c <en>files inside the repository.  Read this entire section
@c <en>before trying it out!
Este método é mais perigoso, já que envolve
movimentação de arquivos no repositório.  Leia a seção
toda antes de sair tentando!

@example
$ cd $CVSROOT/@var{dir}
$ mv @var{old},v @var{new},v
@end example

@noindent
@c <en>Advantages:
Vantagens:

@itemize @bullet
@item
@c <en>The log of changes is maintained intact.
O registro (log) de alterações permanece intacto.

@item
@c <en>The revision numbers are not affected.
Os números de revisão não são alterados.
@end itemize

@noindent
@c <en>Disadvantages:
Desvantagens:

@itemize @bullet
@item
@c <en>Old releases cannot easily be fetched from the
@c <en>repository.  (The file will show up as @var{new} even
@c <en>in revisions from the time before it was renamed).
Releases antigas não serão mais facilmente recuperadas
a partir do repositório.  (O arquivo vai aparecer como
@var{novo} mesmo em revisões do tempo anterior a ter
sido renomeado).

@item
@c <en>There is no log information of when the file was renamed.
Não há informação nos registros de quando o arquivo foi
renomeado.

@item
@c <en>Nasty things might happen if someone accesses the history file
@c <en>while you are moving it.  Make sure no one else runs any of the @sc{cvs}
@c <en>commands while you move it.
Coisas ???Nasty??? podem acontecer se alguém acessar o
arquivo de histórico enquanto você estier movendo ele.
Certifique-se de que ninguém mais rode qualquer dos
comandos do @sc{cvs} durante a movimentação.
@end itemize

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Rename by copying
@node Renomeando na base da cópia
@c <en>@subsection Copying the history file
@subsection Copiando o arquivo de histórico

@c <en>This way also involves direct modifications to the
@c <en>repository.  It is safe, but not without drawbacks.
Esta forma também envolve modificações diretas no
repositório.  É segura, mas tem seus incovenientes.

@example
# @r{Copy the @sc{rcs} file inside the repository}
$ cd $CVSROOT/@var{dir}
$ cp @var{old},v @var{new},v
# @r{Remove the old file}
$ cd ~/@var{dir}
$ rm @var{old}
$ cvs remove @var{old}
$ cvs commit @var{old}
# @r{Remove all tags from @var{new}}
$ cvs update @var{new}
$ cvs log @var{new}             # @r{Remember the non-branch tag names}
$ cvs tag -d @var{tag1} @var{new}
$ cvs tag -d @var{tag2} @var{new}
@dots{}
@end example

@c <en>By removing the tags you will be able to check out old
@c <en>revisions.
Ao remover as etiquetas você vai ser capaz de ???check
out??? revisões antigas.

@noindent
@c <en>Advantages:
Vantagens:

@itemize @bullet
@item
@c FIXME: Is this true about -D now that we have death
@c support?  See 5B.3 in the FAQ.
@c <en>Checking out old revisions works correctly, as long as
@c <en>you use @samp{-r@var{tag}} and not @samp{-D@var{date}}
@c <en>to retrieve the revisions.
O ???check out??? de revisões antigas funciona corretamente,
???as long as??? você usa @samp{-r@var{tag}} e não
@samp{-D@var{date}} para recuperar as revisões.

@item
@c <en>The log of changes is maintained intact.
O registro (log) de mudanças é mantido intacto.

@item
@c <en>The revision numbers are not affected.
Os números de revisão não são afetados.
@end itemize

@noindent
@c <en>Disadvantages:
Desvantagens:

@itemize @bullet
@item
@c <en>You cannot easily see the history of the file across the rename.
Você não pode ver de forma fácil os histórico do
arquivo através das ações de renomear.

@ignore
@c Is this true?  I don't see how the revision numbers
@c _could_ start over, when new,v is just old,v with
@c the tags deleted.
@c If there is some need to reinstate this text,
@c it is "usually 1.1", not "1.0" and it needs an
@c xref to Assigning revisions
@item
@c <en>Unless you use the @samp{-r rev} (@pxref{commit
@c <en>options}) flag when @var{new} is committed its revision
@c <en>numbers will start at 1.0 again.
A menos que você use a opção @samp{-r rev} (@pxref{commit
options}) quando o @var{new} for ???committed??? seus
números de revisão vão sempre recomeçar com 1.0.
@end ignore
@end itemize

@c ---------------------------------------------------------------------
@c <en>@node Moving directories
@node Movendo diretórios
@c <en>@section Moving and renaming directories
@section Movendo e renomeando diretórios
@c <en>@cindex Moving directories
@cindex Movendo diretórios
@c <en>@cindex Renaming directories
@cindex Renomeando diretórios
@c <en>@cindex Directories, moving
@cindex Diretórios, movendo

@c <en>The normal way to rename or move a directory is to
@c <en>rename or move each file within it as described in
@c <en>@ref{Outside}.  Then check out with the @samp{-P}
@c <en>option, as described in @ref{Removing directories}.
A forma normal de renomear ou mover um diretório é
renomear ou mover cada arquivo dentro dele como
descrito em @ref{Outside}.  Então fazer um ???check
out??? com a opção @samp{-P}, como descrito em
@ref{Removendo diretórios}.

@c <en>If you really want to hack the repository to rename or
@c <en>delete a directory in the repository, you can do it
@c <en>like this:
Se você realmente quer ???to hack??? o repositório para
renomear ou apagar um diretório no repositório, você
pode fazê-lo da seguinte forma:

@enumerate
@item
@c <en>Inform everyone who has a checked out copy of the directory that the
@c <en>directory will be renamed.  They should commit all
@c <en>their changes, and remove their working copies,
@c <en>before you take the steps below.
Avise a todos que fizeram checkout do diretório que o
diretório vai ser renomeado.  Eles vão ter que fazer
???commit??? de todas as mudanças, e remover suas
cópias de trabalho antes que você faça os passos
seguintes.

@item
@c <en>Rename the directory inside the repository.
Renomeie o diretório dentro do repositório.

@example
$ cd $CVSROOT/@var{parent-dir}
$ mv @var{old-dir} @var{new-dir}
@end example

@item
@c <en>Fix the @sc{cvs} administrative files, if necessary (for
@c <en>instance if you renamed an entire module).
Conserte os arquivos administrativos do @sc{cvs}, se
necessário (por exemplo, se você está renomeando um
módulo inteiro).

@item
@c <en>Tell everyone that they can check out again and continue
@c <en>working.
Diga a todo mundo que  eles podem fazer check out
novamente e continuar o trabalho.

@end enumerate

@c <en>If someone had a working copy the @sc{cvs} commands will
@c <en>cease to work for him, until he removes the directory
@c <en>that disappeared inside the repository.
Se alguém manteve uma cópia de trabalho, os comandos do
@sc{cvs} vão parar de funcionar para esta pessoa até
que ela remova o diretório que desapareceu do repositório.

@c <en>It is almost always better to move the files in the
@c <en>directory instead of moving the directory.  If you move the
@c <en>directory you are unlikely to be able to retrieve old
@c <en>releases correctly, since they probably depend on the
@c <en>name of the directories.
Na maioria das vezes é melhor mover os arquivos do
diretório ao invés de mover o diretório.  Se você mover
o diretório não há garantias de que você seja capaz de
recuperar releases antigas corretamente, já que elas
dependem provavelmente do nome dos diretórios.

@c ---------------------------------------------------------------------
@c <en>@node History browsing
@node Navegação no Histórico
@c <en>@chapter History browsing
@chapter Navegação no Histórico
@c <en>@cindex History browsing
@cindex Navegação no Histórico
@c <en>@cindex Traceability
@cindex Rastreabilidade
@c <en>@cindex Isolation
@cindex Isolamento

@ignore
@c This is too long for an introduction (goal is
@c one 20x80 character screen), and also mixes up a
@c variety of issues (parallel development, history,
@c maybe even touches on process control).

@c -- @quote{To lose ones history is to lose ones soul.}
@c -- ///
@c -- ///Those who cannot remember the past are condemned to repeat it.
@c -- ///               -- George Santayana
@c -- ///

@c <en>@sc{cvs} tries to make it easy for a group of people to work
@c <en>together.  This is done in two ways:
O @sc{cvs} tenta ajudar um grupo a trabalhar junto.
Isto é feito de duas formas:

@itemize @bullet
@item
@c <en>Isolation---You have your own working copy of the
@c <en>source.  You are not affected by modifications made by
@c <en>others until you decide to incorporate those changes
@c <en>(via the @code{update} command---@pxref{update}).
Isolamento---Você tem a sua própria cópia de trabalho
dos fontes.  Você não é afetado por modificações feitas
por outros até que você decida incorporar estas
modificações (através do comando
@code{update}---@pxref{update}).

@item
@c <en>Traceability---When something has changed, you can
@c <en>always see @emph{exactly} what changed.
Rastreabilidade---Quando alguma coisa mudou, você pode
ver @emph{exatamente} o que mudou.
@end itemize

@c <en>There are several features of @sc{cvs} that together lead
@c <en>to traceability:
Existem várias características do @sc{cvs} que juntas
possibilitam a rastreabilidade:

@itemize @bullet
@item
@c <en>Each revision of a file has an accompanying log
@c <en>message.
Each revision of a file has an accompanying log
message.

@item
@c <en>All commits are optionally logged to a central history
@c <en>database.
All commits are optionally logged to a central history
database.

@item
@c <en>Logging information can be sent to a user-defined
@c <en>program (@pxref{loginfo}).
Logging information can be sent to a user-defined
program (@pxref{loginfo}).
@end itemize

@c -- More text here.

@c <en>This chapter should talk about the history file, the
@c <en>@code{log} command, the usefulness of ChangeLogs
@c <en>even when you run @sc{cvs}, and things like that.
This chapter should talk about the history file, the
@code{log} command, the usefulness of ChangeLogs
even when you run @sc{cvs}, and things like that.

@end ignore

@c kind of lame, in a lot of ways the above text inside
@c the @ignore motivates this chapter better
@c <en>Once you have used @sc{cvs} to store a version control
@c <en>history---what files have changed when, how, and by
@c <en>whom, there are a variety of mechanisms for looking
@c <en>through the history.
Uma vez usando o @sc{cvs} para guardar um histórico do
controle de versões---que arquivos foram mudandos,
quando, como e por quem, existe uma variedade de
mecanismos para procurar ao longo do histórico.

@c FIXME: should also be talking about how you look at
@c old revisions (e.g. "cvs update -p -r 1.2 foo.c").
@menu
@c <en>* log messages::                Log messages
* mensagens de registro::       Mensagens de registro (log)
@c <en>* history database::            The history database
* history database::            The history database
@c <en>* user-defined logging::        User-defined logging
* user-defined logging::        User-defined logging
@c <en>* annotate::                    What revision modified each line of a file?
* annotate::                    Que revisão modificou cada linha de um arquivo?
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node log messages
@node mensagens de registro
@c <en>@section Log messages
@section Mensagens de registro (log)

@c FIXME: @xref to place where we talk about how to
@c specify message to commit.
@c <en>Whenever you commit a file you specify a log message.
Sempre que você ???commit??? um arquivo você especifica
uma mensagem de registro (log).

@c FIXME: bring the information here, and get rid of or
@c greatly shrink the "log" node.
@c <en>To look through the log messages which have been
@c <en>specified for every revision which has been committed,
@c <en>use the @code{cvs log} command (@pxref{log}).
Para ver todas as mensagens de registro que foram
especificadas para cada revisão que foi
???committed???, use o comando @code{cvs log}
(@pxref{log}).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node history database
@node history database
@c <en>@section The history database
@section The history database

@c FIXME: bring the information from the history file
@c and history nodes here.  Rewrite it to be motivated
@c better (start out by clearly explaining what gets
@c logged in history, for example).
@c <en>You can use the history file (@pxref{history file}) to
@c <en>log various @sc{cvs} actions.  To retrieve the
@c <en>information from the history file, use the @code{cvs
@c <en>history} command (@pxref{history}).
Você pode usar o arquivo history (@pxref{arquivo
history (histórico)}) para registrar várias ações do @sc{cvs}.
Para recuperar a informação do arquivo history, use o
comando @code{cvs history} (@pxref{history}).

@c <en>Note: you can control what is logged to this file by using the
@c <en>@samp{LogHistory} keyword in the @file{CVSROOT/config} file
@c <en>(@pxref{config}).
Observação: você pode controlar o que vai ser
registrado neste arquivo usando a palavra-chave
@samp{LogHistory} no arquivo @file{CVSROOT/config}
(@pxref{config}).

@c
@c The history database has many problems:
@c * It is very unclear what field means what.  This
@c could be improved greatly by better documentation,
@c but there are still non-orthogonalities (for
@c example, tag does not record the "repository"
@c field but most records do).
@c * Confusion about files, directories, and modules.
@c Some commands record one, some record others.
@c * File removal is not logged.  There is an 'R'
@c record type documented, but CVS never uses it.
@c * Tags are only logged for the "cvs rtag" command,
@c not "cvs tag".  The fix for this is not completely
@c clear (see above about modules vs. files).
@c * Are there other cases of operations that are not
@c logged?  One would hope for all changes to the
@c repository to be logged somehow (particularly
@c operations like tagging, "cvs admin -k", and other
@c operations which do not record a history that one
@c can get with "cvs log").  Operations on the working
@c directory, like export, get, and release, are a
@c second category also covered by the current "cvs
@c history".
@c * The history file does not record the options given
@c to a command.  The most serious manifestation of
@c this is perhaps that it doesn't record whether a command
@c was recursive.  It is not clear to me whether one
@c wants to log at a level very close to the command
@c line, as a sort of way of logging each command
@c (more or less), or whether one wants
@c to log more at the level of what was changed (or
@c something in between), but either way the current
@c information has pretty big gaps.
@c * Further details about a tag--like whether it is a
@c branch tag or, if a non-branch tag, which branch it
@c is on.  One can find out this information about the
@c tag as it exists _now_, but if the tag has been
@c moved, one doesn't know what it was like at the time
@c the history record was written.
@c * Whether operating on a particular tag, date, or
@c options was implicit (sticky) or explicit.
@c
@c Another item, only somewhat related to the above, is a
@c way to control what is logged in the history file.
@c This is probably the only good way to handle
@c different people having different ideas about
@c information/space tradeoffs.
@c
@c It isn't really clear that it makes sense to try to
@c patch up the history file format as it exists now to
@c include all that stuff.  It might be better to
@c design a whole new CVSROOT/nhistory file and "cvs
@c nhistory" command, or some such, or in some other
@c way trying to come up with a clean break from the
@c past, which can address the above concerns.  Another
@c open question is how/whether this relates to
@c taginfo/loginfo/etc.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node user-defined logging
@node user-defined logging
@c <en>@section User-defined logging
@section User-defined logging

@c FIXME: should probably also mention the fact the -l
@c global option can disable most of the mechanisms
@c discussed here (why?  What is the -l global option for?).
@c
@c FIXME: probably should centralize this information
@c here, at least to some extent.  Maybe by moving the
@c loginfo, etc., nodes here and replacing
@c the "user-defined logging" node with one node for
@c each method.
@c <en>You can customize @sc{cvs} to log various kinds of
@c <en>actions, in whatever manner you choose.  These
@c <en>mechanisms operate by executing a script at various
@c <en>times.  The script might append a message to a file
@c <en>listing the information and the programmer who created
@c <en>it, or send mail to a group of developers, or, perhaps,
@c <en>post a message to a particular newsgroup.  To log
@c <en>commits, use the @file{loginfo} file (@pxref{loginfo}).
@c <en>To log tags, use the @file{taginfo} file (@pxref{taginfo}).
Você pode personalizar o @sc{cvs} para registrar vários
tipos de ação, da forma que você escolher.  Estes
mecanismos operam executando um script várias vezes.  O
script deve anexar uma mensagem a um arquivo que lista
as informações e o programador que as criou, ou mandar
um e-mail para um grupo de desenvolvedores, ou, talvez,
mandar uma mensagem para um newsgroup em particular.
Para registrar os commits, usar o arquivo
@file{loginfo} (@pxref{loginfo}).  Para registrar
etiquetamentos, use o comando @file{taginfo}
(@pxref{taginfo}).
@c FIXME: What is difference between doing it in the
@c modules file and using loginfo/taginfo?  Why should
@c user use one or the other?
@c <en>To log commits, checkouts, exports, and tags,
@c <en>respectively, you can also use the @samp{-i},
@c <en>@samp{-o}, @samp{-e}, and @samp{-t} options in the
@c <en>modules file.  For a more flexible way of giving
@c <en>notifications to various users, which requires less in
@c <en>the way of keeping centralized scripts up to date, use
@c <en>the @code{cvs watch add} command (@pxref{Getting
@c <en>Notified}); this command is useful even if you are not
@c <en>using @code{cvs watch on}.
Para registrar ???commits???, ???checkouts???,
exportações, e etiquetagens, você pode
usar, respectivamente, as opções @samp{-i}, @samp{-o},
@samp{-e} e @samp{-t} no arquivo modules.  Para uma
forma mais flexível de notificar vários usuários, ???which requires less in
the way of??? manter scripts centralizados atualizados,
use o comando @code{cvs watch add} (@pxref{Recebendo
Notificações}); este comando é útil mesmo se você não
estiver usando @code{cvs watch on}.

@c <en>@node annotate
@node annotate
@c <en>@section Annotate command
@section O comando annotate
@c <en>@cindex annotate (subcommand)
@cindex annotate (subcomando)

@c <en>@deffn Command {cvs annotate} [@code{-FflR}] [@code{-r rev}|@code{-D date}] files @dots{}
@deffn Comando {cvs annotate} [@code{-FflR}] [@code{-r revisão}|@code{-D data}] arquivos @dots{}

@c <en>For each file in @var{files}, print the head revision
@c <en>of the trunk, together with information on the last
@c <en>modification for each line.  For example:
Para cada arquivo em @var{arquivos}, imprime a revisão no topo
 do tronco, junto com informações a respeito
da última modificação em cada linha.  Por exemplo:

@example
$ cvs annotate ssfile
Annotations for ssfile
***************
1.1          (mary     27-Mar-96): ssfile line 1
1.2          (joe      28-Mar-96): ssfile line 2
@end example

@c <en>The file @file{ssfile} currently contains two lines.
@c <en>The @code{ssfile line 1} line was checked in by
@c <en>@code{mary} on March 27.  Then, on March 28, @code{joe}
@c <en>added a line @code{ssfile line 2}, without modifying
@c <en>the @code{ssfile line 1} line.  This report doesn't
@c <en>tell you anything about lines which have been deleted
@c <en>or replaced; you need to use @code{cvs diff} for that
@c <en>(@pxref{diff}).
O arquivo @file{ssfile} atualmente contém duas
linhas.  A @code{linha 1 de ssfile} foi submetida por
@code{mary} em March 27 (27 de março).  Então, em March
28 (28 de março), @code{joe} adicionou a
@code{linha 2 de ssfile}, sem modificar a
@code{linha 1 de ssfile}.  Este relatório não te diz nada a
respeito de linhas que foram deletadas ou substituídas;
Você precisa usar o @code{cvs diff} para isto
(@pxref{diff}).

@end deffn

@c <en>The options to @code{cvs annotate} are listed in
@c <en>@ref{Invoking CVS}, and can be used to select the files
@c <en>and revisions to annotate.  The options are described
@c <en>in more detail there and in @ref{Common options}.
As opções para o @code{cvs annotate} são listadas em
@ref{Chamando o CVS} e podem ser usadas para selecionar
os arquivos e revisões para o annotate.  As opções
são descritas com mais detalhes lá e em @ref{Opções comuns}.

@c FIXME: maybe an example using the options?  Just
@c what it means to select a revision might be worth a
@c few words of explanation ("you want to see who
@c changed this line *before* 1.4"...).

@c ---------------------------------------------------------------------
@c <en>@node Binary files
@node Arquivos binários
@c <en>@chapter Handling binary files
@chapter Manipulando arquivos binários
@c <en>@cindex Binary files
@cindex Arquivos binários

@c <en>The most common use for @sc{cvs} is to store text
@c <en>files.  With text files, @sc{cvs} can merge revisions,
@c <en>display the differences between revisions in a
@c <en>human-visible fashion, and other such operations.
@c <en>However, if you are willing to give up a few of these
@c <en>abilities, @sc{cvs} can store binary files.  For
@c <en>example, one might store a web site in @sc{cvs}
@c <en>including both text files and binary images.
O @sc{cvs} é usado normalmente para guardar arquivos
texto.  Com arquivos texto o @sc{cvs} pode mesclar
revisões, mostrar diferenças entre revisões de uma
forma legível para humanos, e outras operações do
tipo.  Entretanto, se você está disposto a abrir mão de
algumas destas habilidades, o @sc{cvs} pode guardar
arquivos binários.  Por exemplo, pode-se guardar um
site no @sc{cvs} incluindo tanto os arquivos texto
quanto as imagens em binário.

@menu
@c <en>* Binary why::     More details on issues with binary files
* Binary why::     Mais detalhes no que concerne a arquivos binários
@c <en>* Binary howto::   How to store them
* Binary howto::   Como guardá-los
@end menu

@c <en>@node Binary why
@node Binary why
@c <en>@section The issues with binary files
@section The issues with binary files

@c <en>While the need to manage binary files may seem obvious
@c <en>if the files that you customarily work with are binary,
@c <en>putting them into version control does present some
@c <en>additional issues.
???While??? a necessidade de armazenar arquivos
binários se mostra óbvia se os arquivos com os quais
você normalmente trabalha são binários, botá-los
dentro do controle de versões requer alguns cuidados
adicionais.

@c <en>One basic function of version control is to show the
@c <en>differences between two revisions.  For example, if
@c <en>someone else checked in a new version of a file, you
@c <en>may wish to look at what they changed and determine
@c <en>whether their changes are good.  For text files,
@c <en>@sc{cvs} provides this functionality via the @code{cvs
@c <en>diff} command.  For binary files, it may be possible to
@c <en>extract the two revisions and then compare them with a
@c <en>tool external to @sc{cvs} (for example, word processing
@c <en>software often has such a feature).  If there is no
@c <en>such tool, one must track changes via other mechanisms,
@c <en>such as urging people to write good log messages, and
@c <en>hoping that the changes they actually made were the
@c <en>changes that they intended to make.
Uma habilidade básica de um controle de versões é mostrar
as diferenças entre duas revisões.  Por exemplo, se
outra pessoa submete (check in) uma nova versão de um
arquivo, você pode querer ver o que foi mudado e
determinar quais destas mudanças foram boas.  Para
arquivos texto, o @sc{cvs} oferece esta funcionalidade
através do comando @code{cvs diff}.  Para arquivos
binários, existe uma chance de  extrair as duas
revisões e então compará-las com uma ferramenta externa
ao @sc{cvs} (por exemplo, alguns processadores de texto
têm esta habilidade).  Se não existe tal ferramenta, é
possível rastrear mudanças por outros meios, como por
exemplo convencendo as pessoas a escreverem boas
mensagens de registro (log), e torcendo para que as
mudanças que eles realmente fizeram foram as que eles
tinham intenção de fazer.

@c <en>Another ability of a version control system is the
@c <en>ability to merge two revisions.  For @sc{cvs} this
@c <en>happens in two contexts.  The first is when users make
@c <en>changes in separate working directories
@c <en>(@pxref{Multiple developers}).  The second is when one
@c <en>merges explicitly with the @samp{update -j} command
@c <en>(@pxref{Branching and merging}).
Outra habilidade de um sistema de controle de versões é
a capacidade de mesclar duas revisões.  No @sc{cvs}
isto acontece em dois contextos.  O primeiro é quando
os usuáriso fazem mudanças em diretórios de trabalho
separados (@pxref{Múltiplos desenvolvedores}).  A
segunda é quando alguém mescla explicitamente com o
comando @samp{update -j} (@pxref{Ramificando e mesclando}).

@c <en>In the case of text
@c <en>files, @sc{cvs} can merge changes made independently,
@c <en>and signal a conflict if the changes conflict.  With
@c <en>binary files, the best that @sc{cvs} can do is present
@c <en>the two different copies of the file, and leave it to
@c <en>the user to resolve the conflict.  The user may choose
@c <en>one copy or the other, or may run an external merge
@c <en>tool which knows about that particular file format, if
@c <en>one exists.
@c <en>Note that having the user merge relies primarily on the
@c <en>user to not accidentally omit some changes, and thus is
@c <en>potentially error prone.
No caso de arquivos texto, o @sc{cvs} pode mesclar
mudanças feitas independentemente, e avisar sobre um
conflito se as mudanças conflitarem.  Com arquivos
binários, o melhor que o @sc{cvs} pode fazer é
fornecer as duas cópias diferentes do arquivo, e deixar
a cargo do usuário a resolução do conflito.  O usuário
pode escolher uma cópia ou a outra, ou pode rodar uma
ferramenta externa de mesclagem que entenda aquele
formato de arquivo em particular, se é que tal
ferramenta exista. Observe que mesclagem feita pelo
usuário se baseia no fato de o usuário não omitir
acidentalmente algumas mudanças, e portanto é sujeita a erros.

@c <en>If this process is thought to be undesirable, the best
@c <en>choice may be to avoid merging.  To avoid the merges
@c <en>that result from separate working directories, see the
@c <en>discussion of reserved checkouts (file locking) in
@c <en>@ref{Multiple developers}.  To avoid the merges
@c <en>resulting from branches, restrict use of branches.
Se você acha que este processo é indesejável, a melhor
escolha é evitar mesclagem.  Para evitar mesclagens
resultantes de diretórios de trabalho separados, veja a
discussão a respeito de ???reserved checkouts??? (travas
de arquivo) em @ref{Múltiplos desenvolvedores}.  Para
ecitar mesclagens resultantes de ramificações,
restrinja o uso de ramos.

@c <en>@node Binary howto
@node Binary howto
@c <en>@section How to store binary files
@section Como guardar arquivos binários

@c <en>There are two issues with using @sc{cvs} to store
@c <en>binary files.  The first is that @sc{cvs} by default
@c <en>converts line endings between the canonical form in
@c <en>which they are stored in the repository (linefeed
@c <en>only), and the form appropriate to the operating system
@c <en>in use on the client (for example, carriage return
@c <en>followed by line feed for Windows NT).
Existem dois aspectos a considerar quando se usa o
@sc{cvs} para guardar arquivos binários.  O primeiro é
que o @sc{cvs}, por padrão, converte quebras de linhas
entre a forma canônica na qual elas são guardadas no
repositório (apenas ???linefeed???), e a forma
apropriada para o sistema operacional no qual o cliente
é usado (por exemplo, carriage return (retorno do
carro) seguido por line feed (alimentação de linha)
para o Windows NT).

@c <en>The second is that a binary file might happen to
@c <en>contain data which looks like a keyword (@pxref{Keyword
@c <en>substitution}), so keyword expansion must be turned
@c <en>off.
O segundo aspecto é que um arquivo binário pode conter
dados que se pareçam com uma palavra-chave
(@pxref{Substituição de palavra-chave}). Logo, a
expansão de palavra-chave deve ser desativada.

@c FIXME: the third is that one can't do merges with
@c binary files.  xref to Multiple Developers and the
@c reserved checkout issues.

@c <en>The @samp{-kb} option available with some @sc{cvs}
@c <en>commands insures that neither line ending conversion
@c <en>nor keyword expansion will be done.
A opção @samp{-kb} disponível com alguns comandos do
@sc{cvs} garante que nem conversão de terminação de
linha nem expansão de palavra-chave sejam usadas.

@c <en>Here is an example of how you can create a new file
@c <en>using the @samp{-kb} flag:
Aqui está um exemplo de como você pode criar um novo
arquivo usando a opção @samp{-kb}:

@example
$ echo '$@splitrcskeyword{}Id$' > kotest
$ cvs add -kb -m"A test file" kotest
$ cvs ci -m"First checkin; contains a keyword" kotest
@end example

@c <en>If a file accidentally gets added without @samp{-kb},
@c <en>one can use the @code{cvs admin} command to recover.
@c <en>For example:
Se um arquivo for acidentalmente adicionado sem o
@samp{-kb}, é possível usar o comando @code{cvs admin}
para reverter. Por exemplo:

@example
$ echo '$@splitrcskeyword{}Id$' > kotest
$ cvs add -m"A test file" kotest
$ cvs ci -m"First checkin; contains a keyword" kotest
$ cvs admin -kb kotest
$ cvs update -A kotest
# @r{For non-unix systems:}
# @r{Copy in a good copy of the file from outside CVS}
$ cvs commit -m "make it binary" kotest
@end example

@c Trying to describe this for both unix and non-unix
@c in the same description is very confusing.  Might
@c want to split the two, or just ditch the unix "shortcut"
@c (unixheads don't do much with binary files, anyway).
@c This used to say "(Try the above example, and do a
@c @code{cat kotest} after every command)".  But that
@c only really makes sense for the unix case.
@c <en>When you check in the file @file{kotest} the file is
@c <en>not preserved as a binary file, because you did not
@c <en>check it in as a binary file.  The @code{cvs
@c <en>admin -kb} command sets the default keyword
@c <en>substitution method for this file, but it does not
@c <en>alter the working copy of the file that you have.  If you need to
@c <en>cope with line endings (that is, you are using
@c <en>@sc{cvs} on a non-unix system), then you need to
@c <en>check in a new copy of the file, as shown by the
@c <en>@code{cvs commit} command above.
@c <en>On unix, the @code{cvs update -A} command suffices.
Quando você submete o arquivo @file{kotest} o arquivo
não é mantido como um arquivo binário, por que você não
o submeteu como arquivo binário.  O comando @code{cvs
admin -kb} ajusta o método de substituição da
palavra-chave padrão para este arquivo, mas não altera
a cópia de trabalho que você tem.  Se você tem que
lidar com terminações de linha (ou seja, você está usando
o @sc{cvs} em um sistema não-unix), então você precisa
submeter uma nova cópia do arquivo, como mostrado no comando
@code{cvs commit} acima. No unix, o comando @code{cvs
update -A} basta.
@c FIXME: should also describe what the *other users*
@c need to do, if they have checked out copies which
@c have been corrupted by lack of -kb.  I think maybe
@c "cvs update -kb" or "cvs
@c update -A" would suffice, although the user who
@c reported this suggested removing the file, manually
@c removing it from CVS/Entries, and then "cvs update"
@c <en>(Note that you can use @code{cvs log} to determine the default keyword
@c <en>substitution method for a file and @code{cvs status} to determine
@c <en>the keyword substitution method for a working copy.)
(Note que você pode usar o @code{cvs log} para
determinar o métido de substituição de palavra-chave
padrão para um arquivo e @code{cvs status} para
determinar o método de substituição de palavra-chave
para uma cópia de trabalho.)

@c <en>However, in using @code{cvs admin -k} to change the
@c <en>keyword expansion, be aware that the keyword expansion
@c <en>mode is not version controlled.  This means that, for
@c <en>example, that if you have a text file in old releases,
@c <en>and a binary file with the same name in new releases,
@c <en>@sc{cvs} provides no way to check out the file in text
@c <en>or binary mode depending on what version you are
@c <en>checking out.  There is no good workaround for this
@c <en>problem.
Entretanto, ao usar @code{cvs admin -k} para mudar a
expansão de palavra-chave, esteja atento para o fato de
que o modo de expansão de palavra-chave não tem
controle de versão.  Isto significa que, por exemplo,
se você tem um arquivo texto em versões antigas, e um
arquivo binário com o mesmo nome em novos releases,
o @sc{cvs} não fornece uma forma de obter o arquivo em
formato texto, ou binário, dependendo da versão que
você estpa pegando.  Não existe uma boa solução
alternativa para este problema.

@c <en>You can also set a default for whether @code{cvs add}
@c <en>and @code{cvs import} treat a file as binary based on
@c <en>its name; for example you could say that files who
@c <en>names end in @samp{.exe} are binary.  @xref{Wrappers}.
@c <en>There is currently no way to have @sc{cvs} detect
@c <en>whether a file is binary based on its contents.  The
@c <en>main difficulty with designing such a feature is that
@c <en>it is not clear how to distinguish between binary and
@c <en>non-binary files, and the rules to apply would vary
@c <en>considerably with the operating system.
Você também pode ajustar um padrão para quando o
@code{cvs add} e o @code{cvs import} tratarem um
arquivo como binário de acordo como o seu nome; por
exemplo, você pode dizer que arquivos cujos nomes
terminem com @samp{.exe} são binário.  @xref{Wrappers}.
Não existe atualmente uma forma de fazer o @sc{cvs}
detectar quando um arquivo é binário baseado em seu
conteúdo.  A dificuldade principal em fazer isto é que
não é claro como se faz para distinguir entre arquivos
binários e não-binários, e as regras para serem
aplicadas variam consideravelmente com o sistema
operacional.
@c For example, it would be good on MS-DOS-family OSes
@c for anything containing ^Z to be binary.  Having
@c characters with the 8th bit set imply binary is almost
@c surely a bad idea in the context of ISO-8859-* and
@c other such character sets.  On VMS or the Mac, we
@c could use the OS's file typing.  This is a
@c commonly-desired feature, and something of this sort
@c may make sense.  But there are a lot of pitfalls here.
@c
@c Another, probably better, way to tell is to read the
@c file in text mode, write it to a temp file in text
@c mode, and then do a binary mode compare of the two
@c files.  If they differ, it is a binary file.  This
@c might have problems on VMS (or some other system
@c with several different text modes), but in general
@c should be relatively portable.  The only other
@c downside I can think of is that it would be fairly
@c slow, but that is perhaps a small price to pay for
@c not having your files corrupted.  Another issue is
@c what happens if you import a text file with bare
@c linefeeds on Windows.  Such files will show up on
@c Windows sometimes (I think some native windows
@c programs even write them, on occasion).  Perhaps it
@c is reasonable to treat such files as binary; after
@c all it is something of a presumption to assume that
@c the user would want the linefeeds converted to CRLF.

@c ---------------------------------------------------------------------
@c <en>@node Multiple developers
@node Múltiplos desenvolvedores
@c <en>@chapter Multiple developers
@chapter Múltiplos desenvolvedores
@c <en>@cindex Multiple developers
@cindex Múltiplos desenvolvedores
@c <en>@cindex Team of developers
@cindex Team of developers
@c <en>@cindex File locking
@cindex File locking
@c <en>@cindex Locking files
@cindex Locking files
@c <en>@cindex Working copy
@cindex Working copy
@c <en>@cindex Reserved checkouts
@cindex Reserved checkouts
@c <en>@cindex Unreserved checkouts
@cindex checkouts não-reservados
@c <en>@cindex RCS-style locking
@cindex RCS-style locking

@c <en>When more than one person works on a software project
@c <en>things often get complicated.  Often, two people try to
@c <en>edit the same file simultaneously.  One solution, known
@c <en>as @dfn{file locking} or @dfn{reserved checkouts}, is
@c <en>to allow only one person to edit each file at a time.
@c <en>This is the only solution with some version control
@c <en>systems, including @sc{rcs} and @sc{sccs}.  Currently
@c <en>the usual way to get reserved checkouts with @sc{cvs}
@c <en>is the @code{cvs admin -l} command (@pxref{admin
@c <en>options}).  This is not as nicely integrated into
@c <en>@sc{cvs} as the watch features, described below, but it
@c <en>seems that most people with a need for reserved
@c <en>checkouts find it adequate.
Quando mais de uma pessoa trabalham em um projeto de
software freqüentemente surgem complicações.  Às vezes
duas pessoas tentam editar o mesmo arquivo
simultaneamente.  Uma solução, conhecida como
@dfn{trava de arquivo} ou @dfn{???checkout???
reservado}, é permitir, para cada arquivo, que apenas
uma pessoa por vez edite o arquivo. Esta é a única
solução em alguns sistemas de controle de versão,
incluindo @sc{rcs} e @sc{sccs}.  Atualmente, a forma
normal de se ter ???checkouts??? reservados com o @sc{cvs}
é com o comando @code{cvs admin -l} (@pxref{admin
options}).  Isto não é tão integrado com o @sc{cvs}
quanto a habilidade de ???watch???, descrita abaixo,
mas vemos que a maioria das pessoas que necessitam de
???checkouts??? reservados acham isto adequado.
@c Or "find it better than worrying about implementing
@c nicely integrated reserved checkouts" or ...?
@c <en>It also may be possible to use the watches
@c <en>features described below, together with suitable
@c <en>procedures (not enforced by software), to avoid having
@c <en>two people edit at the same time.
Também é possível usar a habilidade de trabalhar com
descrita a seguir, junto com alguns procedimentos
adequados (que o sotware não obriga), para evitar que
duas pessoas editem o mesmo arquivo ao mesmo tempo.

@c Our unreserved checkout model might not
@c be quite the same as others.  For example, I
@c think that some systems will tend to create a branch
@c in the case where CVS prints "up-to-date check failed".
@c It isn't clear to me whether we should try to
@c explore these subtleties; it could easily just
@c confuse people.
@c <en>The default model with @sc{cvs} is known as
@c <en>@dfn{unreserved checkouts}.  In this model, developers
@c <en>can edit their own @dfn{working copy} of a file
@c <en>simultaneously.  The first person that commits his
@c <en>changes has no automatic way of knowing that another
@c <en>has started to edit it.  Others will get an error
@c <en>message when they try to commit the file.  They must
@c <en>then use @sc{cvs} commands to bring their working copy
@c <en>up to date with the repository revision.  This process
@c <en>is almost automatic.
O modelo padrão no @sc{cvs} é conhecido como
@dfn{???checkouts??? não-reservados}.  Neste modelo, os
desenvolvedores podem editar sua própria @dfn{cópia de
trabalho} de um arquivo simultaneamente.  A primeira
pessoa que ???commits??? suas mudanças não tem uma
forma automática de saber que outra pessoa começou a
editar o mesmo arquivo.  Os outros vão receber uma
mensagem de erro quando tentarem ???commit??? o
arquivo.  Eles então terão que usar comandos do
@sc{cvs} para tornar sua cópia local atualizada em
relação à revisão no repositório.  Este processo é
quase automático.

@c FIXME? should probably use the word "watch" here, to
@c tie this into the text below and above.
@c <en>@sc{cvs} also supports mechanisms which facilitate
@c <en>various kinds of communication, without actually
@c <en>enforcing rules like reserved checkouts do.
O @sc{cvs} também dá suporte a mecanismos que facilitam
várias formas de comunicação, sem regras realmente
obrigatórias como acontece com os ???checkouts??? reservados.

@c <en>The rest of this chapter describes how these various
@c <en>models work, and some of the issues involved in
@c <en>choosing between them.
O restante deste capítulo descreve como estes vários
modelos funcionam, e alguns dos aspectos envolvidos na
hora de escolher entre eles.

@ignore
@c <en>Here is a draft reserved checkout design or discussion
@c <en>of the issues.  This seems like as good a place as any
@c <en>for this.
Here is a draft reserved checkout design or discussion
of the issues.  This seems like as good a place as any
for this.

@c <en>Might want a cvs lock/cvs unlock--in which the names
@c <en>differ from edit/unedit because the network must be up
@c <en>for these to work.  unedit gives an error if there is a
@c <en>reserved checkout in place (so that people don't
@c <en>accidentally leave locks around); unlock gives an error
@c <en>if one is not in place (this is more arguable; perhaps
@c <en>it should act like unedit in that case).
Might want a cvs lock/cvs unlock--in which the names
differ from edit/unedit because the network must be up
for these to work.  unedit gives an error if there is a
reserved checkout in place (so that people don't
accidentally leave locks around); unlock gives an error
if one is not in place (this is more arguable; perhaps
it should act like unedit in that case).

@c <en>On the other hand, might want it so that emacs,
@c <en>scripts, etc., can get ready to edit a file without
@c <en>having to know which model is in use.  In that case we
@c <en>would have a "cvs watch lock" (or .cvsrc?) (that is,
@c <en>three settings, "on", "off", and "lock").  Having cvs
@c <en>watch lock set would cause a get to record in the CVS
@c <en>directory which model is in use, and cause "cvs edit"
@c <en>to change behaviors.  We'd want a way to query which
@c <en>setting is in effect (this would be handy even if it is
@c <en>only "on" or "off" as presently).  If lock is in
@c <en>effect, then commit would require a lock before
@c <en>allowing a checkin; chmod wouldn't suffice (might be
@c <en>debatable--see chmod comment below, in watches--but it
@c <en>is the way people expect RCS to work and I can't think
@c <en>of any significant downside.  On the other hand, maybe
@c <en>it isn't worth bothering, because people who are used
@c <en>to RCS wouldn't think to use chmod anyway).
On the other hand, might want it so that emacs,
scripts, etc., can get ready to edit a file without
having to know which model is in use.  In that case we
would have a "cvs watch lock" (or .cvsrc?) (that is,
three settings, "on", "off", and "lock").  Having cvs
watch lock set would cause a get to record in the CVS
directory which model is in use, and cause "cvs edit"
to change behaviors.  We'd want a way to query which
setting is in effect (this would be handy even if it is
only "on" or "off" as presently).  If lock is in
effect, then commit would require a lock before
allowing a checkin; chmod wouldn't suffice (might be
debatable--see chmod comment below, in watches--but it
is the way people expect RCS to work and I can't think
of any significant downside.  On the other hand, maybe
it isn't worth bothering, because people who are used
to RCS wouldn't think to use chmod anyway).

@c <en>Implementation: use file attributes or use RCS
@c <en>locking.  The former avoids more dependence on RCS
@c <en>behaviors we will need to reimplement as we librarify
@c <en>RCS, and makes it easier to import/export RCS files (in
@c <en>that context, want to ignore the locker field).  But
@c <en>note that RCS locks are per-branch, which is the
@c <en>correct behavior (this is also an issue for the "watch
@c <en>on" features; they should be per-branch too).
Implementation: use file attributes or use RCS
locking.  The former avoids more dependence on RCS
behaviors we will need to reimplement as we librarify
RCS, and makes it easier to import/export RCS files (in
that context, want to ignore the locker field).  But
note that RCS locks are per-branch, which is the
correct behavior (this is also an issue for the "watch
on" features; they should be per-branch too).

@c <en>Here are a few more random notes about implementation
@c <en>details, assuming "cvs watch lock" and
Here are a few more random notes about implementation
details, assuming "cvs watch lock" and

@c <en>CVS/Watched file?  Or try to fit this into CVS/Entries somehow?
@c <en>Cases: (1) file is checked out (unreserved or with watch on) by old
@c <en>version of @sc{cvs}, now we do something with new one, (2) file is checked
@c <en>out by new version, now we do something with old one.
CVS/Watched file?  Or try to fit this into CVS/Entries somehow?
Cases: (1) file is checked out (não-reservado or with watch on) by old
version of @sc{cvs}, now we do something with new one, (2) file is checked
out by new version, now we do something with old one.

@c <en>Remote protocol would have a "Watched" analogous to "Mode".  Of course
@c <en>it would apply to all Updated-like requests.  How do we keep this
@c <en>setting up to date?  I guess that there wants to be a Watched request,
@c <en>and the server would send a new one if it isn't up to date? (Ugh--hard
@c <en>to implement and slows down "cvs -q update"--is there an easier way?)
Remote protocol would have a "Watched" analogous to "Mode".  Of course
it would apply to all Updated-like requests.  How do we keep this
setting up to date?  I guess that there wants to be a Watched request,
and the server would send a new one if it isn't up to date? (Ugh--hard
to implement and slows down "cvs -q update"--is there an easier way?)

@c <en>"cvs edit"--checks CVS/Watched, and if watch lock, then sends
@c <en>"edit-lock" request.  Which comes back with a Checked-in with
@c <en>appropriate Watched (off, on, lock, locked, or some such?), or error
@c <en>message if already locked.
"cvs edit"--checks CVS/Watched, and if watch lock, then sends
"edit-lock" request.  Which comes back with a Checked-in with
appropriate Watched (off, on, lock, locked, or some such?), or error
message if already locked.

@c <en>"cvs commit"--only will commit if off/on/locked.  lock is not OK.
"cvs commit"--only will commit if off/on/locked.  lock is not OK.

@c <en>Doc:
@c <en>note that "cvs edit" must be connected to network if watch lock is in
@c <en>effect.
Doc:
note that "cvs edit" must be connected to network if watch lock is in
effect.

@c <en>Talk about what to do if someone has locked a file and you want to
@c <en>edit that file.  (breaking locks, or lack thereof).
Talk about what to do if someone has locked a file and you want to
edit that file.  (breaking locks, or lack thereof).


@c <en>One other idea (which could work along with the
@c <en>existing "cvs admin -l" reserved checkouts, as well as
@c <en>the above):
One other idea (which could work along with the
existing "cvs admin -l" reserved checkouts, as well as
the above):

@c <en>"cvs editors" could show who has the file locked, if
@c <en>someone does.
"cvs editors" could show who has the file locked, if
someone does.

@end ignore

@menu
@c <en>* File status::                 A file can be in several states
* Estado de arquivo::           Um arquivo pode ter vários estados
@c <en>* Updating a file::             Bringing a file up-to-date
* Atualizando um arquivo::      Deixando um arquivo atualizado
@c <en>* Conflicts example::           An informative example
* Exemplo de conflitos::        Um exemplo informativo
@c <en>* Informing others::            To cooperate you must inform
* Informando os outros::        Para cooperar você deve informar
@c <en>* Concurrency::                 Simultaneous repository access
* Concorrência::                Acesso simultâneo ao repositório
@c <en>* Watches::                     Mechanisms to track who is editing files
* ???Watches???::               Mecanismos para rastrear quem está editando arquivos
@c <en>* Choosing a model::            Reserved or unreserved checkouts?
* Escolhendo um modelo::        ???checkout??? reservado ou não-reservado?
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node File status
@node Estado de arquivo
@c <en>@section File status
@section Estado de arquivo
@c <en>@cindex File status
@cindex Estado de arquivo
@c <en>@cindex Status of a file
@cindex Estado de um arquivo

@c Shouldn't this start with an example or something,
@c introducing the unreserved checkout model?  Before we
@c dive into listing states?
@c <en>Based on what operations you have performed on a
@c <en>checked out file, and what operations others have
@c <en>performed to that file in the repository, one can
@c <en>classify a file in a number of states.  The states, as
@c <en>reported by the @code{status} command, are:
Baseado em quais operações você realizou num arquivo
???checked out???, e quais operações outros realizaram
neste arquivo no repositório, podemos classificar o
arquivo em vários estados.  Os estados, como são
mostrados pelo comando @code{status}, são:

@c The order of items is chosen to group logically
@c similar outputs together.
@c People who want alphabetical can use the index...
@table @asis
@c <en>@cindex Up-to-date
@cindex Up-to-date (Atualizado)
@c <en>@item Up-to-date
@item Up-to-date (Atualizado)
@c <en>The file is identical with the latest revision in the
@c <en>repository for the branch in use.
O arquivo é identico à última revisão no repositório,
para o ramo em questão.
@c FIXME: should we clarify "in use"?  The answer is
@c sticky tags, and trying to distinguish branch sticky
@c tags from non-branch sticky tags seems rather awkward
@c here.
@c FIXME: What happens with non-branch sticky tags?  Is
@c a stuck file "Up-to-date" or "Needs checkout" or what?

@c <en>@item Locally Modified
@item Locally Modified (Modificado localmente)
@c <en>@cindex Locally Modified
@cindex Locally Modified (Modificado localmente)
@c <en>You have edited the file, and not yet committed your changes.
Você alterou o arquivo, e ainda não ???committed???
suas mudanças.

@c <en>@item Locally Added
@item Locally Added (Adicionado localmente)
@c <en>@cindex Locally Added
@cindex Locally Added (Adicionado localmente)
@c <en>You have added the file with @code{add}, and not yet
@c <en>committed your changes.
Você adicionou o arquivo com @code{add}, e ainda não
???committed??? suas mudanças.
@c There are many cases involving the file being
@c added/removed/modified in the working directory, and
@c added/removed/modified in the repository, which we
@c don't try to describe here.  I'm not sure that "cvs
@c status" produces a non-confusing output in most of
@c those cases.

@c <en>@item Locally Removed
@item Locally Removed (Removido localmente)
@c <en>@cindex Locally Removed
@cindex Locally Removed (Removido localmente)
@c <en>You have removed the file with @code{remove}, and not yet
@c <en>committed your changes.
Você removeu o arquivo com @code{remove}, e ainda não
???committed??? suas mudanças.

@c <en>@item Needs Checkout
@item Needs Checkout (Precisa de ???checkout???)
@c <en>@cindex Needs Checkout
@cindex Needs Checkout (Precisa de ???checkout???)
@c <en>Someone else has committed a newer revision to the
@c <en>repository.  The name is slightly misleading; you will
@c <en>ordinarily use @code{update} rather than
@c <en>@code{checkout} to get that newer revision.
Alguém ???committed??? uma revisão nova no repositório.
O nome está um pouco confuso; você normalmente vai usar
@code{update} ao invés de @code{checkout} para obter a
nova revisão.

@c <en>@item Needs Patch
@item Needs Patch (Precisa de ???patch???)
@c <en>@cindex Needs Patch
@cindex Needs Patch (Precisa de ???patch???)
@c See also newb-123j0 in sanity.sh (although that case
@c should probably be changed rather than documented).
@c <en>Like Needs Checkout, but the @sc{cvs} server will send
@c <en>a patch rather than the entire file.  Sending a patch or
@c <en>sending an entire file accomplishes the same thing.
Igual a 'Needs Checkout', mas o servidor do @sc{cvs}
vai mandar um ???patch??? ao invés de um arquivo
inteiro.  Mandar um ???patch??? ou um arquivo inteiro
dá no mesmo.

@c <en>@item Needs Merge
@item Needs Merge (Precisa mesclar)
@c <en>@cindex Needs Merge
@cindex Needs Merge (Precisa mesclar)
@c <en>Someone else has committed a newer revision to the repository, and you
@c <en>have also made modifications to the file.
Outra pessoa ???committed??? uma nova revisão no
repositório, e você fez modificações no arquivo.

@c <en>@item Unresolved Conflict
@item Unresolved Conflict (Conflito não-solucionado)
@c <en>@cindex Unresolved Conflict
@cindex Unresolved Conflict (Conflito não-solucionado)
@c FIXCVS - This file status needs to be changed to some more informative
@c text that distinguishes it more clearly from each of the Locally Added,
@c File had conflicts on merge, and Unknown status types, but an exact and
@c succinct wording escapes me at the moment.
@c <en>A file with the same name as this new file has been added to the repository
@c <en>from a second workspace.  This file will need to be moved out of the way
@c <en>to allow an @code{update} to complete.
Um arquivo com o mesmo nome deste arquivo novo foi
adicionado ao repositório a partir de outra área de
trabalho.  Este arquivo vai ter que ser movido para que
não atrapalhe um @code{update} de completar.

@c <en>@item File had conflicts on merge
@item File had conflicts on merge (Arquivo teve conflitos na mescla)
@c <en>@cindex File had conflicts on merge
@cindex File had conflicts on merge (Arquivo teve conflitos na mescla)
@c is it worth saying that this message was "Unresolved
@c Conflict" in CVS 1.9 and earlier?  I'm inclined to
@c think that is unnecessarily confusing to new users.
@c <en>This is like Locally Modified, except that a previous
@c <en>@code{update} command gave a conflict.  If you have not
@c <en>already done so, you need to
@c <en>resolve the conflict as described in @ref{Conflicts example}.
Isto é parecido com 'Locally Modified', com a diferença que o comando
@code{update} anterior produziu um conflito.  Se você
ainda não o fez, precisa resolver o conflito, como é
descrito em @ref{Exemplo de conflitos}.

@c <en>@item Unknown
@item Unknown (Desconhecido)
@c <en>@cindex Unknown
@cindex Unknown (Desconhecido)
@c <en>@sc{cvs} doesn't know anything about this file.  For
@c <en>example, you have created a new file and have not run
@c <en>@code{add}.
O @sc{cvs} não sabe nada a respeito deste arquivo.  Por
exemplo, você criou um novo arquivo e não rodou um
@code{add}.
@c
@c "Entry Invalid" and "Classify Error" are also in the
@c status.c.  The latter definitely indicates a CVS bug
@c (should it be worded more like "internal error" so
@c people submit bug reports if they see it?).  The former
@c I'm not as sure; I haven't tracked down whether/when it
@c appears in "cvs status" output.

@end table

@c <en>To help clarify the file status, @code{status} also
@c <en>reports the @code{Working revision} which is the
@c <en>revision that the file in the working directory derives
@c <en>from, and the @code{Repository revision} which is the
@c <en>latest revision in the repository for the branch in
@c <en>use.
Para facilitar o entendimento do estado do arquivo, o
comando @code{status} também relata a @code{revisão de
trabalho}, que é a revisão da qual o arquivo no
diretório de trabalho deriva, e a @code{Revisão de
repositório} que é a mais recente revisão no
repositório, para o ramo em uso.
@c FIXME: should we clarify "in use"?  The answer is
@c sticky tags, and trying to distinguish branch sticky
@c tags from non-branch sticky tags seems rather awkward
@c here.
@c FIXME: What happens with non-branch sticky tags?
@c What is the Repository Revision there?  See the
@c comment at vn_rcs in cvs.h, which is kind of
@c confused--we really need to document better what this
@c field contains.
@c Q: Should we document "New file!" and other such
@c outputs or are they self-explanatory?
@c FIXME: what about the date to the right of "Working
@c revision"?  It doesn't appear with client/server and
@c seems unnecessary (redundant with "ls -l") so
@c perhaps it should be removed for non-client/server too?
@c FIXME: Need some examples.
@c FIXME: Working revision can also be something like
@c "-1.3" for a locally removed file.  Not at all
@c self-explanatory (and it is possible that CVS should
@c be changed rather than documenting this).

@c Would be nice to have an @example showing output
@c from cvs status, with comments showing the xref
@c where each part of the output is described.  This
@c might fit in nicely if it is desirable to split this
@c node in two; one to introduce "cvs status" and one
@c to list each of the states.
@c <en>The options to @code{status} are listed in
@c <en>@ref{Invoking CVS}.  For information on its @code{Sticky tag}
@c <en>and @code{Sticky date} output, see @ref{Sticky tags}.
@c <en>For information on its @code{Sticky options} output,
@c <en>see the @samp{-k} option in @ref{update options}.
As opções para o comando @code{status} são listadas em
@ref{Chamando o CVS}.  Para informações sobre suas
saídas @code{Sticky tag (Etiqueta adesiva)} e
@code{Sticky date (data adesiva)} veja em
@ref{Etiquetas adesivas}. Para informações na saída
@code{Sticky options (Opções adesivas)}, veja a
opção @samp{-k} em @ref{update options}.

@c <en>You can think of the @code{status} and @code{update}
@c <en>commands as somewhat complementary.  You use
@c <en>@code{update} to bring your files up to date, and you
@c <en>can use @code{status} to give you some idea of what an
@c <en>@code{update} would do (of course, the state of the
@c <en>repository might change before you actually run
@c <en>@code{update}).  In fact, if you want a command to
@c <en>display file status in a more brief format than is
@c <en>displayed by the @code{status} command, you can invoke
Você pode pensar nos comandos @code{status} e
@code{update} como complementares.  Você usa o
@code{update} para atualizar seus arquivos, e você pode
usar o @code{status} para ter idéia do que um
@code{update} deve fazer (obviamente, o estado do
repositório pode mudar depois que você rodar o
@code{update}).  De fato, se você quiser um comando
para mostrar o estado de arquivos num formato mais
conciso do que o comando @code{status} mostra, você
pode invocar

@c <en>@cindex update, to display file status
@cindex update, para mostrar o estado dos arquivos
@example
$ cvs -n -q update
@end example

@c <en>The @samp{-n} option means to not actually do the
@c <en>update, but merely to display statuses; the @samp{-q}
@c <en>option avoids printing the name of each directory.  For
@c <en>more information on the @code{update} command, and
@c <en>these options, see @ref{Invoking CVS}.
A opção @samp{-n} significa fingir que faz a
atualização, mas simplesmente mostrar o estado; a opção
@samp{-q} suprime a exibição do nome de cada
diretório.  Para mais informações sobre o comando
@code{update}, e opções, veja em @ref{Chamando o CVS}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Updating a file
@node Atualizando um arquivo
@c <en>@section Bringing a file up to date
@section Deixando um arquivo atualizado
@c <en>@cindex Bringing a file up to date
@cindex Deixando um arquivo atualizado
@c <en>@cindex Updating a file
@cindex Atualizando um arquivo
@c <en>@cindex Merging a file
@cindex Mesclando um arquivo
@c <en>@cindex Update, introduction
@cindex Update, introdução

@c <en>When you want to update or merge a file, use the @code{update}
@c <en>command.  For files that are not up to date this is roughly equivalent
@c <en>to a @code{checkout} command: the newest revision of the file is
@c <en>extracted from the repository and put in your working directory.
Quando você quiser atualizar ou mesclar um arquivo, use o
comando @code{update}.  Para arquivos que não estão
atualizados isto é mais ou menos equivalente ao comando
@code{checkout}: a revisão mais nova do arquivo é
extraída do repositório e posta no diretório de trabalho.

@c <en>Your modifications to a file are never lost when you
@c <en>use @code{update}.  If no newer revision exists,
@c <en>running @code{update} has no effect.  If you have
@c <en>edited the file, and a newer revision is available,
@c <en>@sc{cvs} will merge all changes into your working copy.
Suas modificações num arquivo nunca são perdidas quando
você usa @code{update}.  Se não existe uma revisão mais
nova, o @code{update} não faz nada.  Se você
editou o arquivo, e uma nova revisão está disponível, o
@sc{cvs} vai mesclar todas as alterações na sua cópia
de trabalho.

@c <en>For instance, imagine that you checked out revision 1.4 and started
@c <en>editing it.  In the meantime someone else committed revision 1.5, and
@c <en>shortly after that revision 1.6.  If you run @code{update} on the file
@c <en>now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into
@c <en>your file.
Por exemplo, imagine que você ???checked out??? a
revisão 1.4 e começou a editá-la.  Enquanto isto, outra
pessoa ???committed??? a revisão 1.5, e logo depois a
revisão 1.6.  Se você rodar @code{update} no arquivo
agora, o @sc{cvs} vai incorporar todas as mudanças
entre a revisão 1.4 e 1.6 no seu arquivo.

@c <en>@cindex Overlap
@cindex Sobreposição
@c <en>If any of the changes between 1.4 and 1.6 were made too
@c <en>close to any of the changes you have made, an
@c <en>@dfn{overlap} occurs.  In such cases a warning is
@c <en>printed, and the resulting file includes both
@c <en>versions of the lines that overlap, delimited by
@c <en>special markers.
@c <en>@xref{update}, for a complete description of the
@c <en>@code{update} command.
Se quaisquer das mudanças entre 1.4 e 1.6 ocorreram
suficientemente próximas de quaisquer das suas
mudanças, uma @dfn{sobreposição} ocorre.  Nestes casos
um aviso é mostrado, e o arquivo resultante contém
ambas as versões das linhas que se sobrepuseram,
delimitadas por marcadores especiais. @xref{update},
para uma descrição completa do comando @code{update}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Conflicts example
@node Exemplo de conflitos
@c <en>@section Conflicts example
@section Exemplo de conflitos
@c <en>@cindex Merge, an example
@cindex Merge, an example
@c <en>@cindex Example of merge
@cindex Example of merge
@c <en>@cindex driver.c (merge example)
@cindex driver.c (merge example)

@c <en>Suppose revision 1.4 of @file{driver.c} contains this:
Suponha que a revisão 1.4 de @file{driver.c} contém isto:

@example
#include <stdio.h>

void main()
@{
    parse();
    if (nerr == 0)
        gencode();
    else
        fprintf(stderr, "No code generated.\n");
    exit(nerr == 0 ? 0 : 1);
@}
@end example

@noindent
@c <en>Revision 1.6 of @file{driver.c} contains this:
A revisão 1.6 de @file{driver.c} contém isto:

@example
#include <stdio.h>

int main(int argc,
         char **argv)
@{
    parse();
    if (argc != 1)
    @{
        fprintf(stderr, "tc: No args expected.\n");
        exit(1);
    @}
    if (nerr == 0)
        gencode();
    else
        fprintf(stderr, "No code generated.\n");
    exit(!!nerr);
@}
@end example

@noindent
@c <en>Your working copy of @file{driver.c}, based on revision
@c <en>1.4, contains this before you run @samp{cvs update}:
@c <en>@c -- Really include "cvs"?
Sua cópia de trabalho de @file{driver.c}, baseada na
revisão 1.4, contém isto, antes de você rodar um @samp{cvs update}:
@c -- Really include "cvs"?

@example
#include <stdlib.h>
#include <stdio.h>

void main()
@{
    init_scanner();
    parse();
    if (nerr == 0)
        gencode();
    else
        fprintf(stderr, "No code generated.\n");
    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
@}
@end example

@noindent
@c <en>You run @samp{cvs update}:
@c <en>@c -- Really include "cvs"?
Então você roda o @samp{cvs update}:
@c -- Really include "cvs"?

@example
$ cvs update driver.c
RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
retrieving revision 1.4
retrieving revision 1.6
Merging differences between 1.4 and 1.6 into driver.c
rcsmerge warning: overlaps during merge
cvs update: conflicts found in driver.c
C driver.c
@end example

@noindent
@c <en>@cindex Conflicts (merge example)
@cindex Conflitos (exemplo de mesclagem)
@c <en>@sc{cvs} tells you that there were some conflicts.
@c <en>Your original working file is saved unmodified in
@c <en>@file{.#driver.c.1.4}.  The new version of
@c <en>@file{driver.c} contains this:
O @sc{cvs} disse a você que existem conflitos.
Seu arquivo de trabalho original é guardado sem
modificações em @file{.#driver.c.1.4}.  A nova versão
de @file{driver.c} contém isto:

@example
#include <stdlib.h>
#include <stdio.h>

int main(int argc,
         char **argv)
@{
    init_scanner();
    parse();
    if (argc != 1)
    @{
        fprintf(stderr, "tc: No args expected.\n");
        exit(1);
    @}
    if (nerr == 0)
        gencode();
    else
        fprintf(stderr, "No code generated.\n");
@asis{}<<<<<<< driver.c
    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
@asis{}=======
    exit(!!nerr);
@asis{}>>>>>>> 1.6
@}
@end example

@noindent
@c <en>@cindex Markers, conflict
@cindex Marcadores, conflito
@c <en>@cindex Conflict markers
@cindex Marcadores de conflito
@c <en>@cindex <<<<<<<
@cindex <<<<<<<
@c <en>@cindex >>>>>>>
@cindex >>>>>>>
@c <en>@cindex =======
@cindex =======

@c <en>Note how all non-overlapping modifications are incorporated in your working
@c <en>copy, and that the overlapping section is clearly marked with
@c <en>@samp{<<<<<<<}, @samp{=======} and @samp{>>>>>>>}.
Observe como todas as modificações sem sobreposição
foram incorporadas na sua cópia de trabalho, e que as
seções com sobreposição são marcadas de forma clara com
@samp{<<<<<<<}, @samp{=======} e @samp{>>>>>>>}.

@c <en>@cindex Resolving a conflict
@cindex Resolvendo um conflito
@c <en>@cindex Conflict resolution
@cindex Resolução de conflitos
@c <en>You resolve the conflict by editing the file, removing the markers and
@c <en>the erroneous line.  Suppose you end up with this file:
@c <en>@c -- Add xref to the pcl-cvs manual when it talks
@c <en>@c -- about this.
Você resolve o conflito editando o arquivo, removendo os
marcadores e as linhas erradas.  Suponha que você ficou
com este arquivo:
@c -- Add xref to the pcl-cvs manual when it talks
@c -- about this.
@example
#include <stdlib.h>
#include <stdio.h>

int main(int argc,
         char **argv)
@{
    init_scanner();
    parse();
    if (argc != 1)
    @{
        fprintf(stderr, "tc: No args expected.\n");
        exit(1);
    @}
    if (nerr == 0)
        gencode();
    else
        fprintf(stderr, "No code generated.\n");
    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
@}
@end example

@noindent
@c <en>You can now go ahead and commit this as revision 1.7.
Você agora pode seguir em frente e ???commit??? ele
como a revisão 1.7.

@example
$ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
Checking in driver.c;
/usr/local/cvsroot/yoyodyne/tc/driver.c,v  <--  driver.c
new revision: 1.7; previous revision: 1.6
done
@end example

@c <en>For your protection, @sc{cvs} will refuse to check in a
@c <en>file if a conflict occurred and you have not resolved
@c <en>the conflict.  Currently to resolve a conflict, you
@c <en>must change the timestamp on the file.  In previous
@c <en>versions of @sc{cvs}, you also needed to
@c <en>insure that the file contains no conflict markers.
@c <en>Because
@c <en>your file may legitimately contain conflict markers (that
@c <en>is, occurrences of @samp{>>>>>>> } at the start of a
@c <en>line that don't mark a conflict), the current
@c <en>version of @sc{cvs} will print a warning and proceed to
@c <en>check in the file.
Para sua segurança, o @sc{cvs} não vai aceitar o check
in de um arquivo se um conflito ocorreu e você não
resolveu o conflito.  Atualmente, para resolver um
conflito, você deve mudar a data do arquivo.  Em
versões anteriores do @sc{cvs}, você também precisava
ter certeza de que o arquivo não continha marcadores de
conflito.  Já que seu arquivo pode conter marcadores de
conflito ???de forma legítima??? (isto é, a ocorrência
de @samp{>>>>>>> } no começo de uma linha que não marca
um conflito), a versão atual do @sc{cvs} vai mostrar um
aviso e continuar a fazer o ???check in??? do arquivo.
@c The old behavior was really icky; the only way out
@c was to start hacking on
@c the @code{CVS/Entries} file or other such workarounds.
@c
@c If the timestamp thing isn't considered nice enough,
@c maybe there should be a "cvs resolved" command
@c which clears the conflict indication.  For a nice user
@c interface, this should be invoked by an interactive
@c merge tool like emerge rather than by the user
@c directly--such a tool can verify that the user has
@c really dealt with each conflict.

@c <en>@cindex emerge
@cindex emerge
@c <en>If you use release 1.04 or later of pcl-cvs (a @sc{gnu}
@c <en>Emacs front-end for @sc{cvs}) you can use an Emacs
@c <en>package called emerge to help you resolve conflicts.
@c <en>See the documentation for pcl-cvs.
Se você usa a release 1.04 ou posterior do pcl-cvs (uma
interface amigável para o  @sc{cvs} de dentro do
@sc{gnu} Emacs) você pode usar um pacote do Emacs
chamado emerge para te ajudar a resolver os
conflitos. Veja na documentação do pcl-cvs.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Informing others
@node Informando os outros
@c <en>@section Informing others about commits
@section Informando os outros sobre ???commits???
@c <en>@cindex Informing others
@cindex Informando os outros
@c <en>@cindex Spreading information
@cindex Divulgando informação
@c <en>@cindex Mail, automatic mail on commit
@cindex e-mail, mensagens automáticas no ???commit???

@c <en>It is often useful to inform others when you commit a
@c <en>new revision of a file.  The @samp{-i} option of the
@c <en>@file{modules} file, or the @file{loginfo} file, can be
@c <en>used to automate this process.  @xref{modules}.
@c <en>@xref{loginfo}.  You can use these features of @sc{cvs}
@c <en>to, for instance, instruct @sc{cvs} to mail a
@c <en>message to all developers, or post a message to a local
@c <en>newsgroup.
Às vezes é útil informar os outros quando você
???commit??? uma nova revisão de um arquivo.  A opção
@samp{-i} do arquivo @file{modules}, ou do arquivo
@file{loginfo}, pode ser usada para automatizar este
processo.  @xref{modules}.  @xref{loginfo}.  Você pode
usar estas funcionalidades do @sc{cvs} para, por
exemplo, instruir o @sc{cvs} a enviar uma mensagem a
todos os desenvolvedores, ou enviar uma mensagem para
um newsgroup local.
@c -- More text would be nice here.

@c <en>@node Concurrency
@node Concorrência
@c <en>@section Several developers simultaneously attempting to run CVS
@section Vários desenvolvedores tentando rodar o CVS simultâneamente

@c <en>@cindex Locks, cvs, introduction
@cindex Locks, cvs, introdução
@c For a discussion of *why* CVS creates locks, see
@c the comment at the start of src/lock.c
@c <en>If several developers try to run @sc{cvs} at the same
@c <en>time, one may get the following message:
Se vários desenvolvedores tentam rodar o @sc{cvs} no
mesmo momento, alguém vai receber esta mensagem:

@example
[11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
@end example

@c <en>@cindex #cvs.rfl, removing
@cindex #cvs.rfl, removendo
@c <en>@cindex #cvs.wfl, removing
@cindex #cvs.wfl, removendo
@c <en>@cindex #cvs.lock, removing
@cindex #cvs.lock, removendo
@c <en>@sc{cvs} will try again every 30 seconds, and either
@c <en>continue with the operation or print the message again,
@c <en>if it still needs to wait.  If a lock seems to stick
@c <en>around for an undue amount of time, find the person
@c <en>holding the lock and ask them about the cvs command
@c <en>they are running.  If they aren't running a cvs
@c <en>command, look in the repository directory mentioned in
@c <en>the message and remove files which they own whose names
@c <en>start with @file{#cvs.rfl},
@c <en>@file{#cvs.wfl}, or @file{#cvs.lock}.
O @sc{cvs} vai tentar de novo a cada 30 segundos, e vai
ou continuar com a operação ou mostrar a mensagem de
novo, se ainda precisar esperar.  Se uma trava (lock)
permanece por muito tempo, procure a pessoa que é dona
da trava e pergunte que comando do cvs ele está
rodando.  Se ele/ela não estiver rodando um comando do
cvs, procure no diretório do repositório que está
referenciado na mensagem e remova os arquivos cujos
nomes começam com @file{#cvs.rfl},
@file{#cvs.wfl}, or @file{#cvs.lock}.

@c <en>Note that these locks are to protect @sc{cvs}'s
@c <en>internal data structures and have no relationship to
@c <en>the word @dfn{lock} in the sense used by
@c <en>@sc{rcs}---which refers to reserved checkouts
@c <en>(@pxref{Multiple developers}).
Observe que estas travas são feitas para proteger a
estrutura de dados interna do @sc{cvs} e não tem
relação com a palavra @dfn{lock (trava)} no sentido
usado pelo @sc{rcs}---que se refere a ???checkouts???
reservados (@pxref{Múltiplos desenvolvedores}).

@c <en>Any number of people can be reading from a given
@c <en>repository at a time; only when someone is writing do
@c <en>the locks prevent other people from reading or writing.
Qualquer quantidade de pessoas pode ler de um
repositório num determinado momento; apenas quando
alguém está gravando é que as travas evitam que outras
pessoas leiam ou gravem.

@c <en>@cindex Atomic transactions, lack of
@cindex Transações atômicas, falta de
@c <en>@cindex Transactions, atomic, lack of
@cindex Atômicas, transações, falta de
@c the following talks about what one might call commit/update
@c atomicity.
@c Probably also should say something about
@c commit/commit atomicity, that is, "An update will
@c not get partial versions of more than one commit".
@c CVS currently has this property and I guess we can
@c make it a documented feature.
@c For example one person commits
@c a/one.c and b/four.c and another commits a/two.c and
@c b/three.c.  Then an update cannot get the new a/one.c
@c and a/two.c and the old b/four.c and b/three.c.
@c <en>One might hope for the following property:
Espera-se que a seguinte propriedade valha:

@quotation
@c <en>If someone commits some changes in one cvs command,
@c <en>then an update by someone else will either get all the
@c <en>changes, or none of them.
Se alguém ???commits??? algumas mudanças com um comando
cvs, então um ???update??? por outra pessoa vai obter
ou todas as mudanças, ou nenhuma.
@end quotation

@noindent
@c <en>but @sc{cvs} does @emph{not} have this property.  For
@c <en>example, given the files
mas o @sc{cvs} @emph{não} tem esta propriedade.  Por
exemplo, dados os arquivos

@example
a/one.c
a/two.c
b/three.c
b/four.c
@end example

@noindent
@c <en>if someone runs
se alguém rodar

@example
cvs ci a/two.c b/three.c
@end example

@noindent
@c <en>and someone else runs @code{cvs update} at the same
@c <en>time, the person running @code{update} might get only
@c <en>the change to @file{b/three.c} and not the change to
@c <en>@file{a/two.c}.
e outra pessoa rodar @code{cvs update} no mesmo
momento, a pessoa rodando @code{update} pode receber
apenas as alterações feitas em @file{b/three.c} e não
receber as feitas em @file{a/two.c}.

@c <en>@node Watches
@node ???Watches???
@c <en>@section Mechanisms to track who is editing files
@section Mechanisms to track who is editing files
@c <en>@cindex Watches
@cindex ???Watches???

@c <en>For many groups, use of @sc{cvs} in its default mode is
@c <en>perfectly satisfactory.  Users may sometimes go to
@c <en>check in a modification only to find that another
@c <en>modification has intervened, but they deal with it and
@c <en>proceed with their check in.  Other groups prefer to be
@c <en>able to know who is editing what files, so that if two
@c <en>people try to edit the same file they can choose to
@c <en>talk about who is doing what when rather than be
@c <en>surprised at check in time.  The features in this
@c <en>section allow such coordination, while retaining the
@c <en>ability of two developers to edit the same file at the
@c <en>same time.
Para muitos grupos, o uso do @sc{cvs} em sua forma
padrão é perfeitamente satisfatório.  Os usuários vão
algumas vezes ???check in??? uma modificação e
descobrir que outras intervenções foram feitas, mas
eles tratam isto e seguem em frente com o ???check
in???.  Outros grupos preferem ser capazes de saber
quem está editando quais arquivos, de forma que se duas
pessoas tentam editar o mesmo arquivo elas podem
conversar sobre quem vai editar o que ao invés de serem
surpreendidos na hora do ???check in???.  As
funcionalidades nesta seção permitem tal nível de
coordenação, sem abrir mão da possibilidade de que dois
desenvolvedores editem o mesmo arquivo ao mesmo tempo.

@c Some people might ask why CVS does not enforce the
@c rule on chmod, by requiring a cvs edit before a cvs
@c commit.  The main reason is that it could always be
@c circumvented--one could edit the file, and
@c then when ready to check it in, do the cvs edit and put
@c in the new contents and do the cvs commit.  One
@c implementation note: if we _do_ want to have cvs commit
@c require a cvs edit, we should store the state on
@c whether the cvs edit has occurred in the working
@c directory, rather than having the server try to keep
@c track of what working directories exist.
@c FIXME: should the above discussion be part of the
@c manual proper, somewhere, not just in a comment?
@c <en>For maximum benefit developers should use @code{cvs
@c <en>edit} (not @code{chmod}) to make files read-write to
@c <en>edit them, and @code{cvs release} (not @code{rm}) to
@c <en>discard a working directory which is no longer in use,
@c <en>but @sc{cvs} is not able to enforce this behavior.
Para um máximo apreveitamento, os desenvolvedores devem
usar @code{cvs edit} (e não @code{chmod}) para tornar
os arquivos com permissão de leitura e escrita para
editá-los, e @code{cvs release} (não @code{rm}) para
descartar um diretório de trabalho que não está mais em
uso, mas o @sc{cvs} não é capaz de obrigar tal
comportamento.

@c I'm a little dissatisfied with this presentation,
@c because "watch on"/"edit"/"editors" are one set of
@c functionality, and "watch add"/"watchers" is another
@c which is somewhat orthogonal even though they interact in
@c various ways.  But I think it might be
@c confusing to describe them separately (e.g. "watch
@c add" with loginfo).  I don't know.

@menu
@c <en>* Setting a watch::             Telling CVS to watch certain files
* Ajustando um ???watch???::    Dizendo ao CVS para ???watch??? certos arquivos
@c <en>* Getting Notified::            Telling CVS to notify you
* Recebendo Notificações::      Dizendo ao CVS para te notificar
@c <en>* Editing files::               How to edit a file which is being watched
* Editando arquivos::           Como editar um arquivo que está sendo ???watched???
@c <en>* Watch information::           Information about who is watching and editing
* Informações de ???Watch???::  Informações a respeito de quem
                                está ???watching??? e quem está editando
@c <en>* Watches Compatibility::       Watches interact poorly with CVS 1.6 or earlier
* Compatibilidade de ???Watches???::   ???Watches??? interagem fracamente
                                       com CVS 1.6 ou anteriores
@end menu

@c <en>@node Setting a watch
@node Ajustando um ???watch???
@c <en>@subsection Telling CVS to watch certain files
@subsection Dizendo ao CVS para ???watch??? certos arquivos

@c <en>To enable the watch features, you first specify that
@c <en>certain files are to be watched.
Para habilitar a funcionalidade de ???watch???, você
deve primeiro especificar que certos arquivos devem ser
???watched???.

@c <en>@cindex watch on (subcommand)
@cindex watch on (subcomando)
@c <en>@deffn Command {cvs watch on} [@code{-lR}] [@var{files}]@dots{}
@deffn Comando {cvs watch on} [@code{-lR}] [@var{arquivos}]@dots{}

@c <en>@cindex Read-only files, and watches
@cindex Arquivos somente leitura, e ???watches???
@c <en>Specify that developers should run @code{cvs edit}
@c <en>before editing @var{files}.  @sc{cvs} will create working
@c <en>copies of @var{files} read-only, to remind developers
@c <en>to run the @code{cvs edit} command before working on
@c <en>them.
Especifique que os desenvolvedores devem rodar o
@code{cvs edit} antes de editar arquivos
@var{arquivos}.  O @sc{cvs} vai criar cópias de
trabalho dos @var{arquivos} como somente-leitura, para
lembrar os desenvolvedores de rodarem o comando
@code{cvs edit} antes de trabalhar neles.

@c <en>If @var{files} includes the name of a directory, @sc{cvs}
@c <en>arranges to watch all files added to the corresponding
@c <en>repository directory, and sets a default for files
@c <en>added in the future; this allows the user to set
@c <en>notification policies on a per-directory basis.  The
@c <en>contents of the directory are processed recursively,
@c <en>unless the @code{-l} option is given.
@c <en>The @code{-R} option can be used to force recursion if the @code{-l}
@c <en>option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
Se @var{arquivos} inclui o nome de uma diretório, o
@sc{cvs} faz ???watch??? em todos os arquivos
adicionados ao diretório correspondente do repositório,
e ajusta um padrão para arquivos adicionados no futuro;
isto permite que o usuário ajuste as políticas de
notificação baseada em diretórios.  O conteúdo do
diretório é processado recursivamente, a menos que a
opção @code{-l} seja dada. A opção @code{-R} pode ser
usada para forçar recursão se a opção @code{-l} está
ativada em @file{~/.cvsrc} (@pxref{~/.cvsrc}).

@c <en>If @var{files} is omitted, it defaults to the current directory.
Se @var{arquivos} é omitido, o padrão é o diretório atual.

@c <en>@cindex watch off (subcommand)
@cindex watch off (subcomando)
@end deffn

@c <en>@deffn Command {cvs watch off} [@code{-lR}] [@var{files}]@dots{}
@deffn Comando {cvs watch off} [@code{-lR}] [@var{arquivos}]@dots{}

@c <en>Do not create @var{files} read-only on checkout; thus,
@c <en>developers will not be reminded to use @code{cvs edit}
@c <en>and @code{cvs unedit}.
Não cria @var{arquivos} somente-leitura no
???checkout???; portanto, os desenvolvedores não serão
lembrados de usar @code{cvs edit} e @code{cvs unedit}.
@ignore
@sc{cvs} will check out @var{files}
read-write as usual, unless other permissions override
due to the @code{PreservePermissions} option being
enabled in the @file{config} administrative file
(@pxref{Special Files}, @pxref{config})
@end ignore

@c <en>The @var{files} and options are processed as for @code{cvs
@c <en>watch on}.
Os @var{arquivos} e opções são processados como no
@code{cvs watch on}.

@end deffn

@c <en>@node Getting Notified
@node Recebendo Notificações
@c <en>@subsection Telling CVS to notify you
@subsection Dizendo ao CVS para te notificar

@c <en>You can tell @sc{cvs} that you want to receive
@c <en>notifications about various actions taken on a file.
@c <en>You can do this without using @code{cvs watch on} for
@c <en>the file, but generally you will want to use @code{cvs
@c <en>watch on}, to remind developers to use the @code{cvs edit}
@c <en>command.
Você pode dizer ao @sc{cvs} que você quer receber
notificações sobre várias ações tomadas em um
arquivo. Você pode fazer isto sem usar o @code{cvs
watch on} para o arquivo, mas geralmente você vai
querer usar @code{cvs watch on}, para lembrar os
desenvolvedores de usar o comando @code{cvs edit}.

@c <en>@cindex watch add (subcommand)
@cindex watch add (subcomando)
@c <en>@deffn Command {cvs watch add} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
@deffn Comando {cvs watch add} [@code{-lR}] [@code{-a} @var{ação}]@dots{} [@var{arquivos}]@dots{}

@c <en>Add the current user to the list of people to receive notification of
@c <en>work done on @var{files}.
Adiciona o usuário atual à lista de pessoas que recebem
notificações sobre o trabalho feito em @var{arquivos}.

@c <en>The @code{-a} option specifies what kinds of events @sc{cvs} should notify
@c <en>the user about.  @var{action} is one of the following:
A opção @code{-a} especifica quais tipos de eventos o
@sc{cvs} deve notificar o usuário.  @var{ação} é uma
das seguintes:

@table @code

@c <en>@item edit
@item edit
@c <en>Another user has applied the @code{cvs edit} command (described
@c <en>below) to a watched file.
Outro usuário executou o comando @code{cvs edit}
(descrito abaixo) para um arquivo ???watched???.

@c <en>@item commit
@item commit
@c <en>Another user has committed changes to one of the named @var{files}.
Outro usuário fez ???commit??? em mudanças em um dos @var{arquivos}.

@c <en>@item unedit
@item unedit
@c <en>Another user has abandoned editing a file (other than by committing changes).
@c <en>They can do this in several ways, by:
Outro usuário abandonou a edição de um arquivo (sem ser
por ???committing??? mudanças). Eles podem fazer isto
de várias maneiras:

@itemize @bullet

@item
@c <en>applying the @code{cvs unedit} command (described below) to the file
rodando o comando @code{cvs unedit} (descrito abaixo)
no arquivo

@item
@c <en>applying the @code{cvs release} command (@pxref{release}) to the file's parent directory
@c <en>(or recursively to a directory more than one level up)
rodando o comando @code{cvs release} (@pxref{release})
no diretório pai do arquivo
(ou num diretório mais acima recursivamente)

@item
@c <en>deleting the file and allowing @code{cvs update} to recreate it
apagando o arquivo e permitindo que o @code{cvs update} o recrie

@end itemize

@c <en>@item all
@item all
@c <en>All of the above.
Todos acima.

@c <en>@item none
@item none
@c <en>None of the above.  (This is useful with @code{cvs edit},
@c <en>described below.)
Nenhum dos acima.  (Isto é útil com o @code{cvs edit},
descrito abaixo.)

@end table

@c <en>The @code{-a} option may appear more than once, or not at all.  If
@c <en>omitted, the action defaults to @code{all}.
A opção @code{-a} pode aparecer mais de uma vez, ou
nenhuma vez.  Se não aparecer, a ação padrão é @code{all}.

@c <en>The @var{files} and options are processed as for
@c <en>@code{cvs watch on}.
Os @var{arquivos} e opções são processados como no
@code{cvs watch on}.

@end deffn


@c <en>@cindex watch remove (subcommand)
@cindex watch remove (subcomando)
@c <en>@deffn Command {cvs watch remove} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
@deffn Comando {cvs watch remove} [@code{-lR}] [@code{-a} @var{ação}]@dots{} [@var{arquivos}]@dots{}

@c <en>Remove a notification request established using @code{cvs watch add};
@c <en>the arguments are the same.  If the @code{-a} option is present, only
@c <en>watches for the specified actions are removed.
Remove um pedido de notificação posto por um @code{cvs
watch add}; Os argumentos são os mesmos.  Se a opção
@code{-a} está presente, apenas os ???watches??? para as
ações especificadas são removidos.

@end deffn

@c <en>@cindex notify (admin file)
@cindex notify (arquivo administrativo)
@c <en>When the conditions exist for notification, @sc{cvs}
@c <en>calls the @file{notify} administrative file.  Edit
@c <en>@file{notify} as one edits the other administrative
@c <en>files (@pxref{Intro administrative files}).  This
@c <en>file follows the usual conventions for administrative
@c <en>files (@pxref{syntax}), where each line is a regular
@c <en>expression followed by a command to execute.  The
@c <en>command should contain a single occurrence of @samp{%s}
@c <en>which will be replaced by the user to notify; the rest
@c <en>of the information regarding the notification will be
@c <en>supplied to the command on standard input.  The
@c <en>standard thing to put in the @code{notify} file is the
@c <en>single line:
Quando as condições existem para a notificação, o
@sc{cvs} chama o arquivo administrativo @file{notify}.
Edite o @file{notify} da mesma forma que se edita os
outros arquivos administrativos (@pxref{Intro aos
arquivos administrativos}).  Este arquivo segue as
convenções usuais para arquivos administrativos
(@pxref{syntax}), onde cada linha é uma expressão
regular seguida de um comando para executar.  O comando
pode conter uma única ocorrência de @samp{%s} que é
substituída pelo usuário a ser notificado; o resto da
informação a respeito  da notificação vai ser fornecida
ao comando na entrada padrão.  O padrão para botar no
arquivo @code{notify} é esta única linha:

@example
ALL mail %s -s "CVS notification"
@end example

@noindent
@c <en>This causes users to be notified by electronic mail.
Isto faz com que os usuários sejam avisados por correio
eletrônico.
@c FIXME: should it be this hard to set up this
@c behavior (and the result when one fails to do so,
@c silent failure to notify, so non-obvious)?  Should
@c CVS give a warning if no line in notify matches (and
@c document the use of "DEFAULT :" for the case where
@c skipping the notification is indeed desired)?

@c <en>@cindex users (admin file)
@cindex users (arquivo administrativo)
@c <en>Note that if you set this up in the straightforward
@c <en>way, users receive notifications on the server machine.
@c <en>One could of course write a @file{notify} script which
@c <en>directed notifications elsewhere, but to make this
@c <en>easy, @sc{cvs} allows you to associate a notification
@c <en>address for each user.  To do so create a file
@c <en>@file{users} in @file{CVSROOT} with a line for each
@c <en>user in the format @var{user}:@var{value}.  Then
@c <en>instead of passing the name of the user to be notified
@c <en>to @file{notify}, @sc{cvs} will pass the @var{value}
@c <en>(normally an email address on some other machine).
Observe que se você ajusta isto na forma que está, os
usuários vão receber as notificações na máquina
servidora.  Alguém pode escrever um script
@file{notify} que direcione notificações para outro
lugar, mas para tornar isto fácil, o @sc{cvs} permite
associar um endereço de notificação para cada usuário.
Para isto crie um arquivo @file{users} em
@file{CVSROOT} com uma linha para cada usuário no
formato @var{usuário}:@var{valor}.  Então, ao invés de
passar o nome do usuário a ser notificado para
@file{notify}, o @sc{cvs} vai passar @var{valor}
(normalmente um endereço de email em alguma outra máquina).

@c <en>@sc{cvs} does not notify you for your own changes.
@c <en>Currently this check is done based on whether the user
@c <en>name of the person taking the action which triggers
@c <en>notification matches the user name of the person
@c <en>getting notification.  In fact, in general, the watches
@c <en>features only track one edit by each user.  It probably
@c <en>would be more useful if watches tracked each working
@c <en>directory separately, so this behavior might be worth
@c <en>changing.
O @sc{cvs} não notifica você de suas próprias
mudanças.  Atualmente esta checagem é feita baseada
comparando o nome de usuário da pessoa que executou a
ação que disparou a notificação com o nome de usuário
da pessoa sendo notificada.  De fato, em geral, as
funcionalidades de ???watches??? ???only track one
edit??? para cada usuário.  Seria provavelmente mais
útil se ???watches??? ???tracked??? cada diretório de
trabalho separadamente, logo este comportamento ???might be worth
changing???.
@c "behavior might be worth changing" is an effort to
@c point to future directions while also not promising
@c that "they" (as in "why don't they fix CVS to....")
@c will do this.
@c one implementation issue is identifying whether a
@c working directory is same or different.  Comparing
@c pathnames/hostnames is hopeless, but having the server
@c supply a serial number which the client stores in the
@c CVS directory as a magic cookie should work.

@c <en>@node Editing files
@node Editando arquivos
@c <en>@subsection How to edit a file which is being watched
@subsection Como editar um arquivo que está sendo ???watched???

@c <en>@cindex Checkout, as term for getting ready to edit
@cindex Checkout, as term for getting ready to edit
@c <en>Since a file which is being watched is checked out
@c <en>read-only, you cannot simply edit it.  To make it
@c <en>read-write, and inform others that you are planning to
@c <en>edit it, use the @code{cvs edit} command.  Some systems
@c <en>call this a @dfn{checkout}, but @sc{cvs} uses that term
@c <en>for obtaining a copy of the sources (@pxref{Getting the
@c <en>source}), an operation which those systems call a
@c <en>@dfn{get} or a @dfn{fetch}.
Já que um arquivo que está sendo ???watched??? é
???checked out??? somente-leitura, você não pode
simplesmente editá-lo.  Para torná-lo leitura-escrita,
e informaar outros que você está planejando editá-lo,
use o comando @code{cvs edit}.  Alguns sistemas chamam
isto de @dfn{checkout}, mas o @sc{cvs} usa este termo
para obter uma cópia dos fontes (@pxref{Obtendo os
fontes}), uma operação que estes sistemas chamam de
@dfn{get} ou @dfn{fetch}.
@c Issue to think about: should we transition CVS
@c towards the "get" terminology?  "cvs get" is already a
@c synonym for "cvs checkout" and that section of the
@c manual refers to "Getting the source".  If this is
@c done, needs to be done gingerly (for example, we should
@c still accept "checkout" in .cvsrc files indefinitely
@c even if the CVS's messages are changed from "cvs checkout: "
@c to "cvs get: ").
@c There is a concern about whether "get" is not as
@c good for novices because it is a more general term
@c than "checkout" (and thus arguably harder to assign
@c a technical meaning for).

@c <en>@cindex edit (subcommand)
@cindex edit (subcomando)
@c <en>@deffn Command {cvs edit} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{}
@deffn Comando {cvs edit} [@code{-lR}] [@code{-a} @var{ação}]@dots{} [@var{arquivos}]@dots{}

@c <en>Prepare to edit the working files @var{files}.  @sc{cvs} makes the
@c <en>@var{files} read-write, and notifies users who have requested
@c <en>@code{edit} notification for any of @var{files}.
Prepara para serem editados os @var{files} do diretório
de trabalho.  O @sc{cvs} faz os @var{arquivos}
leitura-escrita, e notifica os usuários que pediram
notificação de @code{edit} para quaisquer dos @var{arquivos}.

@c <en>The @code{cvs edit} command accepts the same options as the
@c <en>@code{cvs watch add} command, and establishes a temporary watch for the
@c <en>user on @var{files}; @sc{cvs} will remove the watch when @var{files} are
@c <en>@code{unedit}ed or @code{commit}ted.  If the user does not wish to
@c <en>receive notifications, she should specify @code{-a none}.
O comando @code{cvs edit} acita as mesmas opções que o
comando @code{cvs watch add}, e estabelece um
???watch??? temporário para o usuário nos
@var{arquivos}; @sc{cvs} vai remover o ???watch??? quando @var{arquivos} forem
@code{unedit}ados ou @code{commit}ados (argh!!!,
''commitados'' é horrível).  Se o usuário não deseja
receber notificações, deve especificar @code{-a none}.

@c <en>The @var{files} and the options are processed as for the @code{cvs
@c <en>watch} commands.
Os @var{arquivos} e as opções são processadas como nos comandos @code{cvs
watch}.

@ignore
@strong{Caution: If the @code{PreservePermissions}
option is enabled in the repository (@pxref{config}),
@sc{cvs} will not change the permissions on any of the
@var{files}.  The reason for this change is to ensure
that using @samp{cvs edit} does not interfere with the
ability to store file permissions in the @sc{cvs}
repository.}
@end ignore

@end deffn

@c <en>Normally when you are done with a set of changes, you
@c <en>use the @code{cvs commit} command, which checks in your
@c <en>changes and returns the watched files to their usual
@c <en>read-only state.  But if you instead decide to abandon
@c <en>your changes, or not to make any changes, you can use
@c <en>the @code{cvs unedit} command.
Normalmente quando você termina com um conjunto de
mudanças, você usa o comando @code{cvs commit}, que
???checks in??? suas mudanças e retorna os arquivos
???watched??? a seus estados usuais de somente-leitura.
Mas se você ao invés disto decide abandonar suas
mudanças, ou não fazer nenhuma mudança, você pode usar
o comando @code{cvs unedit}.

@c <en>@cindex unedit (subcommand)
@cindex unedit (subcomando)
@c <en>@cindex Abandoning work
@cindex Abandonando o trabalho
@c <en>@cindex Reverting to repository version
@cindex Revertendo para a versão do repositório
@c <en>@deffn Command {cvs unedit} [@code{-lR}] [@var{files}]@dots{}
@deffn Comando {cvs unedit} [@code{-lR}] [@var{arquivos}]@dots{}

@c <en>Abandon work on the working files @var{files}, and revert them to the
@c <en>repository versions on which they are based.  @sc{cvs} makes those
@c <en>@var{files} read-only for which users have requested notification using
@c <en>@code{cvs watch on}.  @sc{cvs} notifies users who have requested @code{unedit}
@c <en>notification for any of @var{files}.
Abandona o trabalho nos @var{arquivos} no diretório de
tabalho, e reverte eles às versões do repositório nas
quais eles foram baseados.  O @sc{cvs} faz estes
@var{arquivos} somente-leitura ???for which users have
requested notification??? usando @code{cvs watch on}.
@sc{cvs} notifica os usuários que pediram notificações
do tipo @code{unedit} para quaisquer dos @var{arquivos}.

@c <en>The @var{files} and options are processed as for the
@c <en>@code{cvs watch} commands.
Os @var{arquivos} e opções são processados como nos comandos
@code{cvs watch}.

@c <en>If watches are not in use, the @code{unedit} command
@c <en>probably does not work, and the way to revert to the
@c <en>repository version is with the command @code{cvs update -C file}
@c <en>(@pxref{update}).
@c <en>The meaning is
@c <en>not precisely the same; the latter may also
@c <en>bring in some changes which have been made in the
@c <en>repository since the last time you updated.
Se ???watches??? não estão em uso, o comando
@code{unedit} provavelmente não vai fazer nada, e a
forma de reverter à versão do repositório é com o
comando @code{cvs update -C arquivo} (@pxref{update}).
O significado não é exatamente o mesmo; a última forma
pode também trazer algumas mudanças que foram feitas no
repositório desde a última vez que você atualizou (fez
update).
@c It would be a useful enhancement to CVS to make
@c unedit work in the non-watch case as well.
@end deffn

@c <en>When using client/server @sc{cvs}, you can use the
@c <en>@code{cvs edit} and @code{cvs unedit} commands even if
@c <en>@sc{cvs} is unable to successfully communicate with the
@c <en>server; the notifications will be sent upon the next
@c <en>successful @sc{cvs} command.
Quando usando o @sc{cvs} como cliente/servidor, você
pode usar os comandos @code{cvs edit} e @code{cvs
unedit} mesmo se o @sc{cvs} é incapaz de estabelecer
comunicação com o servidor; as notificações vão ser
mandadas junto com o próximo comando bem sucedido do
@sc{cvs}.

@c <en>@node Watch information
@node Informações de ???Watch???
@c <en>@subsection Information about who is watching and editing
@subsection Informações sobre quem está ???watching??? e editando

@c <en>@cindex watchers (subcommand)
@cindex watchers (subcomando)
@c <en>@deffn Command {cvs watchers} [@code{-lR}] [@var{files}]@dots{}
@deffn Comando {cvs watchers} [@code{-lR}] [@var{arquivos}]@dots{}

@c <en>List the users currently watching changes to @var{files}.  The report
@c <en>includes the files being watched, and the mail address of each watcher.
Lista os usuários que estão atualmente ???watching???
mudanças em @var{arquivos}.  O relatório inclui os
arquivos sendo ???watched???, e o endereço de e-mail de
cada ???watcher???.

@c <en>The @var{files} and options are processed as for the
@c <en>@code{cvs watch} commands.
Os @var{arquivos} e opções são processados como nos comandos
@code{cvs watch}.

@end deffn


@c <en>@cindex editors (subcommand)
@cindex editors (subcommand)
@c <en>@deffn Command {cvs editors} [@code{-lR}] [@var{files}]@dots{}
@deffn Command {cvs editors} [@code{-lR}] [@var{files}]@dots{}

@c <en>List the users currently working on @var{files}.  The report
@c <en>includes the mail address of each user, the time when the user began
@c <en>working with the file, and the host and path of the working directory
@c <en>containing the file.
Lista os usuários atualmente trabalhando em
@var{arquivos}.  O relatório inclui o endereço de
e-mail de cada usuário, o momento no qual o usuário
começou a trabalhar com o arquivo, e a máquina e
caminho do diretório de trabalho contendo o arquivo.

@c <en>The @var{files} and options are processed as for the
@c <en>@code{cvs watch} commands.
Os @var{arquivos} e opções são processados como nos comandos
@code{cvs watch}.

@end deffn

@c <en>@node Watches Compatibility
@node Compatibilidade de ???Watches???
@c <en>@subsection Using watches with old versions of CVS
@subsection Using watches with old versions of CVS

@c <en>@cindex CVS 1.6, and watches
@cindex CVS 1.6, and watches
@c <en>If you use the watch features on a repository, it
@c <en>creates @file{CVS} directories in the repository and
@c <en>stores the information about watches in that directory.
@c <en>If you attempt to use @sc{cvs} 1.6 or earlier with the
@c <en>repository, you get an error message such as the
@c <en>following (all on one line):
If you use the watch features on a repository, it
creates @file{CVS} directories in the repository and
stores the information about watches in that directory.
If you attempt to use @sc{cvs} 1.6 or earlier with the
repository, you get an error message such as the
following (all on one line):

@example
cvs update: cannot open CVS/Entries for reading:
No such file or directory
@end example

@noindent
@c <en>and your operation will likely be aborted.  To use the
@c <en>watch features, you must upgrade all copies of @sc{cvs}
@c <en>which use that repository in local or server mode.  If
@c <en>you cannot upgrade, use the @code{watch off} and
@c <en>@code{watch remove} commands to remove all watches, and
@c <en>that will restore the repository to a state which
@c <en>@sc{cvs} 1.6 can cope with.
and your operation will likely be aborted.  To use the
watch features, you must upgrade all copies of @sc{cvs}
which use that repository in local or server mode.  If
you cannot upgrade, use the @code{watch off} and
@code{watch remove} commands to remove all watches, and
that will restore the repository to a state which
@sc{cvs} 1.6 can cope with.

@c <en>@node Choosing a model
@node Escolhendo um modelo
@c <en>@section Choosing between reserved or unreserved checkouts
@section Escolhendo entre ???checkouts??? reservados ou não-reservados
@c <en>@cindex Choosing, reserved or unreserved checkouts
@cindex Escolhendo, ???checkouts??? reservados ou não-reservados

@c <en>Reserved and unreserved checkouts each have pros and
@c <en>cons.  Let it be said that a lot of this is a matter of
@c <en>opinion or what works given different groups' working
@c <en>styles, but here is a brief description of some of the
@c <en>issues.  There are many ways to organize a team of
@c <en>developers.  @sc{cvs} does not try to enforce a certain
@c <en>organization.  It is a tool that can be used in several
@c <en>ways.
???Checkouts??? reservados e não-reservados têem cada
um prós e contras.  Digamos que muito disto é
uma questão de opinião ou que funciona dependendo dos
diferentes estilos de trabalho em grupo, mas aqui está
uma breve descrição de alguns dos aspectos.  Existem
muitas formas de organizar um time de desenvolvedores.
O @sc{cvs} não tenta induzir uma determinada forma de se
organizar.  Ele é uma ferramenta que pode ser usada de
várias maneiras.

@c <en>Reserved checkouts can be very counter-productive.  If
@c <en>two persons want to edit different parts of a file,
@c <en>there may be no reason to prevent either of them from
@c <en>doing so.  Also, it is common for someone to take out a
@c <en>lock on a file, because they are planning to edit it,
@c <en>but then forget to release the lock.
Checkout reservado pode ser bastante improdutivo.  Se
duas pessoas quiserem editar diferentes partes de um
mesmo arquivo, não há motivos para proibir nenhuma
delas.  Além disto, é normal alguém travar um arquivo
por que planeja editá-lo, mas então esquecer de destravar.

@c "many groups"?  specifics?  cites to papers on this?
@c some way to weasel-word it a bit more so we don't
@c need facts :-)?
@c <en>People, especially people who are familiar with
@c <en>reserved checkouts, often wonder how often conflicts
@c <en>occur if unreserved checkouts are used, and how
@c <en>difficult they are to resolve.  The experience with
@c <en>many groups is that they occur rarely and usually are
@c <en>relatively straightforward to resolve.
As pessoas, especialmente aquelas acostumadas com
???checkouts??? reservados, freqüentemente pensam sobre
a freqüencia com que conlitos acontecem quando
???checkouts??? não-reservados estão em uso, e o quão
difíceis eles são de resolver.  A experiência de muitos
grupos é que os conflitos ocorrem raramente e em geral
são relativamente fáceis de resolver.

@c <en>The rarity of serious conflicts may be surprising, until one realizes
@c <en>that they occur only when two developers disagree on the proper design
@c <en>for a given section of code; such a disagreement suggests that the
@c <en>team has not been communicating properly in the first place.  In order
@c <en>to collaborate under @emph{any} source management regimen, developers
@c <en>must agree on the general design of the system; given this agreement,
@c <en>overlapping changes are usually straightforward to merge.
A dificuldade para encontrar conflitos sérios pode ser
surpreendente, até se perceber que eles ocorrem apenas
quando dois desenvolvedores discordam mesmo é no
projeto de uma dada seção do código; tal desacordo
indica a princípio que a equipe não está se comunicando
direito.  Para colaborar em @emph{qualquer} regime de
gerenciamento de código, os desenvolvedores devem
concordar com o projeto geral do sistema; com este
acordo, mudanças sobrepostas são em geral simples de
mesclar.

@c <en>In some cases unreserved checkouts are clearly
@c <en>inappropriate.  If no merge tool exists for the kind of
@c <en>file you are managing (for example word processor files
@c <en>or files edited by Computer Aided Design programs), and
@c <en>it is not desirable to change to a program which uses a
@c <en>mergeable data format, then resolving conflicts is
@c <en>going to be unpleasant enough that you generally will
@c <en>be better off to simply avoid the conflicts instead, by
@c <en>using reserved checkouts.
Em alguns casos, ???checkouts??? não-reservados são
claramente inapropriados.  Se não existe uma ferramenta
de mescla para o tipo de arquivo que você está lidando
(por exemplo, arquivos de processadores de texto ou
arquivos editados por programas de ???Computer Aided
Design???), e não é desejável mudar para um programa
que usa um formato de dados que se possa mesclar, então
resolver conflitos se torna tão desagradável que você
vai estar melhor simplesmente evitando-os, com o uso de
???checkouts??? não-reservados.

@c <en>The watches features described above in @ref{Watches}
@c <en>can be considered to be an intermediate model between
@c <en>reserved checkouts and unreserved checkouts.  When you
@c <en>go to edit a file, it is possible to find out who else
@c <en>is editing it.  And rather than having the system
@c <en>simply forbid both people editing the file, it can tell
@c <en>you what the situation is and let you figure out
@c <en>whether it is a problem in that particular case or not.
@c <en>Therefore, for some groups it can be considered the
@c <en>best of both the reserved checkout and unreserved
@c <en>checkout worlds.
As funcionalidade de ???watches??? descritas acima em
@ref{???Watches???} podem ser consideradas um modelo
intermediário entre ???checkouts??? reservados e
???checkouts??? não-reservados.  Quando você vai editar
um arquivo, é possível descobrir quem o está editando.
E ao invés de simplesmente o sistema proibir os dois de
trabalhar, ele pode dizer como está a situação e deixar
você decidir se isto é ou não é um problema neste caso
específico. Portanto, para alguns grupos esta é o
melhor dos dois mundos de ???checkouts??? reservados e
???checkouts??? não-reservados.

@c ---------------------------------------------------------------------
@c <en>@node Revision management
@node Gerenciamento de revisões
@c <en>@chapter Revision management
@chapter Gerenciamento de revisões
@c <en>@cindex Revision management
@cindex Gerenciamento de revisões

@c -- This chapter could be expanded a lot.
@c -- Experiences are very welcome!

@c <en>If you have read this far, you probably have a pretty
@c <en>good grasp on what @sc{cvs} can do for you.  This
@c <en>chapter talks a little about things that you still have
@c <en>to decide.
Se você leu até este ponto, você provavelmente tem uma
boa noção do que o @sc{cvs} pode fazer por você.  Este
capítulo fala um pouco sobre coisas que ainda cabe a
você decidir.

@c <en>If you are doing development on your own using @sc{cvs}
@c <en>you could probably skip this chapter.  The questions
@c <en>this chapter takes up become more important when more
@c <en>than one person is working in a repository.
Se você está desenvolvendo sozinho com o @sc{cvs}, você
provavelmente pode pular este capítulo.  As questões
que este capítulo levanta são mais importante quando
mais de uma pessoa está trabalhando num mesmo repositório.

@menu
@c <en>* When to commit::              Some discussion on the subject
* Quando ???commit???::        Alguma discussão sobre o assunto
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node When to commit
@node Quando ???commit???
@c <en>@section When to commit?
@section Quando ???commit??? ?
@c <en>@cindex When to commit
@cindex Quando ???commit???
@c <en>@cindex Committing, when to
@cindex ???Committing???, quando
@c <en>@cindex Policy
@cindex Política

@c <en>Your group should decide which policy to use regarding
@c <en>commits.  Several policies are possible, and as your
@c <en>experience with @sc{cvs} grows you will probably find
@c <en>out what works for you.
Seu grupo deve decidir qual vai ser a política a
respeito de ???commits???.  Várias políticas são
possíveis, e à medida que sua experiência com o
@sc{cvs} crescer, você provavelmente vai encontrar a
que funciona com você.

@c <en>If you commit files too quickly you might commit files
@c <en>that do not even compile.  If your partner updates his
@c <en>working sources to include your buggy file, he will be
@c <en>unable to compile the code.  On the other hand, other
@c <en>persons will not be able to benefit from the
@c <en>improvements you make to the code if you commit very
@c <en>seldom, and conflicts will probably be more common.
Se você ???commit??? arquivos muito rapidamente
provavelmente você vai ???commit??? arquivos que nem
mesmo compilam.  Se seu parceiro atualiza as cópias de
trabalho dele e inclui seu arquivo bichado, ele não vai
conseguir compilar o código.  Por outro lado, as outras
pessoas não vão poder se beneficiar das melhorias que
você fizer no código se você ???commit??? muito
raramente, e os conflitos provavelmente vão aumentar.

@c <en>It is common to only commit files after making sure
@c <en>that they can be compiled.  Some sites require that the
@c <en>files pass a test suite.  Policies like this can be
@c <en>enforced using the commitinfo file
@c <en>(@pxref{commitinfo}), but you should think twice before
@c <en>you enforce such a convention.  By making the
@c <en>development environment too controlled it might become
@c <en>too regimented and thus counter-productive to the real
@c <en>goal, which is to get software written.
É comum apenas ???commit??? arquivos depois de se
certificar que eles podem ser compilados.  Alguns
lugares exigem que os arquivos passem num conjunto de
testes.  Políticas deste tipo podem ser impostas usando
o arquivo commitinfo (@pxref{commitinfo}), mas você
deve pensar duas vezes antes de impor tal convenção.
Tornando o ambiente de desenvolvimento muito controlado
ele se torna muito rígido e contraprodutivo para o
objetivo real, que é ter o software escrito.

@c ---------------------------------------------------------------------
@c <en>@node Keyword substitution
@node Substituição de palavra-chave
@c <en>@chapter Keyword substitution
@chapter Substituição de palavra-chave
@c <en>@cindex Keyword substitution
@cindex Substituição de palavra-chave
@c <en>@cindex Keyword expansion
@cindex Expansão de palavra-chave
@c <en>@cindex Identifying files
@cindex Identificando arquivos

@comment   Be careful when editing this chapter.
@comment   Remember that this file is kept under
@comment   version control, so we must not accidentally
@comment   include a valid keyword in the running text.

@c <en>As long as you edit source files inside a working
@c <en>directory you can always find out the state of
@c <en>your files via @samp{cvs status} and @samp{cvs log}.
@c <en>But as soon as you export the files from your
@c <en>development environment it becomes harder to identify
@c <en>which revisions they are.
À medida em que você edita arquivos fonte dentro de um
diretório de trabalho você pode sempre obter o estado
de seus arquivos via @samp{cvs status} e @samp{cvs
log}.  Mas assim que você exporta os arquivos de seu
ambiente de desenvolvimento se torna mais difícil dizer
de quais revisões eles são.

@c <en>@sc{cvs} can use a mechanism known as @dfn{keyword
@c <en>substitution} (or @dfn{keyword expansion}) to help
@c <en>identifying the files.  Embedded strings of the form
@c <en>@code{$@var{keyword}$} and
@c <en>@code{$@var{keyword}:@dots{}$} in a file are replaced
@c <en>with strings of the form
@c <en>@code{$@var{keyword}:@var{value}$} whenever you obtain
@c <en>a new revision of the file.
O @sc{cvs} pode usar um mecanismo chamado de
@dfn{substituição de palavra-chave} (ou @dfn{expansão
de palavra-chave}) para ajudar na identificação de
arquivos.  Strings embutidas na forma @code{$@var{keyword}$} e
@code{$@var{keyword}:@dots{}$} em um arquivo são
substituídas por strings da forma
@code{$@var{keyword}:@var{value}$} sempre que você obtém
uma nova revisão do arquivo.

@menu
@c <en>* Keyword list::                   Keywords
* Lista de palavras-chave::            Palavras-chave
@c <en>* Using keywords::                 Using keywords
* Usando palavras-chave::              Usando Palavras-chave
@c <en>* Avoiding substitution::          Avoiding substitution
* Evitando substituições::             Evitando substituições
@c <en>* Substitution modes::             Substitution modes
* Modos de substituição::              Modos de substituição
@c <en>* Configuring keyword expansion::  Configuring keyword expansion
* Configurando a expansão do teclado:: Configurando a expansão do teclado
@c <en>* Log keyword::                    Problems with the $@splitrcskeyword{}Log$ keyword.
* Log keyword::                    Problemas com a palavra-chave $@splitrcskeyword{}Log$.
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Keyword list
@node Lista de palavras-chave
@c <en>@section Keyword List
@section Lista de Palavras-chave
@c <en>@cindex Keyword List
@cindex Lista de Palavras-chave

@c FIXME: need some kind of example here I think,
@c perhaps in a
@c "Keyword intro" node.  The intro in the "Keyword
@c substitution" node itself seems OK, but to launch
@c into a list of the keywords somehow seems too abrupt.

@c <en>This is a list of the keywords:
Esta é uma lista de palavras-chave:

@table @code
@c <en>@cindex Author keyword
@cindex Palavra-chave Author (autor)
@c <en>@item $@splitrcskeyword{Author}$
@item $@splitrcskeyword{Author}$
@c <en>The login name of the user who checked in the revision.
O login do usuário que ???checked in??? a revisão.

@c <en>@cindex CVSHeader keyword
@cindex Palavra-chave CVSHeader (cabeçalho CVS)
@c <en>@item $@splitrcskeyword{CVSHeader}
@item $@splitrcskeyword{CVSHeader}
@c <en>A standard header (similar to $@splitrcskeyword{Header}$, but with
@c <en>the CVS root stripped off). It contains the relative
@c <en>pathname of the @sc{rcs} file to the CVS root, the
@c <en>revision number, the date (UTC), the author, the state,
@c <en>and the locker (if locked). Files will normally never
@c <en>be locked when you use @sc{cvs}.
Um cabeçalho padrão (similar ao
$@splitrcskeyword{Header}$, mas com a raíz do CVS
retirada). Ele contém o caminho do arquivo
@sc{rcs} relativo à raíz do CVS, o número da revisão, a
data (UTC), o autor, o estado, e o ???locker??? (se
estiver travado). Arquivos normalmente nunca são
travados quando você usa @sc{cvs}.

@c <en>Note that this keyword has only been recently
@c <en>introduced to @sc{cvs} and may cause problems with
@c <en>existing installations if $@splitrcskeyword{CVSHeader}$ is already
@c <en>in the files for a different purpose. This keyword may
@c <en>be excluded using the @code{KeywordExpansion=eCVSHeader}
@c <en>in the @file{CVSROOT/config} file. 
@c <en>See @ref{Configuring keyword expansion} for more details.
Observe que esta palavra-chave foi adicionada apenas
recentemente no @sc{cvs} e pode causar problemas com
instalações existentes se $@splitrcskeyword{CVSHeader}$
já está nos arquivos por um motivo diferente. Esta
palavra-chave deve ser excluída usando o
@code{KeywordExpansion=eCVSHeader} no arquivo
@file{CVSROOT/config}. Veja em @ref{Configurando a
expansão do teclado} para maiores detalhes.

@c <en>@cindex Date keyword
@cindex Palavra-chave Date (data)
@c <en>@item $@splitrcskeyword{Date}$
@item $@splitrcskeyword{Date}$
@c <en>The date and time (UTC) the revision was checked in.
A data e hora (UTC) na qual a revisão foi ???checked in???.

@c <en>@cindex Header keyword
@cindex Palavra-chave Header (cabeçalho)
@c <en>@item $@splitrcskeyword{Header}$
@item $@splitrcskeyword{Header}$
@c <en>A standard header containing the full pathname of the
@c <en>@sc{rcs} file, the revision number, the date (UTC), the
@c <en>author, the state, and the locker (if locked).  Files
@c <en>will normally never be locked when you use @sc{cvs}.
Um cabeçalho padrão contendo o caminho completo do arquivo
@sc{rcs}, o número da revisão, a data (UTC), o autor, o
estado, e o ???locker??? (se estiver travado).
Arquivos normalmente nunca são travados quando você usa
@sc{cvs}.

@c <en>@cindex Id keyword
@cindex Palavra-chave Id
@c <en>@item $@splitrcskeyword{Id}$
@item $@splitrcskeyword{Id}$
@c <en>Same as @code{$@splitrcskeyword{Header}$}, except that the @sc{rcs}
@c <en>filename is without a path.
Similar ao @code{$@splitrcskeyword{Header}$}, exceto
que o nome do arquivo @sc{rcs} não tem o caminho.

@c <en>@cindex Name keyword
@cindex Palavra-chave Name (nome)
@c <en>@item $@splitrcskeyword{Name}$
@item $@splitrcskeyword{Name}$
@c <en>Tag name used to check out this file.  The keyword is
@c <en>expanded only if one checks out with an explicit tag
@c <en>name.  For example, when running the command @code{cvs
@c <en>co -r first}, the keyword expands to @samp{Name: first}.
Nome da etiqueta (tag) usada para ???check out??? este
arquivo.  A palavra-chave é expandida apenas se foi
???check out??? com um nome de etiqueta explícito.  Por
exemplo, quando rodou o comando @code{cvs co -r
inicio}, a palavra-chave expande para @samp{Name: inicio}.

@c <en>@cindex Locker keyword
@cindex Palavra-chave Locker (???locker???)
@c <en>@item $@splitrcskeyword{Locker}$
@item $@splitrcskeyword{Locker}$
@c <en>The login name of the user who locked the revision
@c <en>(empty if not locked, which is the normal case unless
@c <en>@code{cvs admin -l} is in use).
O login do usuário que travou a revisão (vazio se não
estiver travado, que é o normal a menos que @code{cvs
admin -l} esteja em uso).

@c <en>@cindex Log keyword
@cindex Palvra-chave Log (registro)
@c <en>@cindex MaxCommentLeaderLength
@cindex MaxCommentLeaderLength
@c <en>@cindex UseArchiveCommentLeader
@cindex UseArchiveCommentLeader
@c <en>@cindex Log keyword, configuring substitution behavior
@cindex Palavra-chave Log, configurando o comportamento na substituição
@c <en>@item $@splitrcskeyword{Log}$
@item $@splitrcskeyword{Log}$
@c <en>The log message supplied during commit, preceded by a
@c <en>header containing the @sc{rcs} filename, the revision
@c <en>number, the author, and the date (UTC).  Existing log
@c <en>messages are @emph{not} replaced.  Instead, the new log
@c <en>message is inserted after @code{$@splitrcskeyword{Log:@dots{}}$}.
@c <en>Each new line is prefixed with the same string which
@c <en>precedes the @code{$Log} keyword.  For example, if the
@c <en>file contains:
A mensagem de log (registro) fornecida durante o
???commit???, precedida por um cabeçalho contendo o
nome do arquivo @sc{rcs}, o número de revisão, o autor,
e a data (UTC).  Mensagens de log (registro) @emph{não}
são substituídas.  Ao invés disto, A nova mensagem de
log (registro) é inserida depois do
@code{$@splitrcskeyword{Log:@dots{}}$}. Cada nova linha
é prefixada com a mesma string que precede a
palavra-chave @code{$Log}.  Por exemplo, se o arquivo contém:

@example
  /* Here is what people have been up to:
   *
   * $@splitrcskeyword{}Log: frob.c,v $
   * Revision 1.1  1997/01/03 14:23:51  joe
   * Add the superfrobnicate option
   *
   */
@end example

@noindent
@c <en>then additional lines which are added when expanding
@c <en>the @code{$Log} keyword will be preceded by @samp{   * }.
@c <en>Unlike previous versions of @sc{cvs} and @sc{rcs}, the
@c <en>@dfn{comment leader} from the @sc{rcs} file is not used.
@c <en>The @code{$Log} keyword is useful for
@c <en>accumulating a complete change log in a source file,
@c <en>but for several reasons it can be problematic.
@c <en>@xref{Log keyword}.
Então, linhas adicionais que são adicionadas quando a
palavra-chave @code{$Log} é expandida vão ser
precedidas por @samp{   * }. Ao contrário de versões
prévias do @sc{cvs} e do @sc{rcs}, o @dfn{comment
leader} do arquivo @sc{rcs} não é usado. A
palavra-chave @code{$Log} é útil para acumular um
???change log??? completo num fonte, mas pode ser
problemática por várias razões. Veja em @ref{Log keyword}.

@c <en>@cindex RCSfile keyword
@cindex Palavra-chave RCSfile (arquivo RCS)
@c <en>@item $@splitrcskeyword{RCSfile}$
@item $@splitrcskeyword{RCSfile}$
@c <en>The name of the RCS file without a path.
O nome do arquivo RCS sem o caminho.

@c <en>@cindex Revision keyword
@cindex Palavra-chave Revision (revisão)
@c <en>@item $@splitrcskeyword{Revision}$
@item $@splitrcskeyword{Revision}$
@c <en>The revision number assigned to the revision.
O número de revisão atribuído à revisão.

@c <en>@cindex Source keyword
@cindex Palavra-chave Source (fonte)
@c <en>@item $@splitrcskeyword{Source}$
@item $@splitrcskeyword{Source}$
@c <en>The full pathname of the RCS file.
O caminho completo do arquivo RCS.

@c <en>@cindex State keyword
@cindex Palavra-chave State (estado)
@c <en>@item $@splitrcskeyword{State}$
@item $@splitrcskeyword{State}$
@c <en>The state assigned to the revision.  States can be
@c <en>assigned with @code{cvs admin -s}---see @ref{admin options}.
O estado atribuído à revisão.  Estados podem ser
atribuídos com @code{cvs admin -s}---veja em @ref{admin options}.

@c <en>@cindex Local keyword
@cindex Palavra-chave Local
@c <en>@item Local keyword
@item Palavra-chave Local
@c <en>The @code{LocalKeyword} option in the @file{CVSROOT/config} file
@c <en>may be used to specify a local keyword which is to be
@c <en>used as an alias for one of the keywords: $@splitrcskeyword{}Id$,
@c <en>$@splitrcskeyword{}Header$, or $@splitrcskeyword{}CVSHeader$. For
@c <en>example, if the @file{CVSROOT/config} file contains
@c <en>a line with @code{LocalKeyword=MYBSD=CVSHeader}, then a
@c <en>file with the local keyword $@splitrcskeyword{}MYBSD$ will be
@c <en>expanded as if it were a $@splitrcskeyword{}CVSHeader$ keyword. If
@c <en>the src/frob.c file contained this keyword, it might
@c <en>look something like this:
A opção @code{LocalKeyword} no arquivo
@file{CVSROOT/config} pode ser usada para especificar
uma palavra-chave que não é usada como um alias para
uma das seguintes palavras-chave: $@splitrcskeyword{}Id$,
$@splitrcskeyword{}Header$, ou $@splitrcskeyword{}CVSHeader$. Por
exemplo, se o arquivo @file{CVSROOT/config} contém uma
linha com @code{LocalKeyword=MYBSD=CVSHeader}, então um
arquivo com a palavra-chave local
$@splitrcskeyword{}MYBSD$ vai ser expandido como se ele
fosse uma palavra-chave
$@splitrcskeyword{}CVSHeader$. Se o arquivo src/frob.c
contiver esta palavra-chave, ele pode parecer com algo assim:

@example
  /*
   * $@splitrcskeyword{}MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
   */
@end example

@c <en>Many repositories make use of a such a ``local
@c <en>keyword'' feature. An old patch to @sc{cvs} provided
@c <en>the @code{LocalKeyword} feature using a @code{tag=}
@c <en>option and called this the ``custom tag'' or ``local
@c <en>tag'' feature. It was used in conjunction with the
@c <en>what they called the @code{tagexpand=} option. In
@c <en>@sc{cvs} this other option is known as the
@c <en>@code{KeywordExpand} option. 
@c <en>See @ref{Configuring keyword expansion} for more
@c <en>details.
Muitos repositórios fazem uso de tal ``palavra-chave
local''. Uma ???patch??? antiga ao @sc{cvs} fornecia a
funcionalidade @code{LocalKeyword} usando uma opção
@code{tag=} e chamava esta funcionalidade de ``custom tag'' ou ``local
tag''. ela foi usada em conjunto com o que chamavam de
opção @code{tagexpand=}. No @sc{cvs} esta outra opção é
conhecida como a opção @code{KeywordExpand}. Veja em
@ref{Configurando a expansão do teclado} para maiores
detalhes.

@c <en>Examples from popular projects include:
@c <en>$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$,
@c <en>$@splitrcskeyword{OpenBSD}$, $@splitrcskeyword{XFree86}$,
@c <en>$@splitrcskeyword{Xorg}$.
Exemplos de projetos populares incluem:
$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$,
$@splitrcskeyword{OpenBSD}$, $@splitrcskeyword{XFree86}$,
$@splitrcskeyword{Xorg}$.

@c <en>The advantage of this is that you can include your
@c <en>local version information in a file using this local
@c <en>keyword without disrupting the upstream version
@c <en>information (which may be a different local keyword or
@c <en>a standard keyword). Allowing bug reports and the like
@c <en>to more properly identify the source of the original
@c <en>bug to the third-party and reducing the number of
@c <en>conflicts that arise during an import of a new version.
A vantagem disto é que você pode incluir sua informação
de versão local num arquivo usando esta palavra-chave
local sem romper com a informação da versão principal
(que pode ser uma palavra-chave local diferente ou uma
palavra-chave padrão). Permitir relatório de bug (bug
report) e coisas do gênero para identificar mais
adequadamente a origem do bug original para o terceiro
e reduzir o número de conflitos que surgem durante uma
importação de uma nova versão.

@c <en>All keyword expansion except the local keyword may be
@c <en>disabled using the @code{KeywordExpand} option in
@c <en>the @file{CVSROOT/config} file---see 
@c <en>@ref{Configuring keyword expansion} for more details.
Toda expansão de palavra-chave com exceção da
palavra-chave local deve ser disabilitada usando a
opção @code{KeywordExpand} no arquivo
@file{CVSROOT/config}---veja em @ref{Configurando a
expansão do teclado} para mais detalhes.

@end table

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Using keywords
@node Usando palavras-chave
@c <en>@section Using keywords
@section Usando palavras-chave

@c <en>To include a keyword string you simply include the
@c <en>relevant text string, such as @code{$@splitrcskeyword{Id}$}, inside the
@c <en>file, and commit the file.  @sc{cvs} will automatically (Or,
@c <en>more accurately, as part of the update run that
@c <en>automatically happens after a commit.)
@c <en>expand the string as part of the commit operation.
Para incluir uma string de palavra-chave você deve
simplesmente incluir o a string de texto relevante,
como @code{$@splitrcskeyword{Id}$}, dentro do arquivo,
e ???commit??? o arquivo.  O @sc{cvs} vai automaticamente (Ou,
mais precisamente, como parte da execução do
???update??? que acontece automaticamente depois do
???commit???.) expandir a string como parte da operação
de commit.

@c <en>It is common to embed the @code{$@splitrcskeyword{}Id$} string in
@c <en>the source files so that it gets passed through to
@c <en>generated files.  For example, if you are managing
@c <en>computer program source code, you might include a
@c <en>variable which is initialized to contain that string.
@c <en>Or some C compilers may provide a @code{#pragma ident}
@c <en>directive.  Or a document management system might
@c <en>provide a way to pass a string through to generated
@c <en>files.
É normal imergir a string @code{$@splitrcskeyword{}Id$}
nos arquivos fonte de forma que ela seja ignorada nos
arquivos gerados.  Por exemplo, se você está
gerenciando código fonte de programas de computador,
você deve incluir uma variável que é inicializada para
conter aquela string. Ou alguns compiladores C podem
fornecer uma diretiva @code{#pragma ident}.  Ou um
sistema de gerência de documentos pode fornecer um
jeito de entregar a string diretamente ao arquivos
gerados.

@c Would be nice to give an example, but doing this in
@c portable C is not possible and the problem with
@c picking any one language (VMS HELP files, Ada,
@c troff, whatever) is that people use CVS for all
@c kinds of files.

@c <en>@cindex Ident (shell command)
@cindex Ident (shell command)
@c <en>The @code{ident} command (which is part of the @sc{rcs}
@c <en>package) can be used to extract keywords and their
@c <en>values from a file.  This can be handy for text files,
@c <en>but it is even more useful for extracting keywords from
@c <en>binary files.
O comando @code{ident} (que é parte do pacote @sc{rcs})
pode ser usado para extrair palavras-chave e seus
valores de um arquivo.  Isto pode ser útil para
arquivos texto, mas é mais útil para extração de
palavras-chave de arquivos binários.

@example
$ ident samp.c
samp.c:
     $@splitrcskeyword{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
$ gcc samp.c
$ ident a.out
a.out:
     $@splitrcskeyword{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
@end example

@c <en>@cindex What (shell command)
@cindex What (shell command)
@c <en>S@sc{ccs} is another popular revision control system.
@c <en>It has a command, @code{what}, which is very similar to
@c <en>@code{ident} and used for the same purpose.  Many sites
@c <en>without @sc{rcs} have @sc{sccs}.  Since @code{what}
@c <en>looks for the character sequence @code{@@(#)} it is
@c <en>easy to include keywords that are detected by either
@c <en>command.  Simply prefix the keyword with the
@c <en>magic @sc{sccs} phrase, like this:
S@sc{ccs} é outro sistema de controle de revisões
popular. Ele tem um comando, @code{what} (o que, em
português), que é bastante similar ao @code{ident} e
usado para o mesmo propósito.  Muitos ???sites??? sem
@sc{rcs} tem @sc{sccs}.  Uma vez que o @code{what}
procura pela seqüência de caracteres @code{@@(#)} é
fácil incluir palavras-chave que são detectadas por
qualquer comando.  Simplesmente bote um prefixo na
palavra-chave com a frase mágica @sc{sccs}, como esta:

@example
static char *id="@@(#) $@splitrcskeyword{}Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Avoiding substitution
@node Evitando substituições
@c <en>@section Avoiding substitution
@section Evitando substituições

@c <en>Keyword substitution has its disadvantages.  Sometimes
@c <en>you might want the literal text string
@c <en>@samp{$@splitrcskeyword{}Author$} to appear inside a file without
@c <en>@sc{cvs} interpreting it as a keyword and expanding it
@c <en>into something like @samp{$@splitrcskeyword{}Author: ceder $}.
Substituição de palavra-chave tem suas desvantagens.
Algumas vezes você pode querer que a string de texto
literal @samp{$@splitrcskeyword{}Author$} apareça
dentro de um arquivo sem que o @sc{cvs} a interprete
como uma palavra-chave e a expanda em algo como
@samp{$@splitrcskeyword{}Author: ceder $}.

@c <en>There is unfortunately no way to selectively turn off
@c <en>keyword substitution.  You can use @samp{-ko}
@c <en>(@pxref{Substitution modes}) to turn off keyword
@c <en>substitution entirely.
Infelizmente não há como desligar a substituição de
palavra-chave de forma seletiva.  Você pode usar @samp{-ko}
(@pxref{Modos de substituição}) para desligar a
substituição de palavra-chave completamente.

@c <en>In many cases you can avoid using keywords in
@c <en>the source, even though they appear in the final
@c <en>product.  For example, the source for this manual
@c <en>contains @samp{$@@asis@{@}Author$} whenever the text
@c <en>@samp{$@splitrcskeyword{}Author$} should appear.  In @code{nroff}
@c <en>and @code{troff} you can embed the null-character
@c <en>@code{\&} inside the keyword for a similar effect.
Em muitos casos você pode evitar o uso de palavra-chave
nos fontes, mesmo que elas apareçam no produto final.
Por exemplo, o código-fonte deste manual contém
@samp{$@@asis@{@}Author$} sempre que o texto
@samp{$@splitrcskeyword{}Author$} deva aparecer.  Em
@code{nroff} e @code{troff} você pode imergir o
caractere nulo @code{\&} dentro de uma palavra-chave
para obter um efeito similar.

@c <en>It is also possible to specify an explicit list of
@c <en>keywords to include or exclude using the
@c <en>@code{KeywordExpand} option in the
@c <en>@file{CVSROOT/config} file--see @ref{Configuring keyword expansion}
@c <en>for more details. This feature is intended primarily
@c <en>for use with the @code{LocalKeyword} option--see
@c <en>@ref{Keyword list}.
Também é possível especificar explicitamente uma lista
de palavras-chave para incluir ou excluir usando a
opção @code{KeywordExpand} no arquivo
@file{CVSROOT/config}--veja em @ref{Configurando a
expansão do teclado} para maiores detalhes. Esta
funcionalidade foi pensada para ser usada a princípio
com a opção @code{LocalKeyword}--veja @ref{Lista de
palavras-chave}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Substitution modes
@node Modos de substituição
@c <en>@section Substitution modes
@section Modos de substituição
@c <en>@cindex Keyword substitution, changing modes
@cindex Substituição de palavra-chave, mudando os modos
@c <en>@cindex -k (keyword substitution)
@cindex -k (substituição de palavra-chave)
@c <en>@cindex Kflag
@cindex Kflag

@c FIXME: This could be made more coherent, by expanding it
@c with more examples or something.
@c <en>Each file has a stored default substitution mode, and
@c <en>each working directory copy of a file also has a
@c <en>substitution mode.  The former is set by the @samp{-k}
@c <en>option to @code{cvs add} and @code{cvs admin}; the
@c <en>latter is set by the @samp{-k} or @samp{-A} options to @code{cvs
@c <en>checkout} or @code{cvs update}.  @code{cvs diff} also
@c <en>has a @samp{-k} option.  For some examples,
@c <en>see @ref{Binary files}, and @ref{Merging and keywords}.
Cada arquivo tem um modo de substituição padrão
armazenado, e cada cópia de um arquivo num diretório de
trabalho também tem um modo de substituição.  O
primeiro é ajustado pela opção @samp{-k} no @code{cvs
add} e no @code{cvs admin}; o último é ajustado pelas
opções @samp{-k} ou @samp{-A} do @code{cvs checkout} ou
do @code{cvs update}.  O @code{cvs diff} também tem uma
opção @samp{-k}.  Para alguns exemplos, veja em
@ref{Arquivos binários}, e @ref{Mesclagem e
palavras-chave}.
@c The fact that -A is overloaded to mean both reset
@c sticky options and reset sticky tags/dates is
@c somewhat questionable.  Perhaps there should be
@c separate options to reset sticky options (e.g. -k
@c A") and tags/dates (someone suggested -r HEAD could
@c do this instead of setting a sticky tag of "HEAD"
@c as in the status quo but I haven't thought much
@c about that idea.  Of course -r .reset or something
@c could be coined if this needs to be a new option).
@c On the other hand, having -A mean "get things back
@c into the state after a fresh checkout" has a certain
@c appeal, and maybe there is no sufficient reason for
@c creeping featurism in this area.

@c <en>The modes available are:
Os modos disponíveis são:

@table @samp
@c <en>@item -kkv
@item -kkv
@c <en>Generate keyword strings using the default form, e.g.
@c <en>@code{$@splitrcskeyword{}Revision: 5.7 $} for the @code{Revision}
@c <en>keyword.
Gera strings de palavras-chave usando a forma padrão, e.g.
@code{$@splitrcskeyword{}Revision: 5.7 $} para a
palavra-chave @code{Revision}.

@c <en>@item -kkvl
@item -kkvl
@c <en>Like @samp{-kkv}, except that a locker's name is always
@c <en>inserted if the given revision is currently locked.
@c <en>The locker's name is only relevant if @code{cvs admin
@c <en>-l} is in use.
Parecido com o @samp{-kkv}, exceto que um nome de
???locker??? é sempre inserido se a revisão dada
estiver atualmente ???locked???. O nome do ???locker???
é relevante apenas se @code{cvs admin -l} estiver em uso.

@c <en>@item -kk
@item -kk
@c <en>Generate only keyword names in keyword strings; omit
@c <en>their values.  For example, for the @code{Revision}
@c <en>keyword, generate the string @code{$@splitrcskeyword{}Revision$}
@c <en>instead of @code{$@splitrcskeyword{}Revision: 5.7 $}.  This option
@c <en>is useful to ignore differences due to keyword
@c <en>substitution when comparing different revisions of a
@c <en>file (@pxref{Merging and keywords}).
Gera nomes de palavras-chave apenas nas strings da palavras-chave; omite
seus valores.  Por exemplo, para a palavra-chave @code{Revision}
, gera a string @code{$@splitrcskeyword{}Revision$}
ao invés de @code{$@splitrcskeyword{}Revision: 5.7 $}.
Esta opção é útil para ignorar diferenças devido a
substituição de palavras-chave quando comparando
revisões diferentes de um mesmo arquivo
(@pxref{Mesclagem e palavras-chave}).

@c <en>@item -ko
@item -ko
@c <en>Generate the old keyword string, present in the working
@c <en>file just before it was checked in.  For example, for
@c <en>the @code{Revision} keyword, generate the string
@c <en>@code{$@splitrcskeyword{}Revision: 1.1 $} instead of
@c <en>@code{$@splitrcskeyword{}Revision: 5.7 $} if that is how the
@c <en>string appeared when the file was checked in.
Gera a antiga string da palavra-chave, presente no
arquivo de trabalho antes dele ter sido ???checked
in???.  Por exemplo, para a palavra-chave
@code{Revision}, gera a string
@code{$@splitrcskeyword{}Revision: 1.1 $} ao invés de
@code{$@splitrcskeyword{}Revision: 5.7 $} se era assim
que a string aparecia quando o arquivo foi ???checked
in???.

@c <en>@item -kb
@item -kb
@c <en>Like @samp{-ko}, but also inhibit conversion of line
@c <en>endings between the canonical form in which they are
@c <en>stored in the repository (linefeed only), and the form
@c <en>appropriate to the operating system in use on the
@c <en>client.  For systems, like unix, which use linefeed
@c <en>only to terminate lines, this is very similar to
@c <en>@samp{-ko}.  For more information on binary files, see
@c <en>@ref{Binary files}.  In @sc{cvs} version 1.12.2 and later
@c <en>@samp{-kb}, as set by @code{cvs add}, @code{cvs admin}, or
@c <en>@code{cvs import} may not be overridden by a @samp{-k} option
@c <en>specified on the command line.
Como o @samp{-ko}, mas também inibindo conversão de
fim-de-linhas entre a forma canônica nas qual os
arquivo são arquivados no repositório (apenas
linefeed), e a forma apropriada para o sistema
operacional em uso no cliente.  Para sistemas, como o
unix, que usam apenas o linefeed para terminar linhas,
isto é bastante similar ao @samp{-ko}.  Para mais
informações sobre arquivos binários, veja em
@ref{Arquivos binários}.  No @sc{cvs} versão 1.12.2 ou
mais novas @samp{-kb}, ajustado por @code{cvs add}, @code{cvs admin}, ou
@code{cvs import} não vai ser sobreescrito pela opção
@samp{-k} especificada na linha de comando.

@c <en>@item -kv
@item -kv
@c <en>Generate only keyword values for keyword strings.  For
@c <en>example, for the @code{Revision} keyword, generate the string
@c <en>@code{5.7} instead of @code{$@splitrcskeyword{}Revision: 5.7 $}.
@c <en>This can help generate files in programming languages
@c <en>where it is hard to strip keyword delimiters like
@c <en>@code{$@splitrcskeyword{}Revision: $} from a string.  However,
@c <en>further keyword substitution cannot be performed once
@c <en>the keyword names are removed, so this option should be
@c <en>used with care.
Gera apenas os valores das palavras-chaves para strings
de palavras-chave.  Por exemplo, para a palavra-chave
@code{Revision}, gera a string @code{5.7} ao invés de
@code{$@splitrcskeyword{}Revision: 5.7 $}. Isto pode
ajudar a gerar arquivos em linguagens de programação
onde é difícil ???strip??? delimitadores de
palavras-chave, como o
@code{$@splitrcskeyword{}Revision: $} para uma string.
Entretanto, outras substituições de palavras-chave não
poderam ser feitas, uma vez que os nomes de
palavras-chave foram removidos. Logo, esta opção deve
ser usada com cuidado.

@c <en>One often would like to use @samp{-kv} with @code{cvs
@c <en>export}---@pxref{export}.  But be aware that doesn't
@c <en>handle an export containing binary files correctly.
É comum querer usar o @samp{-kv} com @code{cvs
export}---@pxref{export}.  Mas lembre-se que isto não
trata um export contendo binários direito.

@end table

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Configuring keyword expansion
@node Configurando a expansão do teclado
@c <en>@section Configuring Keyword Expansion
@section Configurando a Expansão do Teclado
@c <en>@cindex Configuring keyword expansion
@cindex Configurando a Expansão do Teclado

@c <en>In a repository that includes third-party software on
@c <en>vendor branches, it is sometimes helpful to configure
@c <en>CVS to use a local keyword instead of the standard
@c <en>$@splitrcskeyword{Id}$ or $@splitrcskeyword{Header}$ keywords. Examples from
@c <en>real projects includ, $@splitrcskeyword{Xorg}$, $@splitrcskeyword{XFree86}$,
@c <en>$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$,
@c <en>$@splitrcskeyword{OpenBSD}$, and even $@splitrcskeyword{dotat}$.
@c <en>The advantage of this is that
@c <en>you can include your local version information in a
@c <en>file using this local keyword (sometimes called a
@c <en>``custom tag'' or a ``local tag'') without disrupting
@c <en>the upstream version information (which may be a
@c <en>different local keyword or a standard keyword). In
@c <en>these cases, it is typically desirable to disable the
@c <en>expansion of all keywords except the configured local
@c <en>keyword.
Num repositório que inclua software de terceiros em
ramos de fornecedor, às vezes é útil configurar o CVS
para usar uma palavra-chave local ao invés das
palavras-chave padrão $@splitrcskeyword{Id}$ ou
$@splitrcskeyword{Header}$. Exemplos de projetos reais incluem, $@splitrcskeyword{Xorg}$, $@splitrcskeyword{XFree86}$,
$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$,
$@splitrcskeyword{OpenBSD}$, e ainda
$@splitrcskeyword{dotat}$. A vantagem disto é que você
pode incluir sua ???local version information??? num
arquivo usando esta palavra-chave local (algumas vezes
chamada de ``custom tag'' ou ``local tag'') sem romper
com a ???upstream version information??? (que pode ser
uma palavra-chave local diferente ou uma palavra-chave
padrão). Nestes casos, é normalmente desejável
desabilitar a expansão de todas as palavras-chave
exceto a palavra-chave local configurada.

@c <en>The @code{KeywordExpansion} option in the
@c <en>@file{CVSROOT/config} file is intended to allow for the
@c <en>either the explicit exclusion of a keyword or list of
@c <en>keywords, or for the explicit inclusion of a keyword or
@c <en>a list of keywords. This list may include the
@c <en>@code{LocalKeyword} that has been configured.
The @code{KeywordExpansion} option in the
@file{CVSROOT/config} file is intended to allow for the
either the explicit exclusion of a keyword or list of
keywords, or for the explicit inclusion of a keyword or
a list of keywords. This list may include the
@code{LocalKeyword} that has been configured.

@c <en>The @code{KeywordExpansion} option is followed by
@c <en>@code{=} and the next character may either be @code{i}
@c <en>to start an inclusion list or @code{e} to start an
@c <en>exclusion list. If the following lines were added to
@c <en>the @file{CVSROOT/config} file:
The @code{KeywordExpansion} option is followed by
@code{=} and the next character may either be @code{i}
to start an inclusion list or @code{e} to start an
exclusion list. If the following lines were added to
the @file{CVSROOT/config} file:

@example
        # Add a "MyBSD" keyword and restrict keyword
        # expansion
        LocalKeyword=MyBSD=CVSHeader
        KeywordExpand=iMyBSD
@end example

@c <en>then only the $@splitrcskeyword{MyBSD}$ keyword would be expanded.
@c <en>A list may be used. The this example:
then only the $@splitrcskeyword{MyBSD}$ keyword would be expanded.
A list may be used. The this example:

@example
        # Add a "MyBSD" keyword and restrict keyword
        # expansion to the MyBSD, Name and Date keywords.
        LocalKeyword=MyBSD=CVSHeader
        KeywordExpand=iMyBSD,Name,Date
@end example

@c <en>would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and
@c <en>$@splitrcskeyword{Date}$ to be expanded.
@c <en>would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and
@c <en>$@splitrcskeyword{Date}$ to be expanded.
would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and
$@splitrcskeyword{Date}$ to be expanded.
would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and
$@splitrcskeyword{Date}$ to be expanded.

@c <en>It is also possible to configure an exclusion list
@c <en>using the following:
@c <en>It is also possible to configure an exclusion list
@c <en>using the following:
It is also possible to configure an exclusion list
using the following:
It is also possible to configure an exclusion list
using the following:

@example
        # Do not expand the non-RCS keyword CVSHeader
        KeywordExpand=eCVSHeader
@end example

@c <en>This allows @sc{cvs} to ignore the recently introduced
@c <en>$@splitrcskeyword{CVSHeader}$ keyword and retain all of the
@c <en>others. The exclusion entry could also contain the
@c <en>standard RCS keyword list, but this could be confusing
@c <en>to users that expect RCS keywords to be expanded, so
@c <en>ycare should be taken to properly set user expectations
@c <en>for a repository that is configured in that manner.
This allows @sc{cvs} to ignore the recently introduced
$@splitrcskeyword{CVSHeader}$ keyword and retain all of the
others. The exclusion entry could also contain the
standard RCS keyword list, but this could be confusing
to users that expect RCS keywords to be expanded, so
ycare should be taken to properly set user expectations
for a repository that is configured in that manner.

@c <en>If there is a desire to not have any RCS keywords
@c <en>expanded and not use the @code{-ko} flags everywhere,
@c <en>an administrator may disable all keyword expansion
@c <en>using the @file{CVSROOT/config} line:
If there is a desire to not have any RCS keywords
expanded and not use the @code{-ko} flags everywhere,
an administrator may disable all keyword expansion
using the @file{CVSROOT/config} line:

@example
	# Do not expand any RCS keywords
	KeywordExpand=i
@end example

@c <en>this could be confusing to users that expect RCS
@c <en>keywords like $@splitrcskeyword{Id}$ to be expanded properly,
@c <en>so care should be taken to properly set user
@c <en>expectations for a repository so configured.
this could be confusing to users that expect RCS
keywords like $@splitrcskeyword{Id}$ to be expanded properly,
so care should be taken to properly set user
expectations for a repository so configured.

@c <en>It should be noted that a patch to provide both the
@c <en>@code{KeywordExpand} and @code{LocalKeyword} features
@c <en>has been around a long time. However, that patch
@c <en>implemented these features using @code{tag=} and
@c <en>@code{tagexpand=} keywords and those keywords are NOT
@c <en>recognized.
It should be noted that a patch to provide both the
@code{KeywordExpand} and @code{LocalKeyword} features
has been around a long time. However, that patch
implemented these features using @code{tag=} and
@code{tagexpand=} keywords and those keywords are NOT
recognized.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Log keyword
@node Log keyword
@c <en>@section Problems with the $@splitrcskeyword{}Log$ keyword.
@section Problems with the $@splitrcskeyword{}Log$ keyword.

@c <en>The @code{$@splitrcskeyword{}Log$} keyword is somewhat
@c <en>controversial.  As long as you are working on your
@c <en>development system the information is easily accessible
@c <en>even if you do not use the @code{$@splitrcskeyword{}Log$}
@c <en>keyword---just do a @code{cvs log}.  Once you export
@c <en>the file the history information might be useless
@c <en>anyhow.
The @code{$@splitrcskeyword{}Log$} keyword is somewhat
controversial.  As long as you are working on your
development system the information is easily accessible
even if you do not use the @code{$@splitrcskeyword{}Log$}
keyword---just do a @code{cvs log}.  Once you export
the file the history information might be useless
anyhow.

@c <en>A more serious concern is that @sc{cvs} is not good at
@c <en>handling @code{$@splitrcskeyword{}Log$} entries when a branch is
@c <en>merged onto the main trunk.  Conflicts often result
@c <en>from the merging operation.
A more serious concern is that @sc{cvs} is not good at
handling @code{$@splitrcskeyword{}Log$} entries when a branch is
merged onto the main trunk.  Conflicts often result
from the merging operation.
@c Might want to check whether the CVS implementation
@c of RCS_merge has this problem the same way rcsmerge
@c does.  I would assume so....

@c <en>People also tend to "fix" the log entries in the file
@c <en>(correcting spelling mistakes and maybe even factual
@c <en>errors).  If that is done the information from
@c <en>@code{cvs log} will not be consistent with the
@c <en>information inside the file.  This may or may not be a
@c <en>problem in real life.
People also tend to "fix" the log entries in the file
(correcting spelling mistakes and maybe even factual
errors).  If that is done the information from
@code{cvs log} will not be consistent with the
information inside the file.  This may or may not be a
problem in real life.

@c <en>It has been suggested that the @code{$@splitrcskeyword{}Log$}
@c <en>keyword should be inserted @emph{last} in the file, and
@c <en>not in the files header, if it is to be used at all.
@c <en>That way the long list of change messages will not
@c <en>interfere with everyday source file browsing.
It has been suggested that the @code{$@splitrcskeyword{}Log$}
keyword should be inserted @emph{last} in the file, and
not in the files header, if it is to be used at all.
That way the long list of change messages will not
interfere with everyday source file browsing.

@c ---------------------------------------------------------------------
@c <en>@node Tracking sources
@node Acompanhando fontes
@c <en>@chapter Tracking third-party sources
@chapter Tracking third-party sources
@c <en>@cindex Third-party sources
@cindex Fontes de terceiros
@c <en>@cindex Tracking sources
@cindex Tracking sources

@c FIXME: Need discussion of added and removed files.
@c FIXME: This doesn't really adequately introduce the
@c concepts of "vendor" and "you".  They don't *have*
@c to be separate organizations or separate people.
@c We want a description which is somewhat more based on
@c the technical issues of which sources go where, but
@c also with enough examples of how this relates to
@c relationships like customer-supplier, developer-QA,
@c maintainer-contributor, or whatever, to make it
@c seem concrete.
@c <en>If you modify a program to better fit your site, you
@c <en>probably want to include your modifications when the next
@c <en>release of the program arrives.  @sc{cvs} can help you with
@c <en>this task.
Se você modificar um programa para se adequar melhor ao
seu ambiente, você provavelmente vai querer incluir
suas modificações quando a nova release do do programa
chegar.  O @sc{cvs} pode te ajudar nesta tarefa.

@c <en>@cindex Vendor
@cindex Vendor
@cindex Vendor (fornecedor)
@c <en>@cindex Vendor branch
@cindex Vendor branch (ramo do forncedor)
@cindex Ramo do fornecedor
@c <en>@cindex Branch, vendor-
@cindex Branch, vendor-
@c <en>In the terminology used in @sc{cvs}, the supplier of the
@c <en>program is called a @dfn{vendor}.  The unmodified
@c <en>distribution from the vendor is checked in on its own
@c <en>branch, the @dfn{vendor branch}.  @sc{cvs} reserves branch
@c <en>1.1.1 for this use.
Na terminologia usada no @sc{cvs}, quem fornece um
programa é chamado de @dfn{vendor} (fornecedor, em
português).  A distribuição não modificada do
fornecedor é ???checked in??? no seu próprio ramo, o
@dfn{vendor branch} (ramo do fornecedor).  O @sc{cvs}
reserva o ramo 1.1.1 para isto.

@c <en>When you modify the source and commit it, your revision
@c <en>will end up on the main trunk.  When a new release is
@c <en>made by the vendor, you commit it on the vendor branch
@c <en>and copy the modifications onto the main trunk.
Quando você modifica a fonte e a ???commit???, sua
revisão vai terminar na ???main trunk???.  Quando uma
nova release é feita pelo fornecedor, você ???commit???
ela no ramo do fornecedor e copia as modificações no
???main trunk???.

@c <en>Use the @code{import} command to create and update
@c <en>the vendor branch.  When you import a new file,
@c <en>the vendor branch is made the `head' revision, so
@c <en>anyone that checks out a copy of the file gets that
@c <en>revision.  When a local modification is committed it is
@c <en>placed on the main trunk, and made the `head'
@c <en>revision.
Use o comando @code{import} para criar e atualizar o
ramo do fornecedor.  Quando você importa um novo
arquivo, o ramo do fornecedor se torna a revisão
`head', logo qualquer um que ???checks out??? uma cópia
do arquivo pega esta revisão.  Quando uma modificação
local é ???committed???, ela é posta no ???main
trunk???, e se torna a revisão `head'.

@menu
@c <en>* First import::                Importing for the first time
* Primeira importação::                 Importando pela primeira vez
@c <en>* Update imports::              Updating with the import command
* Importações de atualização::          Atualizando com o comando import
@c <en>* Reverting local changes::     Reverting to the latest vendor release
* Reverting local changes::             Reverting to the latest vendor release
@c <en>* Binary files in imports::     Binary files require special handling
* Arquivos binários em importações::    Arquivos binários requerem tratamento especial
@c <en>* Keywords in imports::         Keyword substitution might be undesirable
* Palavras-chave em importações::       Substituição de palavras-chave pode ser indesejável
@c <en>* Multiple vendor branches::    What if you get sources from several places?
* Ramos de fornecedor múltiplos::       E se você obtém fontes de vários lugares?
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node First import
@node Primeira importação
@c <en>@section Importing for the first time
@section Importing for the first time
@c <en>@cindex Importing modules
@cindex Importing modules

@c Should mention naming conventions for vendor tags,
@c release tags, and perhaps directory names.
@c <en>Use the @code{import} command to check in the sources
@c <en>for the first time.  When you use the @code{import}
@c <en>command to track third-party sources, the @dfn{vendor
@c <en>tag} and @dfn{release tags} are useful.  The
@c <en>@dfn{vendor tag} is a symbolic name for the branch
@c <en>(which is always 1.1.1, unless you use the @samp{-b
@c <en>@var{branch}} flag---see @ref{Multiple vendor branches}.).  The
@c <en>@dfn{release tags} are symbolic names for a particular
@c <en>release, such as @samp{FSF_0_04}.
Use the @code{import} command to check in the sources
for the first time.  When you use the @code{import}
command to track third-party sources, the @dfn{vendor
tag} and @dfn{release tags} are useful.  The
@dfn{vendor tag} is a symbolic name for the branch
(which is always 1.1.1, unless you use the @samp{-b
@var{branch}} flag---see @ref{Ramos de fornecedor múltiplos}.).  The
@dfn{release tags} are symbolic names for a particular
release, such as @samp{FSF_0_04}.

@c I'm not completely sure this belongs here.  But
@c we need to say it _somewhere_ reasonably obvious; it
@c is a common misconception among people first learning CVS
@c <en>Note that @code{import} does @emph{not} change the
@c <en>directory in which you invoke it.  In particular, it
@c <en>does not set up that directory as a @sc{cvs} working
@c <en>directory; if you want to work with the sources import
@c <en>them first and then check them out into a different
@c <en>directory (@pxref{Getting the source}).
Note that @code{import} does @emph{not} change the
directory in which you invoke it.  In particular, it
does not set up that directory as a @sc{cvs} working
directory; if you want to work with the sources import
them first and then check them out into a different
directory (@pxref{Obtendo os fontes}).

@c <en>@cindex wdiff (import example)
@cindex wdiff (import example)
@c <en>Suppose you have the sources to a program called
@c <en>@code{wdiff} in a directory @file{wdiff-0.04},
@c <en>and are going to make private modifications that you
@c <en>want to be able to use even when new releases are made
@c <en>in the future.  You start by importing the source to
@c <en>your repository:
Suppose you have the sources to a program called
@code{wdiff} in a directory @file{wdiff-0.04},
and are going to make private modifications that you
want to be able to use even when new releases are made
in the future.  You start by importing the source to
your repository:

@example
$ cd wdiff-0.04
$ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
@end example

@c <en>The vendor tag is named @samp{FSF_DIST} in the above
@c <en>example, and the only release tag assigned is
@c <en>@samp{WDIFF_0_04}.
The vendor tag is named @samp{FSF_DIST} in the above
example, and the only release tag assigned is
@samp{WDIFF_0_04}.
@c FIXME: Need to say where fsf/wdiff comes from.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Update imports
@node Importações de atualização
@c <en>@section Updating with the import command
@section Updating with the import command

@c <en>When a new release of the source arrives, you import it into the
@c <en>repository with the same @code{import} command that you used to set up
@c <en>the repository in the first place.  The only difference is that you
@c <en>specify a different release tag this time:
When a new release of the source arrives, you import it into the
repository with the same @code{import} command that you used to set up
the repository in the first place.  The only difference is that you
specify a different release tag this time:

@example
$ tar xfz wdiff-0.05.tar.gz
$ cd wdiff-0.05
$ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05
@end example

@c <en>For files that have not been modified locally, the newly created
@c <en>revision becomes the head revision.  If you have made local
@c <en>changes, @code{import} will warn you that you must merge the changes
@c <en>into the main trunk, and tell you to use @samp{checkout -j} to do so:
For files that have not been modified locally, the newly created
revision becomes the head revision.  If you have made local
changes, @code{import} will warn you that you must merge the changes
into the main trunk, and tell you to use @samp{checkout -j} to do so:

@c FIXME: why "wdiff" here and "fsf/wdiff" in the
@c "import"?  I think the assumption is that one has
@c "wdiff fsf/wdiff" or some such in modules, but it
@c would be better to not use modules in this example.
@example
$ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
@end example

@noindent
@c <en>The above command will check out the latest revision of
@c <en>@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST}
@c <en>since yesterday into the working copy.  If any conflicts arise during
@c <en>the merge they should be resolved in the normal way (@pxref{Conflicts
@c <en>example}).  Then, the modified files may be committed.
The above command will check out the latest revision of
@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST}
since yesterday into the working copy.  If any conflicts arise during
the merge they should be resolved in the normal way
(@pxref{Exemplo de conflitos}).  Then, the modified files may be committed.

@c <en>However, it is much better to use the two release tags rather than using
@c <en>a date on the branch as suggested above:
However, it is much better to use the two release tags rather than using
a date on the branch as suggested above:

@example
$ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
@end example

@noindent
@c <en>The reason this is better is that
@c <en>using a date, as suggested above, assumes that you do
@c <en>not import more than one release of a product per day.
@c <en>More importantly, using the release tags allows @sc{cvs} to detect files
@c <en>that were removed between the two vendor releases and mark them for
@c <en>removal.  Since @code{import} has no way to detect removed files, you
@c <en>should do a merge like this even if @code{import} doesn't tell you to.
The reason this is better is that
using a date, as suggested above, assumes that you do
not import more than one release of a product per day.
More importantly, using the release tags allows @sc{cvs} to detect files
that were removed between the two vendor releases and mark them for
removal.  Since @code{import} has no way to detect removed files, you
should do a merge like this even if @code{import} doesn't tell you to.

@c <en>@node Reverting local changes
@node Reverting local changes
@c <en>@section Reverting to the latest vendor release
@section Reverting to the latest vendor release

@c <en>You can also revert local changes completely and return
@c <en>to the latest vendor release by changing the `head'
@c <en>revision back to the vendor branch on all files.  For
@c <en>example, if you have a checked-out copy of the sources
@c <en>in @file{~/work.d/wdiff}, and you want to revert to the
@c <en>vendor's version for all the files in that directory,
@c <en>you would type:
You can also revert local changes completely and return
to the latest vendor release by changing the `head'
revision back to the vendor branch on all files.  For
example, if you have a checked-out copy of the sources
in @file{~/work.d/wdiff}, and you want to revert to the
vendor's version for all the files in that directory,
you would type:

@example
$ cd ~/work.d/wdiff
$ cvs admin -bFSF_DIST .
@end example

@noindent
@c <en>You must specify the @samp{-bFSF_DIST} without any space
@c <en>after the @samp{-b}.  @xref{admin options}.
You must specify the @samp{-bFSF_DIST} without any space
after the @samp{-b}.  @xref{admin options}.

@c <en>@node Binary files in imports
@node Arquivos binários em importações
@c <en>@section How to handle binary files with cvs import
@section How to handle binary files with cvs import

@c <en>Use the @samp{-k} wrapper option to tell import which
@c <en>files are binary.  @xref{Wrappers}.
Use the @samp{-k} wrapper option to tell import which
files are binary.  @xref{Wrappers}.

@c <en>@node Keywords in imports
@node Palavras-chave em importações
@c <en>@section How to handle keyword substitution with cvs import
@section Como lidar com substituição de palavras-chave com o cvs import

@c <en>The sources which you are importing may contain
@c <en>keywords (@pxref{Keyword substitution}).  For example,
@c <en>the vendor may use @sc{cvs} or some other system
@c <en>which uses similar keyword expansion syntax.  If you
@c <en>just import the files in the default fashion, then
@c <en>the keyword expansions supplied by the vendor will
@c <en>be replaced by keyword expansions supplied by your
@c <en>own copy of @sc{cvs}.  It may be more convenient to
@c <en>maintain the expansions supplied by the vendor, so
@c <en>that this information can supply information about
@c <en>the sources that you imported from the vendor.
The sources which you are importing may contain
keywords (@pxref{Substituição de palavra-chave}).  For example,
the vendor may use @sc{cvs} or some other system
which uses similar keyword expansion syntax.  If you
just import the files in the default fashion, then
the keyword expansions supplied by the vendor will
be replaced by keyword expansions supplied by your
own copy of @sc{cvs}.  It may be more convenient to
maintain the expansions supplied by the vendor, so
that this information can supply information about
the sources that you imported from the vendor.

@c <en>To maintain the keyword expansions supplied by the
@c <en>vendor, supply the @samp{-ko} option to @code{cvs
@c <en>import} the first time you import the file.
@c <en>This will turn off keyword expansion
@c <en>for that file entirely, so if you want to be more
@c <en>selective you'll have to think about what you want
@c <en>and use the @samp{-k} option to @code{cvs update} or
@c <en>@code{cvs admin} as appropriate.
To maintain the keyword expansions supplied by the
vendor, supply the @samp{-ko} option to @code{cvs
import} the first time you import the file.
This will turn off keyword expansion
for that file entirely, so if you want to be more
selective you'll have to think about what you want
and use the @samp{-k} option to @code{cvs update} or
@code{cvs admin} as appropriate.
@c Supplying -ko to import if the file already existed
@c has no effect.  Not clear to me whether it should
@c or not.

@c <en>@node Multiple vendor branches
@node Ramos de fornecedor múltiplos
@c <en>@section Multiple vendor branches
@section Ramos de fornecedor múltiplos

@c <en>All the examples so far assume that there is only one
@c <en>vendor from which you are getting sources.  In some
@c <en>situations you might get sources from a variety of
@c <en>places.  For example, suppose that you are dealing with
@c <en>a project where many different people and teams are
@c <en>modifying the software.  There are a variety of ways to
@c <en>handle this, but in some cases you have a bunch of
@c <en>source trees lying around and what you want to do more
@c <en>than anything else is just to all put them in @sc{cvs} so
@c <en>that you at least have them in one place.
All the examples so far assume that there is only one
vendor from which you are getting sources.  In some
situations you might get sources from a variety of
places.  For example, suppose that you are dealing with
a project where many different people and teams are
modifying the software.  There are a variety of ways to
handle this, but in some cases you have a bunch of
source trees lying around and what you want to do more
than anything else is just to all put them in @sc{cvs} so
that you at least have them in one place.

@c <en>For handling situations in which there may be more than
@c <en>one vendor, you may specify the @samp{-b} option to
@c <en>@code{cvs import}.  It takes as an argument the vendor
@c <en>branch to import to.  The default is @samp{-b 1.1.1}.
For handling situations in which there may be more than
one vendor, you may specify the @samp{-b} option to
@code{cvs import}.  It takes as an argument the vendor
branch to import to.  The default is @samp{-b 1.1.1}.

@c <en>For example, suppose that there are two teams, the red
@c <en>team and the blue team, that are sending you sources.
@c <en>You want to import the red team's efforts to branch
@c <en>1.1.1 and use the vendor tag RED.  You want to import
@c <en>the blue team's efforts to branch 1.1.3 and use the
@c <en>vendor tag BLUE.  So the commands you might use are:
For example, suppose that there are two teams, the red
team and the blue team, that are sending you sources.
You want to import the red team's efforts to branch
1.1.1 and use the vendor tag RED.  You want to import
the blue team's efforts to branch 1.1.3 and use the
vendor tag BLUE.  So the commands you might use are:

@example
$ cvs import dir RED RED_1-0
$ cvs import -b 1.1.3 dir BLUE BLUE_1-5
@end example

Note that if your vendor tag does not match your
@samp{-b} option, @sc{cvs} will not detect this case!  For
example,

@example
$ cvs import -b 1.1.3 dir RED RED_1-0
@end example

@noindent
@c <en>Be careful; this kind of mismatch is sure to sow
@c <en>confusion or worse.  I can't think of a useful purpose
@c <en>for the ability to specify a mismatch here, but if you
@c <en>discover such a use, don't.  @sc{cvs} is likely to make this
@c <en>an error in some future release.
Be careful; this kind of mismatch is sure to sow
confusion or worse.  I can't think of a useful purpose
for the ability to specify a mismatch here, but if you
discover such a use, don't.  @sc{cvs} is likely to make this
an error in some future release.

@c Probably should say more about the semantics of
@c multiple branches.  What about the default branch?
@c What about joining (perhaps not as useful with
@c multiple branches, or perhaps it is.  Either way
@c should be mentioned).

@c I'm not sure about the best location for this.  In
@c one sense, it might belong right after we've introduced
@c CVS's basic version control model, because people need
@c to figure out builds right away.  The current location
@c is based on the theory that it kind of akin to the
@c "Revision management" section.
@c <en>@node Builds
@node Builds
@c <en>@chapter How your build system interacts with CVS
@chapter How your build system interacts with CVS
@c <en>@cindex Builds
@cindex Builds
@c <en>@cindex make
@cindex make

@c <en>As mentioned in the introduction, @sc{cvs} does not
@c <en>contain software for building your software from source
@c <en>code.  This section describes how various aspects of
@c <en>your build system might interact with @sc{cvs}.
As mentioned in the introduction, @sc{cvs} does not
contain software for building your software from source
code.  This section describes how various aspects of
your build system might interact with @sc{cvs}.

@c Is there a way to discuss this without reference to
@c tools other than CVS?  I'm not sure there is; I
@c wouldn't think that people who learn CVS first would
@c even have this concern.
@c <en>One common question, especially from people who are
@c <en>accustomed to @sc{rcs}, is how to make their build get
@c <en>an up to date copy of the sources.  The answer to this
@c <en>with @sc{cvs} is two-fold.  First of all, since
@c <en>@sc{cvs} itself can recurse through directories, there
@c <en>is no need to modify your @file{Makefile} (or whatever
@c <en>configuration file your build tool uses) to make sure
@c <en>each file is up to date.  Instead, just use two
@c <en>commands, first @code{cvs -q update} and then
@c <en>@code{make} or whatever the command is to invoke your
@c <en>build tool.  Secondly, you do not necessarily
@c <en>@emph{want} to get a copy of a change someone else made
@c <en>until you have finished your own work.  One suggested
@c <en>approach is to first update your sources, then
@c <en>implement, build and
@c <en>test the change you were thinking of, and then commit
@c <en>your sources (updating first if necessary).  By
@c <en>periodically (in between changes, using the approach
@c <en>xjust described) updating your entire tree, you ensure
@c <en>that your sources are sufficiently up to date.
One common question, especially from people who are
accustomed to @sc{rcs}, is how to make their build get
an up to date copy of the sources.  The answer to this
with @sc{cvs} is two-fold.  First of all, since
@sc{cvs} itself can recurse through directories, there
is no need to modify your @file{Makefile} (or whatever
configuration file your build tool uses) to make sure
each file is up to date.  Instead, just use two
commands, first @code{cvs -q update} and then
@code{make} or whatever the command is to invoke your
build tool.  Secondly, you do not necessarily
@emph{want} to get a copy of a change someone else made
until you have finished your own work.  One suggested
approach is to first update your sources, then
implement, build and
test the change you were thinking of, and then commit
your sources (updating first if necessary).  By
periodically (in between changes, using the approach
just described) updating your entire tree, you ensure
that your sources are sufficiently up to date.

@c <en>@cindex Bill of materials
@cindex Bill of materials
@c <en>One common need is to record which versions of which
@c <en>source files went into a particular build.  This kind
@c <en>of functionality is sometimes called @dfn{bill of
@c <en>materials} or something similar.  The best way to do
@c <en>this with @sc{cvs} is to use the @code{tag} command to
@c <en>record which versions went into a given build
@c <en>(@pxref{Tags}).
One common need is to record which versions of which
source files went into a particular build.  This kind
of functionality is sometimes called @dfn{bill of
materials} or something similar.  The best way to do
this with @sc{cvs} is to use the @code{tag} command to
record which versions went into a given build
(@pxref{Etiquetas}).

@c <en>Using @sc{cvs} in the most straightforward manner
@c <en>possible, each developer will have a copy of the entire
@c <en>source tree which is used in a particular build.  If
@c <en>the source tree is small, or if developers are
@c <en>geographically dispersed, this is the preferred
@c <en>solution.  In fact one approach for larger projects is
@c <en>to break a project down into smaller
Using @sc{cvs} in the most straightforward manner
possible, each developer will have a copy of the entire
source tree which is used in a particular build.  If
the source tree is small, or if developers are
geographically dispersed, this is the preferred
solution.  In fact one approach for larger projects is
to break a project down into smaller
@c I say subsystem instead of module because they may or
@c may not use the modules file.
@c <en>separately-compiled subsystems, and arrange a way of
@c <en>releasing them internally so that each developer need
@c <en>check out only those subsystems which they are
@c <en>actively working on.
separately-compiled subsystems, and arrange a way of
releasing them internally so that each developer need
check out only those subsystems which they are
actively working on.

@c <en>Another approach is to set up a structure which allows
@c <en>developers to have their own copies of some files, and
@c <en>for other files to access source files from a central
@c <en>location.  Many people have come up with some such a
Another approach is to set up a structure which allows
developers to have their own copies of some files, and
for other files to access source files from a central
location.  Many people have come up with some such a
@c two such people are paul@sander.cupertino.ca.us (for
@c a previous employer)
@c and gtornblo@senet.abb.se (spicm and related tools),
@c but as far as I know
@c no one has nicely packaged or released such a system (or
@c instructions for constructing one).
@c <en>system using features such as the symbolic link feature
@c <en>found in many operating systems, or the @code{VPATH}
@c <en>feature found in many versions of @code{make}.  One build
@c <en>tool which is designed to help with this kind of thing
@c <en>is Odin (see
@c <en>@code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}).
system using features such as the symbolic link feature
found in many operating systems, or the @code{VPATH}
feature found in many versions of @code{make}.  One build
tool which is designed to help with this kind of thing
is Odin (see
@code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}).
@c Should we be saying more about Odin?  Or how you use
@c it with CVS?  Also, the Prime Time Freeware for Unix
@c disk (see http://www.ptf.com/) has Odin (with a nice
@c paragraph summarizing it on the web), so that might be a
@c semi-"official" place to point people.
@c
@c Of course, many non-CVS systems have this kind of
@c functionality, for example OSF's ODE
@c (http://www.osf.org/ode/) or mk
@c (http://www.grin.net/~pzi/mk-3.18.4.docs/mk_toc.html
@c He has changed providers in the past; a search engine search
@c for "Peter Ziobrzynski" probably won't get too many
@c spurious hits :-).  A more stable URL might be
@c ftp://ftp.uu.net/pub/cmvc/mk).  But I'm not sure
@c there is any point in mentioning them here unless they
@c can work with CVS.

@c ---------------------------------------------------------------------
@c <en>@node Special Files
@node Arquivos especiais
@c <en>@chapter Special Files
@chapter Arquivos especiais

@c <en>@cindex Special files
@cindex Arquivos especiais
@c <en>@cindex Device nodes
@cindex Device nodes
@c <en>@cindex Ownership, saving in CVS
@cindex Ownership, saving in CVS
@c <en>@cindex Permissions, saving in CVS
@cindex Permissions, saving in CVS
@c <en>@cindex Hard links
@cindex Hard links
@c <en>@cindex Symbolic links
@cindex Symbolic links

@c <en>In normal circumstances, @sc{cvs} works only with regular
@c <en>files.  Every file in a project is assumed to be
@c <en>persistent; it must be possible to open, read and close
@c <en>them; and so on.  @sc{cvs} also ignores file permissions and
@c <en>ownerships, leaving such issues to be resolved by the
@c <en>developer at installation time.  In other words, it is
@c <en>not possible to "check in" a device into a repository;
@c <en>if the device file cannot be opened, @sc{cvs} will refuse to
@c <en>handle it.  Files also lose their ownerships and
@c <en>permissions during repository transactions.
In normal circumstances, @sc{cvs} works only with regular
files.  Every file in a project is assumed to be
persistent; it must be possible to open, read and close
them; and so on.  @sc{cvs} also ignores file permissions and
ownerships, leaving such issues to be resolved by the
developer at installation time.  In other words, it is
not possible to "check in" a device into a repository;
if the device file cannot be opened, @sc{cvs} will refuse to
handle it.  Files also lose their ownerships and
permissions during repository transactions.

@ignore
If the configuration variable @code{PreservePermissions}
(@pxref{config}) is set in the repository, @sc{cvs} will
save the following file characteristics in the
repository:

@itemize @bullet
@item user and group ownership
@item permissions
@item major and minor device numbers
@item symbolic links
@item hard link structure
@end itemize

Using the @code{PreservePermissions} option affects the
behavior of @sc{cvs} in several ways.  First, some of the
new operations supported by @sc{cvs} are not accessible to
all users.  In particular, file ownership and special
file characteristics may only be changed by the
superuser.  When the @code{PreservePermissions}
configuration variable is set, therefore, users will
have to be `root' in order to perform @sc{cvs} operations.

When @code{PreservePermissions} is in use, some @sc{cvs}
operations (such as @samp{cvs status}) will not
recognize a file's hard link structure, and so will
emit spurious warnings about mismatching hard links.
The reason is that @sc{cvs}'s internal structure does not
make it easy for these operations to collect all the
necessary data about hard links, so they check for file
conflicts with inaccurate data.

A more subtle difference is that @sc{cvs} considers a file
to have changed only if its contents have changed
(specifically, if the modification time of the working
file does not match that of the repository's file).
Therefore, if only the permissions, ownership or hard
linkage have changed, or if a device's major or minor
numbers have changed, @sc{cvs} will not notice.  In order to
commit such a change to the repository, you must force
the commit with @samp{cvs commit -f}.  This also means
that if a file's permissions have changed and the
repository file is newer than the working copy,
performing @samp{cvs update} will silently change the
permissions on the working copy.

Changing hard links in a @sc{cvs} repository is particularly
delicate.  Suppose that file @file{foo} is linked to
file @file{old}, but is later relinked to file
@file{new}.  You can wind up in the unusual situation
where, although @file{foo}, @file{old} and @file{new}
have all had their underlying link patterns changed,
only @file{foo} and @file{new} have been modified, so
@file{old} is not considered a candidate for checking
in.  It can be very easy to produce inconsistent
results this way.  Therefore, we recommend that when it
is important to save hard links in a repository, the
prudent course of action is to @code{touch} any file
whose linkage or status has changed since the last
checkin.  Indeed, it may be wise to @code{touch *}
before each commit in a directory with complex hard
link structures.

It is worth noting that only regular files may
be merged, for reasons that hopefully are obvious.  If
@samp{cvs update} or @samp{cvs checkout -j} attempts to
merge a symbolic link with a regular file, or two
device files for different kinds of devices, @sc{cvs} will
report a conflict and refuse to perform the merge.  At
the same time, @samp{cvs diff} will not report any
differences between these files, since no meaningful
textual comparisons can be made on files which contain
no text.

The @code{PreservePermissions} features do not work
with client/server @sc{cvs}.  Another limitation is
that hard links must be to other files within the same
directory; hard links across directories are not
supported.
@end ignore

@c ---------------------------------------------------------------------
@c <en>@node Comandos do CVS
@node Comandos do CVS
@c <en>@appendix Guia dos comandos do CVS
@appendix Guia dos comandos do CVS

@c <en>This appendix describes the overall structure of
@c <en>@sc{cvs} commands, and describes some commands in
@c <en>detail (others are described elsewhere; for a quick
@c <en>reference to @sc{cvs} commands, @pxref{Invoking CVS}).
Este apêndice descreve a estrutura geral dos comandos
do @sc{cvs}, e descreve alguns comandos em detalhe
(outros são descritos em outra parte; para
uma referência rápida dos comandos do @sc{cvs},
@pxref{Chamando o CVS}).
@c The idea is that we want to move the commands which
@c are described here into the main body of the manual,
@c in the process reorganizing the manual to be
@c organized around what the user wants to do, not
@c organized around CVS commands.
@c
@c Note that many users do expect a manual which is
@c organized by command.  At least some users do.
@c One good addition to the "organized by command"
@c section (if any) would be "see also" links.
@c The awk manual might be a good example; it has a
@c reference manual which is more verbose than Invoking
@c CVS but probably somewhat less verbose than CVS
@c Commands.

@menu
@c <en>* Structure::                   Overall structure of CVS commands
* Estrutura::                   Estrutura geral dos comandos do CVS
@c <en>* Exit status::                 Indicating CVS's success or failure
* Estados de saída::            Indicando o sucesso ou falha do CVS
@c <en>* ~/.cvsrc::                    Default options with the ~/.cvsrc file
* ~/.cvsrc::                    Opções padrão com o arquivo ~/.cvsrc
@c <en>* Global options::              Options you give to the left of cvs_command
* Opções globais::              Opções que você bota a esquerda do comando_do_cvs
@c <en>* Common options::              Options you give to the right of cvs_command
* Opções comuns::              Opções que você bota a direita do comando_do_cvs
@c <en>* admin::                       Administration
* admin::                       Administração
@c <en>* checkout::                    Checkout sources for editing
* checkout::                    ???Checkout??? fontes para edição
@c <en>* commit::                      Check files into the repository
* commit::                      Colocar arquivos no repositório
@c <en>* diff::                        Show differences between revisions
* diff::                        Mostrar diferenças entre revisões
@c <en>* export::                      Export sources from CVS, similar to checkout
* export::                      Exportar fontes para fora do CVS, similar ao ???checkout???
@c <en>* history::                     Show status of files and users
* history::                     Mostrar estado de arquivos e usuários
@c <en>* import::                      Import sources into CVS, using vendor branches
* import::                      Importar fontes para dentro do CVS, usando ramos de fornecedor
@c <en>* log::                         Show log messages for files
* log::                         Mostrar mensagens de log para arquivos
@c <en>* rdiff::                       'patch' format diffs between releases
* rdiff::                       'patch' format diffs between releases
@c <en>* release::                     Indicate that a directory is no longer in use
* release::                     Avisar que um diretorio não está mais em uso
@c <en>* update::                      Bring work tree in sync with repository
* update::                      Deixar árvore de trabalho em sincronia com o repositório
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Structure
@node Estrutura
@c <en>@appendixsec Overall structure of CVS commands
@appendixsec Estrutura geral dos comandos do CVS
@c <en>@cindex Structure
@cindex Estrutura
@c <en>@cindex CVS command structure
@cindex Estrutura do comando CVS
@c <en>@cindex Command structure
@cindex Estrutura do comando
@c <en>@cindex Format of CVS commands
@cindex Formato dos comandos do CVS

@c <en>The overall format of all @sc{cvs} commands is:
O formato geral de todos os comandos do @sc{cvs} é:

@example
cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
@end example

@table @code
@c <en>@item cvs
@item cvs
@c <en>The name of the @sc{cvs} program.
O nome do programa @sc{cvs}.

@c <en>@item cvs_options
@item cvs_options
@c <en>Some options that affect all sub-commands of @sc{cvs}.  These are
@c <en>described below.
Algumas opções que afetam todos os sub-comandos do
@sc{cvs}.  Estes estão descritos abaixo.

@c <en>@item cvs_command
@item cvs_command
@c <en>One of several different sub-commands.  Some of the commands have
@c <en>aliases that can be used instead; those aliases are noted in the
@c <en>reference manual for that command.  There are only two situations
@c <en>where you may omit @samp{cvs_command}: @samp{cvs -H} elicits a
@c <en>list of available commands, and @samp{cvs -v} displays version
@c <en>information on @sc{cvs} itself.
Um dos vários sub-comandos.  Alguns dos comandos têm
???aliases??? substituí-los; estes ???aliases??? são
listados no manual de referência do comando.  Existem
apenas duas situações onde você pode omitir o
@samp{cvs_command}: @samp{cvs -H} retorna uma lista de
comandos disponíveis, e @samp{cvs -v} mostra
informações sobre a versão do próprio @sc{cvs}.

@c <en>@item command_options
@item command_options
@c <en>Options that are specific for the command.
Opções que são específicas para o comando.

@c <en>@item command_args
@item command_args
@c <en>Arguments to the commands.
Argumentos para os comandos.
@end table

@c <en>There is unfortunately some confusion between
@c <en>@code{cvs_options} and @code{command_options}.
@c <en>@samp{-l}, when given as a @code{cvs_option}, only
@c <en>affects some of the commands.  When it is given as a
@c <en>@code{command_option} is has a different meaning, and
@c <en>is accepted by more commands.  In other words, do not
@c <en>take the above categorization too seriously.  Look at
@c <en>the documentation instead.
Infelizmente, existe alguma confusão entre
@code{cvs_options} e @code{command_options}. @samp{-l},
quando passado como @code{cvs_option}, afeta apenas
alguns dos comandos.  Quando é passado como um
@code{command_option} tem um significado diferente, e é
aceito por mais comandos.  Em outras palavras, não leve
a categorização acima tão a sério.  Olhe a
documentação, ao invés disto.

@c <en>@node Exit status
@node Estados de saída
@c <en>@appendixsec CVS's exit status
@appendixsec estado de saída do CVS
@c <en>@cindex Exit status, of CVS
@cindex Estados de saída do CVS

@c <en>@sc{cvs} can indicate to the calling environment whether it
@c <en>succeeded or failed by setting its @dfn{exit status}.
@c <en>The exact way of testing the exit status will vary from
@c <en>one operating system to another.  For example in a unix
@c <en>shell script the @samp{$?} variable will be 0 if the
@c <en>last command returned a successful exit status, or
@c <en>greater than 0 if the exit status indicated failure.
O @sc{cvs} pode indicar para o ambiente que o chamou se
ele foi bem-sucedido ou falhou ao ajustar seu
@dfn{estado de saída}.  A forma exata de testar o
estado de saída varia de um sistema operacional para
outro.  Por exemplo, num shell script do unix a
variável @samp{$?} será 0 se o último comando retornar
um estado de saída bem-sucedido, ou maior que 0 se o
estado de saída indicar uma falha.

@c <en>If @sc{cvs} is successful, it returns a successful status;
@c <en>if there is an error, it prints an error message and
@c <en>returns a failure status.  The one exception to this is
@c <en>the @code{cvs diff} command.  It will return a
@c <en>successful status if it found no differences, or a
@c <en>failure status if there were differences or if there
@c <en>was an error.  Because this behavior provides no good
@c <en>way to detect errors, in the future it is possible that
@c <en>@code{cvs diff} will be changed to behave like the
@c <en>other @sc{cvs} commands.
Se o @sc{cvs} é bem-sucedido, retorna um estado de sucesso;
se existe um erro, mostra uma mensagem de erro e
retorna um estado de falha.  A única exceção para isto
é o comando @code{cvs diff}.  Ele retornará um estado
de sucesso se não encontrar diferenças, ou um estado de
sucesso se existirem diferenças ou acontecer um erro.
Já que este comportamento não fornece uma boa maneira
de detectar erros, é possível que no futuro o @code{cvs
diff} seja mudado para se comportar como os outros
comandos do @sc{cvs}.
@c It might seem like checking whether cvs -q diff
@c produces empty or non-empty output can tell whether
@c there were differences or not.  But it seems like
@c there are cases with output but no differences
@c (testsuite basica-8b).  It is not clear to me how
@c useful it is for a script to be able to check
@c whether there were differences.
@c FIXCVS? In previous versions of CVS, cvs diff
@c returned 0 for no differences, 1 for differences, or
@c 2 for errors.  Is this behavior worth trying to
@c bring back (but what does it mean for VMS?)?

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node ~/.cvsrc
@node ~/.cvsrc
@c <en>@appendixsec Default options and the ~/.cvsrc file
@appendixsec Opções padrão e o arquivo ~/.cvsrc
@c <en>@cindex .cvsrc file
@cindex Arquivo .cvsrc
@c <en>@cindex Option defaults
@cindex Padrão, opções

@c <en>There are some @code{command_options} that are used so
@c <en>often that you might have set up an alias or some other
@c <en>means to make sure you always specify that option.  One
@c <en>example (the one that drove the implementation of the
@c <en>@file{.cvsrc} support, actually) is that many people find the
@c <en>default output of the @samp{diff} command to be very
@c <en>hard to read, and that either context diffs or unidiffs
@c <en>are much easier to understand.
Existem algumas @code{opções_de_comando} que são tão
usadas que você vai querer  preparar um atalho ou
alguma outra forma de ter certeza que tais opções
sempre vão ser especificadas.  Um exemplo (o que
motivou a implementação do suporte ao arquivo
@file{.cvsrc}, na verdade) é que muitas pessoas acham a
saída do comando @samp{diff} muito difícil de ler, e
que tanto diffs de contexto quanto unidiffs são muito
mais fáceis de entender.

@c <en>The @file{~/.cvsrc} file is a way that you can add
@c <en>default options to @code{cvs_commands} within cvs,
@c <en>instead of relying on aliases or other shell scripts.
O arquivo @file{~/.cvsrc} é uma forma de você adicionar
opções padrão aos @code{comandos_cvs} dentro do cvs, ao
invés de usar alias (apelidos) ou outros scripts de shell.

@c <en>The format of the @file{~/.cvsrc} file is simple.  The
@c <en>file is searched for a line that begins with the same
@c <en>name as the @code{cvs_command} being executed.  If a
@c <en>match is found, then the remainder of the line is split
@c <en>up (at whitespace characters) into separate options and
@c <en>added to the command arguments @emph{before} any
@c <en>options from the command line.
O formato do arquivo @file{~/.cvsrc} é simples.  O
arquivo é varrido por uma linha que comece com o mesmo
nome do @code{comando_cvs} sendo executado.  Se
encontra, então o restante da linha é dividido (pelos
espaços) em opções distintas e adicionadas aos
argumentos do comando @emph{antes} de quaisquer opções
da linha de comando.

@c <en>If a command has two names (e.g., @code{checkout} and
@c <en>@code{co}), the official name, not necessarily the one
@c <en>used on the command line, will be used to match against
@c <en>the file.  So if this is the contents of the user's
@c <en>@file{~/.cvsrc} file:
Se um comando tem dois nomes (e.g., @code{checkout} e
@code{co}), o nome oficial, que não é necessariamente o
usado na linha de comando,  vai ser usado para fazer a
busca no arquivo.  Logo, se este é o conteúdo do
arquivo @file{~/.cvsrc} do usuário:

@example
log -N
diff -uN
rdiff -u
update -Pd
checkout -P
release -d
@end example

@noindent
@c <en>the command @samp{cvs checkout foo} would have the
@c <en>@samp{-P} option added to the arguments, as well as
@c <en>@samp{cvs co foo}.
o comando @samp{cvs checkout foo} vai ter a opção
@samp{-P} adicionada a seus argumentos, assim como
@samp{cvs co foo}.

@c <en>With the example file above, the output from @samp{cvs
@c <en>diff foobar} will be in unidiff format.  @samp{cvs diff
@c <en>-c foobar} will provide context diffs, as usual.
@c <en>Getting "old" format diffs would be slightly more
@c <en>complicated, because @code{diff} doesn't have an option
@c <en>to specify use of the "old" format, so you would need
@c <en>@samp{cvs -f diff foobar}.
Com o arquivo de exemplo acima, a saída de @samp{cvs
diff foobar} vai ser no formato unidiff.  @samp{cvs
diff -c foobar} vai dar diffs de contexto, que é o normal.
Obter o diff no formato "velho" vai ser um pouco mais
complicado, já que o @code{diff} não tem uma opção para
especificar o uso do formato "velho", logo você vai ter
que usar @samp{cvs -f diff foobar}.

@c <en>In place of the command name you can use @code{cvs} to
@c <en>specify global options (@pxref{Global options}).  For
@c <en>example the following line in @file{.cvsrc}
Ao invés de no nome do comando você pode usar o
@code{cvs} especificando opções globais (@pxref{Opções globais}).  Por
exemplo a seguinte linha em @file{.cvsrc}

@example
cvs -z6
@end example

@noindent
@c <en>causes @sc{cvs} to use compression level 6.
faz com que o @sc{cvs} use compressão de nível 6.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Global options
@node Opções globais
@c <en>@appendixsec Global options
@appendixsec Opções globais
@c <en>@cindex Options, global
@cindex Options, global
@c <en>@cindex Global options
@cindex Opções globais
@c <en>@cindex Left-hand options
@cindex Left-hand options

The available @samp{cvs_options} (that are given to the
left of @samp{cvs_command}) are:

@table @code
@c <en>@item --allow-root=@var{rootdir}
@item --allow-root=@var{rootdir}
@c <en>Specify legal @sc{cvsroot} directory.  See
@c <en>@ref{Password authentication server}.
Specify legal @sc{cvsroot} directory.  See
@ref{Servidor de autenticação por senha}.

@c <en>@cindex Authentication, stream
@cindex Authentication, stream
@c <en>@cindex Stream authentication
@cindex Stream authentication
@c <en>@item -a
@item -a
@c <en>Authenticate all communication between the client and
@c <en>the server.  Only has an effect on the @sc{cvs} client.
@c <en>As of this writing, this is only implemented when using
@c <en>a GSSAPI connection (@pxref{GSSAPI authenticated}).
@c <en>Authentication prevents certain sorts of attacks
@c <en>involving hijacking the active @sc{tcp} connection.
@c <en>Enabling authentication does not enable encryption.
Authenticate all communication between the client and
the server.  Only has an effect on the @sc{cvs} client.
As of this writing, this is only implemented when using
a GSSAPI connection (@pxref{Autenticação GSSAPI}).
Authentication prevents certain sorts of attacks
involving hijacking the active @sc{tcp} connection.
Enabling authentication does not enable encryption.

@cindex RCSBIN, overriding
@cindex Overriding RCSBIN
@item -b @var{bindir}
In @sc{cvs} 1.9.18 and older, this specified that
@sc{rcs} programs are in the @var{bindir} directory.
Current versions of @sc{cvs} do not run @sc{rcs}
programs; for compatibility this option is accepted,
but it does nothing.

@cindex TMPDIR, overriding
@cindex Overriding TMPDIR
@item -T @var{tempdir}
Use @var{tempdir} as the directory where temporary files are
located.  Overrides the setting of the @code{$TMPDIR} environment
variable and any precompiled directory.  This parameter should be
specified as an absolute pathname.
(When running client/server, @samp{-T} affects only the local process;
specifying @samp{-T} for the client has no effect on the server and
vice versa.)

@cindex CVSROOT, overriding
@cindex Overriding CVSROOT
@item -d @var{cvs_root_directory}
Use @var{cvs_root_directory} as the root directory
pathname of the repository.  Overrides the setting of
the @code{$CVSROOT} environment variable.  @xref{Repositório}.

@c <en>@cindex EDITOR, overriding
@cindex EDITOR, overriding
@c <en>@cindex Overriding EDITOR
@cindex Overriding EDITOR
@c <en>@item -e @var{editor}
@item -e @var{editor}
@c <en>Use @var{editor} to enter revision log information.  Overrides the
@c <en>setting of the @code{$CVSEDITOR} and @code{$EDITOR}
@c <en>environment variables.  For more information, see
@c <en>@ref{Committing your changes}.
Use @var{editor} to enter revision log information.  Overrides the
setting of the @code{$CVSEDITOR} and @code{$EDITOR}
environment variables.  For more information, see
@ref{Efetivando suas alterações}.

@item -f
Do not read the @file{~/.cvsrc} file.  This
option is most often used because of the
non-orthogonality of the @sc{cvs} option set.  For
example, the @samp{cvs log} option @samp{-N} (turn off
display of tag names) does not have a corresponding
option to turn the display on.  So if you have
@samp{-N} in the @file{~/.cvsrc} entry for @samp{log},
you may need to use @samp{-f} to show the tag names.

@item -H
@itemx --help
Display usage information about the specified @samp{cvs_command}
(but do not actually execute the command).  If you don't specify
a command name, @samp{cvs -H} displays overall help for
@sc{cvs}, including a list of other help options.
@c It seems to me it is better to document it this way
@c rather than trying to update this documentation
@c every time that we add a --help-foo option.  But
@c perhaps that is confusing...

@item -l
Do not log the @samp{cvs_command} in the command history (but execute it
anyway).  @xref{history}, for information on command history.

@cindex Read-only repository mode
@item -R
Turns on read-only repository mode.  This allows one to check out from a
read-only repository, such as within an anoncvs server, or from a CDROM
repository.

Same effect as if the @code{CVSREADONLYFS} environment
variable is set. Using @samp{-R} can also considerably
speed up checkout's over NFS.

@cindex Read-only mode
@item -n
Do not change any files.  Attempt to execute the
@samp{cvs_command}, but only to issue reports; do not remove,
update, or merge any existing files, or create any new files.

Note that @sc{cvs} will not necessarily produce exactly
the same output as without @samp{-n}.  In some cases
the output will be the same, but in other cases
@sc{cvs} will skip some of the processing that would
have been required to produce the exact same output.

@item -Q
Cause the command to be really quiet; the command will only
generate output for serious problems.

@item -q
Cause the command to be somewhat quiet; informational messages,
such as reports of recursion through subdirectories, are
suppressed.

@c <en>@cindex Read-only files, and -r
@cindex Read-only files, and -r
@c <en>@item -r
@item -r
@c <en>Make new working files read-only.  Same effect
@c <en>as if the @code{$CVSREAD} environment variable is set
@c <en>(@pxref{Environment variables}).  The default is to
@c <en>make working files writable, unless watches are on
@c <en>(@pxref{Watches}).
Make new working files read-only.  Same effect
as if the @code{$CVSREAD} environment variable is set
(@pxref{Variáveis de ambiente}).  The default is to
make working files writable, unless watches are on
(@pxref{???Watches???}).

@item -s @var{variable}=@var{value}
Set a user variable (@pxref{Variables}).

@cindex Trace
@item -t
Trace program execution; display messages showing the steps of
@sc{cvs} activity.  Particularly useful with @samp{-n} to explore the
potential impact of an unfamiliar command.

@item -v
@item --version
Display version and copyright information for @sc{cvs}.

@cindex CVSREAD, overriding
@cindex Overriding CVSREAD
@item -w
Make new working files read-write.  Overrides the
setting of the @code{$CVSREAD} environment variable.
Files are created read-write by default, unless @code{$CVSREAD} is
set or @samp{-r} is given.
@c Note that -w only overrides -r and CVSREAD; it has
@c no effect on files which are readonly because of
@c "cvs watch on".  My guess is that is the way it
@c should be (or should "cvs -w get" on a watched file
@c be the same as a get and a cvs edit?), but I'm not
@c completely sure whether to document it this way.

@item -x
@c <en>@cindex Encryption
@cindex Encryption
@c <en>Encrypt all communication between the client and the
@c <en>server.  Only has an effect on the @sc{cvs} client.  As
@c <en>of this writing, this is only implemented when using a
@c <en>GSSAPI connection (@pxref{GSSAPI authenticated}) or a
@c <en>Kerberos connection (@pxref{Kerberos authenticated}).
@c <en>Enabling encryption implies that message traffic is
@c <en>also authenticated.  Encryption support is not
@c <en>available by default; it must be enabled using a
@c <en>special configure option, @file{--enable-encryption},
@c <en>when you build @sc{cvs}.
Encrypt all communication between the client and the
server.  Only has an effect on the @sc{cvs} client.  As
of this writing, this is only implemented when using a
GSSAPI connection (@pxref{Autenticação GSSAPI}) or a
Kerberos connection (@pxref{Autenticação kerberos}).
Enabling encryption implies that message traffic is
also authenticated.  Encryption support is not
available by default; it must be enabled using a
special configure option, @file{--enable-encryption},
when you build @sc{cvs}.

@item -z @var{gzip-level}
@cindex Compression
@cindex Gzip
Set the compression level.
Valid levels are 1 (high speed, low compression) to
9 (low speed, high compression), or 0 to disable
compression (the default).
Only has an effect on the @sc{cvs} client.

@end table

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node Common options
@node Opções comuns
@c <en>@appendixsec Common command options
@appendixsec Common command options
@c <en>@cindex Common options
@cindex Opções comuns
@c <en>@cindex Right-hand options
@cindex Right-hand options

This section describes the @samp{command_options} that
are available across several @sc{cvs} commands.  These
options are always given to the right of
@samp{cvs_command}. Not all
commands support all of these options; each option is
only supported for commands where it makes sense.
However, when a command has one of these options you
can almost always count on the same behavior of the
option as in other commands.  (Other command options,
which are listed with the individual commands, may have
different behavior from one @sc{cvs} command to the other).

@strong{Note: the @samp{history} command is an exception; it supports
many options that conflict even with these standard options.}

@table @code
@cindex Dates
@cindex Time
@cindex Specifying dates
@item -D @var{date_spec}
Use the most recent revision no later than @var{date_spec}.
@var{date_spec} is a single argument, a date description
specifying a date in the past.

@c <en>The specification is @dfn{sticky} when you use it to make a
@c <en>private copy of a source file; that is, when you get a working
@c <en>file using @samp{-D}, @sc{cvs} records the date you specified, so that
@c <en>further updates in the same directory will use the same date
@c <en>(for more information on sticky tags/dates, @pxref{Sticky tags}).
The specification is @dfn{sticky} when you use it to make a
private copy of a source file; that is, when you get a working
file using @samp{-D}, @sc{cvs} records the date you specified, so that
further updates in the same directory will use the same date
(for more information on sticky tags/dates, @pxref{Etiquetas adesivas}).

@samp{-D} is available with the @code{annotate}, @code{checkout},
@code{diff}, @code{export}, @code{history},
@code{rdiff}, @code{rtag}, @code{tag}, and @code{update} commands.
(The @code{history} command uses this option in a
slightly different way; @pxref{history options}).

@c What other formats should we accept?  I don't want
@c to start accepting a whole mess of non-standard
@c new formats (there are a lot which are in wide use in
@c one context or another), but practicality does
@c dictate some level of flexibility.
@c * POSIX.2 (e.g. touch, ls output, date) and other
@c POSIX and/or de facto unix standards (e.g. at).  The
@c practice here is too inconsistent to be of any use.
@c * VMS dates.  This is not a formal standard, but
@c there is a published specification (see SYS$ASCTIM
@c and SYS$BINTIM in the _VMS System Services Reference
@c Manual_), it is implemented consistently in VMS
@c utilities, and VMS users will expect CVS running on
@c VMS to support this format (and if we're going to do
@c that, better to make CVS support it on all
@c platforms.  Maybe).
@c
@c NOTE: The tar manual has some documentation for
@c getdate.y (just for our info; we don't want to
@c attempt to document all the formats accepted by
@c getdate.y).
@c
@c One more note: In output, CVS should consistently
@c use one date format, and that format should be one that
@c it accepts in input as well.  The former isn't
@c really true (see survey below), and I'm not
@c sure that either of those formats is accepted in
@c input.
@c
@c cvs log
@c   current 1996/01/02 13:45:31
@c   Internet 02 Jan 1996 13:45:31 UT
@c   ISO 1996-01-02 13:45:31
@c cvs ann
@c   current 02-Jan-96
@c   Internet-like 02 Jan 96
@c   ISO 96-01-02
@c cvs status
@c   current Tue Jun 11 02:54:53 1996
@c   Internet [Tue,] 11 Jun 1996 02:54:53
@c   ISO 1996-06-11 02:54:53
@c   note: date possibly should be omitted entirely for
@c   other reasons.
@c cvs editors
@c   current Tue Jun 11 02:54:53 1996 GMT
@c cvs history
@c   current 06/11 02:54 +0000
@c any others?
@c There is a good chance the proper solution has to
@c involve at least some level of letting the user
@c decide which format (with the default being the
@c formats CVS has always used; changing these might be
@c _very_ disruptive since scripts may very well be
@c parsing them).
@c
@c Another random bit of prior art concerning dates is
@c the strptime function which takes templates such as
@c "%m/%d/%y", and apparent a variant of getdate()
@c which also honors them.  See
@c X/Open CAE Specification, System Interfaces and
@c Headers Issue 4, Version 2 (September 1994), in the
@c entry for getdate() on page 231

@cindex Timezone, in input
@cindex Zone, time, in input
A wide variety of date formats are supported by
@sc{cvs}.  The most standard ones are ISO8601 (from the
International Standards Organization) and the Internet
e-mail standard (specified in RFC822 as amended by
RFC1123).

@c Probably should be doing more to spell out just what
@c the rules are, rather than just giving examples.
@c But I want to keep this simple too.
@c So I don't know....
@c A few specific issues: (1) Maybe should reassure
@c people that years after 2000
@c work (they are in the testsuite, so they do indeed
@c work).  (2) What do two digit years
@c mean?  Where do we accept them?  (3) Local times can
@c be ambiguous or nonexistent if they fall during the
@c hour when daylight savings time goes into or out of
@c effect.  Pretty obscure, so I'm not at all sure we
@c should be documenting the behavior in that case.
ISO8601 dates have many variants but a few examples
are:

@example
1972-09-24
1972-09-24 20:05
@end example
@c I doubt we really accept all ISO8601 format dates
@c (for example, decimal hours like 1972-09-24 20,2)
@c I'm not sure we should, many of them are pretty
@c bizarre and it has lots of gratuitous multiple ways
@c to specify the same thing.

There are a lot more ISO8601 date formats, and @sc{cvs}
accepts many of them, but you probably don't want to
hear the @emph{whole} long story :-).

@c Citing a URL here is kind of problematic given how
@c much they change and people who have old versions of
@c this manual, but in case we want to reinstate an
@c ISO8601 URL, a few are:
@c http://www.saqqara.demon.co.uk/datefmt.htm
@c http://www.cl.cam.ac.uk/~mgk25/iso-time.html
@c Citing some other ISO8601 source is probably even
@c worse :-).

In addition to the dates allowed in Internet e-mail
itself, @sc{cvs} also allows some of the fields to be
omitted.  For example:
@c FIXME: Need to figure out better, and document,
@c what we want to allow the user to omit.
@c NOTE: "omit" does not imply "reorder".
@c FIXME: Need to cite a web page describing how to get
@c RFC's.

@example
24 Sep 1972 20:05
24 Sep
@end example

The date is interpreted as being in the
local timezone, unless a specific timezone is
specified.

These two date formats are preferred.  However,
@sc{cvs} currently accepts a wide variety of other date
formats.  They are intentionally not documented here in
any detail, and future versions of @sc{cvs} might not
accept all of them.
@c We should document and testsuite "now" and
@c "yesterday".  "now" is mentioned in the FAQ and
@c "yesterday" is mentioned in this document (and the
@c message from "cvs import" suggesting a merge
@c command).  What else?  Probably some/all of the "3
@c weeks ago" family.
@c
@c Maybe at
@c some point have CVS start give warnings on "unofficial"
@c formats (many of which might be typos or user
@c misunderstandings, and/or formats people never/rarely
@c use to specify dates)?

One such format is
@code{@var{month}/@var{day}/@var{year}}.  This may
confuse people who are accustomed to having the month
and day in the other order; @samp{1/4/96} is January 4,
not April 1.

Remember to quote the argument to the @samp{-D}
flag so that your shell doesn't interpret spaces as
argument separators.  A command using the @samp{-D}
flag can look like this:

@example
$ cvs diff -D "1 hour ago" cvs.texinfo
@end example

@cindex Forcing a tag match
@item -f
When you specify a particular date or tag to @sc{cvs} commands, they
normally ignore files that do not contain the tag (or did not
exist prior to the date) that you specified.  Use the @samp{-f} option
if you want files retrieved even when there is no match for the
tag or date.  (The most recent revision of the file
will be used).

Note that even with @samp{-f}, a tag that you specify
must exist (that is, in some file, not necessary in
every file).  This is so that @sc{cvs} will continue to
give an error if you mistype a tag name.

@need 800
@samp{-f} is available with these commands:
@code{annotate}, @code{checkout}, @code{export},
@code{rdiff}, @code{rtag}, and @code{update}.

@c <en>@strong{WARNING:  The @code{commit} and @code{remove}
@c <en>commands also have a
@c <en>@samp{-f} option, but it has a different behavior for
@c <en>those commands.  See @ref{commit options}, and
@c <en>@ref{Removing files}.}
@strong{WARNING:  The @code{commit} and @code{remove}
commands also have a
@samp{-f} option, but it has a different behavior for
those commands.  See @ref{commit options}, and
@ref{Removendo arquivos}.}

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Override the default processing of RCS keywords other than
@c <en>@samp{-kb}.  @xref{Keyword substitution}, for the meaning of
@c <en>@var{kflag}.  Used with the @code{checkout} and @code{update}
@c <en>commands, your @var{kflag} specification is
@c <en>@dfn{sticky}; that is, when you use this option
@c <en>with a @code{checkout} or @code{update} command,
@c <en>@sc{cvs} associates your selected @var{kflag} with any files
@c <en>it operates on, and continues to use that @var{kflag} with future
@c <en>commands on the same files until you specify otherwise.
Override the default processing of RCS keywords other than
@samp{-kb}.  @xref{Substituição de palavra-chave}, for the meaning of
@var{kflag}.  Used with the @code{checkout} and @code{update}
commands, your @var{kflag} specification is
@dfn{sticky}; that is, when you use this option
with a @code{checkout} or @code{update} command,
@sc{cvs} associates your selected @var{kflag} with any files
it operates on, and continues to use that @var{kflag} with future
commands on the same files until you specify otherwise.

@c <en>The @samp{-k} option is available with the @code{add},
@c <en>@code{checkout}, @code{diff}, @code{export}, @code{import} and
@c <en>@code{update} commands.
The @samp{-k} option is available with the @code{add},
@code{checkout}, @code{diff}, @code{export}, @code{import} and
@code{update} commands.

@c <en>@strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag
@c <en>overrode the @samp{-kb} indication for a binary file.  This could
@c <en>sometimes corrupt binary files.  @xref{Merging and keywords}, for
@c <en>more.}
@strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag
overrode the @samp{-kb} indication for a binary file.  This could
sometimes corrupt binary files.  @xref{Mesclagem e palavras-chave}, for
more.}

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory, rather than
@c <en>recursing through subdirectories.
Local; run only in current working directory, rather than
recursing through subdirectories.

@c <en>Available with the following commands: @code{annotate}, @code{checkout},
@c <en>@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export},
@c <en>@code{log}, @code{rdiff}, @code{remove}, @code{rtag},
@c <en>@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch},
@c <en>and @code{watchers}.
Available with the following commands: @code{annotate}, @code{checkout},
@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export},
@code{log}, @code{rdiff}, @code{remove}, @code{rtag},
@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch},
and @code{watchers}.

@c <en>@cindex Editor, avoiding invocation of
@cindex Editor, avoiding invocation of
@c <en>@cindex Avoiding editor invocation
@cindex Avoiding editor invocation
@c <en>@item -m @var{message}
@item -m @var{message}
@c <en>Use @var{message} as log information, instead of
@c <en>invoking an editor.
Use @var{message} as log information, instead of
invoking an editor.

@c <en>Available with the following commands: @code{add},
@c <en>@code{commit} and @code{import}.
Available with the following commands: @code{add},
@code{commit} and @code{import}.

@c <en>@item -n
@item -n
@c <en>Do not run any tag program.  (A program can be
@c <en>specified to run in the modules
@c <en>database (@pxref{modules}); this option bypasses it).
Do not run any tag program.  (A program can be
specified to run in the modules
database (@pxref{modules}); this option bypasses it).

@c <en>@strong{Note: this is not the same as the @samp{cvs -n}
@c <en>program option, which you can specify to the left of a cvs command!}
@strong{Note: this is not the same as the @samp{cvs -n}
program option, which you can specify to the left of a cvs command!}

Available with the @code{checkout}, @code{commit}, @code{export},
and @code{rtag} commands.

@item -P
@c <en>Prune empty directories.  See @ref{Removing directories}.
Prune empty directories.  See @ref{Removendo diretórios}.

@item -p
Pipe the files retrieved from the repository to standard output,
rather than writing them in the current directory.  Available
with the @code{checkout} and @code{update} commands.

@item -R
Process directories recursively.  This is on by default.

Available with the following commands: @code{annotate}, @code{checkout},
@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export},
@code{rdiff}, @code{remove}, @code{rtag},
@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch},
and @code{watchers}.

@item -r @var{tag}
@cindex HEAD, special tag
@cindex BASE, special tag
Use the revision specified by the @var{tag} argument instead of the
default @dfn{head} revision.  As well as arbitrary tags defined
with the @code{tag} or @code{rtag} command, two special tags are
always available: @samp{HEAD} refers to the most recent version
available in the repository, and @samp{BASE} refers to the
revision you last checked out into the current working directory.

@c FIXME: What does HEAD really mean?  I believe that
@c the current answer is the head of the default branch
@c for all cvs commands except diff.  For diff, it
@c seems to be (a) the head of the trunk (or the default
@c branch?) if there is no sticky tag, (b) the head of the
@c branch for the sticky tag, if there is a sticky tag.
@c (b) is ugly as it differs
@c from what HEAD means for other commands, but people
@c and/or scripts are quite possibly used to it.
@c See "head" tests in sanity.sh.
@c Probably the best fix is to introduce two new
@c special tags, ".thead" for the head of the trunk,
@c and ".bhead" for the head of the current branch.
@c Then deprecate HEAD.  This has the advantage of
@c not surprising people with a change to HEAD, and a
@c side benefit of also phasing out the poorly-named
@c HEAD (see discussion of reserved tag names in node
@c "Tags").  Of course, .thead and .bhead should be
@c carefully implemented (with the implementation the
@c same for "diff" as for everyone else), test cases
@c written (similar to the ones in "head"), new tests
@c cases written for things like default branches, &c.

@c <en>The tag specification is sticky when you use this
@c <en>@c option
@c <en>with @code{checkout} or @code{update} to make your own
@c <en>copy of a file: @sc{cvs} remembers the tag and continues to use it on
@c <en>future update commands, until you specify otherwise (for more information
@c <en>on sticky tags/dates, @pxref{Sticky tags}).
The tag specification is sticky when you use this
@c option
with @code{checkout} or @code{update} to make your own
copy of a file: @sc{cvs} remembers the tag and continues to use it on
future update commands, until you specify otherwise (for more information
on sticky tags/dates, @pxref{Etiquetas adesivas}).

@c <en>The tag can be either a symbolic or numeric tag, as
@c <en>described in @ref{Tags}, or the name of a branch, as
@c <en>described in @ref{Branching and merging}.
The tag can be either a symbolic or numeric tag, as
described in @ref{Etiquetas}, or the name of a branch, as
described in @ref{Ramificando e mesclando}.

Specifying the @samp{-q} global option along with the
@samp{-r} command option is often useful, to suppress
the warning messages when the @sc{rcs} file
does not contain the specified tag.

@strong{Note: this is not the same as the overall @samp{cvs -r} option,
which you can specify to the left of a @sc{cvs} command!}

@samp{-r} is available with the @code{annotate}, @code{checkout},
@code{commit}, @code{diff}, @code{history}, @code{export}, @code{rdiff},
@code{rtag}, and @code{update} commands.

@item -W
Specify file names that should be filtered.  You can
use this option repeatedly.  The spec can be a file
name pattern of the same type that you can specify in
the @file{.cvswrappers} file.
Available with the following commands: @code{import},
and @code{update}.

@end table

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node admin
@appendixsec admin---Administration
@cindex Admin (subcommand)

@itemize @bullet
@item
Requires: repository, working directory.
@item
Changes: repository.
@item
Synonym: rcs
@end itemize

This is the @sc{cvs} interface to assorted
administrative facilities.  Some of them have
questionable usefulness for @sc{cvs} but exist for
historical purposes.  Some of the questionable options
are likely to disappear in the future.  This command
@emph{does} work recursively, so extreme care should be
used.

@cindex cvsadmin
@cindex UserAdminOptions, in CVSROOT/config
On unix, if there is a group named @code{cvsadmin},
only members of that group can run @code{cvs admin}
commands, except for those specified using the
@code{UserAdminOptions} configuration option in the
@file{CVSROOT/config} file.  Options specified using
@code{UserAdminOptions} can be run by any user.  See
@ref{config} for more on @code{UserAdminOptions}.

The @code{cvsadmin} group should exist on the server,
or any system running the non-client/server @sc{cvs}.
To disallow @code{cvs admin} for all users, create a
group with no users in it.  On NT, the @code{cvsadmin}
feature does not exist and all users
can run @code{cvs admin}.

@menu
* admin options::               admin options
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node admin options
@appendixsubsec admin options

Some of these options have questionable usefulness for
@sc{cvs} but exist for historical purposes.  Some even
make it impossible to use @sc{cvs} until you undo the
effect!

@table @code
@item -A@var{oldfile}
Might not work together with @sc{cvs}.  Append the
access list of @var{oldfile} to the access list of the
@sc{rcs} file.

@item -a@var{logins}
Might not work together with @sc{cvs}.  Append the
login names appearing in the comma-separated list
@var{logins} to the access list of the @sc{rcs} file.

@c <en>@item -b[@var{rev}]
@item -b[@var{rev}]
@c <en>Set the default branch to @var{rev}.  In @sc{cvs}, you
@c <en>normally do not manipulate default branches; sticky
@c <en>tags (@pxref{Sticky tags}) are a better way to decide
@c <en>which branch you want to work on.  There is one reason
@c <en>to run @code{cvs admin -b}: to revert to the vendor's
@c <en>version when using vendor branches (@pxref{Reverting
@c <en>local changes}).
@c <en>There can be no space between @samp{-b} and its argument.
Set the default branch to @var{rev}.  In @sc{cvs}, you
normally do not manipulate default branches; sticky
tags (@pxref{Etiquetas adesivas}) are a better way to decide
which branch you want to work on.  There is one reason
to run @code{cvs admin -b}: to revert to the vendor's
version when using vendor branches (@pxref{Reverting
local changes}).
There can be no space between @samp{-b} and its argument.
@c Hmm, we don't document the usage where rev is
@c omitted.  Maybe that usage can/should be deprecated
@c (and replaced with -bHEAD or something?) (so we can toss
@c the optional argument).  Note that -bHEAD does not
@c work, as of 17 Sep 1997, but probably will once "cvs
@c admin" is internal to CVS.

@c <en>@cindex Comment leader
@cindex Comment leader
@c <en>@item -c@var{string}
@item -c@var{string}
@c <en>Sets the comment leader to @var{string}.  The comment
@c <en>leader is not used by current versions of @sc{cvs} or
@c <en>@sc{rcs} 5.7.  Therefore, you can almost surely not
@c <en>worry about it.  @xref{Keyword substitution}.
Sets the comment leader to @var{string}.  The comment
leader is not used by current versions of @sc{cvs} or
@sc{rcs} 5.7.  Therefore, you can almost surely not
worry about it.  @xref{Substituição de palavra-chave}.

@item -e[@var{logins}]
Might not work together with @sc{cvs}.  Erase the login
names appearing in the comma-separated list
@var{logins} from the access list of the RCS file.  If
@var{logins} is omitted, erase the entire access list.
There can be no space between @samp{-e} and its argument.

@item -I
Run interactively, even if the standard input is not a
terminal.  This option does not work with the
client/server @sc{cvs} and is likely to disappear in
a future release of @sc{cvs}.

@item -i
@c <en>Useless with @sc{cvs}.  This creates and initializes a
@c <en>new @sc{rcs} file, without depositing a revision.  With
@c <en>@sc{cvs}, add files with the @code{cvs add} command
@c <en>(@pxref{Adding files}).
Useless with @sc{cvs}.  This creates and initializes a
new @sc{rcs} file, without depositing a revision.  With
@sc{cvs}, add files with the @code{cvs add} command
(@pxref{Adicionando arquivos}).

@c <en>@item -k@var{subst}
@item -k@var{subst}
@c <en>Set the default keyword
@c <en>substitution to @var{subst}.  @xref{Keyword
@c <en>substitution}.  Giving an explicit @samp{-k} option to
@c <en>@code{cvs update}, @code{cvs export}, or @code{cvs
@c <en>checkout} overrides this default.
Set the default keyword
substitution to @var{subst}.
@xref{Substituição de palavra-chave}.  Giving an explicit @samp{-k} option to
@code{cvs update}, @code{cvs export}, or @code{cvs
checkout} overrides this default.

@item -l[@var{rev}]
Lock the revision with number @var{rev}.  If a branch
is given, lock the latest revision on that branch.  If
@var{rev} is omitted, lock the latest revision on the
default branch.  There can be no space between
@samp{-l} and its argument.

This can be used in conjunction with the
@file{rcslock.pl} script in the @file{contrib}
directory of the @sc{cvs} source distribution to
provide reserved checkouts (where only one user can be
editing a given file at a time).  See the comments in
that file for details (and see the @file{README} file
in that directory for disclaimers about the unsupported
nature of contrib).  According to comments in that
file, locking must set to strict (which is the default).

@item -L
Set locking to strict.  Strict locking means that the
owner of an RCS file is not exempt from locking for
checkin.  For use with @sc{cvs}, strict locking must be
set; see the discussion under the @samp{-l} option above.

@cindex Changing a log message
@cindex Replacing a log message
@cindex Correcting a log message
@cindex Fixing a log message
@cindex Log message, correcting
@item -m@var{rev}:@var{msg}
Replace the log message of revision @var{rev} with
@var{msg}.

@c The rcs -M option, to suppress sending mail, has never been
@c documented as a cvs admin option.

@c <en>@item -N@var{name}[:[@var{rev}]]
@item -N@var{name}[:[@var{rev}]]
@c <en>Act like @samp{-n}, except override any previous
@c <en>assignment of @var{name}.  For use with magic branches,
@c <en>see @ref{Magic branch numbers}.
Act like @samp{-n}, except override any previous
assignment of @var{name}.  For use with magic branches,
see @ref{Números de ramos mágicos}.

@item -n@var{name}[:[@var{rev}]]
Associate the symbolic name @var{name} with the branch
or revision @var{rev}.  It is normally better to use
@samp{cvs tag} or @samp{cvs rtag} instead.  Delete the
symbolic name if both @samp{:} and @var{rev} are
omitted; otherwise, print an error message if
@var{name} is already associated with another number.
If @var{rev} is symbolic, it is expanded before
association.  A @var{rev} consisting of a branch number
followed by a @samp{.} stands for the current latest
revision in the branch.  A @samp{:} with an empty
@var{rev} stands for the current latest revision on the
default branch, normally the trunk.  For example,
@samp{cvs admin -n@var{name}:} associates @var{name} with the
current latest revision of all the RCS files;
this contrasts with @samp{cvs admin -n@var{name}:$} which
associates @var{name} with the revision numbers
extracted from keyword strings in the corresponding
working files.

@cindex Deleting revisions
@cindex Outdating revisions
@cindex Saving space
@item -o@var{range}
Deletes (@dfn{outdates}) the revisions given by
@var{range}.

Note that this command can be quite dangerous unless
you know @emph{exactly} what you are doing (for example
see the warnings below about how the
@var{rev1}:@var{rev2} syntax is confusing).

If you are short on disc this option might help you.
But think twice before using it---there is no way short
of restoring the latest backup to undo this command!
If you delete different revisions than you planned,
either due to carelessness or (heaven forbid) a @sc{cvs}
bug, there is no opportunity to correct the error
before the revisions are deleted.  It probably would be
a good idea to experiment on a copy of the repository
first.

Specify @var{range} in one of the following ways:

@table @code
@item @var{rev1}::@var{rev2}
Collapse all revisions between rev1 and rev2, so that
@sc{cvs} only stores the differences associated with going
from rev1 to rev2, not intermediate steps.  For
example, after @samp{-o 1.3::1.5} one can retrieve
revision 1.3, revision 1.5, or the differences to get
from 1.3 to 1.5, but not the revision 1.4, or the
differences between 1.3 and 1.4.  Other examples:
@samp{-o 1.3::1.4} and @samp{-o 1.3::1.3} have no
effect, because there are no intermediate revisions to
remove.

@item ::@var{rev}
Collapse revisions between the beginning of the branch
containing @var{rev} and @var{rev} itself.  The
branchpoint and @var{rev} are left intact.  For
example, @samp{-o ::1.3.2.6} deletes revision 1.3.2.1,
revision 1.3.2.5, and everything in between, but leaves
1.3 and 1.3.2.6 intact.

@item @var{rev}::
Collapse revisions between @var{rev} and the end of the
branch containing @var{rev}.  Revision @var{rev} is
left intact but the head revision is deleted.

@item @var{rev}
Delete the revision @var{rev}.  For example, @samp{-o
1.3} is equivalent to @samp{-o 1.2::1.4}.

@c <en>@item @var{rev1}:@var{rev2}
@item @var{rev1}:@var{rev2}
@c <en>Delete the revisions from @var{rev1} to @var{rev2},
@c <en>inclusive, on the same branch.  One will not be able to
@c <en>retrieve @var{rev1} or @var{rev2} or any of the
@c <en>revisions in between.  For example, the command
@c <en>@samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful.
@c <en>It means to delete revisions up to, and including, the
@c <en>tag R_1_02.  But beware!  If there are files that have not
@c <en>changed between R_1_02 and R_1_03 the file will have
@c <en>@emph{the same} numerical revision number assigned to
@c <en>the tags R_1_02 and R_1_03.  So not only will it be
@c <en>impossible to retrieve R_1_02; R_1_03 will also have to
@c <en>be restored from the tapes!  In most cases you want to
@c <en>specify @var{rev1}::@var{rev2} instead.
Delete the revisions from @var{rev1} to @var{rev2},
inclusive, on the same branch.  One will not be able to
retrieve @var{rev1} or @var{rev2} or any of the
revisions in between.  For example, the command
@samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful.
It means to delete revisions up to, and including, the
tag R_1_02.  But beware!  If there are files that have not
changed between R_1_02 and R_1_03 the file will have
@emph{the same} numerical revision number assigned to
the tags R_1_02 and R_1_03.  So not only will it be
impossible to retrieve R_1_02; R_1_03 will also have to
be restored from the tapes!  In most cases you want to
specify @var{rev1}::@var{rev2} instead.

@c <en>@item :@var{rev}
@item :@var{rev}
@c <en>Delete revisions from the beginning of the
@c <en>branch containing @var{rev} up to and including
@c <en>@var{rev}.
Delete revisions from the beginning of the
branch containing @var{rev} up to and including
@var{rev}.

@c <en>@item @var{rev}:
@item @var{rev}:
@c <en>Delete revisions from revision @var{rev}, including
@c <en>@var{rev} itself, to the end of the branch containing
@c <en>@var{rev}.
Delete revisions from revision @var{rev}, including
@var{rev} itself, to the end of the branch containing
@var{rev}.
@end table

@c <en>None of the revisions to be deleted may have
@c <en>branches or locks.
None of the revisions to be deleted may have
branches or locks.

@c <en>If any of the revisions to be deleted have symbolic
@c <en>names, and one specifies one of the @samp{::} syntaxes,
@c <en>then @sc{cvs} will give an error and not delete any
@c <en>revisions.  If you really want to delete both the
@c <en>symbolic names and the revisions, first delete the
@c <en>symbolic names with @code{cvs tag -d}, then run
@c <en>@code{cvs admin -o}.  If one specifies the
@c <en>non-@samp{::} syntaxes, then @sc{cvs} will delete the
@c <en>revisions but leave the symbolic names pointing to
@c <en>nonexistent revisions.  This behavior is preserved for
@c <en>compatibility with previous versions of @sc{cvs}, but
@c <en>because it isn't very useful, in the future it may
@c <en>change to be like the @samp{::} case.
If any of the revisions to be deleted have symbolic
names, and one specifies one of the @samp{::} syntaxes,
then @sc{cvs} will give an error and not delete any
revisions.  If you really want to delete both the
symbolic names and the revisions, first delete the
symbolic names with @code{cvs tag -d}, then run
@code{cvs admin -o}.  If one specifies the
non-@samp{::} syntaxes, then @sc{cvs} will delete the
revisions but leave the symbolic names pointing to
nonexistent revisions.  This behavior is preserved for
compatibility with previous versions of @sc{cvs}, but
because it isn't very useful, in the future it may
change to be like the @samp{::} case.

@c <en>Due to the way @sc{cvs} handles branches @var{rev}
@c <en>cannot be specified symbolically if it is a branch.
@c <en>@xref{Magic branch numbers}, for an explanation.
Due to the way @sc{cvs} handles branches @var{rev}
cannot be specified symbolically if it is a branch.
@xref{Números de ramos mágicos}, for an explanation.
@c FIXME: is this still true?  I suspect not.

@c <en>Make sure that no-one has checked out a copy of the
@c <en>revision you outdate.  Strange things will happen if he
@c <en>starts to edit it and tries to check it back in.  For
@c <en>this reason, this option is not a good way to take back
@c <en>a bogus commit; commit a new revision undoing the bogus
@c <en>change instead (@pxref{Merging two revisions}).
Make sure that no-one has checked out a copy of the
revision you outdate.  Strange things will happen if he
starts to edit it and tries to check it back in.  For
this reason, this option is not a good way to take back
a bogus commit; commit a new revision undoing the bogus
change instead (@pxref{Mesclando duas revisões}).

@item -q
@c <en>Run quietly; do not print diagnostics.
Run quietly; do not print diagnostics.

@c <en>@item -s@var{state}[:@var{rev}]
@item -s@var{state}[:@var{rev}]
@c <en>Useful with @sc{cvs}.  Set the state attribute of the
@c <en>revision @var{rev} to @var{state}.  If @var{rev} is a
@c <en>branch number, assume the latest revision on that
@c <en>branch.  If @var{rev} is omitted, assume the latest
@c <en>revision on the default branch.  Any identifier is
@c <en>acceptable for @var{state}.  A useful set of states is
@c <en>@samp{Exp} (for experimental), @samp{Stab} (for
@c <en>stable), and @samp{Rel} (for released).  By default,
@c <en>the state of a new revision is set to @samp{Exp} when
@c <en>it is created.  The state is visible in the output from
@c <en>@var{cvs log} (@pxref{log}), and in the
@c <en>@samp{$@splitrcskeyword{}Log$} and @samp{$@splitrcskeyword{}State$} keywords
@c <en>(@pxref{Keyword substitution}).  Note that @sc{cvs}
@c <en>uses the @code{dead} state for its own purposes; to
@c <en>take a file to or from the @code{dead} state use
@c <en>commands like @code{cvs remove} and @code{cvs add}, not
@c <en>@code{cvs admin -s}.
Useful with @sc{cvs}.  Set the state attribute of the
revision @var{rev} to @var{state}.  If @var{rev} is a
branch number, assume the latest revision on that
branch.  If @var{rev} is omitted, assume the latest
revision on the default branch.  Any identifier is
acceptable for @var{state}.  A useful set of states is
@samp{Exp} (for experimental), @samp{Stab} (for
stable), and @samp{Rel} (for released).  By default,
the state of a new revision is set to @samp{Exp} when
it is created.  The state is visible in the output from
@var{cvs log} (@pxref{log}), and in the
@samp{$@splitrcskeyword{}Log$} and @samp{$@splitrcskeyword{}State$} keywords
(@pxref{Substituição de palavra-chave}).  Note that @sc{cvs}
uses the @code{dead} state for its own purposes; to
take a file to or from the @code{dead} state use
commands like @code{cvs remove} and @code{cvs add}, not
@code{cvs admin -s}.

@item -t[@var{file}]
Useful with @sc{cvs}.  Write descriptive text from the
contents of the named @var{file} into the RCS file,
deleting the existing text.  The @var{file} pathname
may not begin with @samp{-}.  The descriptive text can be seen in the
output from @samp{cvs log} (@pxref{log}).
There can be no space between @samp{-t} and its argument.

If @var{file} is omitted,
obtain the text from standard input, terminated by
end-of-file or by a line containing @samp{.} by itself.
Prompt for the text if interaction is possible; see
@samp{-I}.

@item -t-@var{string}
Similar to @samp{-t@var{file}}. Write descriptive text
from the @var{string} into the @sc{rcs} file, deleting
the existing text.
There can be no space between @samp{-t} and its argument.

@c The rcs -T option, do not update last-mod time for
@c minor changes, has never been documented as a
@c cvs admin option.

@item -U
Set locking to non-strict.  Non-strict locking means
that the owner of a file need not lock a revision for
checkin.  For use with @sc{cvs}, strict locking must be
set; see the discussion under the @samp{-l} option
above.

@c <en>@item -u[@var{rev}]
@item -u[@var{rev}]
@c <en>See the option @samp{-l} above, for a discussion of
@c <en>using this option with @sc{cvs}.  Unlock the revision
@c <en>with number @var{rev}.  If a branch is given, unlock
@c <en>the latest revision on that branch.  If @var{rev} is
@c <en>omitted, remove the latest lock held by the caller.
@c <en>Normally, only the locker of a revision may unlock it;
@c <en>somebody else unlocking a revision breaks the lock.
@c <en>This causes the original locker to be sent a @code{commit}
@c <en>notification (@pxref{Getting Notified}).
@c <en>There can be no space between @samp{-u} and its argument.
See the option @samp{-l} above, for a discussion of
using this option with @sc{cvs}.  Unlock the revision
with number @var{rev}.  If a branch is given, unlock
the latest revision on that branch.  If @var{rev} is
omitted, remove the latest lock held by the caller.
Normally, only the locker of a revision may unlock it;
somebody else unlocking a revision breaks the lock.
This causes the original locker to be sent a @code{commit}
notification (@pxref{Recebendo Notificações}).
There can be no space between @samp{-u} and its argument.

@item -V@var{n}
In previous versions of @sc{cvs}, this option meant to
write an @sc{rcs} file which would be acceptable to
@sc{rcs} version @var{n}, but it is now obsolete and
specifying it will produce an error.
@c Note that -V without an argument has never been
@c documented as a cvs admin option.

@item -x@var{suffixes}
In previous versions of @sc{cvs}, this was documented
as a way of specifying the names of the @sc{rcs}
files.  However, @sc{cvs} has always required that the
@sc{rcs} files used by @sc{cvs} end in @samp{,v}, so
this option has never done anything useful.

@c The rcs -z option, to specify the timezone, has
@c never been documented as a cvs admin option.
@end table


@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node checkout
@appendixsec checkout---Check out sources for editing
@cindex checkout (subcommand)
@cindex co (subcommand)

@itemize @bullet
@item
Synopsis: checkout [options] modules@dots{}
@item
Requires: repository.
@item
Changes: working directory.
@item
Synonyms: co, get
@end itemize

Create or update a working directory containing copies of the
source files specified by @var{modules}.  You must execute
@code{checkout} before using most of the other @sc{cvs}
commands, since most of them operate on your working
directory.

The @var{modules} are either
symbolic names for some
collection of source directories and files, or paths to
directories or files in the repository.  The symbolic
names are defined in the @samp{modules} file.
@xref{modules}.
@c Needs an example, particularly of the non-"modules"
@c case but probably of both.

@c FIXME: this seems like a very odd place to introduce
@c people to how CVS works.  The bit about unreserved
@c checkouts is also misleading as it depends on how
@c things are set up.
Depending on the modules you specify, @code{checkout} may
recursively create directories and populate them with
the appropriate source files.  You can then edit these
source files at any time (regardless of whether other
software developers are editing their own copies of the
sources); update them to include new changes applied by
others to the source repository; or commit your work as
a permanent change to the source repository.

Note that @code{checkout} is used to create
directories.  The top-level directory created is always
added to the directory where @code{checkout} is
invoked, and usually has the same name as the specified
module.  In the case of a module alias, the created
sub-directory may have a different name, but you can be
sure that it will be a sub-directory, and that
@code{checkout} will show the relative path leading to
each file as it is extracted into your private work
area (unless you specify the @samp{-Q} global option).

@c <en>The files created by @code{checkout} are created
@c <en>read-write, unless the @samp{-r} option to @sc{cvs}
@c <en>(@pxref{Global options}) is specified, the
@c <en>@code{CVSREAD} environment variable is specified
@c <en>(@pxref{Environment variables}), or a watch is in
@c <en>effect for that file (@pxref{Watches}).
The files created by @code{checkout} are created
read-write, unless the @samp{-r} option to @sc{cvs}
(@pxref{Opções globais}) is specified, the
@code{CVSREAD} environment variable is specified
(@pxref{Variáveis de ambiente}), or a watch is in
effect for that file (@pxref{???Watches???}).

Note that running @code{checkout} on a directory that was already
built by a prior @code{checkout} is also permitted.
This is similar to specifying the @samp{-d} option
to the @code{update} command in the sense that new
directories that have been created in the repository
will appear in your work area.
However, @code{checkout} takes a module name whereas
@code{update} takes a directory name.  Also
to use @code{checkout} this way it must be run from the
top level directory (where you originally ran
@code{checkout} from), so before you run
@code{checkout} to update an existing directory, don't
forget to change your directory to the top level
directory.

For the output produced by the @code{checkout} command
see @ref{update output}.

@menu
* checkout options::            checkout options
* checkout examples::           checkout examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node checkout options
@appendixsubsec checkout options

@c <en>These standard options are supported by @code{checkout}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are supported by @code{checkout}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Use the most recent revision no later than @var{date}.
@c <en>This option is sticky, and implies @samp{-P}.  See
@c <en>@ref{Sticky tags}, for more information on sticky tags/dates.
@c <en>Use the most recent revision no later than @var{date}.
@c <en>This option is sticky, and implies @samp{-P}.  See
@c <en>@ref{Sticky tags}, for more information on sticky tags/dates.
Use the most recent revision no later than @var{date}.
This option is sticky, and implies @samp{-P}.  See
@ref{Etiquetas adesivas}, for more information on sticky tags/dates.
Use the most recent revision no later than @var{date}.
This option is sticky, and implies @samp{-P}.  See
@ref{Etiquetas adesivas}, for more information on sticky tags/dates.

@item -f
Only useful with the @samp{-D @var{date}} or @samp{-r
@var{tag}} flags.  If no matching revision is found,
retrieve the most recent revision (instead of ignoring
the file).

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Process keywords according to @var{kflag}.  See
@c <en>@ref{Keyword substitution}.
@c <en>This option is sticky; future updates of
@c <en>this file in this working directory will use the same
@c <en>@var{kflag}.  The @code{status} command can be viewed
@c <en>to see the sticky options.  See @ref{Invoking CVS}, for
@c <en>more information on the @code{status} command.
Process keywords according to @var{kflag}.  See
@ref{Substituição de palavra-chave}.
This option is sticky; future updates of
this file in this working directory will use the same
@var{kflag}.  The @code{status} command can be viewed
to see the sticky options.  See @ref{Chamando o CVS}, for
more information on the @code{status} command.

@item -l
Local; run only in current working directory.

@item -n
Do not run any checkout program (as specified
with the @samp{-o} option in the modules file;
@pxref{modules}).

@item -P
@c <en>Prune empty directories.  See @ref{Moving directories}.
Prune empty directories.  See @ref{Movendo diretórios}.

@item -p
Pipe files to the standard output.

@item -R
Checkout directories recursively.  This option is on by default.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Use revision @var{tag}.  This option is sticky, and implies @samp{-P}.
@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates.
Use revision @var{tag}.  This option is sticky, and implies @samp{-P}.
See @ref{Etiquetas adesivas}, for more information on sticky tags/dates.
@end table

In addition to those, you can use these special command
options with @code{checkout}:

@table @code
@c <en>@item -A
@item -A
@c <en>Reset any sticky tags, dates, or @samp{-k} options.
@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates.
Reset any sticky tags, dates, or @samp{-k} options.
See @ref{Etiquetas adesivas}, for more information on sticky tags/dates.

@item -c
Copy the module file, sorted, to the standard output,
instead of creating or modifying any files or
directories in your working directory.

@item -d @var{dir}
Create a directory called @var{dir} for the working
files, instead of using the module name.  In general,
using this flag is equivalent to using @samp{mkdir
@var{dir}; cd @var{dir}} followed by the checkout
command without the @samp{-d} flag.

There is an important exception, however.  It is very
convenient when checking out a single item to have the
output appear in a directory that doesn't contain empty
intermediate directories.  In this case @emph{only},
@sc{cvs} tries to ``shorten'' pathnames to avoid those empty
directories.

For example, given a module @samp{foo} that contains
the file @samp{bar.c}, the command @samp{cvs co -d dir
foo} will create directory @samp{dir} and place
@samp{bar.c} inside.  Similarly, given a module
@samp{bar} which has subdirectory @samp{baz} wherein
there is a file @samp{quux.c}, the command @samp{cvs co
-d dir bar/baz} will create directory @samp{dir} and
place @samp{quux.c} inside.

Using the @samp{-N} flag will defeat this behavior.
Given the same module definitions above, @samp{cvs co
-N -d dir foo} will create directories @samp{dir/foo}
and place @samp{bar.c} inside, while @samp{cvs co -N -d
dir bar/baz} will create directories @samp{dir/bar/baz}
and place @samp{quux.c} inside.

@item -j @var{tag}
With two @samp{-j} options, merge changes from the
revision specified with the first @samp{-j} option to
the revision specified with the second @samp{j} option,
into the working directory.

With one @samp{-j} option, merge changes from the
ancestor revision to the revision specified with the
@samp{-j} option, into the working directory.  The
ancestor revision is the common ancestor of the
revision which the working directory is based on, and
the revision specified in the @samp{-j} option.

In addition, each -j option can contain an optional
date specification which, when used with branches, can
limit the chosen revision to one within a specific
date.  An optional date is specified by adding a colon
(:) to the tag:
@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.

@c <en>@xref{Branching and merging}.
@xref{Ramificando e mesclando}.

@item -N
Only useful together with @samp{-d @var{dir}}.  With
this option, @sc{cvs} will not ``shorten'' module paths
in your working directory when you check out a single
module.  See the @samp{-d} flag for examples and a
discussion.

@item -s
Like @samp{-c}, but include the status of all modules,
and sort it by the status string.  @xref{modules}, for
info about the @samp{-s} option that is used inside the
modules file to set the module status.
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node checkout examples
@appendixsubsec checkout examples

Get a copy of the module @samp{tc}:

@example
$ cvs checkout tc
@end example

Get a copy of the module @samp{tc} as it looked one day
ago:

@example
$ cvs checkout -D yesterday tc
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node commit
@appendixsec commit---Check files into the repository
@cindex commit (subcommand)

@itemize @bullet
@item
Synopsis: commit [-lnRf] [-m 'log_message' |
-F file] [-r revision] [files@dots{}]
@item
Requires: working directory, repository.
@item
Changes: repository.
@item
Synonym: ci
@end itemize

Use @code{commit} when you want to incorporate changes
from your working source files into the source
repository.

If you don't specify particular files to commit, all of
the files in your working current directory are
examined.  @code{commit} is careful to change in the
repository only those files that you have really
changed.  By default (or if you explicitly specify the
@samp{-R} option), files in subdirectories are also
examined and committed if they have changed; you can
use the @samp{-l} option to limit @code{commit} to the
current directory only.

@code{commit} verifies that the selected files are up
to date with the current revisions in the source
repository; it will notify you, and exit without
committing, if any of the specified files must be made
current first with @code{update} (@pxref{update}).
@code{commit} does not call the @code{update} command
for you, but rather leaves that for you to do when the
time is right.

When all is well, an editor is invoked to allow you to
enter a log message that will be written to one or more
logging programs (@pxref{modules}, and @pxref{loginfo})
and placed in the @sc{rcs} file inside the
repository.  This log message can be retrieved with the
@code{log} command; see @ref{log}.  You can specify the
log message on the command line with the @samp{-m
@var{message}} option, and thus avoid the editor invocation,
or use the @samp{-F @var{file}} option to specify
that the argument file contains the log message.

@menu
* commit options::              commit options
* commit examples::             commit examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node commit options
@appendixsubsec commit options

@c <en>These standard options are supported by @code{commit}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are supported by @code{commit}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@item -l
Local; run only in current working directory.

@item -R
Commit directories recursively.  This is on by default.

@c <en>@item -r @var{revision}
@item -r @var{revision}
@c <en>Commit to @var{revision}.  @var{revision} must be
@c <en>either a branch, or a revision on the main trunk that
@c <en>is higher than any existing revision number
@c <en>(@pxref{Assigning revisions}).  You
@c <en>cannot commit to a specific revision on a branch.
Commit to @var{revision}.  @var{revision} must be
either a branch, or a revision on the main trunk that
is higher than any existing revision number
(@pxref{Atribuindo revisões}).  You
cannot commit to a specific revision on a branch.
@c FIXME: Need xref for branch case.
@end table

@code{commit} also supports these options:

@table @code
@item -F @var{file}
Read the log message from @var{file}, instead
of invoking an editor.

@c <en>@item -f
@item -f
@c <en>Note that this is not the standard behavior of
@c <en>the @samp{-f} option as defined in @ref{Common options}.
Note that this is not the standard behavior of
the @samp{-f} option as defined in @ref{Opções comuns}.

Force @sc{cvs} to commit a new revision even if you haven't
made any changes to the file.  If the current revision
of @var{file} is 1.7, then the following two commands
are equivalent:

@example
$ cvs commit -f @var{file}
$ cvs commit -r 1.8 @var{file}
@end example

@c This is odd, but it's how CVS has worked for some
@c time.
The @samp{-f} option disables recursion (i.e., it
implies @samp{-l}).  To force @sc{cvs} to commit a new
revision for all files in all subdirectories, you must
use @samp{-f -R}.

@item -m @var{message}
Use @var{message} as the log message, instead of
invoking an editor.
@end table

@need 2000
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node commit examples
@appendixsubsec commit examples

@c FIXME: this material wants to be somewhere
@c in "Branching and merging".

@appendixsubsubsec Committing to a branch

@c <en>You can commit to a branch revision (one that has an
@c <en>even number of dots) with the @samp{-r} option.  To
@c <en>create a branch revision, use the @samp{-b} option
@c <en>of the @code{rtag} or @code{tag} commands
@c <en>(@pxref{Branching and merging}).  Then, either @code{checkout} or
@c <en>@code{update} can be used to base your sources on the
@c <en>newly created branch.  From that point on, all
@c <en>@code{commit} changes made within these working sources
@c <en>will be automatically added to a branch revision,
@c <en>thereby not disturbing main-line development in any
@c <en>way.  For example, if you had to create a patch to the
@c <en>1.2 version of the product, even though the 2.0 version
@c <en>is already under development, you might do:
You can commit to a branch revision (one that has an
even number of dots) with the @samp{-r} option.  To
create a branch revision, use the @samp{-b} option
of the @code{rtag} or @code{tag} commands
(@pxref{Ramificando e mesclando}).  Then, either @code{checkout} or
@code{update} can be used to base your sources on the
newly created branch.  From that point on, all
@code{commit} changes made within these working sources
will be automatically added to a branch revision,
thereby not disturbing main-line development in any
way.  For example, if you had to create a patch to the
1.2 version of the product, even though the 2.0 version
is already under development, you might do:

@example
$ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
$ cvs checkout -r FCS1_2_Patch product_module
$ cd product_module
[[ hack away ]]
$ cvs commit
@end example

@noindent
This works automatically since the @samp{-r} option is
sticky.

@appendixsubsubsec Creating the branch after editing

Say you have been working on some extremely
experimental software, based on whatever revision you
happened to checkout last week.  If others in your
group would like to work on this software with you, but
without disturbing main-line development, you could
commit your change to a new branch.  Others can then
checkout your experimental stuff and utilize the full
benefit of @sc{cvs} conflict resolution.  The scenario might
look like:

@c FIXME: Should we be recommending tagging the branchpoint?
@example
[[ hacked sources are present ]]
$ cvs tag -b EXPR1
$ cvs update -r EXPR1
$ cvs commit
@end example

The @code{update} command will make the @samp{-r
EXPR1} option sticky on all files.  Note that your
changes to the files will never be removed by the
@code{update} command.  The @code{commit} will
automatically commit to the correct branch, because the
@samp{-r} is sticky.  You could also do like this:

@c FIXME: Should we be recommending tagging the branchpoint?
@example
[[ hacked sources are present ]]
$ cvs tag -b EXPR1
$ cvs commit -r EXPR1
@end example

@noindent
but then, only those files that were changed by you
will have the @samp{-r EXPR1} sticky flag.  If you hack
away, and commit without specifying the @samp{-r EXPR1}
flag, some files may accidentally end up on the main
trunk.

To work with you on the experimental change, others
would simply do

@example
$ cvs checkout -r EXPR1 whatever_module
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node diff
@appendixsec diff---Show differences between revisions
@cindex diff (subcommand)

@itemize @bullet
@item
Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 |  -D date2]] [files@dots{}]
@item
Requires: working directory, repository.
@item
Changes: nothing.
@end itemize

The @code{diff} command is used to compare different
revisions of files.  The default action is to compare
your working files with the revisions they were based
on, and report any differences that are found.

If any file names are given, only those files are
compared.  If any directories are given, all files
under them will be compared.

@c <en>The exit status for diff is different than for other
@c <en>@sc{cvs} commands; for details @ref{Exit status}.
The exit status for diff is different than for other
@sc{cvs} commands; for details @ref{Estados de saída}.

@menu
* diff options::                diff options
* diff examples::               diff examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node diff options
@appendixsubsec diff options

@c <en>These standard options are supported by @code{diff}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are supported by @code{diff}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@item -D @var{date}
Use the most recent revision no later than @var{date}.
See @samp{-r} for how this affects the comparison.

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Process keywords according to @var{kflag}.  See
@c <en>@ref{Keyword substitution}.
Process keywords according to @var{kflag}.  See
@ref{Substituição de palavra-chave}.

@item -l
Local; run only in current working directory.

@item -R
Examine directories recursively.  This option is on by
default.

@item -r @var{tag}
Compare with revision @var{tag}.  Zero, one or two
@samp{-r} options can be present.  With no @samp{-r}
option, the working file will be compared with the
revision it was based on.  With one @samp{-r}, that
revision will be compared to your current working file.
With two @samp{-r} options those two revisions will be
compared (and your working file will not affect the
outcome in any way).
@c We should be a lot more explicit, with examples,
@c about the difference between "cvs diff" and "cvs
@c diff -r HEAD".  This often confuses new users.

One or both @samp{-r} options can be replaced by a
@samp{-D @var{date}} option, described above.
@end table

@c Conceptually, this is a disaster.  There are 3
@c zillion diff formats that we support via the diff
@c library.  It is not obvious to me that we should
@c document them all.  Maybe just the most common ones
@c like -c and -u, and think about phasing out the
@c obscure ones.
@c FIXCVS: also should be a way to specify an external
@c diff program (which can be different for different
@c file types) and pass through
@c arbitrary options, so that the user can do
@c "--pass=-Z --pass=foo" or something even if CVS
@c doesn't know about the "-Z foo" option to diff.
@c This would fit nicely with deprecating/eliminating
@c the obscure options of the diff library, because it
@c would let people specify an external GNU diff if
@c they are into that sort of thing.
The following options specify the format of the
output.  They have the same meaning as in GNU diff.
Most options have two equivalent names, one of which is a single letter
preceded by @samp{-}, and the other of which is a long name preceded by
@samp{--}.

@table @samp
@item -@var{lines}
Show @var{lines} (an integer) lines of context.  This option does not
specify an output format by itself; it has no effect unless it is
combined with @samp{-c} or @samp{-u}.  This option is obsolete.  For proper
operation, @code{patch} typically needs at least two lines of context.

@item -a
Treat all files as text and compare them line-by-line, even if they
do not seem to be text.

@item -b
Ignore trailing white space and consider all other sequences of one or
more white space characters to be equivalent.

@item -B
Ignore changes that just insert or delete blank lines.

@item --binary
Read and write data in binary mode.

@item --brief
Report only whether the files differ, not the details of the
differences.

@item -c
Use the context output format.

@item -C @var{lines}
@itemx --context@r{[}=@var{lines}@r{]}
Use the context output format, showing @var{lines} (an integer) lines of
context, or three if @var{lines} is not given.
For proper operation, @code{patch} typically needs at least two lines of
context.

@item --changed-group-format=@var{format}
Use @var{format} to output a line group containing differing lines from
both files in if-then-else format.  @xref{Line group formats}.

@item -d
Change the algorithm to perhaps find a smaller set of changes.  This makes
@code{diff} slower (sometimes much slower).

@item -e
@itemx --ed
Make output that is a valid @code{ed} script.

@item --expand-tabs
Expand tabs to spaces in the output, to preserve the alignment of tabs
in the input files.

@item -f
Make output that looks vaguely like an @code{ed} script but has changes
in the order they appear in the file.

@item -F @var{regexp}
In context and unified format, for each hunk of differences, show some
of the last preceding line that matches @var{regexp}.

@item --forward-ed
Make output that looks vaguely like an @code{ed} script but has changes
in the order they appear in the file.

@item -H
Use heuristics to speed handling of large files that have numerous
scattered small changes.

@item --horizon-lines=@var{lines}
Do not discard the last @var{lines} lines of the common prefix
and the first @var{lines} lines of the common suffix.

@item -i
Ignore changes in case; consider upper- and lower-case letters
equivalent.

@item -I @var{regexp}
Ignore changes that just insert or delete lines that match @var{regexp}.

@item --ifdef=@var{name}
Make merged if-then-else output using @var{name}.

@item --ignore-all-space
Ignore white space when comparing lines.

@item --ignore-blank-lines
Ignore changes that just insert or delete blank lines.

@item --ignore-case
Ignore changes in case; consider upper- and lower-case to be the same.

@item --ignore-matching-lines=@var{regexp}
Ignore changes that just insert or delete lines that match @var{regexp}.

@item --ignore-space-change
Ignore trailing white space and consider all other sequences of one or
more white space characters to be equivalent.

@item --initial-tab
Output a tab rather than a space before the text of a line in normal or
context format.  This causes the alignment of tabs in the line to look
normal.

@item -L @var{label}
Use @var{label} instead of the file name in the context format
and unified format headers.

@item --label=@var{label}
Use @var{label} instead of the file name in the context format
and unified format headers.

@item --left-column
Print only the left column of two common lines in side by side format.

@item --line-format=@var{format}
Use @var{format} to output all input lines in if-then-else format.
@xref{Line formats}.

@item --minimal
Change the algorithm to perhaps find a smaller set of changes.  This
makes @code{diff} slower (sometimes much slower).

@item -n
Output RCS-format diffs; like @samp{-f} except that each command
specifies the number of lines affected.

@item -N
@itemx --new-file
In directory comparison, if a file is found in only one directory,
treat it as present but empty in the other directory.

@item --new-group-format=@var{format}
Use @var{format} to output a group of lines taken from just the second
file in if-then-else format.  @xref{Line group formats}.

@item --new-line-format=@var{format}
Use @var{format} to output a line taken from just the second file in
if-then-else format.  @xref{Line formats}.

@item --old-group-format=@var{format}
Use @var{format} to output a group of lines taken from just the first
file in if-then-else format.  @xref{Line group formats}.

@item --old-line-format=@var{format}
Use @var{format} to output a line taken from just the first file in
if-then-else format.  @xref{Line formats}.

@item -p
Show which C function each change is in.

@item --rcs
Output RCS-format diffs; like @samp{-f} except that each command
specifies the number of lines affected.

@item --report-identical-files
@itemx -s
Report when two files are the same.

@item --show-c-function
Show which C function each change is in.

@item --show-function-line=@var{regexp}
In context and unified format, for each hunk of differences, show some
of the last preceding line that matches @var{regexp}.

@item --side-by-side
Use the side by side output format.

@item --speed-large-files
Use heuristics to speed handling of large files that have numerous
scattered small changes.

@item --suppress-common-lines
Do not print common lines in side by side format.

@item -t
Expand tabs to spaces in the output, to preserve the alignment of tabs
in the input files.

@item -T
Output a tab rather than a space before the text of a line in normal or
context format.  This causes the alignment of tabs in the line to look
normal.

@item --text
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.

@item -u
Use the unified output format.

@item --unchanged-group-format=@var{format}
Use @var{format} to output a group of common lines taken from both files
in if-then-else format.  @xref{Line group formats}.

@item --unchanged-line-format=@var{format}
Use @var{format} to output a line common to both files in if-then-else
format.  @xref{Line formats}.

@item -U @var{lines}
@itemx --unified@r{[}=@var{lines}@r{]}
Use the unified output format, showing @var{lines} (an integer) lines of
context, or three if @var{lines} is not given.
For proper operation, @code{patch} typically needs at least two lines of
context.

@item -w
Ignore white space when comparing lines.

@item -W @var{columns}
@itemx --width=@var{columns}
Use an output width of @var{columns} in side by side format.

@item -y
Use the side by side output format.
@end table

@menu
* Line group formats::          Line group formats
* Line formats::                Line formats
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node Line group formats
@appendixsubsubsec Line group formats

Line group formats let you specify formats suitable for many
applications that allow if-then-else input, including programming
languages and text formatting languages.  A line group format specifies
the output format for a contiguous group of similar lines.

For example, the following command compares the TeX file @file{myfile}
with the original version from the repository,
and outputs a merged file in which old regions are
surrounded by @samp{\begin@{em@}}-@samp{\end@{em@}} lines, and new
regions are surrounded by @samp{\begin@{bf@}}-@samp{\end@{bf@}} lines.

@example
cvs diff \
   --old-group-format='\begin@{em@}
%<\end@{em@}
' \
   --new-group-format='\begin@{bf@}
%>\end@{bf@}
' \
   myfile
@end example

The following command is equivalent to the above example, but it is a
little more verbose, because it spells out the default line group formats.

@example
cvs diff \
   --old-group-format='\begin@{em@}
%<\end@{em@}
' \
   --new-group-format='\begin@{bf@}
%>\end@{bf@}
' \
   --unchanged-group-format='%=' \
   --changed-group-format='\begin@{em@}
%<\end@{em@}
\begin@{bf@}
%>\end@{bf@}
' \
   myfile
@end example

Here is a more advanced example, which outputs a diff listing with
headers containing line numbers in a ``plain English'' style.

@example
cvs diff \
   --unchanged-group-format='' \
   --old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
%<' \
   --new-group-format='-------- %dN line%(N=1?:s) added after %de:
%>' \
   --changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
%<-------- to:
%>' \
   myfile
@end example

To specify a line group format, use one of the options
listed below.  You can specify up to four line group formats, one for
each kind of line group.  You should quote @var{format}, because it
typically contains shell metacharacters.

@table @samp
@item --old-group-format=@var{format}
These line groups are hunks containing only lines from the first file.
The default old group format is the same as the changed group format if
it is specified; otherwise it is a format that outputs the line group as-is.

@item --new-group-format=@var{format}
These line groups are hunks containing only lines from the second
file.  The default new group format is same as the changed group
format if it is specified; otherwise it is a format that outputs the
line group as-is.

@item --changed-group-format=@var{format}
These line groups are hunks containing lines from both files.  The
default changed group format is the concatenation of the old and new
group formats.

@item --unchanged-group-format=@var{format}
These line groups contain lines common to both files.  The default
unchanged group format is a format that outputs the line group as-is.
@end table

In a line group format, ordinary characters represent themselves;
conversion specifications start with @samp{%} and have one of the
following forms.

@table @samp
@item %<
stands for the lines from the first file, including the trailing newline.
Each line is formatted according to the old line format (@pxref{Line formats}).

@item %>
stands for the lines from the second file, including the trailing newline.
Each line is formatted according to the new line format.

@item %=
stands for the lines common to both files, including the trailing newline.
Each line is formatted according to the unchanged line format.

@item %%
stands for @samp{%}.

@item %c'@var{C}'
where @var{C} is a single character, stands for @var{C}.
@var{C} may not be a backslash or an apostrophe.
For example, @samp{%c':'} stands for a colon, even inside
the then-part of an if-then-else format, which a colon would
normally terminate.

@item %c'\@var{O}'
where @var{O} is a string of 1, 2, or 3 octal digits,
stands for the character with octal code @var{O}.
For example, @samp{%c'\0'} stands for a null character.

@item @var{F}@var{n}
where @var{F} is a @code{printf} conversion specification and @var{n} is one
of the following letters, stands for @var{n}'s value formatted with @var{F}.

@table @samp
@item e
The line number of the line just before the group in the old file.

@item f
The line number of the first line in the group in the old file;
equals @var{e} + 1.

@item l
The line number of the last line in the group in the old file.

@item m
The line number of the line just after the group in the old file;
equals @var{l} + 1.

@item n
The number of lines in the group in the old file; equals @var{l} - @var{f} + 1.

@item E, F, L, M, N
Likewise, for lines in the new file.

@end table

The @code{printf} conversion specification can be @samp{%d},
@samp{%o}, @samp{%x}, or @samp{%X}, specifying decimal, octal,
lower case hexadecimal, or upper case hexadecimal output
respectively.  After the @samp{%} the following options can appear in
sequence: a @samp{-} specifying left-justification; an integer
specifying the minimum field width; and a period followed by an
optional integer specifying the minimum number of digits.
For example, @samp{%5dN} prints the number of new lines in the group
in a field of width 5 characters, using the @code{printf} format @code{"%5d"}.

@item (@var{A}=@var{B}?@var{T}:@var{E})
If @var{A} equals @var{B} then @var{T} else @var{E}.
@var{A} and @var{B} are each either a decimal constant
or a single letter interpreted as above.
This format spec is equivalent to @var{T} if
@var{A}'s value equals @var{B}'s; otherwise it is equivalent to @var{E}.

For example, @samp{%(N=0?no:%dN) line%(N=1?:s)} is equivalent to
@samp{no lines} if @var{N} (the number of lines in the group in the
new file) is 0, to @samp{1 line} if @var{N} is 1, and to @samp{%dN lines}
otherwise.
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node Line formats
@appendixsubsubsec Line formats

Line formats control how each line taken from an input file is
output as part of a line group in if-then-else format.

For example, the following command outputs text with a one-column
change indicator to the left of the text.  The first column of output
is @samp{-} for deleted lines, @samp{|} for added lines, and a space
for unchanged lines.  The formats contain newline characters where
newlines are desired on output.

@example
cvs diff \
   --old-line-format='-%l
' \
   --new-line-format='|%l
' \
   --unchanged-line-format=' %l
' \
   myfile
@end example

To specify a line format, use one of the following options.  You should
quote @var{format}, since it often contains shell metacharacters.

@table @samp
@item --old-line-format=@var{format}
formats lines just from the first file.

@item --new-line-format=@var{format}
formats lines just from the second file.

@item --unchanged-line-format=@var{format}
formats lines common to both files.

@item --line-format=@var{format}
formats all lines; in effect, it sets all three above options simultaneously.
@end table

In a line format, ordinary characters represent themselves;
conversion specifications start with @samp{%} and have one of the
following forms.

@table @samp
@item %l
stands for the contents of the line, not counting its trailing
newline (if any).  This format ignores whether the line is incomplete.

@item %L
stands for the contents of the line, including its trailing newline
(if any).  If a line is incomplete, this format preserves its
incompleteness.

@item %%
stands for @samp{%}.

@item %c'@var{C}'
where @var{C} is a single character, stands for @var{C}.
@var{C} may not be a backslash or an apostrophe.
For example, @samp{%c':'} stands for a colon.

@item %c'\@var{O}'
where @var{O} is a string of 1, 2, or 3 octal digits,
stands for the character with octal code @var{O}.
For example, @samp{%c'\0'} stands for a null character.

@item @var{F}n
where @var{F} is a @code{printf} conversion specification,
stands for the line number formatted with @var{F}.
For example, @samp{%.5dn} prints the line number using the
@code{printf} format @code{"%.5d"}.  @xref{Line group formats}, for
more about printf conversion specifications.

@end table

The default line format is @samp{%l} followed by a newline character.

If the input contains tab characters and it is important that they line
up on output, you should ensure that @samp{%l} or @samp{%L} in a line
format is just after a tab stop (e.g.@: by preceding @samp{%l} or
@samp{%L} with a tab character), or you should use the @samp{-t} or
@samp{--expand-tabs} option.

Taken together, the line and line group formats let you specify many
different formats.  For example, the following command uses a format
similar to @code{diff}'s normal format.  You can tailor this command
to get fine control over @code{diff}'s output.

@example
cvs diff \
   --old-line-format='< %l
' \
   --new-line-format='> %l
' \
   --old-group-format='%df%(f=l?:,%dl)d%dE
%<' \
   --new-group-format='%dea%dF%(F=L?:,%dL)
%>' \
   --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
%<---
%>' \
   --unchanged-group-format='' \
   myfile
@end example

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node diff examples
@appendixsubsec diff examples

The following line produces a Unidiff (@samp{-u} flag)
between revision 1.14 and 1.19 of
@file{backend.c}.  Due to the @samp{-kk} flag no
keywords are substituted, so differences that only depend
on keyword substitution are ignored.

@example
$ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
@end example

Suppose the experimental branch EXPR1 was based on a
set of files tagged RELEASE_1_0.  To see what has
happened on that branch, the following can be used:

@example
$ cvs diff -r RELEASE_1_0 -r EXPR1
@end example

A command like this can be used to produce a context
diff between two releases:

@example
$ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
@end example

If you are maintaining ChangeLogs, a command like the following
just before you commit your changes may help you write
the ChangeLog entry.  All local modifications that have
not yet been committed will be printed.

@example
$ cvs diff -u | less
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node export
@appendixsec export---Export sources from CVS, similar to checkout
@cindex export (subcommand)

@itemize @bullet
@item
Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module@dots{}
@item
Requires: repository.
@item
Changes: current directory.
@end itemize

This command is a variant of @code{checkout}; use it
when you want a copy of the source for module without
the @sc{cvs} administrative directories.  For example, you
might use @code{export} to prepare source for shipment
off-site.  This command requires that you specify a
date or tag (with @samp{-D} or @samp{-r}), so that you
can count on reproducing the source you ship to others
(and thus it always prunes empty directories).

One often would like to use @samp{-kv} with @code{cvs
export}.  This causes any keywords to be
expanded such that an import done at some other site
will not lose the keyword revision information.  But be
aware that doesn't handle an export containing binary
files correctly.  Also be aware that after having used
@samp{-kv}, one can no longer use the @code{ident}
command (which is part of the @sc{rcs} suite---see
ident(1)) which looks for keyword strings.  If
you want to be able to use @code{ident} you must not
use @samp{-kv}.

@menu
* export options::              export options
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node export options
@appendixsubsec export options

@c <en>These standard options are supported by @code{export}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are supported by @code{export}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@item -D @var{date}
Use the most recent revision no later than @var{date}.

@item -f
If no matching revision is found, retrieve the most
recent revision (instead of ignoring the file).

@item -l
Local; run only in current working directory.

@item -n
Do not run any checkout program.

@item -R
Export directories recursively.  This is on by default.

@item -r @var{tag}
Use revision @var{tag}.
@end table

In addition, these options (that are common to
@code{checkout} and @code{export}) are also supported:

@table @code
@item -d @var{dir}
Create a directory called @var{dir} for the working
files, instead of using the module name.
@xref{checkout options}, for complete details on how
@sc{cvs} handles this flag.

@c <en>@item -k @var{subst}
@item -k @var{subst}
@c <en>Set keyword expansion mode (@pxref{Substitution modes}).
Set keyword expansion mode (@pxref{Modos de substituição}).

@item -N
Only useful together with @samp{-d @var{dir}}.
@xref{checkout options}, for complete details on how
@sc{cvs} handles this flag.
@end table

@ignore
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c @node export examples
@appendixsubsec export examples

Contributed examples are gratefully accepted.
@c -- Examples here!!
@end ignore

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node history
@appendixsec history---Show status of files and users
@cindex history (subcommand)

@itemize @bullet
@item
Synopsis:     history [-report] [-flags] [-options args] [files@dots{}]
@item
Requires: the file @file{$CVSROOT/CVSROOT/history}
@item
Changes: nothing.
@end itemize

@sc{cvs} can keep a history file that tracks each use of the
@code{checkout}, @code{commit}, @code{rtag},
@code{update}, and @code{release} commands.  You can
use @code{history} to display this information in
various formats.

Logging must be enabled by creating the file
@file{$CVSROOT/CVSROOT/history}.

@c <en>@strong{Note: @code{history} uses @samp{-f}, @samp{-l},
@c <en>@samp{-n}, and @samp{-p} in ways that conflict with the
@c <en>normal use inside @sc{cvs} (@pxref{Common options}).}
@strong{Note: @code{history} uses @samp{-f}, @samp{-l},
@samp{-n}, and @samp{-p} in ways that conflict with the
normal use inside @sc{cvs} (@pxref{Opções comuns}).}

@menu
* history options::             history options
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node history options
@appendixsubsec history options

Several options (shown above as @samp{-report})  control  what
kind of report is generated:

@table @code
@item -c
Report on each time commit was used (i.e., each time
the repository was modified).

@item -e
Everything (all record types).  Equivalent to
specifying @samp{-x} with all record types.  Of course,
@samp{-e} will also include record types which are
added in a future version of @sc{cvs}; if you are
writing a script which can only handle certain record
types, you'll want to specify @samp{-x}.

@item -m @var{module}
Report on a particular module.  (You can meaningfully
use @samp{-m} more than once on the command line.)

@item -o
Report on checked-out modules.  This is the default report type.

@item -T
Report on all tags.

@item -x @var{type}
Extract a particular set of record types @var{type} from the @sc{cvs}
history.  The types are indicated by single letters,
which you may specify in combination.

Certain commands have a single record type:

@table @code
@item F
release
@item O
checkout
@item E
export
@item T
rtag
@end table

@noindent
One of five record types may result from an update:

@table @code
@item C
A merge was necessary but collisions were
detected (requiring manual merging).
@item G
A merge was necessary and it succeeded.
@item U
A working file was copied from the repository.
@item P
A working file was patched to match the repository.
@item W
The working copy of a file was deleted during
update (because it was gone from the repository).
@end table

@noindent
One of three record types results from commit:

@table @code
@item A
A file was added for the first time.
@item M
A file was modified.
@item R
A file was removed.
@end table
@end table

The options shown as @samp{-flags} constrain or expand
the report without requiring option arguments:

@table @code
@item -a
Show data for all users (the default is to show data
only for the user executing @code{history}).

@item -l
Show last modification only.

@item -w
Show only the records for modifications done from the
same working directory where @code{history} is
executing.
@end table

The options shown as @samp{-options @var{args}} constrain the report
based on an argument:

@table @code
@item -b @var{str}
Show data back to a record containing  the  string
@var{str}  in  either the module name, the file name, or
the repository path.

@item -D @var{date}
Show data since @var{date}.  This is slightly different
from the normal use of @samp{-D @var{date}}, which
selects the newest revision older than @var{date}.

@item -f @var{file}
Show data for a particular file
(you can specify several @samp{-f} options on the same command line).
This is equivalent to specifying the file on the command line.

@item -n @var{module}
Show data for a particular module
(you can specify several @samp{-n} options on the same command line).

@item -p @var{repository}
Show data for a particular source repository  (you
can specify several @samp{-p} options on the same command
line).

@item -r @var{rev}
Show records referring to revisions since the revision
or tag named @var{rev} appears in individual @sc{rcs}
files.  Each @sc{rcs} file is searched for the revision or
tag.

@item -t @var{tag}
Show records since tag @var{tag} was last added to the
history file.  This differs from the @samp{-r} flag
above in that it reads only the history file, not the
@sc{rcs} files, and is much faster.

@item -u @var{name}
Show records for user @var{name}.

@item -z @var{timezone}
Show times in the selected records using the specified
time zone instead of UTC.
@end table

@ignore
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c @node history examples
@appendixsubsec history examples

Contributed examples will gratefully be accepted.
@c -- Examples here!
@end ignore

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node import
@appendixsec import---Import sources into CVS, using vendor branches
@cindex import (subcommand)

@c FIXME: This node is way too long for one which has subnodes.

@itemize @bullet
@item
Synopsis: import [-options] repository vendortag releasetag@dots{}
@item
Requires: Repository, source distribution directory.
@item
Changes: repository.
@end itemize

Use @code{import} to incorporate an entire source
distribution from an outside source (e.g., a source
vendor) into your source repository directory.  You can
use this command both for initial creation of a
repository, and for wholesale updates to the module
from the outside source.  @xref{Acompanhando fontes}, for
a discussion on this subject.

The @var{repository} argument gives a directory name
(or a path to a directory) under the @sc{cvs} root directory
for repositories; if the directory did not exist,
import creates it.

When you use import for updates to source that has been
modified in your source repository (since a prior
import), it will notify you of any files that conflict
in the two branches of development; use @samp{checkout
-j} to reconcile the differences, as import instructs
you to do.

If @sc{cvs} decides a file should be ignored
(@pxref{cvsignore}), it does not import it and prints
@samp{I } followed by the filename (@pxref{import output}, for a
complete description of the output).

If the file @file{$CVSROOT/CVSROOT/cvswrappers} exists,
any file whose names match the specifications in that
file will be treated as packages and the appropriate
filtering will be performed on the file/directory
before being imported.  @xref{Wrappers}.

The outside source is saved in a first-level
branch, by default 1.1.1.  Updates are leaves of this
branch; for example, files from the first imported
collection of source will be revision 1.1.1.1, then
files from the first imported update will be revision
1.1.1.2, and so on.

At least three arguments are required.
@var{repository} is needed to identify the collection
of source.  @var{vendortag} is a tag for the entire
branch (e.g., for 1.1.1).  You must also specify at
least one @var{releasetag} to identify the files at
the leaves created each time you execute @code{import}.

@c I'm not completely sure this belongs here.  But
@c we need to say it _somewhere_ reasonably obvious; it
@c is a common misconception among people first learning CVS
@c <en>Note that @code{import} does @emph{not} change the
@c <en>directory in which you invoke it.  In particular, it
@c <en>does not set up that directory as a @sc{cvs} working
@c <en>directory; if you want to work with the sources import
@c <en>them first and then check them out into a different
@c <en>directory (@pxref{Getting the source}).
Note that @code{import} does @emph{not} change the
directory in which you invoke it.  In particular, it
does not set up that directory as a @sc{cvs} working
directory; if you want to work with the sources import
them first and then check them out into a different
directory (@pxref{Obtendo os fontes}).

@menu
* import options::              import options
* import output::               import output
* import examples::             import examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node import options
@appendixsubsec import options

@c <en>This standard option is supported by @code{import}
@c <en>(@pxref{Common options}, for a complete description):
This standard option is supported by @code{import}
(@pxref{Opções comuns}, for a complete description):

@table @code
@item -m @var{message}
Use @var{message} as log information, instead of
invoking an editor.
@end table

There are the following additional special options.

@table @code
@c <en>@item -b @var{branch}
@item -b @var{branch}
@c <en>See @ref{Multiple vendor branches}.
See @ref{Ramos de fornecedor múltiplos}.

@c <en>@item -k @var{subst}
@item -k @var{subst}
@c <en>Indicate the keyword expansion mode desired.  This
@c <en>setting will apply to all files created during the
@c <en>import, but not to any files that previously existed in
@c <en>the repository.  See @ref{Substitution modes}, for a
@c <en>list of valid @samp{-k} settings.
Indicate the keyword expansion mode desired.  This
setting will apply to all files created during the
import, but not to any files that previously existed in
the repository.  See @ref{Modos de substituição}, for a
list of valid @samp{-k} settings.

@item -I @var{name}
Specify file names that should be ignored during
import.  You can use this option repeatedly.  To avoid
ignoring any files at all (even those ignored by
default), specify `-I !'.

@var{name} can be a file name pattern of the same type
that you can specify in the @file{.cvsignore} file.
@xref{cvsignore}.
@c -- Is this really true?

@item -W @var{spec}
Specify file names that should be filtered during
import.  You can use this option repeatedly.

@var{spec} can be a file name pattern of the same type
that you can specify in the @file{.cvswrappers}
file. @xref{Wrappers}.
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node import output
@appendixsubsec import output

@c <en>@code{import} keeps you informed of its progress by printing a line
@c <en>for each file, preceded by one character indicating the status of the file:
O @code{import} mantém você informado de seu progresso
escrevendo uma linha para cada arquivo, iniciando com
um caractere que indica o status do arquivo:

@table @code
@c <en>@item U @var{file}
@item U @var{arquivo}
@c <en>The file already exists in the repository and has not been locally
@c <en>modified; a new revision has been created (if necessary).
O arquivo já existe no repositório não foi modificado
localmente; uma nova revisão foi criada (se necessário).

@c <en>@item N @var{file}
@item N @var{arquivo}
@c <en>The file is a new file which has been added to the repository.
O arquivo é um arquivo novo que foi adicionado ao repositório.

@c <en>@item C @var{file}
@item C @var{arquivo}
@c <en>The file already exists in the repository but has been locally modified;
@c <en>you will have to merge the changes.
O arquivo já existe no repositório mas foi modificado
localmente; Você vai ter que mesclar as mudanças.

@c <en>@item I @var{file}
@item I @var{arquivo}
@c <en>The file is being ignored (@pxref{cvsignore}).
O arquivo foi ignorado (@pxref{cvsignore}).

@c <en>@cindex Symbolic link, importing
@cindex Ligações simbólicas, importando
@c <en>@cindex Link, symbolic, importing
@cindex Simbólica, ligação, importando
@c FIXME: also (somewhere else) probably
@c should be documenting what happens if you "cvs add"
@c a symbolic link.  Also maybe what happens if
@c you manually create symbolic links within the
@c repository (? - not sure why we'd want to suggest
@c doing that).
@c <en>@item L @var{file}
@item L @var{arquivo}
@c <en>The file is a symbolic link; @code{cvs import} ignores symbolic links.
@c <en>People periodically suggest that this behavior should
@c <en>be changed, but if there is a consensus on what it
@c <en>should be changed to, it is not apparent.
@c <en>(Various options in the @file{modules} file can be used
@c <en>to recreate symbolic links on checkout, update, etc.;
@c <en>@pxref{modules}.)
O arquivo é uma ligação simbólica; O @code{cvs import}
ignora ligações simbólicas.  De vez em quando alguem
sugere que este comportamento seja mudado, mas se há um
consenso quanto a que mudança fazer, não é
claro.  (Várias opções no arquivo @file{modules} podem
ser usadas para recriar ligações simbólicas no checkout, update, etc.;
@pxref{modules}.)
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node import examples
@appendixsubsec import examples

@c <en>See @ref{Tracking sources}, and @ref{From files}.
See @ref{Acompanhando fontes}, and @ref{De arquivos}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node log
@appendixsec log---Print out log information for files
@cindex log (subcommand)

@itemize @bullet
@item
Synopsis: log [options] [files@dots{}]
@item
Requires: repository, working directory.
@item
Changes: nothing.
@end itemize

Display log information for files.  @code{log} used to
call the @sc{rcs} utility @code{rlog}.  Although this
is no longer true in the current sources, this history
determines the format of the output and the options,
which are not quite in the style of the other @sc{cvs}
commands.

@cindex Timezone, in output
@cindex Zone, time, in output
@c Kind of a funny place to document the timezone used
@c in output from commands other than @code{log}.
@c There is also more we need to say about this,
@c including what happens in a client/server environment.
The output includes the location of the @sc{rcs} file,
the @dfn{head} revision (the latest revision on the
trunk), all symbolic names (tags) and some other
things.  For each revision, the revision number, the
author, the number of lines added/deleted and the log
message are printed.  All times are displayed in
Coordinated Universal Time (UTC).  (Other parts of
@sc{cvs} print times in the local timezone).
@c FIXCVS: need a better way to control the timezone
@c used in output.  Previous/current versions of CVS did/do
@c sometimes support -z in RCSINIT, and/or an
@c undocumented (except by reference to 'rlog') -z option
@c to cvs log, but this has not been a consistent,
@c documented feature.  Perhaps a new global option,
@c where LT means the client's timezone, which the
@c client then communicates to the server, is the
@c right solution.

@c <en>@strong{Note: @code{log} uses @samp{-R} in a way that conflicts
@c <en>with the normal use inside @sc{cvs} (@pxref{Common options}).}
@strong{Note: @code{log} uses @samp{-R} in a way that conflicts
with the normal use inside @sc{cvs} (@pxref{Opções comuns}).}

@menu
* log options::                 log options
* log examples::                log examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node log options
@appendixsubsec log options

By default, @code{log} prints all information that is
available.  All other options restrict the output.

@table @code
@item -b
Print information about the revisions on the default
branch, normally the highest branch on the trunk.

@c <en>@item -d @var{dates}
@item -d @var{dates}
@c <en>Print information about revisions with a checkin
@c <en>date/time in the range given by the
@c <en>semicolon-separated list of dates.  The date formats
@c <en>accepted are those accepted by the @samp{-D} option to
@c <en>many other @sc{cvs} commands (@pxref{Common options}).
@c <en>Dates can be combined into ranges as follows:
Print information about revisions with a checkin
date/time in the range given by the
semicolon-separated list of dates.  The date formats
accepted are those accepted by the @samp{-D} option to
many other @sc{cvs} commands (@pxref{Opções comuns}).
Dates can be combined into ranges as follows:

@c Should we be thinking about accepting ISO8601
@c ranges?  For example "1972-09-10/1972-09-12".
@table @code
@item @var{d1}<@var{d2}
@itemx @var{d2}>@var{d1}
Select the revisions that were deposited between
@var{d1} and @var{d2}.

@item <@var{d}
@itemx @var{d}>
Select all revisions dated @var{d} or earlier.

@item @var{d}<
@itemx >@var{d}
Select all revisions dated @var{d} or later.

@item @var{d}
Select the single, latest revision dated @var{d} or
earlier.
@end table

The @samp{>} or @samp{<} characters may be followed by
@samp{=} to indicate an inclusive range rather than an
exclusive one.

Note that the separator is a semicolon (;).

@item -h
Print only the name of the @sc{rcs} file, name
of the file in the working directory, head,
default branch, access list, locks, symbolic names, and
suffix.

@item -l
Local; run only in current working directory.  (Default
is to run recursively).

@item -N
Do not print the list of tags for this file.  This
option can be very useful when your site uses a lot of
tags, so rather than "more"'ing over 3 pages of tag
information, the log information is presented without
tags at all.

@item -R
Print only the name of the @sc{rcs} file.

@c Note that using a bare revision (in addition to not
@c being explicitly documented here) is potentially
@c confusing; it shows the log message to get from the
@c previous revision to that revision.  "-r1.3 -r1.6"
@c (equivalent to "-r1.3,1.6") is even worse; it
@c prints the messages to get from 1.2 to 1.3 and 1.5
@c to 1.6.  By analogy with "cvs diff", users might
@c expect that it is more like specifying a range.
@c It is not 100% clear to me how much of this should
@c be documented (for example, multiple -r options
@c perhaps could/should be deprecated given the false
@c analogy with "cvs diff").
@c In general, this section should be rewritten to talk
@c about messages to get from revision rev1 to rev2,
@c rather than messages for revision rev2 (that is, the
@c messages are associated with a change not a static
@c revision and failing to make this distinction causes
@c much confusion).
@item -r@var{revisions}
Print information about revisions given in the
comma-separated list @var{revisions} of revisions and
ranges.  The following table explains the available
range formats:

@table @code
@item @var{rev1}:@var{rev2}
Revisions @var{rev1} to @var{rev2} (which must be on
the same branch).

@item @var{rev1}::@var{rev2}
The same, but excluding @var{rev1}.

@item :@var{rev}
@itemx ::@var{rev}
Revisions from the beginning of the branch up to
and including @var{rev}.

@item @var{rev}:
Revisions starting with @var{rev} to the end of the
branch containing @var{rev}.

@item @var{rev}::
Revisions starting just after @var{rev} to the end of the
branch containing @var{rev}.

@item @var{branch}
An argument that is a branch means all revisions on
that branch.

@item @var{branch1}:@var{branch2}
@itemx @var{branch1}::@var{branch2}
A range of branches means all revisions
on the branches in that range.

@item @var{branch}.
The latest revision in @var{branch}.
@end table

A bare @samp{-r} with no revisions means the latest
revision on the default branch, normally the trunk.
There can be no space between the @samp{-r} option and
its argument.

@item -S
Suppress the header if no revisions are selected.

@item -s @var{states}
Print information about revisions whose state
attributes match one of the states given in the
comma-separated list @var{states}.

@item -t
Print the same as @samp{-h}, plus the descriptive text.

@item -w@var{logins}
Print information about revisions checked in by users
with login names appearing in the comma-separated list
@var{logins}.  If @var{logins} is omitted, the user's
login is assumed.  There can be no space between the
@samp{-w} option and its argument.
@end table

@code{log} prints the intersection of the revisions
selected with the options @samp{-d}, @samp{-s}, and
@samp{-w}, intersected with the union of the revisions
selected by @samp{-b} and @samp{-r}.

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node log examples
@appendixsubsec log examples

Contributed examples are gratefully accepted.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node rdiff
@appendixsec rdiff---'patch' format diffs between releases
@cindex rdiff (subcommand)

@itemize @bullet
@item
rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules@dots{}
@item
Requires: repository.
@item
Changes: nothing.
@item
Synonym: patch
@end itemize

Builds a Larry Wall format patch(1) file between two
releases, that can be fed directly into the @code{patch}
program to bring an old release up-to-date with the new
release.  (This is one of the few @sc{cvs} commands that
operates directly from the repository, and doesn't
require a prior checkout.) The diff output is sent to
the standard output device.

You can specify (using the standard @samp{-r} and
@samp{-D} options) any combination of one or two
revisions or dates.  If only one revision or date is
specified, the patch file reflects differences between
that revision or date and the current head revisions in
the @sc{rcs} file.

Note that if the software release affected is contained
in more than one directory, then it may be necessary to
specify the @samp{-p} option to the @code{patch} command when
patching the old sources, so that @code{patch} is able to find
the files that are located in other directories.

@menu
* rdiff options::               rdiff options
* rdiff examples::              rdiff examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node rdiff options
@appendixsubsec rdiff options

@c <en>These standard options are supported by @code{rdiff}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are supported by @code{rdiff}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@item -D @var{date}
Use the most recent revision no later than @var{date}.

@item -f
If no matching revision is found, retrieve the most
recent revision (instead of ignoring the file).

@item -l
Local; don't descend subdirectories.

@item -R
Examine directories recursively.  This option is on by default.

@item -r @var{tag}
Use revision @var{tag}.
@end table

In addition to the above, these options are available:

@table @code
@item -c
Use the context diff format.  This is the default format.

@item -s
Create a summary change report instead of a patch.  The
summary includes information about files that were
changed or added between the releases.  It is sent to
the standard output device.  This is useful for finding
out, for example, which files have changed between two
dates or revisions.

@item -t
A diff of the top two revisions is sent to the standard
output device.  This is most useful for seeing what the
last change to a file was.

@item -u
Use the unidiff format for the context diffs.
Remember that old versions
of the @code{patch} program can't handle the unidiff
format, so if you plan to post this patch to the net
you should probably not use @samp{-u}.

@item -V @var{vn}
Expand keywords according to the rules current in
@sc{rcs} version @var{vn} (the expansion format changed with
@sc{rcs} version 5).  Note that this option is no
longer accepted.  @sc{cvs} will always expand keywords the
way that @sc{rcs} version 5 does.
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node rdiff examples
@appendixsubsec rdiff examples

Suppose you receive mail from @t{foo@@example.net} asking for an
update from release 1.2 to 1.4 of the tc compiler.  You
have no such patches on hand, but with @sc{cvs} that can
easily be fixed with a command such as this:

@example
$ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
$$ Mail -s 'The patches you asked for' foo@@example.net
@end example

Suppose you have made release 1.3, and forked a branch
called @samp{R_1_3fix} for bugfixes.  @samp{R_1_3_1}
corresponds to release 1.3.1, which was made some time
ago.  Now, you want to see how much development has been
done on the branch.  This command can be used:

@example
$ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
cvs rdiff: Diffing module-name
File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
File bar.h,v changed from revision 1.29.2.1 to 1.2
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node release
@appendixsec release---Indicate that a Module is no longer in use
@cindex release (subcommand)

@itemize @bullet
@item
release [-d] directories@dots{}
@item
Requires: Working directory.
@item
Changes: Working directory, history log.
@end itemize

@c <en>This command is meant to safely cancel the effect of
@c <en>@samp{cvs checkout}.  Since @sc{cvs} doesn't lock files, it
@c <en>isn't strictly necessary to use this command.  You can
@c <en>always simply delete your working directory, if you
@c <en>like; but you risk losing changes you may have
@c <en>forgotten, and you leave no trace in the @sc{cvs} history
@c <en>file (@pxref{history file}) that you've abandoned your
@c <en>checkout.
This command is meant to safely cancel the effect of
@samp{cvs checkout}.  Since @sc{cvs} doesn't lock files, it
isn't strictly necessary to use this command.  You can
always simply delete your working directory, if you
like; but you risk losing changes you may have
forgotten, and you leave no trace in the @sc{cvs} history
file (@pxref{arquivo history (histórico)}) that you've abandoned your
checkout.

Use @samp{cvs release} to avoid these problems.  This
command checks that no uncommitted changes are
present; that you are executing it from immediately
above a @sc{cvs} working directory; and that the repository
recorded for your files is the same as the repository
defined in the module database.

If all these conditions are true, @samp{cvs release}
leaves a record of its execution (attesting to your
intentionally abandoning your checkout) in the @sc{cvs}
history log.

@menu
* release options::             release options
* release output::              release output
* release examples::            release examples
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node release options
@appendixsubsec release options

The @code{release} command supports one command option:

@table @code
@item -d
Delete your working copy of the file if the release
succeeds.  If this flag is not given your files will
remain in your working directory.

@c <en>@strong{WARNING:  The @code{release} command deletes
@c <en>all directories and files recursively.  This
@c <en>has the very serious side-effect that any directory
@c <en>that you have created inside your checked-out sources,
@c <en>and not added to the repository (using the @code{add}
@c <en>command; @pxref{Adding files}) will be silently deleted---even
@c <en>if it is non-empty!}
@strong{WARNING:  The @code{release} command deletes
all directories and files recursively.  This
has the very serious side-effect that any directory
that you have created inside your checked-out sources,
and not added to the repository (using the @code{add}
command; @pxref{Adicionando arquivos}) will be silently deleted---even
if it is non-empty!}
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node release output
@appendixsubsec release output

Before @code{release} releases your sources it will
print a one-line message for any file that is not
up-to-date.

@table @code
@item U @var{file}
@itemx P @var{file}
There exists a newer revision of this file in the
repository, and you have not modified your local copy
of the file (@samp{U} and @samp{P} mean the same thing).

@item A @var{file}
The file has been added to your private copy of the
sources, but has not yet been committed to the
repository.  If you delete your copy of the sources
this file will be lost.

@item R @var{file}
The file has been removed from your private copy of the
sources, but has not yet been removed from the
repository, since you have not yet committed the
removal.  @xref{commit}.

@item M @var{file}
The file is modified in your working directory.  There
might also be a newer revision inside the repository.

@item ? @var{file}
@var{file} is in your working directory, but does not
correspond to anything in the source repository, and is
not in the list of files for @sc{cvs} to ignore (see the
description of the @samp{-I} option, and
@pxref{cvsignore}).  If you remove your working
sources, this file will be lost.
@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node release examples
@appendixsubsec release examples

Release the @file{tc} directory, and delete your local working copy
of the files.

@example
$ cd ..         # @r{You must stand immediately above the}
                # @r{sources when you issue @samp{cvs release}.}
$ cvs release -d tc
You have [0] altered files in this repository.
Are you sure you want to release (and delete) directory `tc': y
$
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node update
@appendixsec update---Bring work tree in sync with repository
@cindex update (subcommand)

@itemize @bullet
@item
update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files@dots{}
@item
Requires: repository, working directory.
@item
Changes: working directory.
@end itemize

After you've run checkout to create your private copy
of source from the common repository, other developers
will continue changing the central source.  From time
to time, when it is convenient in your development
process, you can use the @code{update} command from
within your working directory to reconcile your work
with any revisions applied to the source repository
since your last checkout or update.  Without the @code{-C}
option, @code{update} will also merge any differences
between the local copy of files and their base revisions
into any destination revisions specified with @code{-r},
@code{-D}, or @code{-A}.

@menu
* update options::              update options
* update output::               update output
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node update options
@appendixsubsec update options

@c <en>These standard options are available with @code{update}
@c <en>(@pxref{Common options}, for a complete description of
@c <en>them):
These standard options are available with @code{update}
(@pxref{Opções comuns}, for a complete description of
them):

@table @code
@c <en>@item -D date
@item -D date
@c <en>Use the most recent revision no later than @var{date}.
@c <en>This option is sticky, and implies @samp{-P}.
@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates.
Use the most recent revision no later than @var{date}.
This option is sticky, and implies @samp{-P}.
See @ref{Etiquetas adesivas}, for more information on sticky tags/dates.

@item -f
Only useful with the @samp{-D @var{date}} or @samp{-r
@var{tag}} flags.  If no matching revision is found,
retrieve the most recent revision (instead of ignoring
the file).

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Process keywords according to @var{kflag}.  See
@c <en>@ref{Keyword substitution}.
@c <en>This option is sticky; future updates of
@c <en>this file in this working directory will use the same
@c <en>@var{kflag}.  The @code{status} command can be viewed
@c <en>to see the sticky options.  See @ref{Invoking CVS}, for
@c <en>more information on the @code{status} command.
Process keywords according to @var{kflag}.  See
@ref{Substituição de palavra-chave}.
This option is sticky; future updates of
this file in this working directory will use the same
@var{kflag}.  The @code{status} command can be viewed
to see the sticky options.  See @ref{Chamando o CVS}, for
more information on the @code{status} command.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -P
@item -P
@c <en>Prune empty directories.  See @ref{Moving directories}.
Prune empty directories.  See @ref{Movendo diretórios}.

@c <en>@item -p
@item -p
@c <en>Pipe files to the standard output.
Pipe files to the standard output.

@c <en>@item -R
@item -R
@c <en>Update directories recursively (default).  @xref{Recursive
@c <en>behavior}.
Update directories recursively (default).
@xref{Comportamento recursivo}.

@c <en>@item -r rev
@item -r rev
@c <en>Retrieve revision/tag @var{rev}.  This option is sticky,
@c <en>and implies @samp{-P}.
@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates.
Retrieve revision/tag @var{rev}.  This option is sticky,
and implies @samp{-P}.
See @ref{Etiquetas adesivas}, for more information on sticky tags/dates.
@end table

@need 800
These special options are also available with
@code{update}.

@table @code
@c <en>@item -A
@item -A
@c <en>Reset any sticky tags, dates, or @samp{-k} options.
@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates.
Reset any sticky tags, dates, or @samp{-k} options.
See @ref{Etiquetas adesivas}, for more information on sticky tags/dates.

@item -C
Overwrite locally modified files with clean copies from
the repository (the modified file is saved in
@file{.#@var{file}.@var{revision}}, however).

@item -d
Create any directories that exist in the repository if
they're missing from the working directory.  Normally,
@code{update} acts only on directories and files that
were already enrolled in your working directory.

This is useful for updating directories that were
created in the repository since the initial checkout;
but it has an unfortunate side effect.  If you
deliberately avoided certain directories in the
repository when you created your working directory
(either through use of a module name or by listing
explicitly the files and directories you wanted on the
command line), then updating with @samp{-d} will create
those directories, which may not be what you want.

@item -I @var{name}
Ignore files whose names match @var{name} (in your
working directory) during the update.  You can specify
@samp{-I} more than once on the command line to specify
several files to ignore.  Use @samp{-I !} to avoid
ignoring any files at all.  @xref{cvsignore}, for other
ways to make @sc{cvs} ignore some files.

@item -W@var{spec}
Specify file names that should be filtered during
update.  You can use this option repeatedly.

@var{spec} can be a file name pattern of the same type
that you can specify in the @file{.cvswrappers}
file. @xref{Wrappers}.

@item -j@var{revision}
With two @samp{-j} options, merge changes from the
revision specified with the first @samp{-j} option to
the revision specified with the second @samp{j} option,
into the working directory.

With one @samp{-j} option, merge changes from the
ancestor revision to the revision specified with the
@samp{-j} option, into the working directory.  The
ancestor revision is the common ancestor of the
revision which the working directory is based on, and
the revision specified in the @samp{-j} option.

@c <en>Note that using a single @samp{-j @var{tagname}} option rather than
@c <en>@samp{-j @var{branchname}} to merge changes from a branch will
@c <en>often not remove files which were removed on the branch.
@c <en>@xref{Merging adds and removals}, for more.
Note that using a single @samp{-j @var{tagname}} option rather than
@samp{-j @var{branchname}} to merge changes from a branch will
often not remove files which were removed on the branch.
@xref{Mesclando adicionados e removidos}, for more.

In addition, each @samp{-j} option can contain an optional
date specification which, when used with branches, can
limit the chosen revision to one within a specific
date.  An optional date is specified by adding a colon
(:) to the tag:
@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}.

@c <en>@xref{Branching and merging}.
@xref{Ramificando e mesclando}.

@end table

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@c <en>@node update output
@node update output
@c <en>@appendixsubsec update output
@appendixsubsec update output

@c <en>@code{update} and @code{checkout} keep you informed of
@c <en>their progress by printing a line for each file, preceded
@c <en>by one character indicating the status of the file:
O @code{update} e o @code{checkout} mantém você
informado de seu progresso escrevendo uma linha para
cada arquivo, iniciando com um caractere que indica o
status do arquivo:

@table @code
@c <en>@item U @var{file}
@item U @var{arquivo}
@c <en>The file was brought up to date with respect to the
@c <en>repository.  This is done for any file that exists in
@c <en>the repository but not in your source, and for files
@c <en>that you haven't changed but are not the most recent
@c <en>versions available in the repository.
O arquivo foi atualizado com base no repositório.  Isto
é feito para qualquer arquivo que exista no
repositório mas não esteja nos seus fontes (no seu
diretório da trabalho) e para arquivos que você não
mudou mas não estão na versão mais recente que está
disponível no repositório.

@c <en>@item P @var{file}
@item P @var{arquivo}
@c <en>Like @samp{U}, but the @sc{cvs} server sends a patch instead of an entire
@c <en>file.  This accomplishes the same thing as @samp{U} using less bandwidth.

Como o @samp{U}, mas o servidor @sc{cvs} manda um patch
(remendo) ao invés de mandar um arquivo inteiro.  Tem o
mesmo resultado que @samp{U} usando menos largura de banda.

@c <en>@item A @var{file}
@item A @var{arquivo}
@c <en>The file has been added to your private copy of the
@c <en>sources, and will be added to the source repository
@c <en>when you run @code{commit} on the file.  This is a
@c <en>reminder to you that the file needs to be committed.
O arquivo foi adicionado a sua cópia local dos fontes,
e vai ser adicionado ao repositório quando você rodar o
@code{commit} no arquivo.  Funciona como um lembrete de
que o arquivo precisa ser ???commitado???.

@c <en>@item R @var{file}
@item R @var{arquivo}
@c <en>The file has been removed from your private copy of the
@c <en>sources, and will be removed from the source repository
@c <en>when you run @code{commit} on the file.  This is a
@c <en>reminder to you that the file needs to be committed.
O arquivo foi removido de sua cópia local dos fontes, e
será removido do repositório quando você executar um
@code{commit} no arquivo.  Funciona como um lembrete de
que o arquivo precisa ser ???commitado???.

@c <en>@item M @var{file}
@item M @var{arquivo}
@c <en>The file is modified in  your  working  directory.
O arquivo está modificado no seu diretório de trabalho.

@c <en>@samp{M} can indicate one of two states for a file
@c <en>you're working on: either there were no modifications
@c <en>to the same file in the repository, so that your file
@c <en>remains as you last saw it; or there were modifications
@c <en>in the repository as well as in your copy, but they
@c <en>were merged successfully, without conflict, in your
@c <en>working directory.
O @samp{M} pode indicar um dos dois estados para um
arquivo no qual você esteja trabalhando: ou não existem
modificações do arquivo equivalente no repositório, de forma
que seu arquivo continua da forma como você o deixou;
ou existem modificações no repositório assim como na
sua cópia, mas elas foram mescladas com sucesso, sem
conflito, no seu diretório de trabalho.

@c <en>@sc{cvs} will print some messages if it merges your work,
@c <en>and a backup copy of your working file (as it looked
@c <en>before you ran @code{update}) will be made.  The exact
@c <en>name of that file is printed while @code{update} runs.
O @sc{cvs} vai escrever algumas mensagens se ele
mesclar seu trabalho, e colocará uma cópia de segurança no seu
diretório de trabalho (na forma que estava antes de
executar o @code{update}).  O nome exato do arquivo
será escrito quando o @code{update} rodar.

@c <en>@item C @var{file}
@item C @var{arquivo}
@c <en>@cindex .# files
@cindex arquivos .#
@c <en>@cindex __ files (VMS)
@cindex __ arquivos (VMS)
@c <en>A conflict was detected while trying to merge your
@c <en>changes to @var{file} with changes from the source
@c <en>repository.  @var{file} (the copy in your working
@c <en>directory) is now the result of attempting to merge
@c <en>the two revisions; an unmodified copy of your file
@c <en>is also in your working directory, with the name
@c <en>@file{.#@var{file}.@var{revision}} where @var{revision}
@c <en>is the revision that your modified file started
@c <en>from.  Resolve the conflict as described in
@c <en>@ref{Conflicts example}.
Um conflito foi detectado quando se tentava mesclar
suas mudanças no @var{arquivo} com as mudanças no
repositório.  O @var{arquivo} (a cópia no seu diretório
de trabalho) é agora o resultado da tentativa de
mesclar as duas revisões; uma cópia inalterada do
arquivo também está no diretório de trabalho, com o
nome de @file{.#@var{arquivo}.@var{revisão}} onde
@var{revisão} é a revisão de onde o seu arquivo
modificado saiu.  Resolva o conflito como é mostrado em
@ref{Exemplo de conflitos}.
@c "some systems" as in out-of-the-box OSes?  Not as
@c far as I know.  We need to advise sysadmins as well
@c as users how to set up this kind of purge, if that is
@c what they want.
@c We also might want to think about cleaner solutions,
@c like having CVS remove the .# file once the conflict
@c has been resolved or something like that.
@c <en>(Note that some systems automatically purge
@c <en>files that begin with @file{.#} if they have not been
@c <en>accessed for a few days.  If you intend to keep a copy
@c <en>of your original file, it is a very good idea to rename
@c <en>it.)  Under @sc{vms}, the file name starts with
@c <en>@file{__} rather than @file{.#}.
(Note que alguns sistemas eliminam automaticamente
arquivos que começam com @file{.#} se eles não são
acessados por alguns dias.  Se você pretende manter uma
cópia do arquivo original, é um ótima idéia
renomeá-lo.)  No @sc{vms}, o nome do arquivo começa com
@file{__} ao invés de @file{.#}.

@c <en>@item ? @var{file}
@item ? @var{arquivo}
@c <en>@var{file} is in your working directory, but does not
@c <en>correspond to anything in the source repository, and is
@c <en>not in the list of files for @sc{cvs} to ignore (see the
@c <en>description of the @samp{-I} option, and
@c <en>@pxref{cvsignore}).
O @var{arquivo} is in your working directory, but does not
correspond to anything in the source repository, and is
not in the list of files for @sc{cvs} to ignore (see the
description of the @samp{-I} option, and
@pxref{cvsignore}).
@end table

@c <en>@node Invoking CVS
@node Chamando o CVS
@c <en>@appendix Quick reference to CVS commands
@appendix Quick reference to CVS commands
@c <en>@cindex Command reference
@cindex Command reference
@c <en>@cindex Reference, commands
@cindex Reference, commands
@c <en>@cindex Invoking CVS
@cindex Chamando o CVS

@c <en>This appendix describes how to invoke @sc{cvs}, with
@c <en>references to where each command or feature is
@c <en>described in detail.  For other references run the
@c <en>@code{cvs --help} command, or see @ref{Index}.
This appendix describes how to invoke @sc{cvs}, with
references to where each command or feature is
described in detail.  For other references run the
@code{cvs --help} command, or see @ref{Indice}.

@c <en>A @sc{cvs} command looks like:
A @sc{cvs} command looks like:

@example
cvs [ @var{global_options} ] @var{command} [ @var{command_options} ] [ @var{command_args} ]
@end example

Global options:

@table @code
@c <en>@item --allow-root=@var{rootdir}
@item --allow-root=@var{rootdir}
@c <en>Specify legal @sc{cvsroot} directory (server only) (not
@c <en>in @sc{cvs} 1.9 and older).  See @ref{Password
@c <en>authentication server}.
Specify legal @sc{cvsroot} directory (server only) (not
in @sc{cvs} 1.9 and older).  See
@ref{Servidor de autenticação por senha}.

@c <en>@item -a
@item -a
@c <en>Authenticate all communication (client only) (not in @sc{cvs}
@c <en>1.9 and older).  See @ref{Global options}.
Authenticate all communication (client only) (not in @sc{cvs}
1.9 and older).  See @ref{Opções globais}.

@c <en>@item -b
@item -b
@c <en>Specify RCS location (@sc{cvs} 1.9 and older).  See
@c <en>@ref{Global options}.
Specify RCS location (@sc{cvs} 1.9 and older).  See
@ref{Opções globais}.

@c <en>@item -d @var{root}
@item -d @var{root}
@c <en>Specify the @sc{cvsroot}.  See @ref{Repository}.
Specify the @sc{cvsroot}.  See @ref{Repositório}.

@c <en>@item -e @var{editor}
@item -e @var{editor}
@c <en>Edit messages with @var{editor}.  See @ref{Committing
@c <en>your changes}.
Edit messages with @var{editor}.  See
@ref{Efetivando suas alterações}.

@c <en>@item -f
@item -f
@c <en>Do not read the @file{~/.cvsrc} file.  See @ref{Global
@c <en>options}.
Do not read the @file{~/.cvsrc} file.  See @ref{Opções globais}.

@c <en>@item -H
@item -H
@c <en>@itemx --help
@itemx --help
@c <en>Print a help message.  See @ref{Global options}.
Print a help message.  See @ref{Opções globais}.

@c <en>@item -l
@item -l
@c <en>Do not log in @file{$CVSROOT/CVSROOT/history} file.  See @ref{Global
@c <en>options}.
Do not log in @file{$CVSROOT/CVSROOT/history} file.  See
@ref{Opções globais}.

@c <en>@item -n
@item -n
@c <en>Do not change any files.  See @ref{Global options}.
Do not change any files.  See @ref{Opções globais}.

@c <en>@item -Q
@item -Q
@c <en>Be really quiet.  See @ref{Global options}.
Be really quiet.  See @ref{Opções globais}.

@c <en>@item -q
@item -q
@c <en>Be somewhat quiet.  See @ref{Global options}.
Be somewhat quiet.  See @ref{Opções globais}.

@c <en>@item -r
@item -r
@c <en>Make new working files read-only.  See @ref{Global options}.
Make new working files read-only.  See @ref{Opções globais}.

@c <en>@item -s @var{variable}=@var{value}
@item -s @var{variable}=@var{value}
@c <en>Set a user variable.  See @ref{Variables}.
Set a user variable.  See @ref{Variables}.

@c <en>@item -T @var{tempdir}
@item -T @var{tempdir}
@c <en>Put temporary files in @var{tempdir}.  See @ref{Global
@c <en>options}.
Put temporary files in @var{tempdir}.  See
@ref{Opções globais}.

@c <en>@item -t
@item -t
@c <en>Trace @sc{cvs} execution.  See @ref{Global options}.
Trace @sc{cvs} execution.  See @ref{Opções globais}.

@c <en>@item -v
@item -v
@c <en>@item --version
@item --version
@c <en>Display version and copyright information for @sc{cvs}.
Display version and copyright information for @sc{cvs}.

@c <en>@item -w
@item -w
@c <en>Make new working files read-write.  See @ref{Global
@c <en>options}.
Make new working files read-write.  See @ref{Opções globais}.

@c <en>@item -x
@item -x
@c <en>Encrypt all communication (client only).
@c <en>See @ref{Global options}.
Encrypt all communication (client only).
See @ref{Opções globais}.

@c <en>@item -z @var{gzip-level}
@item -z @var{gzip-level}
@c <en>@cindex Compression
@cindex Compression
@c <en>@cindex Gzip
@cindex Gzip
@c <en>Set the compression level (client only).
@c <en>See @ref{Global options}.
Set the compression level (client only).
See @ref{Opções globais}.
@end table

@c <en>Keyword expansion modes (@pxref{Substitution modes}):
Keyword expansion modes (@pxref{Modos de substituição}):

@example
-kkv  $@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
-kkvl $@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
-kk   $@splitrcskeyword{}Id$
-kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
-ko   @i{no expansion}
-kb   @i{no expansion, file is binary}
@end example

@c <en>Keywords (@pxref{Keyword list}):
Keywords (@pxref{Lista de palavras-chave}):

@example
$@splitrcskeyword{}Author: joe $
$@splitrcskeyword{}Date: 1993/12/09 03:21:13 $
$@splitrcskeyword{}CVSHeader: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$@splitrcskeyword{}Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
$@splitrcskeyword{}Locker: harry $
$@splitrcskeyword{}Name: snapshot_1_14 $
$@splitrcskeyword{}RCSfile: file1,v $
$@splitrcskeyword{}Revision: 1.1 $
$@splitrcskeyword{}Source: /home/files/file1,v $
$@splitrcskeyword{}State: Exp $
$@splitrcskeyword{}Log: file1,v $
Revision 1.1  1993/12/09 03:30:17  joe
Initial revision

@end example

@c The idea behind this table is that we want each item
@c to be a sentence or two at most.  Preferably a
@c single line.
@c
@c In some cases refs to "foo options" are just to get
@c this thing written quickly, not because the "foo
@c options" node is really the best place to point.
Commands, command options, and command arguments:

@table @code
@c ------------------------------------------------------------
@c <en>@item add [@var{options}] [@var{files}@dots{}]
@item add [@var{options}] [@var{files}@dots{}]
@c <en>Add a new file/directory.  See @ref{Adding files}.
Add a new file/directory.  See @ref{Adicionando arquivos}.

@table @code
@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Set keyword expansion.
Set keyword expansion.

@c <en>@item -m @var{msg}
@item -m @var{msg}
@c <en>Set file description.
Set file description.
@end table

@c ------------------------------------------------------------
@c <en>@item admin [@var{options}] [@var{files}@dots{}]
@item admin [@var{options}] [@var{files}@dots{}]
@c <en>Administration of history files in the repository.  See
@c <en>@ref{admin}.
Administration of history files in the repository.  See
@ref{admin}.
@c This list omits those options which are not
@c documented as being useful with CVS.  That might be
@c a mistake...

@table @code
@c <en>@item -b[@var{rev}]
@item -b[@var{rev}]
@c <en>Set default branch.  See @ref{Reverting local changes}.
Set default branch.  See @ref{Reverting local changes}.

@c <en>@item -c@var{string}
@item -c@var{string}
@c <en>Set comment leader.
Set comment leader.

@c <en>@item -k@var{subst}
@item -k@var{subst}
@c <en>Set keyword substitution.  See @ref{Keyword
@c <en>substitution}.
Set keyword substitution.  See @ref{Substituição de palavra-chave}.

@c <en>@item -l[@var{rev}]
@item -l[@var{rev}]
@c <en>Lock revision @var{rev}, or latest revision.
Lock revision @var{rev}, or latest revision.

@c <en>@item -m@var{rev}:@var{msg}
@item -m@var{rev}:@var{msg}
@c <en>Replace the log message of revision @var{rev} with
@c <en>@var{msg}.
Replace the log message of revision @var{rev} with
@var{msg}.

@c <en>@item -o@var{range}
@item -o@var{range}
@c <en>Delete revisions from the repository.  See
@c <en>@ref{admin options}.
Delete revisions from the repository.  See
@ref{admin options}.

@c <en>@item -q
@item -q
@c <en>Run quietly; do not print diagnostics.
Run quietly; do not print diagnostics.

@c <en>@item -s@var{state}[:@var{rev}]
@item -s@var{state}[:@var{rev}]
@c <en>Set the state.
Set the state.

@c Does not work for client/server CVS
@c <en>@item -t
@item -t
@c <en>Set file description from standard input.
Set file description from standard input.

@c <en>@item -t@var{file}
@item -t@var{file}
@c <en>Set file description from @var{file}.
Set file description from @var{file}.

@c <en>@item -t-@var{string}
@item -t-@var{string}
@c <en>Set file description to @var{string}.
Set file description to @var{string}.

@c <en>@item -u[@var{rev}]
@item -u[@var{rev}]
@c <en>Unlock revision @var{rev}, or latest revision.
Unlock revision @var{rev}, or latest revision.
@end table

@c ------------------------------------------------------------
@c <en>@item annotate [@var{options}] [@var{files}@dots{}]
@item annotate [@var{options}] [@var{files}@dots{}]
@c <en>Show last revision where each line was modified.  See
@c <en>@ref{annotate}.
Show last revision where each line was modified.  See
@ref{annotate}.

@table @code
@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Annotate the most recent revision no later than
@c <en>@var{date}.  See @ref{Common options}.
Annotate the most recent revision no later than
@var{date}.  See @ref{Opções comuns}.

@c <en>@item -F
@item -F
@c <en>Force annotation of binary files.  (Without this option,
@c <en>binary files are skipped with a message.)
Force annotation of binary files.  (Without this option,
binary files are skipped with a message.)

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).
@xref{Comportamento recursivo}.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Annotate revision @var{tag}.  See @ref{Common options}.
Annotate revision @var{tag}.  See @ref{Opções comuns}.
@end table

@c ------------------------------------------------------------
@c <en>@item checkout [@var{options}] @var{modules}@dots{}
@item checkout [@var{options}] @var{modules}@dots{}
@c <en>Get a copy of the sources.  See @ref{checkout}.
Get a copy of the sources.  See @ref{checkout}.

@table @code
@c <en>@item -A
@item -A
@c <en>Reset any sticky tags/date/options.  See @ref{Sticky
@c <en>tags} and @ref{Keyword substitution}.
Reset any sticky tags/date/options.  See @ref{Etiquetas adesivas}
and @ref{Substituição de palavra-chave}.

@c <en>@item -c
@item -c
@c <en>Output the module database.  See @ref{checkout options}.
Output the module database.  See @ref{checkout options}.

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Check out revisions as of @var{date} (is sticky).  See
@c <en>@ref{Common options}.
Check out revisions as of @var{date} (is sticky).  See
@ref{Opções comuns}.

@c <en>@item -d @var{dir}
@item -d @var{dir}
@c <en>Check out into @var{dir}.  See @ref{checkout options}.
Check out into @var{dir}.  See @ref{checkout options}.

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c Probably want to use rev1/rev2 style like for diff
@c -r.  Here and in on-line help.
@c <en>@item -j @var{rev}
@item -j @var{rev}
@c <en>Merge in changes.  See @ref{checkout options}.
Merge in changes.  See @ref{checkout options}.

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Use @var{kflag} keyword expansion.  See
@c <en>@ref{Substitution modes}.
Use @var{kflag} keyword expansion.  See
@ref{Modos de substituição}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -N
@item -N
@c <en>Don't ``shorten'' module paths if -d specified.  See
@c <en>@ref{checkout options}.
Don't ``shorten'' module paths if -d specified.  See
@ref{checkout options}.

@c <en>@item -n
@item -n
@c <en>Do not run module program (if any).  See @ref{checkout options}.
Do not run module program (if any).  See @ref{checkout options}.

@c <en>@item -P
@item -P
@c <en>Prune empty directories.  See @ref{Moving directories}.
Prune empty directories.  See @ref{Movendo diretórios}.

@c <en>@item -p
@item -p
@c <en>Check out files to standard output (avoids
@c <en>stickiness).  See @ref{checkout options}.
Check out files to standard output (avoids
stickiness).  See @ref{checkout options}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Checkout revision @var{tag} (is sticky).  See @ref{Common options}.
Checkout revision @var{tag} (is sticky).  See @ref{Opções comuns}.

@c <en>@item -s
@item -s
@c <en>Like -c, but include module status.  See @ref{checkout options}.
Like -c, but include module status.  See @ref{checkout options}.
@end table

@c ------------------------------------------------------------
@c <en>@item commit [@var{options}] [@var{files}@dots{}]
@item commit [@var{options}] [@var{files}@dots{}]
@c <en>Check changes into the repository.  See @ref{commit}.
Check changes into the repository.  See @ref{commit}.

@table @code
@c <en>@item -F @var{file}
@item -F @var{file}
@c <en>Read log message from @var{file}.  See @ref{commit options}.
Read log message from @var{file}.  See @ref{commit options}.

@c <en>@item -f
@item -f
@c What is this "disables recursion"?  It is from the
@c on-line help; is it documented in this manual?
@c <en>Force the file to be committed; disables recursion.
@c <en>See @ref{commit options}.
Force the file to be committed; disables recursion.
See @ref{commit options}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -m @var{msg}
@item -m @var{msg}
@c <en>Use @var{msg} as log message.  See @ref{commit options}.
Use @var{msg} as log message.  See @ref{commit options}.

@c <en>@item -n
@item -n
@c <en>Do not run module program (if any).  See @ref{commit options}.
Do not run module program (if any).  See @ref{commit options}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{rev}
@item -r @var{rev}
@c <en>Commit to @var{rev}.  See @ref{commit options}.
Commit to @var{rev}.  See @ref{commit options}.
@c FIXME: should be dragging over text from
@c commit options, especially if it can be cleaned up
@c and made concise enough.
@end table

@c ------------------------------------------------------------
@c <en>@item diff [@var{options}] [@var{files}@dots{}]
@item diff [@var{options}] [@var{files}@dots{}]
@c <en>Show differences between revisions.  See @ref{diff}.
@c <en>In addition to the options shown below, accepts a wide
@c <en>variety of options to control output style, for example
@c <en>@samp{-c} for context diffs.
Show differences between revisions.  See @ref{diff}.
In addition to the options shown below, accepts a wide
variety of options to control output style, for example
@samp{-c} for context diffs.

@table @code
@c <en>@item -D @var{date1}
@item -D @var{date1}
@c <en>Diff revision for date against working file.  See
@c <en>@ref{diff options}.
Diff revision for date against working file.  See
@ref{diff options}.

@c <en>@item -D @var{date2}
@item -D @var{date2}
@c <en>Diff @var{rev1}/@var{date1} against @var{date2}.  See
@c <en>@ref{diff options}.
Diff @var{rev1}/@var{date1} against @var{date2}.  See
@ref{diff options}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -N
@item -N
@c <en>Include diffs for added and removed files.  See
@c <en>@ref{diff options}.
Include diffs for added and removed files.  See
@ref{diff options}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{rev1}
@item -r @var{rev1}
@c <en>Diff revision for @var{rev1} against working file.  See
@c <en>@ref{diff options}.
Diff revision for @var{rev1} against working file.  See
@ref{diff options}.

@c <en>@item -r @var{rev2}
@item -r @var{rev2}
@c <en>Diff @var{rev1}/@var{date1} against @var{rev2}.  See @ref{diff options}.
Diff @var{rev1}/@var{date1} against @var{rev2}.  See @ref{diff options}.
@end table

@c ------------------------------------------------------------
@c <en>@item edit [@var{options}] [@var{files}@dots{}]
@item edit [@var{options}] [@var{files}@dots{}]
@c <en>Get ready to edit a watched file.  See @ref{Editing files}.
Get ready to edit a watched file.  See @ref{Editando arquivos}.

@table @code
@c <en>@item -a @var{actions}
@item -a @var{actions}
@c <en>Specify actions for temporary watch, where
@c <en>@var{actions} is @code{edit}, @code{unedit},
@c <en>@code{commit}, @code{all}, or @code{none}.  See
@c <en>@ref{Editing files}.
Specify actions for temporary watch, where
@var{actions} is @code{edit}, @code{unedit},
@code{commit}, @code{all}, or @code{none}.  See
@ref{Editando arquivos}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@c ------------------------------------------------------------
@c <en>@item editors [@var{options}] [@var{files}@dots{}]
@item editors [@var{options}] [@var{files}@dots{}]
@c <en>See who is editing a watched file.  See @ref{Watch information}.
See who is editing a watched file.  See @ref{Informações de ???Watch???}.

@table @code
@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@c ------------------------------------------------------------
@c <en>@item export [@var{options}] @var{modules}@dots{}
@item export [@var{options}] @var{modules}@dots{}
@c <en>Export files from @sc{cvs}.  See @ref{export}.
Export files from @sc{cvs}.  See @ref{export}.

@table @code
@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Check out revisions as of @var{date}.  See
@c <en>@ref{Common options}.
Check out revisions as of @var{date}.  See
@ref{Opções comuns}.

@c <en>@item -d @var{dir}
@item -d @var{dir}
@c <en>Check out into @var{dir}.  See @ref{export options}.
Check out into @var{dir}.  See @ref{export options}.

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Use @var{kflag} keyword expansion.  See
@c <en>@ref{Substitution modes}.
Use @var{kflag} keyword expansion.  See
@ref{Modos de substituição}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -N
@item -N
@c <en>Don't ``shorten'' module paths if -d specified.  See
@c <en>@ref{export options}.
Don't ``shorten'' module paths if -d specified.  See
@ref{export options}.

@c <en>@item -n
@item -n
@c <en>Do not run module program (if any).  See @ref{export options}.
Do not run module program (if any).  See @ref{export options}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Checkout revision @var{tag}.  See @ref{Common options}.
Checkout revision @var{tag}.  See @ref{Opções comuns}.
@end table

@c ------------------------------------------------------------
@c <en>@item history [@var{options}] [@var{files}@dots{}]
@item history [@var{options}] [@var{files}@dots{}]
@c <en>Show repository access history.  See @ref{history}.
Show repository access history.  See @ref{history}.

@table @code
@c <en>@item -a
@item -a
@c <en>All users (default is self).  See @ref{history options}.
All users (default is self).  See @ref{history options}.

@c <en>@item -b @var{str}
@item -b @var{str}
@c <en>Back to record with @var{str} in module/file/repos
@c <en>field.  See @ref{history options}.
Back to record with @var{str} in module/file/repos
field.  See @ref{history options}.

@c <en>@item -c
@item -c
@c <en>Report on committed (modified) files.  See @ref{history options}.
Report on committed (modified) files.  See @ref{history options}.

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Since @var{date}.  See @ref{history options}.
Since @var{date}.  See @ref{history options}.

@c <en>@item -e
@item -e
@c <en>Report on all record types.  See @ref{history options}.
Report on all record types.  See @ref{history options}.

@c <en>@item -l
@item -l
@c <en>Last modified (committed or modified report).  See @ref{history options}.
Last modified (committed or modified report).  See @ref{history options}.

@c <en>@item -m @var{module}
@item -m @var{module}
@c <en>Report on @var{module} (repeatable).  See @ref{history options}.
Report on @var{module} (repeatable).  See @ref{history options}.

@c <en>@item -n @var{module}
@item -n @var{module}
@c <en>In @var{module}.  See @ref{history options}.
In @var{module}.  See @ref{history options}.

@c <en>@item -o
@item -o
@c <en>Report on checked out modules.  See @ref{history options}.
Report on checked out modules.  See @ref{history options}.

@c <en>@item -p @var{repository}
@item -p @var{repository}
@c <en>In @var{repository}.  See @ref{history options}.
In @var{repository}.  See @ref{history options}.

@c <en>@item -r @var{rev}
@item -r @var{rev}
@c <en>Since revision @var{rev}.  See @ref{history options}.
Since revision @var{rev}.  See @ref{history options}.

@c <en>@item -T
@item -T
@c What the @#$@# is a TAG?  Same as a tag?  This
@c wording is also in the online-line help.
@c <en>Produce report on all TAGs.  See @ref{history options}.
Produce report on all TAGs.  See @ref{history options}.

@c <en>@item -t @var{tag}
@item -t @var{tag}
@c <en>Since tag record placed in history file (by anyone).
@c <en>See @ref{history options}.
Since tag record placed in history file (by anyone).
See @ref{history options}.

@c <en>@item -u @var{user}
@item -u @var{user}
@c <en>For user @var{user} (repeatable).  See @ref{history options}.
For user @var{user} (repeatable).  See @ref{history options}.

@c <en>@item -w
@item -w
@c <en>Working directory must match.  See @ref{history options}.
Working directory must match.  See @ref{history options}.

@c <en>@item -x @var{types}
@item -x @var{types}
@c <en>Report on @var{types}, one or more of
@c <en>@code{TOEFWUPCGMAR}.  See @ref{history options}.
Report on @var{types}, one or more of
@code{TOEFWUPCGMAR}.  See @ref{history options}.

@c <en>@item -z @var{zone}
@item -z @var{zone}
@c <en>Output for time zone @var{zone}.  See @ref{history options}.
Output for time zone @var{zone}.  See @ref{history options}.
@end table

@c ------------------------------------------------------------
@c <en>@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{}
@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{}
@c <en>Import files into @sc{cvs}, using vendor branches.  See
@c <en>@ref{import}.
Import files into @sc{cvs}, using vendor branches.  See
@ref{import}.

@table @code
@c <en>@item -b @var{bra}
@item -b @var{bra}
@c <en>Import to vendor branch @var{bra}.  See
@c <en>@ref{Multiple vendor branches}.
Import to vendor branch @var{bra}.  See
@ref{Ramos de fornecedor múltiplos}.

@c <en>@item -d
@item -d
@c <en>Use the file's modification time as the time of
@c <en>import.  See @ref{import options}.
Use the file's modification time as the time of
import.  See @ref{import options}.

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Set default keyword substitution mode.  See
@c <en>@ref{import options}.
Set default keyword substitution mode.  See
@ref{import options}.

@c <en>@item -m @var{msg}
@item -m @var{msg}
@c <en>Use @var{msg} for log message.  See
@c <en>@ref{import options}.
Use @var{msg} for log message.  See
@ref{import options}.

@c <en>@item -I @var{ign}
@item -I @var{ign}
@c <en>More files to ignore (! to reset).  See
@c <en>@ref{import options}.
More files to ignore (! to reset).  See
@ref{import options}.

@c <en>@item -W @var{spec}
@item -W @var{spec}
@c <en>More wrappers.  See @ref{import options}.
More wrappers.  See @ref{import options}.
@end table

@c ------------------------------------------------------------
@c <en>@item init
@item init
@c <en>Create a @sc{cvs} repository if it doesn't exist.  See
@c <en>@ref{Creating a repository}.
Create a @sc{cvs} repository if it doesn't exist.  See
@ref{Criando um repositório}.

@c ------------------------------------------------------------
@c <en>@item kserver
@item kserver
@c <en>Kerberos authenticated server.
@c <en>See @ref{Kerberos authenticated}.
Kerberos authenticated server.
See @ref{Autenticação kerberos}.

@c ------------------------------------------------------------
@c <en>@item log [@var{options}] [@var{files}@dots{}]
@item log [@var{options}] [@var{files}@dots{}]
@c <en>Print out history information for files.  See @ref{log}.
Print out history information for files.  See @ref{log}.

@table @code
@c <en>@item -b
@item -b
@c <en>Only list revisions on the default branch.  See @ref{log options}.
Only list revisions on the default branch.  See @ref{log options}.

@c <en>@item -d @var{dates}
@item -d @var{dates}
@c <en>Specify dates (@var{d1}<@var{d2} for range, @var{d} for
@c <en>latest before).  See @ref{log options}.
Specify dates (@var{d1}<@var{d2} for range, @var{d} for
latest before).  See @ref{log options}.

@c <en>@item -h
@item -h
@c <en>Only print header.  See @ref{log options}.
Only print header.  See @ref{log options}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -N
@item -N
@c <en>Do not list tags.  See @ref{log options}.
Do not list tags.  See @ref{log options}.

@c <en>@item -R
@item -R
@c <en>Only print name of RCS file.  See @ref{log options}.
Only print name of RCS file.  See @ref{log options}.

@c <en>@item -r@var{revs}
@item -r@var{revs}
@c <en>Only list revisions @var{revs}.  See @ref{log options}.
Only list revisions @var{revs}.  See @ref{log options}.

@c <en>@item -s @var{states}
@item -s @var{states}
@c <en>Only list revisions with specified states.  See @ref{log options}.
Only list revisions with specified states.  See @ref{log options}.

@c <en>@item -t
@item -t
@c <en>Only print header and descriptive text.  See @ref{log
@c <en>options}.
Only print header and descriptive text.  See @ref{log
options}.

@c <en>@item -w@var{logins}
@item -w@var{logins}
@c <en>Only list revisions checked in by specified logins.  See @ref{log options}.
Only list revisions checked in by specified logins.  See @ref{log options}.
@end table

@c ------------------------------------------------------------
@c <en>@item login
@item login
@c <en>Prompt for password for authenticating server.  See
@c <en>@ref{Password authentication client}.
Pede por uma senha para o servidor de autenticação.  Veja em
@ref{Cliente de autenticação por senha}.

@c ------------------------------------------------------------
@c <en>@item logout
@item logout
@c <en>Remove stored password for authenticating server.  See
@c <en>@ref{Password authentication client}.
Remove senhas armazenadas para a autenticação no servidor.  Veja em
@ref{Cliente de autenticação por senha}.

@c ------------------------------------------------------------
@c <en>@item pserver
@item pserver
@c <en>Password authenticated server.
@c <en>See @ref{Password authentication server}.
Password authenticated server.
See @ref{Servidor de autenticação por senha}.

@c ------------------------------------------------------------
@c <en>@item rannotate [@var{options}] [@var{modules}@dots{}]
@item rannotate [@var{options}] [@var{modules}@dots{}]
@c <en>Show last revision where each line was modified.  See
@c <en>@ref{annotate}.
Show last revision where each line was modified.  See
@ref{annotate}.

@table @code
@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Annotate the most recent revision no later than
@c <en>@var{date}.  See @ref{Common options}.
Annotate the most recent revision no later than
@var{date}.  See @ref{Opções comuns}.

@c <en>@item -F
@item -F
@c <en>Force annotation of binary files.  (Without this option,
@c <en>binary files are skipped with a message.)
Force annotation of binary files.  (Without this option,
binary files are skipped with a message.)

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Annotate revision @var{tag}.  See @ref{Common options}.
Annotate revision @var{tag}.  See @ref{Opções comuns}.
@end table

@c ------------------------------------------------------------
@c <en>@item rdiff [@var{options}] @var{modules}@dots{}
@item rdiff [@var{options}] @var{modules}@dots{}
@c <en>Show differences between releases.  See @ref{rdiff}.
Show differences between releases.  See @ref{rdiff}.

@table @code
@c <en>@item -c
@item -c
@c <en>Context diff output format (default).  See @ref{rdiff options}.
Context diff output format (default).  See @ref{rdiff options}.

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Select revisions based on @var{date}.  See @ref{Common options}.
Select revisions based on @var{date}.  See @ref{Opções comuns}.

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{rev}
@item -r @var{rev}
@c <en>Select revisions based on @var{rev}.  See @ref{Common options}.
Select revisions based on @var{rev}.  See @ref{Opções comuns}.

@c <en>@item -s
@item -s
@c <en>Short patch - one liner per file.  See @ref{rdiff options}.
Short patch - one liner per file.  See @ref{rdiff options}.

@c <en>@item -t
@item -t
@c <en>Top two diffs - last change made to the file.  See
@c <en>@ref{diff options}.
Top two diffs - last change made to the file.  See
@ref{diff options}.

@c <en>@item -u
@item -u
@c <en>Unidiff output format.  See @ref{rdiff options}.
Unidiff output format.  See @ref{rdiff options}.

@c <en>@item -V @var{vers}
@item -V @var{vers}
@c <en>Use RCS Version @var{vers} for keyword expansion (obsolete).  See
@c <en>@ref{rdiff options}.
Use RCS Version @var{vers} for keyword expansion (obsolete).  See
@ref{rdiff options}.
@end table

@c ------------------------------------------------------------
@c <en>@item release [@var{options}] @var{directory}
@item release [@var{options}] @var{directory}
@c <en>Indicate that a directory is no longer in use.  See
@c <en>@ref{release}.
Indicate that a directory is no longer in use.  See
@ref{release}.

@table @code
@c <en>@item -d
@item -d
@c <en>Delete the given directory.  See @ref{release options}.
Delete the given directory.  See @ref{release options}.
@end table

@c ------------------------------------------------------------
@c <en>@item remove [@var{options}] [@var{files}@dots{}]
@item remove [@var{options}] [@var{files}@dots{}]
@c <en>Remove an entry from the repository.  See @ref{Removing files}.
Remove an entry from the repository.  See @ref{Removendo arquivos}.

@table @code
@c <en>@item -f
@item -f
@c <en>Delete the file before removing it.  See @ref{Removing files}.
Delete the file before removing it.  See @ref{Removendo arquivos}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@c ------------------------------------------------------------
@c <en>@item rlog [@var{options}] [@var{files}@dots{}]
@item rlog [@var{options}] [@var{files}@dots{}]
@c <en>Print out history information for modules.  See @ref{log}.
Print out history information for modules.  See @ref{log}.

@table @code
@c <en>@item -b
@item -b
@c <en>Only list revisions on the default branch.  See @ref{log options}.
Only list revisions on the default branch.  See @ref{log options}.

@c <en>@item -d @var{dates}
@item -d @var{dates}
@c <en>Specify dates (@var{d1}<@var{d2} for range, @var{d} for
@c <en>latest before).  See @ref{log options}.
Specify dates (@var{d1}<@var{d2} for range, @var{d} for
latest before).  See @ref{log options}.

@c <en>@item -h
@item -h
@c <en>Only print header.  See @ref{log options}.
Only print header.  See @ref{log options}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -N
@item -N
@c <en>Do not list tags.  See @ref{log options}.
Do not list tags.  See @ref{log options}.

@c <en>@item -R
@item -R
@c <en>Only print name of RCS file.  See @ref{log options}.
Only print name of RCS file.  See @ref{log options}.

@c <en>@item -r@var{revs}
@item -r@var{revs}
@c <en>Only list revisions @var{revs}.  See @ref{log options}.
Only list revisions @var{revs}.  See @ref{log options}.

@c <en>@item -s @var{states}
@item -s @var{states}
@c <en>Only list revisions with specified states.  See @ref{log options}.
Only list revisions with specified states.  See @ref{log options}.

@c <en>@item -t
@item -t
@c <en>Only print header and descriptive text.  See @ref{log options}.
Only print header and descriptive text.  See @ref{log options}.

@c <en>@item -w@var{logins}
@item -w@var{logins}
@c <en>Only list revisions checked in by specified logins.  See @ref{log options}.
Only list revisions checked in by specified logins.  See @ref{log options}.
@end table

@c ------------------------------------------------------------
@c <en>@item rtag [@var{options}] @var{tag} @var{modules}@dots{}
@item rtag [@var{options}] @var{tag} @var{modules}@dots{}
@c <en>Add a symbolic tag to a module.
@c <en>See @ref{Revisions} and @ref{Branching and merging}.
Add a symbolic tag to a module.
See @ref{Revisões} and @ref{Ramificando e mesclando}.

@table @code
@c <en>@item -a
@item -a
@c <en>Clear tag from removed files that would not otherwise
@c <en>be tagged.  See @ref{Tagging add/remove}.
Clear tag from removed files that would not otherwise
be tagged.  See @ref{Etiquetando adicionados/removidos}.

@c <en>@item -b
@item -b
@c <en>Create a branch named @var{tag}.  See @ref{Branching and merging}.
Create a branch named @var{tag}.  See @ref{Ramificando e mesclando}.

@c <en>@item -B
@item -B
@c <en>Used in conjunction with -F or -d, enables movement and deletion of
@c <en>branch tags.  Use with extreme caution. 
Used in conjunction with -F or -d, enables movement and deletion of
branch tags.  Use with extreme caution. 

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
Tag revisions as of @var{date}.  See @ref{Etiquetando por data/etiqueta}.

@c <en>@item -d
@item -d
@c <en>Delete @var{tag}.  See @ref{Modifying tags}.
Delete @var{tag}.  See @ref{Modificando etiquetas}.

@c <en>@item -F
@item -F
@c <en>Move @var{tag} if it already exists.  See @ref{Modifying tags}.
Move @var{tag} if it already exists.  See @ref{Modificando etiquetas}.

@c <en>@item -f
@item -f
@c <en>Force a head revision match if tag/date not found.
@c <en>See @ref{Tagging by date/tag}.
Force a head revision match if tag/date not found.
See @ref{Etiquetando por data/etiqueta}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -n
@item -n
@c <en>No execution of tag program.  See @ref{Common options}.
No execution of tag program.  See @ref{Opções comuns}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{rev}
@item -r @var{rev}
@c <en>Tag existing tag @var{rev}.  See @ref{Tagging by date/tag}.
Tag existing tag @var{rev}.  See @ref{Etiquetando por data/etiqueta}.
@end table

@c ------------------------------------------------------------
@c <en>@item server
@item server
@c <en>Rsh server.  See @ref{Connecting via rsh}.
Rsh server.  See @ref{Se conectando via rsh}.

@c ------------------------------------------------------------
@c <en>@item status [@var{options}] @var{files}@dots{}
@item status [@var{options}] @var{files}@dots{}
@c <en>Display status information in a working directory.  See
@c <en>@ref{File status}.
Display status information in a working directory.  See
@ref{Estado de arquivo}.

@table @code
@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -v
@item -v
@c <en>Include tag information for file.  See @ref{Tags}.
Include tag information for file.  See @ref{Etiquetas}.
@end table

@c ------------------------------------------------------------
@c <en>@item tag [@var{options}] @var{tag} [@var{files}@dots{}]
@item tag [@var{options}] @var{tag} [@var{files}@dots{}]
@c <en>Add a symbolic tag to checked out version of files.
@c <en>See @ref{Revisions} and @ref{Branching and merging}.
Add a symbolic tag to checked out version of files.
See @ref{Revisões} and @ref{Ramificando e mesclando}.

@table @code
@c <en>@item -b
@item -b
@c <en>Create a branch named @var{tag}.  See @ref{Branching and merging}.
Create a branch named @var{tag}.  See @ref{Ramificando e mesclando}.

@c <en>@item -c
@item -c
@c <en>Check that working files are unmodified.  See
@c <en>@ref{Tagging the working directory}.
Check that working files are unmodified.  See
@ref{Etiquetando o diretório de trabalho}.

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
Tag revisions as of @var{date}.  See @ref{Etiquetando por data/etiqueta}.

@c <en>@item -d
@item -d
@c <en>Delete @var{tag}.  See @ref{Modifying tags}.
Delete @var{tag}.  See @ref{Modificando etiquetas}.

@c <en>@item -F
@item -F
@c <en>Move @var{tag} if it already exists.  See @ref{Modifying tags}.
Move @var{tag} if it already exists.  See @ref{Modificando etiquetas}.

@c <en>@item -f
@item -f
@c <en>Force a head revision match if tag/date not found.
@c <en>See @ref{Tagging by date/tag}.
Force a head revision match if tag/date not found.
See @ref{Etiquetando por data/etiqueta}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{rev}
@item -r @var{rev}
@c <en>Tag existing tag @var{rev}.  See @ref{Tagging by date/tag}.
Tag existing tag @var{rev}.  See @ref{Etiquetando por data/etiqueta}.
@end table

@c ------------------------------------------------------------
@c <en>@item unedit [@var{options}] [@var{files}@dots{}]
@item unedit [@var{options}] [@var{files}@dots{}]
@c <en>Undo an edit command.  See @ref{Editing files}.
Undo an edit command.  See @ref{Editando arquivos}.

@table @code
@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@c ------------------------------------------------------------
@c <en>@item update [@var{options}] [@var{files}@dots{}]
@item update [@var{options}] [@var{files}@dots{}]
@c <en>Bring work tree in sync with repository.  See
@c <en>@ref{update}.
Bring work tree in sync with repository.  See
@ref{update}.

@table @code
@c <en>@item -A
@item -A
@c <en>Reset any sticky tags/date/options.  See @ref{Sticky
@c <en>tags} and @ref{Keyword substitution}.
Reset any sticky tags/date/options.  See
@ref{Etiquetas adesivas} and @ref{Substituição de palavra-chave}.

@c <en>@item -C
@item -C
@c <en>Overwrite locally modified files with clean copies from
@c <en>the repository (the modified file is saved in
@c <en>@file{.#@var{file}.@var{revision}}, however).
Overwrite locally modified files with clean copies from
the repository (the modified file is saved in
@file{.#@var{file}.@var{revision}}, however).

@c <en>@item -D @var{date}
@item -D @var{date}
@c <en>Check out revisions as of @var{date} (is sticky).  See
@c <en>@ref{Common options}.
Check out revisions as of @var{date} (is sticky).  See
@ref{Opções comuns}.

@c <en>@item -d
@item -d
@c <en>Create directories.  See @ref{update options}.
Create directories.  See @ref{update options}.

@c <en>@item -f
@item -f
@c <en>Use head revision if tag/date not found.  See
@c <en>@ref{Common options}.
Use head revision if tag/date not found.  See
@ref{Opções comuns}.

@c <en>@item -I @var{ign}
@item -I @var{ign}
@c <en>More files to ignore (! to reset).  See
@c <en>@ref{import options}.
More files to ignore (! to reset).  See
@ref{import options}.

@c Probably want to use rev1/rev2 style like for diff
@c -r.  Here and in on-line help.
@c <en>@item -j @var{rev}
@item -j @var{rev}
@c <en>Merge in changes.  See @ref{update options}.
Merge in changes.  See @ref{update options}.

@c <en>@item -k @var{kflag}
@item -k @var{kflag}
@c <en>Use @var{kflag} keyword expansion.  See
@c <en>@ref{Substitution modes}.
Use @var{kflag} keyword expansion.  See
@ref{Modos de substituição}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  @xref{Recursive behavior}.
Local; run only in current working directory.  @xref{Comportamento recursivo}.

@c <en>@item -P
@item -P
@c <en>Prune empty directories.  See @ref{Moving directories}.
Prune empty directories.  See @ref{Movendo diretórios}.

@c <en>@item -p
@item -p
@c <en>Check out files to standard output (avoids
@c <en>stickiness).  See @ref{update options}.
Check out files to standard output (avoids
stickiness).  See @ref{update options}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.

@c <en>@item -r @var{tag}
@item -r @var{tag}
@c <en>Checkout revision @var{tag} (is sticky).  See @ref{Common options}.
Checkout revision @var{tag} (is sticky).  See @ref{Opções comuns}.

@c <en>@item -W @var{spec}
@item -W @var{spec}
@c <en>More wrappers.  See @ref{import options}.
More wrappers.  See @ref{import options}.
@end table

@c ------------------------------------------------------------
@c <en>@item version
@item version
@c <en>@cindex version (subcommand)
@cindex version (subcommand)

@c <en>Display the version of @sc{cvs} being used.  If the repository
@c <en>is remote, display both the client and server versions.
Display the version of @sc{cvs} being used.  If the repository
is remote, display both the client and server versions.

@c ------------------------------------------------------------
@c <en>@item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}]
@item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}]

@c <en>on/off: turn on/off read-only checkouts of files.  See
@c <en>@ref{Setting a watch}.
on/off: turn on/off read-only checkouts of files.  See
@ref{Ajustando um ???watch???}.

@c <en>add/remove: add or remove notification on actions.  See
@c <en>@ref{Getting Notified}.
add/remove: add or remove notification on actions.  See
@ref{Recebendo Notificações}.

@table @code
@c <en>@item -a @var{actions}
@item -a @var{actions}
@c <en>Specify actions for temporary watch, where
@c <en>@var{actions} is @code{edit}, @code{unedit},
@c <en>@code{commit}, @code{all}, or @code{none}.  See
@c <en>@ref{Editing files}.
Specify actions for temporary watch, where
@var{actions} is @code{edit}, @code{unedit},
@code{commit}, @code{all}, or @code{none}.  See
@ref{Editando arquivos}.

@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@c ------------------------------------------------------------
@c <en>@item watchers [@var{options}] [@var{files}@dots{}]
@item watchers [@var{options}] [@var{files}@dots{}]
@c <en>See who is watching a file.  See @ref{Watch information}.
See who is watching a file.  See @ref{Informações de ???Watch???}.

@table @code
@c <en>@item -l
@item -l
@c <en>Local; run only in current working directory.  See @ref{Recursive behavior}.
Local; run only in current working directory.  See @ref{Comportamento recursivo}.

@c <en>@item -R
@item -R
@c <en>Operate recursively (default).  @xref{Recursive
@c <en>behavior}.
Operate recursively (default).  @xref{Comportamento recursivo}.
@end table

@end table

@c ---------------------------------------------------------------------
@c <en>@node Administrative files
@node Arquivos administrativos
@c <en>@appendix Reference manual for Administrative files
@appendix Manual de referência para Arquivos administrativos
@c <en>@cindex Administrative files (reference)
@cindex Arquivos administrativos (referência)
@c <en>@cindex Files, reference manual
@cindex Files, reference manual
@c <en>@cindex Reference manual (files)
@cindex Reference manual (files)
@c <en>@cindex CVSROOT (file)
@cindex CVSROOT (file)

@c FIXME?  Somewhere there needs to be a more "how-to"
@c guide to writing these.  I think the triggers
@c (commitinfo, loginfo, taginfo, &c) are perhaps a
@c different case than files like modules.  One
@c particular issue that people sometimes are
@c (unnecessarily?) worried about is performance, and
@c the impact of writing in perl or sh or ____.
@c <en>Inside the repository, in the directory
@c <en>@file{$CVSROOT/CVSROOT}, there are a number of
@c <en>supportive files for @sc{cvs}.  You can use @sc{cvs} in a limited
@c <en>fashion without any of them, but if they are set up
@c <en>properly they can help make life easier.  For a
@c <en>discussion of how to edit them, see @ref{Intro
@c <en>administrative files}.
Dentro do repositório, no diretório
@file{$CVSROOT/CVSROOT}, existem vários arquivos de
suporte para o @sc{cvs}.  Você pode usar o @sc{cvs} de
uma forma limitada sem se aproveitar deles, mas se eles
estiverem ajustados corretamente eles podem facilitar
muito seu trabalho.  Para uma discussão sobre como
editá-los, veja em @ref{Intro aos arquivos administrativos}.

@c <en>The most important of these files is the @file{modules}
@c <en>file, which defines the modules inside the repository.
O mais importante destes arquivos é o arquivo
@file{modules}, que define os módulos dentro do repositório.

@menu
@c <en>* modules::                     Defining modules
* modules::                     Definindo módulos
@c <en>* Wrappers::                    Specify binary-ness based on file name
* Wrappers::                    Specify binary-ness based on file name
@c <en>* commit files::                The commit support files (commitinfo,
@c <en>                                verifymsg, loginfo)
* Arquivos de ???commit???::    Os arquivos de suporte a commit (commitinfo,
                                verifymsg, loginfo)
@c <en>* taginfo::                     Verifying/Logging tags
* taginfo::                     Verifcando/Registrando etiquetas
@c <en>* rcsinfo::                     Templates for the log messages
* rcsinfo::                     Templates for the log messages
@c <en>* cvsignore::                   Ignoring files via cvsignore
* cvsignore::                   Ignoring files via cvsignore
@c <en>* checkoutlist::                Adding your own administrative files
* checkoutlist::                Adding your own administrative files
@c <en>* history file::                History information
* arquivo history (histórico)::                History information
@c <en>* Variables::                   Various variables are expanded
* Variables::                   Various variables are expanded
@c <en>* config::                      Miscellaneous CVS configuration
* config::                      Miscellaneous CVS configuration
@end menu

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node modules
@node modules
@c <en>@appendixsec The modules file
@appendixsec O arquivo modules
@c <en>@cindex Modules (admin file)
@cindex Modules (arquivo administrativo)
@c <en>@cindex Defining modules (reference manual)
@cindex Definindo módulos (manual de referência)

@c <en>The @file{modules} file records your definitions of
@c <en>names for collections of source code.  @sc{cvs} will
@c <en>use these definitions if you use @sc{cvs} to update the
@c <en>modules file (use normal commands like @code{add},
@c <en>@code{commit}, etc).
O arquivo @file{modules} registra suas definições de
nomes para coleções de código fonte.  @sc{cvs} vai usar
estas definições se você usar o @sc{cvs} para atualizar
o arquivo modules (use comandos normais, como @code{add},
@code{commit}, etc).

@c <en>The @file{modules} file may contain blank lines and
@c <en>comments (lines beginning with @samp{#}) as well as
@c <en>module definitions.  Long lines can be continued on the
@c <en>next line by specifying a backslash (@samp{\}) as the
@c <en>last character on the line.
The @file{modules} file may contain blank lines and
comments (lines beginning with @samp{#}) as well as
module definitions.  Long lines can be continued on the
next line by specifying a backslash (@samp{\}) as the
last character on the line.

@c <en>There are three basic types of modules: alias modules,
@c <en>regular modules, and ampersand modules.  The difference
@c <en>between them is the way that they map files in the
@c <en>repository to files in the working directory.  In all
@c <en>of the following examples, the top-level repository
@c <en>contains a directory called @file{first-dir}, which
@c <en>contains two files, @file{file1} and @file{file2}, and a
@c <en>directory @file{sdir}.  @file{first-dir/sdir} contains
@c <en>a file @file{sfile}.
There are three basic types of modules: alias modules,
regular modules, and ampersand modules.  The difference
between them is the way that they map files in the
repository to files in the working directory.  In all
of the following examples, the top-level repository
contains a directory called @file{first-dir}, which
contains two files, @file{file1} and @file{file2}, and a
directory @file{sdir}.  @file{first-dir/sdir} contains
a file @file{sfile}.

@c FIXME: should test all the examples in this section.

@menu
@c <en>* Alias modules::             The simplest kind of module
* Alias modules::             The simplest kind of module
@c <en>* Regular modules::
* Regular modules::
@c <en>* Ampersand modules::
* Ampersand modules::
@c <en>* Excluding directories::     Excluding directories from a module
* Excluding directories::     Excluding directories from a module
@c <en>* Module options::            Regular and ampersand modules can take options
* Module options::            Regular and ampersand modules can take options
@c <en>* Module program options::    How the modules ``program options'' programs
@c <en>                              are run. 
* Module program options::    How the modules ``program options'' programs
                              are run. 
@end menu

@c <en>@node Alias modules
@node Alias modules
@c <en>@appendixsubsec Alias modules
@appendixsubsec Alias modules
@c <en>@cindex Alias modules
@cindex Alias modules
@c <en>@cindex -a, in modules file
@cindex -a, in modules file

@c <en>Alias modules are the simplest kind of module:
Alias modules are the simplest kind of module:

@table @code
@c <en>@item @var{mname} -a @var{aliases}@dots{}
@c <en>This represents the simplest way of defining a module
@c <en>@var{mname}.  The @samp{-a} flags the definition as a
@c <en>simple alias: @sc{cvs} will treat any use of @var{mname} (as
@c <en>a command argument) as if the list of names
@c <en>@var{aliases} had been specified instead.
@c <en>@var{aliases} may contain either other module names or
@c <en>paths.  When you use paths in aliases, @code{checkout}
@c <en>creates all intermediate directories in the working
@c <en>directory, just as if the path had been specified
@c <en>explicitly in the @sc{cvs} arguments.
@item @var{mname} -a @var{aliases}@dots{}
This represents the simplest way of defining a module
@var{mname}.  The @samp{-a} flags the definition as a
simple alias: @sc{cvs} will treat any use of @var{mname} (as
a command argument) as if the list of names
@var{aliases} had been specified instead.
@var{aliases} may contain either other module names or
paths.  When you use paths in aliases, @code{checkout}
creates all intermediate directories in the working
directory, just as if the path had been specified
explicitly in the @sc{cvs} arguments.
@end table

@c <en>For example, if the modules file contains:
For example, if the modules file contains:

@example
amodule -a first-dir
@end example

@noindent
@c <en>then the following two commands are equivalent:
then the following two commands are equivalent:

@example
$ cvs co amodule
$ cvs co first-dir
@end example

@noindent
@c <en>and they each would provide output such as:
and they each would provide output such as:

@example
cvs checkout: Updating first-dir
U first-dir/file1
U first-dir/file2
cvs checkout: Updating first-dir/sdir
U first-dir/sdir/sfile
@end example

@c <en>@node Regular modules
@node Regular modules
@c <en>@appendixsubsec Regular modules
@appendixsubsec Regular modules
@c <en>@cindex Regular modules
@cindex Regular modules

@table @code
@c <en>@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
@c <en>In the simplest case, this form of module definition
@c <en>reduces to @samp{@var{mname} @var{dir}}.  This defines
@c <en>all the files in directory @var{dir} as module mname.
@c <en>@var{dir} is a relative path (from @code{$CVSROOT}) to a
@c <en>directory of source in the source repository.  In this
@c <en>case, on checkout, a single directory called
@c <en>@var{mname} is created as a working directory; no
@c <en>intermediate directory levels are used by default, even
@c <en>if @var{dir} was a path involving several directory
@c <en>levels.
@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ]
In the simplest case, this form of module definition
reduces to @samp{@var{mname} @var{dir}}.  This defines
all the files in directory @var{dir} as module mname.
@var{dir} is a relative path (from @code{$CVSROOT}) to a
directory of source in the source repository.  In this
case, on checkout, a single directory called
@var{mname} is created as a working directory; no
intermediate directory levels are used by default, even
if @var{dir} was a path involving several directory
levels.
@end table

@c <en>For example, if a module is defined by:
For example, if a module is defined by:

@example
regmodule first-dir
@end example

@noindent
@c <en>then regmodule will contain the files from first-dir:
then regmodule will contain the files from first-dir:

@example
$ cvs co regmodule
cvs checkout: Updating regmodule
U regmodule/file1
U regmodule/file2
cvs checkout: Updating regmodule/sdir
U regmodule/sdir/sfile
$
@end example

@c <en>By explicitly specifying files in the module definition
@c <en>after @var{dir}, you can select particular files from
@c <en>directory @var{dir}.  Here is
@c <en>an example:
By explicitly specifying files in the module definition
after @var{dir}, you can select particular files from
directory @var{dir}.  Here is
an example:

@example
regfiles first-dir/sdir sfile
@end example

@noindent
@c <en>With this definition, getting the regfiles module
@c <en>will create a single working directory
@c <en>@file{regfiles} containing the file listed, which
@c <en>comes from a directory deeper
@c <en>in the @sc{cvs} source repository:
With this definition, getting the regfiles module
will create a single working directory
@file{regfiles} containing the file listed, which
comes from a directory deeper
in the @sc{cvs} source repository:

@example
$ cvs co regfiles
U regfiles/sfile
$
@end example

@c <en>@node Ampersand modules
@node Ampersand modules
@c <en>@appendixsubsec Ampersand modules
@appendixsubsec Ampersand modules
@c <en>@cindex Ampersand modules
@cindex Ampersand modules
@c <en>@cindex &, in modules file
@cindex &, in modules file

@c <en>A module definition can refer to other modules by
@c <en>including @samp{&@var{module}} in its definition.
A module definition can refer to other modules by
including @samp{&@var{module}} in its definition.
@example
@var{mname} [ options ] @var{&module}@dots{}
@end example

@c <en>Then getting the module creates a subdirectory for each such
@c <en>module, in the directory containing the module.  For
@c <en>example, if modules contains
Then getting the module creates a subdirectory for each such
module, in the directory containing the module.  For
example, if modules contains

@example
ampermod &first-dir
@end example

@noindent
@c <en>then a checkout will create an @code{ampermod} directory
@c <en>which contains a directory called @code{first-dir},
@c <en>which in turns contains all the directories and files
@c <en>which live there.  For example, the command
then a checkout will create an @code{ampermod} directory
which contains a directory called @code{first-dir},
which in turns contains all the directories and files
which live there.  For example, the command

@example
$ cvs co ampermod
@end example

@noindent
@c <en>will create the following files:
will create the following files:

@example
ampermod/first-dir/file1
ampermod/first-dir/file2
ampermod/first-dir/sdir/sfile
@end example

@c <en>There is one quirk/bug: the messages that @sc{cvs}
@c <en>prints omit the @file{ampermod}, and thus do not
@c <en>correctly display the location to which it is checking
@c <en>out the files:
There is one quirk/bug: the messages that @sc{cvs}
prints omit the @file{ampermod}, and thus do not
correctly display the location to which it is checking
out the files:

@example
$ cvs co ampermod
cvs checkout: Updating first-dir
U first-dir/file1
U first-dir/file2
cvs checkout: Updating first-dir/sdir
U first-dir/sdir/sfile
$
@end example

@c <en>Do not rely on this buggy behavior; it may get fixed in
@c <en>a future release of @sc{cvs}.
Do not rely on this buggy behavior; it may get fixed in
a future release of @sc{cvs}.

@c FIXCVS: What happens if regular and & modules are
@c combined, as in "ampermodule first-dir &second-dir"?
@c When I tried it, it seemed to just ignore the
@c "first-dir".  I think perhaps it should be an error
@c (but this needs further investigation).
@c In addition to discussing what each one does, we
@c should put in a few words about why you would use one or
@c the other in various situations.

@c <en>@node Excluding directories
@node Excluding directories
@c <en>@appendixsubsec Excluding directories
@appendixsubsec Excluding directories
@c <en>@cindex Excluding directories, in modules file
@cindex Excluding directories, in modules file
@c <en>@cindex !, in modules file
@cindex !, in modules file

@c <en>An alias module may exclude particular directories from
@c <en>other modules by using an exclamation mark (@samp{!})
@c <en>before the name of each directory to be excluded.
An alias module may exclude particular directories from
other modules by using an exclamation mark (@samp{!})
before the name of each directory to be excluded.

@c <en>For example, if the modules file contains:
For example, if the modules file contains:

@example
exmodule -a !first-dir/sdir first-dir
@end example

@noindent
@c <en>then checking out the module @samp{exmodule} will check
@c <en>out everything in @samp{first-dir} except any files in
@c <en>the subdirectory @samp{first-dir/sdir}.
then checking out the module @samp{exmodule} will check
out everything in @samp{first-dir} except any files in
the subdirectory @samp{first-dir/sdir}.
@c Note that the "!first-dir/sdir" sometimes must be listed
@c before "first-dir".  That seems like a probable bug, in which
@c case perhaps it should be fixed (to allow either
@c order) rather than documented.  See modules4 in testsuite.

@c <en>@node Module options
@node Module options
@c <en>@appendixsubsec Module options
@appendixsubsec Module options
@c <en>@cindex Options, in modules file
@cindex Options, in modules file

@c <en>Either regular modules or ampersand modules can contain
@c <en>options, which supply additional information concerning
@c <en>the module.
Either regular modules or ampersand modules can contain
options, which supply additional information concerning
the module.

@table @code
@c <en>@cindex -d, in modules file
@cindex -d, in modules file
@c <en>@item -d @var{name}
@item -d @var{name}
@c <en>Name the working directory something other than the
@c <en>module name.
Name the working directory something other than the
module name.
@c FIXME: Needs a bunch of examples, analogous to the
@c examples for alias, regular, and ampersand modules
@c which show where the files go without -d.

@c <en>@cindex Export program
@cindex Export program
@c <en>@cindex -e, in modules file
@cindex -e, in modules file
@c <en>@item -e @var{prog}
@item -e @var{prog}
@c <en>Specify a program @var{prog} to run whenever files in a
@c <en>module are exported.  @var{prog} runs with a single
@c <en>argument, the module name.
Specify a program @var{prog} to run whenever files in a
module are exported.  @var{prog} runs with a single
argument, the module name.
@c FIXME: Is it run on server? client?

@c <en>@cindex Checkout program
@cindex Checkout program
@c <en>@cindex -o, in modules file
@cindex -o, in modules file
@c <en>@item -o @var{prog}
@item -o @var{prog}
@c <en>Specify a program @var{prog} to run whenever files in a
@c <en>module are checked out.  @var{prog} runs with a single
@c <en>argument, the module name.  See @ref{Module program options} for
@c <en>information on how @var{prog} is called.
Specify a program @var{prog} to run whenever files in a
module are checked out.  @var{prog} runs with a single
argument, the module name.  See @ref{Module program options} for
information on how @var{prog} is called.
@c FIXME: Is it run on server? client?

@c <en>@cindex Status of a module
@cindex Status of a module
@c <en>@cindex Module status
@cindex Module status
@c <en>@cindex -s, in modules file
@cindex -s, in modules file
@c <en>@item -s @var{status}
@item -s @var{status}
@c <en>Assign a status to the module.  When the module file is
@c <en>printed with @samp{cvs checkout -s} the modules are
@c <en>sorted according to primarily module status, and
@c <en>secondarily according to the module name.  This option
@c <en>has no other meaning.  You can use this option for
@c <en>several things besides status: for instance, list the
@c <en>person that is responsible for this module.
Assign a status to the module.  When the module file is
printed with @samp{cvs checkout -s} the modules are
sorted according to primarily module status, and
secondarily according to the module name.  This option
has no other meaning.  You can use this option for
several things besides status: for instance, list the
person that is responsible for this module.

@c <en>@cindex Tag program
@cindex Tag program
@c <en>@cindex -t, in modules file
@cindex -t, in modules file
@c <en>@item -t @var{prog}
@item -t @var{prog}
@c <en>Specify a program @var{prog} to run whenever files in a
@c <en>module are tagged with @code{rtag}.  @var{prog} runs
@c <en>with two arguments: the module name and the symbolic
@c <en>tag specified to @code{rtag}.  It is not run
@c <en>when @code{tag} is executed.  Generally you will find
@c <en>that the @file{taginfo} file is a better solution(@pxref{taginfo}).
Specify a program @var{prog} to run whenever files in a
module are tagged with @code{rtag}.  @var{prog} runs
with two arguments: the module name and the symbolic
tag specified to @code{rtag}.  It is not run
when @code{tag} is executed.  Generally you will find
that the @file{taginfo} file is a better solution(@pxref{taginfo}).
@c FIXME: Is it run on server? client?
@c Problems with -t include:
@c * It is run after the tag not before
@c * It doesn't get passed all the information that
@c   taginfo does ("mov", &c).
@c * It only is run for rtag, not tag.
@end table

@c <en>You should also see @pxref{Module program options} about how the
@c <en>``program options'' programs are run.
You should also see @pxref{Module program options} about how the
``program options'' programs are run.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@c <en>@node Module program options
@node Module program options
@c <en>@appendixsubsec How the modules file ``program options'' programs are run
@appendixsubsec How the modules file ``program options'' programs are run
@c <en>@cindex Modules file program options
@cindex Modules file program options
@c <en>@cindex -t, in modules file
@cindex -t, in modules file
@c <en>@cindex -o, in modules file
@cindex -o, in modules file
@c <en>@cindex -e, in modules file
@cindex -e, in modules file

@noindent
@c <en>For checkout, rtag, and export, the program is server-based, and as such the
@c <en>following applies:-
For checkout, rtag, and export, the program is server-based, and as such the
following applies:-

@c <en>If using remote access methods (pserver, ext, etc.),
@c <en>@sc{cvs} will execute this program on the server from a temporary
@c <en>directory. The path is searched for this program.
If using remote access methods (pserver, ext, etc.),
@sc{cvs} will execute this program on the server from a temporary
directory. The path is searched for this program.

@c <en>If using ``local access'' (on a local or remote NFS file system, i.e.
@c <en>repository set just to a path),
@c <en>the program will be executed from the newly checked-out tree, if
@c <en>found there, or alternatively searched for in the path if not.
If using ``local access'' (on a local or remote NFS file system, i.e.
repository set just to a path),
the program will be executed from the newly checked-out tree, if
found there, or alternatively searched for in the path if not.

@c <en>The programs are all run after the operation has effectively
@c <en>completed.
The programs are all run after the operation has effectively
completed.


@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Wrappers
@appendixsec The cvswrappers file
@cindex cvswrappers (admin file)
@cindex CVSWRAPPERS, environment variable
@cindex Wrappers

@c FIXME: need some better way of separating this out
@c by functionality.  -m is
@c one feature, and -k is a another.  And this discussion
@c should be better motivated (e.g. start with the
@c problems, then explain how the feature solves it).

Wrappers refers to a @sc{cvs} feature which lets you
control certain settings based on the name of the file
which is being operated on.  The settings are @samp{-k}
for binary files, and @samp{-m} for nonmergeable text
files.

The @samp{-m} option
specifies the merge methodology that should be used when
a non-binary file is updated.  @code{MERGE} means the usual
@sc{cvs} behavior: try to merge the files.  @code{COPY}
means that @code{cvs update} will refuse to merge
files, as it also does for files specified as binary
with @samp{-kb} (but if the file is specified as
binary, there is no need to specify @samp{-m 'COPY'}).
@sc{cvs} will provide the user with the
two versions of the files, and require the user using
mechanisms outside @sc{cvs}, to insert any necessary
changes.

@c <en>@strong{WARNING: do not use @code{COPY} with
@c <en>@sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will
@c <en>copy one version of your file over the other, wiping
@c <en>out the previous contents.}
@strong{WARNING: do not use @code{COPY} with
@sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will
copy one version of your file over the other, wiping
out the previous contents.}
@c Ordinarily we don't document the behavior of old
@c versions.  But this one is so dangerous, I think we
@c must.  I almost renamed it to -m 'NOMERGE' so we
@c could say "never use -m 'COPY'".
@c <en>The @samp{-m} wrapper option only affects behavior when
@c <en>merging is done on update; it does not affect how files
@c <en>are stored.  See @ref{Binary files}, for more on
@c <en>binary files.
The @samp{-m} wrapper option only affects behavior when
merging is done on update; it does not affect how files
are stored.  See @ref{Arquivos binários}, for more on
binary files.

The basic format of the file @file{cvswrappers} is:

@c FIXME: @example is all wrong for this.  Use @deffn or
@c something more sensible.
@example
wildcard     [option value][option value]...

where option is one of
-m           update methodology      value: MERGE or COPY
-k           keyword expansion       value: expansion mode

and value is a single-quote delimited value.
@end example

@ignore
@example
*.nib    -f 'unwrap %s' -t 'wrap %s %s' -m 'COPY'
*.c      -t 'indent %s %s'
@end example
@c When does the filter need to be an absolute pathname
@c and when will something like the above work?  I
@c suspect it relates to the PATH of the server (which
@c in turn depends on all kinds of stuff, e.g. inetd
@c for pserver).  I'm not sure whether/where to discuss
@c this.
@c FIXME: What do the %s's stand for?

@noindent
The above example of a @file{cvswrappers} file
states that all files/directories that end with a @code{.nib}
should be filtered with the @file{wrap} program before
checking the file into the repository. The file should
be filtered though the @file{unwrap} program when the
file is checked out of the repository. The
@file{cvswrappers} file also states that a @code{COPY}
methodology should be used when updating the files in
the repository (that is, no merging should be performed).

@c What pitfalls arise when using indent this way?  Is
@c it a winning thing to do?  Would be nice to at least
@c hint at those issues; we want our examples to tell
@c how to solve problems, not just to say that cvs can
@c do certain things.
The last example line says that all files that end with
@code{.c} should be filtered with @file{indent}
before being checked into the repository. Unlike the previous
example, no filtering of the @code{.c} file is done when
it is checked out of the repository.
@noindent
The @code{-t} filter is called with two arguments,
the first is the name of the file/directory to filter
and the second is the pathname to where the resulting
filtered file should be placed.

@noindent
The @code{-f} filter is called with one argument,
which is the name of the file to filter from. The end
result of this filter will be a file in the users directory
that they can work on as they normally would.

Note that the @samp{-t}/@samp{-f} features do not
conveniently handle one portion of @sc{cvs}'s operation:
determining when files are modified.  @sc{cvs} will still
want a file (or directory) to exist, and it will use
its modification time to determine whether a file is
modified.  If @sc{cvs} erroneously thinks a file is
unmodified (for example, a directory is unchanged but
one of the files within it is changed), you can force
it to check in the file anyway by specifying the
@samp{-f} option to @code{cvs commit} (@pxref{commit
options}).
@c This is, of course, a serious design flaw in -t/-f.
@c Probably the whole functionality needs to be
@c redesigned (starting from requirements) to fix this.
@end ignore

@c FIXME: We don't document -W or point to where it is
@c documented.  Or .cvswrappers.
For example, the following command imports a
directory, treating files whose name ends in
@samp{.exe} as binary:

@example
cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag
@end example

@c Another good example, would be storing files
@c (e.g. binary files) compressed in the repository.
@c 	::::::::::::::::::
@c 	cvswrappers
@c 	::::::::::::::::::
@c 	*.t12 -m 'COPY'
@c 	*.t[0-9][0-9] -f 'gunzipcp %s' -t 'gzipcp %s %s' -m 'COPY'
@c
@c	::::::::::::::::::
@c	gunzipcp
@c	::::::::::::::::::
@c	:
@c	[ -f $1 ] || exit 1
@c	zcat $1 > /tmp/.#$1.$$
@c	mv /tmp/.#$1.$$ $1
@c
@c	::::::::::::::::::
@c	gzipcp
@c	::::::::::::::::::
@c	:
@c	DIRNAME=`echo $1 | sed -e "s|/.*/||g"`
@c	if [ ! -d $DIRNAME ] ; then
@c	      DIRNAME=`echo $1 | sed -e "s|.*/||g"`
@c	fi
@c	gzip -c  $DIRNAME  > $2
@c One catch--"cvs diff" will not invoke the wrappers
@c (probably a CVS bug, although I haven't thought it out).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node commit files
@node Arquivos de ???commit???
@c <en>@appendixsec The commit support files
@appendixsec The commit support files
@c <en>@cindex Committing, administrative support files
@cindex Committing, administrative support files

The @samp{-i} flag in the @file{modules} file can be
used to run a certain program whenever files are
committed (@pxref{modules}).  The files described in
this section provide other, more flexible, ways to run
programs whenever something is committed.

There are three kind of programs that can be run on
commit.  They are specified in files in the repository,
as described below.  The following table summarizes the
file names and the purpose of the corresponding
programs.

@table @file
@item commitinfo
The program is responsible for checking that the commit
is allowed.  If it exits with a non-zero exit status
the commit will be aborted.

@item verifymsg
The specified program is used to evaluate the log message,
and possibly verify that it contains all required
fields.  This is most useful in combination with the
@file{rcsinfo} file, which can hold a log message
template (@pxref{rcsinfo}).

@item loginfo
The specified program is called when the commit is
complete.  It receives the log message and some
additional information and can store the log message in
a file, or mail it to appropriate persons, or maybe
post it to a local newsgroup, or@dots{}  Your
imagination is the limit!
@end table

@menu
* syntax::                      The common syntax
* commitinfo::                  Pre-commit checking
* verifymsg::                   How are log messages evaluated?
* loginfo::                     Where should log messages be sent?
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node syntax
@appendixsubsec The common syntax
@cindex Info files (syntax)
@cindex Syntax of info files
@cindex Common syntax of info files

@c FIXME: having this so totally separate from the
@c Variables node is rather bogus.

The administrative files such as @file{commitinfo},
@file{loginfo}, @file{rcsinfo}, @file{verifymsg}, etc.,
all have a common format.  The purpose of the files are
described later on.  The common syntax is described
here.

@cindex Regular expression syntax
Each line contains the following:
@itemize @bullet
@item
@c Say anything about DEFAULT and ALL?  Right now we
@c leave that to the description of each file (and in fact
@c the practice is inconsistent which is really annoying).
A regular expression.  This is a basic regular
expression in the syntax used by GNU emacs.
@c FIXME: What we probably should be saying is "POSIX Basic
@c Regular Expression with the following extensions (`\('
@c `\|' '+' etc)"
@c rather than define it with reference to emacs.
@c The reference to emacs is not strictly speaking
@c true, as we don't support \=, \s, or \S.  Also it isn't
@c clear we should document and/or promise to continue to
@c support all the obscure emacs extensions like \<.
@c Also need to better cite (or include) full
@c documentation for the syntax.
@c Also see comment in configure.in about what happens to the
@c syntax if we pick up a system-supplied regexp matcher.

@item
A whitespace separator---one or more spaces and/or tabs.

@item
A file name or command-line template.
@end itemize

@noindent
Blank lines are ignored.  Lines that start with the
character @samp{#} are treated as comments.  Long lines
unfortunately can @emph{not} be broken in two parts in
any way.

The first regular expression that matches the current
directory name in the repository is used.  The rest of the line
is used as a file name or command-line as appropriate.

@c FIXME: need an example.  In particular, show what
@c the regular expression is matched against (one
@c ordinarily clueful person got confused about whether it
@c includes the filename--"directory name" above should be
@c unambiguous but there is nothing like an example to
@c confirm people's understanding of this sort of thing).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node commitinfo
@appendixsubsec Commitinfo
@cindex @file{commitinfo}
@cindex Commits, precommit verification of
@cindex Precommit checking

The @file{commitinfo} file defines programs to execute
whenever @samp{cvs commit} is about to execute.  These
programs are used for pre-commit checking to verify
that the modified, added and removed files are really
ready to be committed.  This could be used, for
instance, to verify that the changed files conform to
to your site's standards for coding practice.

As mentioned earlier, each line in the
@file{commitinfo} file consists of a regular expression
and a command-line template.  The template can include
a program name and any number of arguments you wish to
supply to it.  The full path to the current source
repository is appended to the template, followed by the
file names of any files involved in the commit (added,
removed, and modified files).

@cindex Exit status, of commitinfo
The first line with a regular expression matching the
directory within the repository will be used.  If the
command returns a non-zero exit status the commit will
be aborted.
@c FIXME: need example(s) of what "directory within the
@c repository" means.

@cindex DEFAULT in commitinfo
If the repository name does not match any of the
regular expressions in this file, the @samp{DEFAULT}
line is used, if it is specified.

@cindex ALL in commitinfo
All occurrences of the name @samp{ALL} appearing as a
regular expression are used in addition to the first
matching regular expression or the name @samp{DEFAULT}.

@c <en>@cindex @file{commitinfo}, working directory
@cindex @file{commitinfo}, working directory
@c <en>@cindex @file{commitinfo}, command environment
@cindex @file{commitinfo}, command environment
@c <en>The command will be run in the root of the workspace
@c <en>containing the new versions of any files the user would like
@c <en>to modify (commit), @emph{or in a copy of the workspace on
@c <en>the server (@pxref{Remote repositories})}.  If a file is
@c <en>being removed, there will be no copy of the file under the
@c <en>current directory.  If a file is being added, there will be
@c <en>no corresponding archive file in the repository unless the
@c <en>file is being resurrected.
The command will be run in the root of the workspace
containing the new versions of any files the user would like
to modify (commit), @emph{or in a copy of the workspace on
the server (@pxref{Repositórios remotos})}.  If a file is
being removed, there will be no copy of the file under the
current directory.  If a file is being added, there will be
no corresponding archive file in the repository unless the
file is being resurrected.

Note that both the repository directory and the corresponding
Attic (@pxref{Attic}) directory may need to be checked to
locate the archive file corresponding to any given file being
committed.  Much of the information about the specific commit
request being made, including the destination branch, commit
message, and command line options specified, is not available
to the command.

@c FIXME: should discuss using commitinfo to control
@c who has checkin access to what (e.g. Joe can check into
@c directories a, b, and c, and Mary can check into
@c directories b, c, and d--note this case cannot be
@c conveniently handled with unix groups).  Of course,
@c adding a new set of features to CVS might be a more
@c natural way to fix this problem than telling people to
@c use commitinfo.
@c FIXME: Should make some reference, especially in
@c the context of controlling who has access, to the fact
@c that commitinfo can be circumvented.  Perhaps
@c mention SETXID (but has it been carefully examined
@c for holes?).  This fits in with the discussion of
@c general CVS security in "Password authentication
@c security" (the bit which is not pserver-specific).

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node verifymsg
@appendixsubsec Verifying log messages
@cindex @file{verifymsg} (admin file)
@cindex Log message, verifying

Once you have entered a log message, you can evaluate
that message to check for specific content, such as
a bug ID.  Use the @file{verifymsg} file to
specify a program that is used to verify the log message.
This program could be a simple script that checks
that the entered message contains the required fields.

The @file{verifymsg} file is often most useful together
with the @file{rcsinfo} file, which can be used to
specify a log message template.

Each line in the @file{verifymsg} file consists of a
regular expression and a command-line template.  The
template must include a program name, and can include
any number of arguments.  The full path to the current
log message template file is appended to the template.

One thing that should be noted is that the @samp{ALL}
keyword is not supported.  If more than one matching
line is found, the first one is used.  This can be
useful for specifying a default verification script in a
directory, and then overriding it in a subdirectory.

@cindex DEFAULT in @file{verifymsg}
If the repository name does not match any of the
regular expressions in this file, the @samp{DEFAULT}
line is used, if it is specified.

@cindex Exit status, of @file{verifymsg}
If the verification script exits with a non-zero exit status,
the commit is aborted.

@cindex @file{verifymsg}, changing the log message
In the default configuration, CVS allows the
verification script to change the log message. This is
controlled via the RereadLogAfterVerify CVSROOT/config
option.

When @samp{RereadLogAfterVerify=always} or
@samp{RereadLogAfterVerify=stat}, the log message will
either always be reread after the verification script
is run or reread only if the log message file status
has changed.

@xref{config}, for more on CVSROOT/config options.

@c <en>It is NOT a good idea for a @file{verifymsg} script to
@c <en>interact directly with the user in the various
@c <en>client/server methods. For the @code{pserver} method,
@c <en>there is no protocol support for communicating between
@c <en>@file{verifymsg} and the client on the remote end. For the
@c <en>@code{ext} and @code{server} methods, it is possible
@c <en>for CVS to become confused by the characters going
@c <en>along the same channel as the CVS protocol
@c <en>messages. See @ref{Remote repositories}, for more
@c <en>information on client/server setups.  In addition, at the time
@c <en>the @file{verifymsg} script runs, the CVS
@c <en>server has locks in place in the repository.  If control is
@c <en>returned to the user here then other users may be stuck waiting
@c <en>for access to the repository.
It is NOT a good idea for a @file{verifymsg} script to
interact directly with the user in the various
client/server methods. For the @code{pserver} method,
there is no protocol support for communicating between
@file{verifymsg} and the client on the remote end. For the
@code{ext} and @code{server} methods, it is possible
for CVS to become confused by the characters going
along the same channel as the CVS protocol
messages. See @ref{Repositórios remotos}, for more
information on client/server setups.  In addition, at the time
the @file{verifymsg} script runs, the CVS
server has locks in place in the repository.  If control is
returned to the user here then other users may be stuck waiting
for access to the repository.

This option can be useful if you find yourself using an
rcstemplate that needs to be modified to remove empty
elements or to fill in default values.  It can also be
useful if the rcstemplate has changed in the repository
and the CVS/Template was not updated, but is able to be
adapted to the new format by the verification script
that is run by @file{verifymsg}.

An example of an update might be to change all
occurrences of 'BugId:' to be 'DefectId:' (which can be
useful if the rcstemplate has recently been changed and
there are still checked-out user trees with cached
copies in the CVS/Template file of the older version).

Another example of an update might be to delete a line
that contains 'BugID: none' from the log message after
validation of that value as being allowed is made.

The following is a little silly example of a
@file{verifymsg} file, together with the corresponding
@file{rcsinfo} file, the log message template and an
verification  script.  We begin with the log message template.
We want to always record a bug-id number on the first
line of the log message.  The rest of log message is
free text.  The following template is found in the file
@file{/usr/cvssupport/tc.template}.

@example
BugId:
@end example

The script @file{/usr/cvssupport/bugid.verify} is used to
evaluate the log message.

@example
#!/bin/sh
#
#       bugid.verify filename
#
#  Verify that the log message contains a valid bugid
#  on the first line.
#
if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
    exit 0
elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
    # It is okay to allow commits with 'BugId: none',
    # but do not put that text into the real log message.
    grep -v '^BugId:[ ]*none$' > $1.rewrite
    mv $1.rewrite $1
    exit 0
else
    echo "No BugId found."
    exit 1
fi
@end example

The @file{verifymsg} file contains this line:

@example
^tc     /usr/cvssupport/bugid.verify
@end example

The @file{rcsinfo} file contains this line:

@example
^tc     /usr/cvssupport/tc.template
@end example

The @file{config} file contains this line:

@example
RereadLogAfterVerify=always
@end example



@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node loginfo
@appendixsubsec Loginfo
@cindex loginfo (admin file)
@cindex Storing log messages
@cindex Mailing log messages
@cindex Distributing log messages
@cindex Log messages

@c "cvs commit" is not quite right.  What we
@c mean is "when the repository gets changed" which
@c also includes "cvs import" and "cvs add" on a directory.
The @file{loginfo} file is used to control where
@samp{cvs commit} log information is sent.  The first
entry on a line is a regular expression which is tested
against the directory that the change is being made to,
relative to the @code{$CVSROOT}.  If a match is found, then
the remainder of the line is a filter program that
should expect log information on its standard input.

If the repository name does not match any of the
regular expressions in this file, the @samp{DEFAULT}
line is used, if it is specified.

All occurrences of the name @samp{ALL} appearing as a
regular expression are used in addition to the first
matching regular expression or @samp{DEFAULT}.

The first matching regular expression is used.

@xref{Arquivos de ???commit???}, for a description of the syntax of
the @file{loginfo} file.

The user may specify a format string as
part of the filter.  The string is composed of a
@samp{%} followed by a space, or followed by a single
format character, or followed by a set of format
characters surrounded by @samp{@{} and @samp{@}} as
separators.  The format characters are:

@table @t
@item s
file name
@item V
old version number (pre-checkin)
@item v
new version number (post-checkin)
@end table

All other characters that appear in a format string
expand to an empty field (commas separating fields are
still provided).

For example, some valid format strings are @samp{%},
@samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}.

The output will be a space separated string of tokens enclosed in
quotation marks (@t{"}).
Any embedded dollar signs (@t{$}), backticks (@t{`}),
backslashes (@t{\}), or quotation marks will be preceded
by a backslash (this allows the shell to correctly parse it
as a single string, regardless of the characters it contains).
For backwards compatibility, the first
token will be the repository subdirectory.  The rest of the
tokens will be comma-delimited lists of the information
requested in the format string.  For example, if
@samp{/u/src/master/yoyodyne/tc} is the repository, @samp{%@{sVv@}}
is the format string, and three files (@t{ChangeLog},
@t{Makefile}, @t{foo.c}) were modified, the output
might be:

@example
"yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13"
@end example

As another example, @samp{%@{@}} means that only the
name of the repository will be generated.

Note: when @sc{cvs} is accessing a remote repository,
@file{loginfo} will be run on the @emph{remote}
(i.e., server) side, not the client side (@pxref{Repositórios remotos}).

@menu
* loginfo example::             Loginfo example
* Keeping a checked out copy::  Updating a tree on every checkin
@end menu

@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node loginfo example
@appendixsubsubsec Loginfo example

The following @file{loginfo} file, together with the
tiny shell-script below, appends all log messages
to the file @file{$CVSROOT/CVSROOT/commitlog},
and any commits to the administrative files (inside
the @file{CVSROOT} directory) are also logged in
@file{/usr/adm/cvsroot-log}.
Commits to the @file{prog1} directory are mailed to @t{ceder}.

@c FIXME: is it a CVS feature or bug that only the
@c first matching line is used?  It is documented
@c above, but is it useful?  For example, if we wanted
@c to run both "cvs-log" and "Mail" for the CVSROOT
@c directory, it is kind of awkward if
@c only the first matching line is used.
@example
ALL             /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
^prog1          Mail -s %s ceder
@end example

The shell-script @file{/usr/local/bin/cvs-log} looks
like this:

@example
#!/bin/sh
(echo "------------------------------------------------------";
 echo -n $2"  ";
 date;
 echo;
 cat) >> $1
@end example

@node Keeping a checked out copy
@appendixsubsubsec Keeping a checked out copy

@c What other index entries?  It seems like
@c people might want to use a lot of different
@c words for this functionality.
@cindex Keeping a checked out copy
@cindex Checked out copy, keeping
@cindex Web pages, maintaining with CVS

It is often useful to maintain a directory tree which
contains files which correspond to the latest version
in the repository.  For example, other developers might
want to refer to the latest sources without having to
check them out, or you might be maintaining a web site
with @sc{cvs} and want every checkin to cause the files
used by the web server to be updated.
@c Can we offer more details on the web example?  Or
@c point the user at how to figure it out?  This text
@c strikes me as sufficient for someone who already has
@c some idea of what we mean but not enough for the naive
@c user/sysadmin to understand it and set it up.

The way to do this is by having loginfo invoke
@code{cvs update}.  Doing so in the naive way will
cause a problem with locks, so the @code{cvs update}
must be run in the background.
@c Should we try to describe the problem with locks?
@c It seems like a digression for someone who just
@c wants to know how to make it work.
@c Another choice which might work for a single file
@c is to use "cvs -n update -p" which doesn't take
@c out locks (I think) but I don't see many advantages
@c of that and we might as well document something which
@c works for multiple files.
Here is an example for unix (this should all be on one line):

@example
^cyclic-pages		(date; cat; (sleep 2; cd /u/www/local-docs;
 cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1
@end example

This will cause checkins to repository directories
starting with @code{cyclic-pages} to update the checked
out tree in @file{/u/www/local-docs}.
@c More info on some of the details?  The "sleep 2" is
@c so if we are lucky the lock will be gone by the time
@c we start and we can wait 2 seconds instead of 30.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node rcsinfo
@appendixsec Rcsinfo
@cindex rcsinfo (admin file)
@cindex Form for log message
@cindex Log message template
@cindex Template for log message

The @file{rcsinfo} file can be used to specify a form to
edit when filling out the commit log.  The
@file{rcsinfo} file has a syntax similar to the
@file{verifymsg}, @file{commitinfo} and @file{loginfo}
files.  @xref{syntax}.  Unlike the other files the second
part is @emph{not} a command-line template.  Instead,
the part after the regular expression should be a full pathname to
a file containing the log message template.

If the repository name does not match any of the
regular expressions in this file, the @samp{DEFAULT}
line is used, if it is specified.

All occurrences of the name @samp{ALL} appearing as a
regular expression are used in addition to the first
matching regular expression or @samp{DEFAULT}.

@c FIXME: should be offering advice, somewhere around
@c here, about where to put the template file.  The
@c verifymsg example uses /usr/cvssupport but doesn't
@c say anything about what that directory is for or
@c whether it is hardwired into CVS or who creates
@c it or anything.  In particular we should say
@c how to version control the template file.  A
@c probably better answer than the /usr/cvssupport
@c stuff is to use checkoutlist (with xref to the
@c checkoutlist doc).
@c Also I am starting to see a connection between
@c this and the Keeping a checked out copy node.
@c Probably want to say something about that.
The log message template will be used as a default log
message.  If you specify a log message with @samp{cvs
commit -m @var{message}} or @samp{cvs commit -f
@var{file}} that log message will override the
template.

@xref{verifymsg}, for an example @file{rcsinfo}
file.

When @sc{cvs} is accessing a remote repository,
the contents of @file{rcsinfo} at the time a directory
is first checked out will specify a template. This
template will be updated on all @samp{cvs update}
commands. It will also be added to new directories
added with a @samp{cvs add new-directry} command.
In versions of @sc{cvs} prior to version 1.12, the
@file{CVS/Template} file was not updated. If the
@sc{cvs} server is at version 1.12 or higher an older
client may be used and the @file{CVS/Template} will
be updated from the server.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node taginfo
@node taginfo
@c <en>@appendixsec Taginfo
@appendixsec Taginfo
@c <en>@cindex taginfo (admin file)
@cindex taginfo (admin file)
@c <en>@cindex Tags, logging
@cindex Tags, logging
@c <en>@cindex Tags, verifying
@cindex Tags, verifying
@c <en>The @file{taginfo} file defines programs to execute
@c <en>when someone executes a @code{tag} or @code{rtag}
@c <en>command.  The @file{taginfo} file has the standard form
@c <en>for administrative files (@pxref{syntax}),
@c <en>where each line is a regular expression
@c <en>followed by a command to execute.  The arguments passed
@c <en>to the command are, in order, the @var{tagname},
@c <en>@var{operation} (@code{add} for @code{tag},
@c <en>@code{mov} for @code{tag -F}, and @code{del} for
@c <en>@code{tag -d}), @var{repository}, and any remaining are
@c <en>pairs of @var{filename} @var{revision}.  A non-zero
@c <en>exit of the filter program will cause the tag to be
@c <en>aborted.
The @file{taginfo} file defines programs to execute
when someone executes a @code{tag} or @code{rtag}
command.  The @file{taginfo} file has the standard form
for administrative files (@pxref{syntax}),
where each line is a regular expression
followed by a command to execute.  The arguments passed
to the command are, in order, the @var{tagname},
@var{operation} (@code{add} for @code{tag},
@code{mov} for @code{tag -F}, and @code{del} for
@code{tag -d}), @var{repository}, and any remaining are
pairs of @var{filename} @var{revision}.  A non-zero
exit of the filter program will cause the tag to be
aborted.

@c <en>Here is an example of using the @file{taginfo} file
@c <en>to log @code{tag} and @code{rtag}
@c <en>commands.  In the @file{taginfo} file put:
Here is an example of using the @file{taginfo} file
to log @code{tag} and @code{rtag}
commands.  In the @file{taginfo} file put:

@example
ALL /usr/local/cvsroot/CVSROOT/loggit
@end example

@noindent
@c <en>Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the
@c <en>following script:
Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the
following script:

@example
#!/bin/sh
echo "$@@" >>/home/kingdon/cvsroot/CVSROOT/taglog
@end example

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node cvsignore
@appendixsec Ignoring files via cvsignore
@cindex cvsignore (admin file), global
@cindex Global cvsignore
@cindex Ignoring files
@c -- This chapter should maybe be moved to the
@c tutorial part of the manual?

There are certain file names that frequently occur
inside your working copy, but that you don't want to
put under @sc{cvs} control.  Examples are all the object
files that you get while you compile your sources.
Normally, when you run @samp{cvs update}, it prints a
line for each file it encounters that it doesn't know
about (@pxref{update output}).

@sc{cvs} has a list of files (or sh(1) file name patterns)
that it should ignore while running @code{update},
@code{import} and @code{release}.
@c -- Are those the only three commands affected?
This list is constructed in the following way.

@itemize @bullet
@item
The list is initialized to include certain file name
patterns: names associated with @sc{cvs}
administration, or with other common source control
systems; common names for patch files, object files,
archive files, and editor backup files; and other names
that are usually artifacts of assorted utilities.
Currently, the default list of ignored file name
patterns is:

@cindex Ignored files
@cindex Automatically ignored files
@example
    RCS     SCCS    CVS     CVS.adm
    RCSLOG  cvslog.*
    tags    TAGS
    .make.state     .nse_depinfo
    *~      #*      .#*     ,*      _$*     *$
    *.old   *.bak   *.BAK   *.orig  *.rej   .del-*
    *.a     *.olb   *.o     *.obj   *.so    *.exe
    *.Z     *.elc   *.ln
    core
@end example

@item
The per-repository list in
@file{$CVSROOT/CVSROOT/cvsignore} is appended to
the list, if that file exists.

@item
The per-user list in @file{.cvsignore} in your home
directory is appended to the list, if it exists.

@item
Any entries in the environment variable
@code{$CVSIGNORE} is appended to the list.

@item
Any @samp{-I} options given to @sc{cvs} is appended.

@item
As @sc{cvs} traverses through your directories, the contents
of any @file{.cvsignore} will be appended to the list.
The patterns found in @file{.cvsignore} are only valid
for the directory that contains them, not for
any sub-directories.
@end itemize

In any of the 5 places listed above, a single
exclamation mark (@samp{!}) clears the ignore list.
This can be used if you want to store any file which
normally is ignored by @sc{cvs}.

Specifying @samp{-I !} to @code{cvs import} will import
everything, which is generally what you want to do if
you are importing files from a pristine distribution or
any other source which is known to not contain any
extraneous files.  However, looking at the rules above
you will see there is a fly in the ointment; if the
distribution contains any @file{.cvsignore} files, then
the patterns from those files will be processed even if
@samp{-I !} is specified.  The only workaround is to
remove the @file{.cvsignore} files in order to do the
import.  Because this is awkward, in the future
@samp{-I !} might be modified to override
@file{.cvsignore} files in each directory.

Note that the syntax of the ignore files consists of a
series of lines, each of which contains a space
separated list of filenames.  This offers no clean way
to specify filenames which contain spaces, but you can
use a workaround like @file{foo?bar} to match a file
named @file{foo bar} (it also matches @file{fooxbar}
and the like).  Also note that there is currently no
way to specify comments.
@c FIXCVS?  I don't _like_ this syntax at all, but
@c changing it raises all the usual compatibility
@c issues and I'm also not sure what to change it to.

@node checkoutlist
@appendixsec The checkoutlist file
@cindex checkoutlist

It may be helpful to use @sc{cvs} to maintain your own
files in the @file{CVSROOT} directory.  For example,
suppose that you have a script @file{logcommit.pl}
which you run by including the following line in the
@file{commitinfo} administrative file:

@example
ALL   $CVSROOT/CVSROOT/logcommit.pl
@end example

To maintain @file{logcommit.pl} with @sc{cvs} you would
add the following line to the @file{checkoutlist}
administrative file:

@example
logcommit.pl
@end example

The format of @file{checkoutlist} is one line for each
file that you want to maintain using @sc{cvs}, giving
the name of the file, followed optionally by more whitespace
and any error message that should print if the file cannot be
checked out into CVSROOT after a commit:

@example
logcommit.pl	Could not update CVSROOT/logcommit.pl.
@end example

After setting up @file{checkoutlist} in this fashion,
the files listed there will function just like
@sc{cvs}'s built-in administrative files.  For example,
when checking in one of the files you should get a
message such as:

@example
cvs commit: Rebuilding administrative file database
@end example

@noindent
and the checked out copy in the @file{CVSROOT}
directory should be updated.

@c <en>Note that listing @file{passwd} (@pxref{Password
@c <en>authentication server}) in @file{checkoutlist} is not
@c <en>recommended for security reasons.
Note that listing @file{passwd}
(@pxref{Servidor de autenticação por senha}) in @file{checkoutlist} is not
recommended for security reasons.

For information about keeping a checkout out copy in a
more general context than the one provided by
@file{checkoutlist}, see @ref{Keeping a checked out
copy}.

@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c <en>@node history file
@node arquivo history (histórico)
@c <en>@appendixsec The history file
@appendixsec O arquivo history (histórico)
@c <en>@cindex History file
@cindex Arquivo history (histórico)
@c <en>@cindex Log information, saving
@cindex Log information, saving

@c <en>The file @file{$CVSROOT/CVSROOT/history} is used
@c <en>to log information for the @code{history} command
@c <en>(@pxref{history}).  This file must be created to turn
@c <en>on logging.  This is done automatically if the
@c <en>@code{cvs init} command is used to set up the
@c <en>repository (@pxref{Creating a repository}).
The file @file{$CVSROOT/CVSROOT/history} is used
to log information for the @code{history} command
(@pxref{history}).  This file must be created to turn
on logging.  This is done automatically if the
@code{cvs init} command is used to set up the
repository (@pxref{Criando um repositório}).

The file format of the @file{history} file is
documented only in comments in the @sc{cvs} source
code, but generally programs should use the @code{cvs
history} command to access it anyway, in case the
format changes with future releases of @sc{cvs}.

@node Variables
@appendixsec Expansions in administrative files
@cindex Internal variables
@cindex Variables

Sometimes in writing an administrative file, you might
want the file to be able to know various things based
on environment @sc{cvs} is running in.  There are
several mechanisms to do that.

@c <en>To find the home directory of the user running @sc{cvs}
@c <en>(from the @code{HOME} environment variable), use
@c <en>@samp{~} followed by @samp{/} or the end of the line.
@c <en>Likewise for the home directory of @var{user}, use
@c <en>@samp{~@var{user}}.  These variables are expanded on
@c <en>the server machine, and don't get any reasonable
@c <en>expansion if pserver (@pxref{Password authenticated})
@c <en>is in use; therefore user variables (see below) may be
@c <en>a better choice to customize behavior based on the user
@c <en>running @sc{cvs}.
To find the home directory of the user running @sc{cvs}
(from the @code{HOME} environment variable), use
@samp{~} followed by @samp{/} or the end of the line.
Likewise for the home directory of @var{user}, use
@samp{~@var{user}}.  These variables are expanded on
the server machine, and don't get any reasonable
expansion if pserver (@pxref{Autenticação por senha})
is in use; therefore user variables (see below) may be
a better choice to customize behavior based on the user
running @sc{cvs}.
@c Based on these limitations, should we deprecate ~?
@c What is it good for?  Are people using it?

One may want to know about various pieces of
information internal to @sc{cvs}.  A @sc{cvs} internal
variable has the syntax @code{$@{@var{variable}@}},
where @var{variable} starts with a letter and consists
of alphanumeric characters and @samp{_}.  If the
character following @var{variable} is a
non-alphanumeric character other than @samp{_}, the
@samp{@{} and @samp{@}} can be omitted.  The @sc{cvs}
internal variables are:

@table @code
@c <en>@item CVSROOT
@item CVSROOT
@c <en>@cindex CVSROOT, internal variable
@cindex CVSROOT, internal variable
@c <en>This is the absolute path to the current @sc{cvs} root directory.
@c <en>@xref{Repository}, for a description of the various
@c <en>ways to specify this, but note that the internal
@c <en>variable contains just the directory and not any
@c <en>of the access method information.
This is the absolute path to the current @sc{cvs} root directory.
@xref{Repositório}, for a description of the various
ways to specify this, but note that the internal
variable contains just the directory and not any
of the access method information.

@item RCSBIN
@cindex RCSBIN, internal variable
In @sc{cvs} 1.9.18 and older, this specified the
directory where @sc{cvs} was looking for @sc{rcs}
programs.  Because @sc{cvs} no longer runs @sc{rcs}
programs, specifying this internal variable is now an
error.

@c <en>@item CVSEDITOR
@item CVSEDITOR
@c <en>@cindex CVSEDITOR, internal variable
@cindex CVSEDITOR, internal variable
@c <en>@itemx EDITOR
@itemx EDITOR
@c <en>@cindex EDITOR, internal variable
@cindex EDITOR, internal variable
@c <en>@itemx VISUAL
@itemx VISUAL
@c <en>@cindex VISUAL, internal variable
@cindex VISUAL, internal variable
@c <en>These all expand to the same value, which is the editor
@c <en>that @sc{cvs} is using.  @xref{Global options}, for how
@c <en>to specify this.
These all expand to the same value, which is the editor
that @sc{cvs} is using.  @xref{Opções globais}, for how
to specify this.

@c <en>@item USER
@item USER
@c <en>@cindex USER, internal variable
@cindex USER, internal variable
@c <en>Username of the user running @sc{cvs} (on the @sc{cvs}
@c <en>server machine).
@c <en>When using pserver, this is the user specified in the repository
@c <en>specification which need not be the same as the username the
@c <en>server is running as (@pxref{Password authentication server}).
@c <en>Do not confuse this with the environment variable of the same name.
Username of the user running @sc{cvs} (on the @sc{cvs}
server machine).
When using pserver, this is the user specified in the repository
specification which need not be the same as the username the
server is running as (@pxref{Servidor de autenticação por senha}).
Do not confuse this with the environment variable of the same name.
@end table

If you want to pass a value to the administrative files
which the user who is running @sc{cvs} can specify,
use a user variable.
@cindex User variables
To expand a user variable, the
administrative file contains
@code{$@{=@var{variable}@}}.  To set a user variable,
specify the global option @samp{-s} to @sc{cvs}, with
argument @code{@var{variable}=@var{value}}.  It may be
particularly useful to specify this option via
@file{.cvsrc} (@pxref{~/.cvsrc}).

For example, if you want the administrative file to
refer to a test directory you might create a user
variable @code{TESTDIR}.  Then if @sc{cvs} is invoked
as

@example
cvs -s TESTDIR=/work/local/tests
@end example

@noindent
and the
administrative file contains @code{sh
$@{=TESTDIR@}/runtests}, then that string is expanded
to @code{sh /work/local/tests/runtests}.

All other strings containing @samp{$} are reserved;
there is no way to quote a @samp{$} character so that
@samp{$} represents itself.

Environment variables passed to administrative files are:

@table @code
@cindex environment variables, passed to administrative files

@item CVS_USER
@cindex CVS_USER, environment variable
The @sc{cvs}-specific username provided by the user, if it
can be provided (currently just for the pserver access
method), and to the empty string otherwise.  (@code{CVS_USER}
and @code{USER} may differ when @file{$CVSROOT/CVSROOT/passwd}
is used to map @sc{cvs} usernames to system usernames.)

@item LOGNAME
@cindex LOGNAME, environment variable
The username of the system user.

@item USER
@cindex USER, environment variable
Same as @code{LOGNAME}.
Do not confuse this with the internal variable of the same name.
@end table

@node config
@appendixsec The CVSROOT/config configuration file

@cindex config, in CVSROOT
@cindex CVSROOT/config

The administrative file @file{config} contains various
miscellaneous settings which affect the behavior of
@sc{cvs}.  The syntax is slightly different from the
other administrative files.  Variables are not
expanded.  Lines which start with @samp{#} are
considered comments.
@c FIXME: where do we define comments for the other
@c administrative files.
Other lines consist of a keyword, @samp{=}, and a
value.  Note that this syntax is very strict.
Extraneous spaces or tabs are not permitted.
@c See comments in parseinfo.c:parse_config for more
@c discussion of this strictness.

Currently defined keywords are:

@table @code
@cindex RCSBIN, in CVSROOT/config
@item RCSBIN=@var{bindir}
For @sc{cvs} 1.9.12 through 1.9.18, this setting told
@sc{cvs} to look for @sc{rcs} programs in the
@var{bindir} directory.  Current versions of @sc{cvs}
do not run @sc{rcs} programs; for compatibility this
setting is accepted, but it does nothing.

@c <en>@cindex SystemAuth, in CVSROOT/config
@cindex SystemAuth, in CVSROOT/config
@c <en>@item SystemAuth=@var{value}
@item SystemAuth=@var{value}
@c <en>If @var{value} is @samp{yes}, then pserver should check
@c <en>for users in the system's user database if not found in
@c <en>@file{CVSROOT/passwd}.  If it is @samp{no}, then all
@c <en>pserver users must exist in @file{CVSROOT/passwd}.
@c <en>The default is @samp{yes}.  For more on pserver, see
@c <en>@ref{Password authenticated}.
If @var{value} is @samp{yes}, then pserver should check
for users in the system's user database if not found in
@file{CVSROOT/passwd}.  If it is @samp{no}, then all
pserver users must exist in @file{CVSROOT/passwd}.
The default is @samp{yes}.  For more on pserver, see
@ref{Autenticação por senha}.

@ignore
@cindex PreservePermissions, in CVSROOT/config
@item PreservePermissions=@var{value}
Enable support for saving special device files,
symbolic links, file permissions and ownerships in the
repository.  The default value is @samp{no}.
@xref{Special Files}, for the full implications of using
this keyword.
@end ignore

@cindex TopLevelAdmin, in CVSROOT/config
@item TopLevelAdmin=@var{value}
Modify the @samp{checkout} command to create a
@samp{CVS} directory at the top level of the new
working directory, in addition to @samp{CVS}
directories created within checked-out directories.
The default value is @samp{no}.

@c <en>This option is useful if you find yourself performing
@c <en>many commands at the top level of your working
@c <en>directory, rather than in one of the checked out
@c <en>subdirectories.  The @file{CVS} directory created there
@c <en>will mean you don't have to specify @code{CVSROOT} for
@c <en>each command.  It also provides a place for the
@c <en>@file{CVS/Template} file (@pxref{Working directory
@c <en>storage}).
This option is useful if you find yourself performing
many commands at the top level of your working
directory, rather than in one of the checked out
subdirectories.  The @file{CVS} directory created there
will mean you don't have to specify @code{CVSROOT} for
each command.  It also provides a place for the
@file{CVS/Template} file
(@pxref{Armazenamento do Diretório de trabalho}).

@c <en>@cindex LockDir, in CVSROOT/config
@cindex LockDir, in CVSROOT/config
@c <en>@item LockDir=@var{directory}
@item LockDir=@var{directory}
@c <en>Put @sc{cvs} lock files in @var{directory} rather than
@c <en>directly in the repository.  This is useful if you want
@c <en>to let users read from the repository while giving them
@c <en>write access only to @var{directory}, not to the
@c <en>repository.
@c <en>It can also be used to put the locks on a very fast
@c <en>in-memory file system to speed up locking and unlocking
@c <en>the repository.
@c <en>You need to create @var{directory}, but
@c <en>@sc{cvs} will create subdirectories of @var{directory} as it
@c <en>needs them.  For information on @sc{cvs} locks, see
@c <en>@ref{Concurrency}.
Put @sc{cvs} lock files in @var{directory} rather than
directly in the repository.  This is useful if you want
to let users read from the repository while giving them
write access only to @var{directory}, not to the
repository.
It can also be used to put the locks on a very fast
in-memory file system to speed up locking and unlocking
the repository.
You need to create @var{directory}, but
@sc{cvs} will create subdirectories of @var{directory} as it
needs them.  For information on @sc{cvs} locks, see
@ref{Concorrência}.

@c Mention this in Compatibility section?
Before enabling the LockDir option, make sure that you
have tracked down and removed any copies of @sc{cvs} 1.9 or
older.  Such versions neither support LockDir, nor will
give an error indicating that they don't support it.
The result, if this is allowed to happen, is that some
@sc{cvs} users will put the locks one place, and others will
put them another place, and therefore the repository
could become corrupted.  @sc{cvs} 1.10 does not support
LockDir but it will print a warning if run on a
repository with LockDir enabled.

@cindex LogHistory, in CVSROOT/config
@item LogHistory=@var{value}
Control what is logged to the @file{CVSROOT/history} file (@pxref{history}).
Default of @samp{TOEFWUPCGMAR} (or simply @samp{all}) will log
all transactions.  Any subset of the default is
legal.  (For example, to only log transactions that modify the
@file{*,v} files, use @samp{LogHistory=TMAR}.)

@cindex RereadLogAfterVerify, in CVSROOT/config
@cindex @file{verifymsg}, changing the log message
@item RereadLogAfterVerify=@var{value}
Modify the @samp{commit} command such that CVS will reread the
log message after running the program specified by @file{verifymsg}.
@var{value} may be one of @samp{yes} or @samp{always}, indicating that
the log message should always be reread; @samp{no}
or @samp{never}, indicating that it should never be
reread; or @var{value} may be @samp{stat}, indicating
that the file should be checked with the filesystem
@samp{stat()} function to see if it has changed (see warning below)
before rereading.  The default value is @samp{always}.

@strong{Note: the `stat' mode can cause CVS to pause for up to
one extra second per directory committed.  This can be less IO and
CPU intensive but is not recommended for use with large repositories}

@xref{verifymsg}, for more information on how verifymsg
may be used.

@cindex UserAdminOptions, in CVSROOT/config
@item UserAdminOptions=@var{value}
Control what options will be allowed with the @code{cvs admin}
command (@pxref{admin}) for users not in the @code{cvsadmin} group.
The @var{value} string is a list of single character options
which should be allowed.  If a user who is not a member of the
@code{cvsadmin} group tries to execute any @code{cvs admin}
option which is not listed they will will receive an error message
reporting that the option is restricted.

If no @code{cvsadmin} group exists on the server, @sc{cvs} will
ignore the @code{UserAdminOptions} keyword (@pxref{admin}).

When not specified, @code{UserAdminOptions} defaults to
@samp{k}.  In other words, it defaults to allowing
users outside of the @code{cvsadmin} group to use the
@code{cvs admin} command only to change the default keyword
expansion mode for files.

As an example, to restrict users not in the @code{cvsadmin}
group to using @code{cvs admin} to change the default keyword
substitution mode, lock revisions, unlock revisions, and
replace the log message, use @samp{UserAdminOptions=klum}.
@end table

@c ---------------------------------------------------------------------
@c <en>@node Environment variables
@node Variáveis de ambiente
@c <en>@appendix All environment variables which affect CVS
@appendix Todas as variáveis de ambiente que afetam o CVS
@c <en>@cindex Environment variables
@cindex Environment variables
@c <en>@cindex Reference manual for variables
@cindex Reference manual for variables

This is a complete list of all environment variables
that affect @sc{cvs}.

@table @code
@cindex CVSIGNORE, environment variable
@item $CVSIGNORE
A whitespace-separated list of file name patterns that
@sc{cvs} should ignore. @xref{cvsignore}.

@cindex CVSWRAPPERS, environment variable
@item $CVSWRAPPERS
A whitespace-separated list of file name patterns that
@sc{cvs} should treat as wrappers. @xref{Wrappers}.

@cindex CVSREAD, environment variable
@cindex Read-only files, and CVSREAD
@item $CVSREAD
If this is set, @code{checkout} and @code{update} will
try hard to make the files in your working directory
read-only.  When this is not set, the default behavior
is to permit modification of your working files.

@cindex CVSREADONLYFS, environment variable
@item $CVSREADONLYFS
Turns on read-only repository mode. This allows one to
check out from a read-only repository, such as within
an anoncvs server, or from a CDROM repository.

It has the same effect as if the @samp{-R} command-line
option is used. This can also allow the use of
read-only NFS repositories.

@c <en>@item $CVSUMASK
@item $CVSUMASK
@c <en>Controls permissions of files in the repository.  See
@c <en>@ref{File permissions}.
Controls permissions of files in the repository.  See
@ref{Permissões de arquivos}.

@item $CVSROOT
Should contain the full pathname to the root of the @sc{cvs}
source repository (where the @sc{rcs} files are
kept).  This information must be available to @sc{cvs} for
most commands to execute; if @code{$CVSROOT} is not set,
or if you wish to override it for one invocation, you
can supply it on the command line: @samp{cvs -d cvsroot
cvs_command@dots{}} Once you have checked out a working
directory, @sc{cvs} stores the appropriate root (in
the file @file{CVS/Root}), so normally you only need to
worry about this when initially checking out a working
directory.

@c <en>@item $CVSEDITOR
@item $CVSEDITOR
@c <en>@cindex CVSEDITOR, environment variable
@cindex CVSEDITOR, environment variable
@c <en>@itemx $EDITOR
@itemx $EDITOR
@c <en>@cindex EDITOR, environment variable
@cindex EDITOR, environment variable
@c <en>@itemx $VISUAL
@itemx $VISUAL
@c <en>@cindex VISUAL, environment variable
@cindex VISUAL, environment variable
@c <en>Specifies the program to use for recording log messages
@c <en>during commit.  @code{$CVSEDITOR} overrides
@c <en>@code{$EDITOR}, which overrides @code{$VISUAL}.
@c <en>See @ref{Committing your changes} for more or
@c <en>@ref{Global options} for alternative ways of specifying a
@c <en>log editor.
Specifies the program to use for recording log messages
during commit.  @code{$CVSEDITOR} overrides
@code{$EDITOR}, which overrides @code{$VISUAL}.
See @ref{Efetivando suas alterações} for more or
@ref{Opções globais} for alternative ways of specifying a
log editor.

@cindex PATH, environment variable
@item $PATH
If @code{$RCSBIN} is not set, and no path is compiled
into @sc{cvs}, it will use @code{$PATH} to try to find all
programs it uses.

@cindex HOME, environment variable
@item $HOME
@cindex HOMEPATH, environment variable
@item $HOMEPATH
@cindex HOMEDRIVE, environment variable
@item $HOMEDRIVE
Used to locate the directory where the @file{.cvsrc}
file, and other such files, are searched.  On Unix, @sc{cvs}
just checks for @code{HOME}.  On Windows NT, the system will
set @code{HOMEDRIVE}, for example to @samp{d:} and @code{HOMEPATH},
for example to @file{\joe}.  On Windows 95, you'll
probably need to set @code{HOMEDRIVE} and @code{HOMEPATH} yourself.
@c We are being vague about whether HOME works on
@c Windows; see long comment in windows-NT/filesubr.c.

@c <en>@cindex CVS_RSH, environment variable
@cindex CVS_RSH, environment variable
@c <en>@item $CVS_RSH
@item $CVS_RSH
@c <en>Specifies the external program which @sc{cvs} connects with,
@c <en>when @code{:ext:} access method is specified.
@c <en>@pxref{Connecting via rsh}.
Specifies the external program which @sc{cvs} connects with,
when @code{:ext:} access method is specified.
@pxref{Se conectando via rsh}.

@c <en>@item $CVS_SERVER
@item $CVS_SERVER
@c <en>Used in client-server mode when accessing a remote
@c <en>repository using @sc{rsh}.  It specifies the name of
@c <en>the program to start on the server side (and any
@c <en>necessary arguments) when accessing a remote repository
@c <en>using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods.
@c <en>The default value for @code{:ext:} and @code{:server:} is @code{cvs};
@c <en>the default value for @code{:fork:} is the name used to run the client.
@c <en>@pxref{Connecting via rsh}
Used in client-server mode when accessing a remote
repository using @sc{rsh}.  It specifies the name of
the program to start on the server side (and any
necessary arguments) when accessing a remote repository
using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods.
The default value for @code{:ext:} and @code{:server:} is @code{cvs};
the default value for @code{:fork:} is the name used to run the client.
@pxref{Se conectando via rsh}

@c <en>@item $CVS_PASSFILE
@item $CVS_PASSFILE
@c <en>Used in client-server mode when accessing the @code{cvs
@c <en>login server}.  Default value is @file{$HOME/.cvspass}.
@c <en>@pxref{Password authentication client}
Used in client-server mode when accessing the @code{cvs
login server}.  Default value is @file{$HOME/.cvspass}.
@pxref{Cliente de autenticação por senha}

@c <en>@item $CVS_CLIENT_PORT
@item $CVS_CLIENT_PORT
@c <en>Used in client-server mode to set the port to use when accessing the server
@c <en>via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol
@c <en>if the port is not specified in the CVSROOT.
@c <en>@pxref{Remote repositories}
Used in client-server mode to set the port to use when accessing the server
via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol
if the port is not specified in the CVSROOT.
@pxref{Repositórios remotos}

@cindex CVS_RCMD_PORT, environment variable
@item $CVS_RCMD_PORT
Used in client-server mode.  If set, specifies the port
number to be used when accessing the @sc{rcmd} demon on
the server side. (Currently not used for Unix clients).

@cindex CVS_CLIENT_LOG, environment variable
@item $CVS_CLIENT_LOG
Used for debugging only in client-server
mode.  If set, everything sent to the server is logged
into @file{@code{$CVS_CLIENT_LOG}.in} and everything
sent from the server is logged into
@file{@code{$CVS_CLIENT_LOG}.out}.

@cindex CVS_SERVER_SLEEP, environment variable
@item $CVS_SERVER_SLEEP
Used only for debugging the server side in
client-server mode.  If set, delays the start of the
server child process the specified amount of
seconds so that you can attach to it with a debugger.

@cindex CVS_IGNORE_REMOTE_ROOT, environment variable
@item $CVS_IGNORE_REMOTE_ROOT
For @sc{cvs} 1.10 and older, setting this variable
prevents @sc{cvs} from overwriting the @file{CVS/Root}
file when the @samp{-d} global option is specified.
Later versions of @sc{cvs} do not rewrite
@file{CVS/Root}, so @code{CVS_IGNORE_REMOTE_ROOT} has no
effect.

@cindex CVS_LOCAL_BRANCH_NUM, environment variable
@item $CVS_LOCAL_BRANCH_NUM
Setting this variable allows some control over the
branch number that is assigned. This is specifically to
support the local commit feature of CVSup. If one sets
@code{CVS_LOCAL_BRANCH_NUM} to (say) 1000 then branches
the local repository, the revision numbers will look
like 1.66.1000.xx. There is almost a dead-set certainty
that there will be no conflicts with version numbers.

@cindex COMSPEC, environment variable
@item $COMSPEC
Used under OS/2 only.  It specifies the name of the
command interpreter and defaults to @sc{cmd.exe}.

@c <en>@cindex TMPDIR, environment variable
@cindex TMPDIR, environment variable
@c <en>@item $TMPDIR
@item $TMPDIR
@c <en>@cindex TMP, environment variable
@cindex TMP, environment variable
@c <en>@itemx $TMP
@itemx $TMP
@c <en>@cindex TEMP, environment variable
@cindex TEMP, environment variable
@c <en>@itemx $TEMP
@itemx $TEMP
@c <en>@cindex Temporary files, location of
@cindex Temporary files, location of
@c This is quite nuts.  We don't talk about tempnam
@c or mkstemp which we sometimes use.  The discussion
@c of "Global options" is semi-incoherent.
@c I'm not even sure those are the only inaccuracies.
@c Furthermore, the conventions are
@c pretty crazy and they should be simplified.
@c <en>Directory in which temporary files are located.
@c <en>The @sc{cvs} server uses
@c <en>@code{TMPDIR}.  @xref{Global options}, for a
@c <en>description of how to specify this.
@c <en>Some parts of @sc{cvs} will always use @file{/tmp} (via
@c <en>the @code{tmpnam} function provided by the system).
Directory in which temporary files are located.
The @sc{cvs} server uses
@code{TMPDIR}.  @xref{Opções globais}, for a
description of how to specify this.
Some parts of @sc{cvs} will always use @file{/tmp} (via
the @code{tmpnam} function provided by the system).

On Windows NT, @code{TMP} is used (via the @code{_tempnam}
function provided by the system).

The @code{patch} program which is used by the @sc{cvs}
client uses @code{TMPDIR}, and if it is not set, uses
@file{/tmp} (at least with GNU patch 2.1).  Note that
if your server and client are both running @sc{cvs}
1.9.10 or later, @sc{cvs} will not invoke an external
@code{patch} program.

@cindex CVS_PID, environment variable
@item $CVS_PID
This is the process identification (aka pid) number of
the @sc{cvs} process. It is often useful in the
programs and/or scripts specified by the
@file{commitinfo}, @file{verifymsg}, @file{loginfo}
files.
@end table

@c <en>@node Compatibility
@node Compatibilidade
@c <en>@appendix Compatibility between CVS Versions
@appendix Compatibility between CVS Versions

@cindex CVS, versions of
@cindex Versions, of CVS
@cindex Compatibility, between CVS versions
@c We don't mention versions older than CVS 1.3
@c on the theory that it would clutter it up for the vast
@c majority of people, who don't have anything that old.
@c
@c <en>The repository format is compatible going back to
@c <en>@sc{cvs} 1.3.  But see @ref{Watches Compatibility}, if
@c <en>you have copies of @sc{cvs} 1.6 or older and you want
@c <en>to use the optional developer communication features.
The repository format is compatible going back to
@sc{cvs} 1.3.  But see @ref{Compatibilidade de ???Watches???}, if
you have copies of @sc{cvs} 1.6 or older and you want
to use the optional developer communication features.
@c If you "cvs rm" and commit using 1.3, then you'll
@c want to run "rcs -sdead <file,v>" on each of the
@c files in the Attic if you then want 1.5 and
@c later to recognize those files as dead (I think the
@c symptom if this is not done is that files reappear
@c in joins).  (Wait: the above will work but really to
@c be strictly correct we should suggest checking
@c in a new revision rather than just changing the
@c state of the head revision, shouldn't we?).
@c The old convert.sh script was for this, but it never
@c did get updated to reflect use of the RCS "dead"
@c state.
@c Note: this is tricky to document without confusing
@c people--need to carefully say what CVS version we
@c are talking about and keep in mind the distinction
@c between a
@c repository created with 1.3 and on which one now
@c uses 1.5+, and a repository on which one wants to
@c use both versions side by side (e.g. during a
@c transition period).
@c Wait, can't CVS just detect the case in which a file
@c is in the Attic but the head revision is not dead?
@c Not sure whether this should produce a warning or
@c something, and probably needs further thought, but
@c it would appear that the situation can be detected.
@c
@c We might want to separate out the 1.3 compatibility
@c section (for repository & working directory) from the
@c rest--that might help avoid confusing people who
@c are upgrading (for example) from 1.6 to 1.8.
@c
@c A minor incompatibility is if a current version of CVS
@c puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will
@c see this as if there is no tag.  Seems to me this is
@c too obscure to mention.

The working directory format is compatible going back
to @sc{cvs} 1.5.  It did change between @sc{cvs} 1.3
and @sc{cvs} 1.5.  If you run @sc{cvs} 1.5 or newer on
a working directory checked out with @sc{cvs} 1.3,
@sc{cvs} will convert it, but to go back to @sc{cvs}
1.3 you need to check out a new working directory with
@sc{cvs} 1.3.

The remote protocol is interoperable going back to @sc{cvs} 1.5, but no
further (1.5 was the first official release with the remote protocol,
but some older versions might still be floating around).  In many
cases you need to upgrade both the client and the server to take
advantage of new features and bugfixes, however.

@c Perhaps should be saying something here about the
@c "D" lines in Entries (written by CVS 1.9; 1.8 and
@c older don't use them).  These are supposed to be
@c compatible in both directions, but I'm not sure
@c they quite are 100%.  One common gripe is if you
@c "rm -r" a directory and 1.9 gets confused, as it
@c still sees it in Entries.  That one is fixed in
@c (say) 1.9.6.  Someone else reported problems with
@c starting with a directory which was checked out with
@c an old version, and then using a new version, and
@c some "D" lines appeared, but not for every
@c directory, causing some directories to be skipped.
@c They weren't sure how to reproduce this, though.

@c ---------------------------------------------------------------------
@c <en>@node Troubleshooting
@node Resolução de problemas
@c <en>@appendix Troubleshooting
@appendix Resolução de problemas

If you are having trouble with @sc{cvs}, this appendix
may help.  If there is a particular error message which
you are seeing, then you can look up the message
alphabetically.  If not, you can look through the
section on other problems to see if your problem is
mentioned there.

@menu
@c <en>* Error messages::              Partial list of CVS errors
* Mensagens de erro::             Partial list of CVS errors
@c <en>* Connection::                  Trouble making a connection to a CVS server
* Conexão::                       Trouble making a connection to a CVS server
@c <en>* Other problems::              Problems not readily listed by error message
* Outros problemas::              Problems not readily listed by error message
@end menu

@ignore
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c @node Bad administrative files
@appendixsec Bad administrative files

@c -- Give hints on how to fix them
@end ignore

@c <en>@node Error messages
@node Mensagens de erro
@c <en>@appendixsec Partial list of error messages
@appendixsec Partial list of error messages

Here is a partial list of error messages that you may
see from @sc{cvs}.  It is not a complete list---@sc{cvs}
is capable of printing many, many error messages, often
with parts of them supplied by the operating system,
but the intention is to list the common and/or
potentially confusing error messages.

The messages are alphabetical, but introductory text
such as @samp{cvs update: } is not considered in
ordering them.

In some cases the list includes messages printed by old
versions of @sc{cvs} (partly because users may not be
sure which version of @sc{cvs} they are using at any
particular moment).
@c If we want to start retiring messages, perhaps we
@c should pick a cutoff version (for example, no more
@c messages which are specific to versions before 1.9)
@c and then move the old messages to an "old messages"
@c node rather than deleting them completely.

@table @code
@c FIXME: What is the correct way to format a multiline
@c error message here?  Maybe @table is the wrong
@c choice?  Texinfo gurus?
@c <en>@item @var{file}:@var{line}: Assertion '@var{text}' failed
@item @var{file}:@var{line}: Assertion '@var{text}' failed
@c <en>The exact format of this message may vary depending on
@c <en>your system.  It indicates a bug in @sc{cvs}, which can
@c <en>be handled as described in @ref{BUGS}.
The exact format of this message may vary depending on
your system.  It indicates a bug in @sc{cvs}, which can
be handled as described in @ref{Paus}.

@c <en>@item cvs @var{command}: authorization failed: server @var{host} rejected access
@item cvs @var{command}: authorization failed: server @var{host} rejected access
@c <en>This is a generic response when trying to connect to a
@c <en>pserver server which chooses not to provide a
@c <en>specific reason for denying authorization.  Check that
@c <en>the username and password specified are correct and
@c <en>that the @code{CVSROOT} specified is allowed by @samp{--allow-root}
@c <en>in @file{inetd.conf}.  See @ref{Password authenticated}.
This is a generic response when trying to connect to a
pserver server which chooses not to provide a
specific reason for denying authorization.  Check that
the username and password specified are correct and
that the @code{CVSROOT} specified is allowed by @samp{--allow-root}
in @file{inetd.conf}.  See @ref{Autenticação por senha}.

@item cvs @var{command}: conflict: removed @var{file} was modified by second party
This message indicates that you removed a file, and
someone else modified it.  To resolve the conflict,
first run @samp{cvs add @var{file}}.  If desired, look
at the other party's modification to decide whether you
still want to remove it.  If you don't want to remove
it, stop here.  If you do want to remove it, proceed
with @samp{cvs remove @var{file}} and commit your
removal.
@c Tests conflicts2-142b* in sanity.sh test for this.

@item cannot change permissions on temporary directory
@example
Operation not permitted
@end example
This message has been happening in a non-reproducible,
occasional way when we run the client/server testsuite,
both on Red Hat Linux 3.0.3 and 4.1.  We haven't been
able to figure out what causes it, nor is it known
whether it is specific to linux (or even to this
particular machine!).  If the problem does occur on
other unices, @samp{Operation not permitted} would be
likely to read @samp{Not owner} or whatever the system
in question uses for the unix @code{EPERM} error.  If
you have any information to add, please let us know as
described in @ref{Paus}.  If you experience this error
while using @sc{cvs}, retrying the operation which
produced it should work fine.
@c This has been seen in a variety of tests, including
@c multibranch-2, multibranch-5, and basic1-24-rm-rm,
@c so it doesn't seem particularly specific to any one
@c test.

@c <en>@item cvs [server aborted]: Cannot check out files into the repository itself
@item cvs [server aborted]: Cannot check out files into the repository itself
@c <en>The obvious cause for this message (especially for
@c <en>non-client/server @sc{cvs}) is that the @sc{cvs} root
@c <en>is, for example, @file{/usr/local/cvsroot} and you try
@c <en>to check out files when you are in a subdirectory, such
@c <en>as @file{/usr/local/cvsroot/test}.  However, there is a
@c <en>more subtle cause, which is that the temporary
@c <en>directory on the server is set to a subdirectory of the
@c <en>root (which is also not allowed).  If this is the
@c <en>problem, set the temporary directory to somewhere else,
@c <en>for example @file{/var/tmp}; see @code{TMPDIR} in
@c <en>@ref{Environment variables}, for how to set the
@c <en>temporary directory.
The obvious cause for this message (especially for
non-client/server @sc{cvs}) is that the @sc{cvs} root
is, for example, @file{/usr/local/cvsroot} and you try
to check out files when you are in a subdirectory, such
as @file{/usr/local/cvsroot/test}.  However, there is a
more subtle cause, which is that the temporary
directory on the server is set to a subdirectory of the
root (which is also not allowed).  If this is the
problem, set the temporary directory to somewhere else,
for example @file{/var/tmp}; see @code{TMPDIR} in
@ref{Variáveis de ambiente}, for how to set the
temporary directory.

@item cannot commit files as 'root'
See @samp{'root' is not allowed to commit files}.

@c For one example see basica-1a10 in the testsuite
@c For another example, "cvs co ." on NT; see comment
@c at windows-NT/filesubr.c (expand_wild).
@c For another example, "cvs co foo/bar" where foo exists.
@c <en>@item cannot open CVS/Entries for reading: No such file or directory
@item cannot open CVS/Entries for reading: No such file or directory
@c <en>This generally indicates a @sc{cvs} internal error, and
@c <en>can be handled as with other @sc{cvs} bugs
@c <en>(@pxref{BUGS}).  Usually there is a workaround---the
@c <en>exact nature of which would depend on the situation but
@c <en>which hopefully could be figured out.
This generally indicates a @sc{cvs} internal error, and
can be handled as with other @sc{cvs} bugs
(@pxref{Paus}).  Usually there is a workaround---the
exact nature of which would depend on the situation but
which hopefully could be figured out.

@c This is more obscure than it might sound; it only
@c happens if you run "cvs init" from a directory which
@c contains a CVS/Root file at the start.
@item cvs [init aborted]: cannot open CVS/Root: No such file or directory
This message is harmless.  Provided it is not
accompanied by other errors, the operation has
completed successfully.  This message should not occur
with current versions of @sc{cvs}, but it is documented
here for the benefit of @sc{cvs} 1.9 and older.

@c <en>@item cvs server: cannot open /root/.cvsignore: Permission denied
@item cvs server: cannot open /root/.cvsignore: Permission denied
@c <en>@itemx cvs [server aborted]: can't chdir(/root): Permission denied
@itemx cvs [server aborted]: can't chdir(/root): Permission denied
@c <en>See @ref{Connection}.
See @ref{Conexão}.

@c <en>@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument
@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument
@c <en>This message has been reported as intermittently
@c <en>happening with @sc{cvs} 1.9 on Solaris 2.5.  The cause is
@c <en>unknown; if you know more about what causes it, let us
@c <en>know as described in @ref{BUGS}.
This message has been reported as intermittently
happening with @sc{cvs} 1.9 on Solaris 2.5.  The cause is
unknown; if you know more about what causes it, let us
know as described in @ref{Paus}.

@c <en>@item cvs [@var{command} aborted]: cannot start server via rcmd
@item cvs [@var{command} aborted]: cannot start server via rcmd
@c <en>This, unfortunately, is a rather nonspecific error
@c <en>message which @sc{cvs} 1.9 will print if you are
@c <en>running the @sc{cvs} client and it is having trouble
@c <en>connecting to the server.  Current versions of @sc{cvs}
@c <en>should print a much more specific error message.  If
@c <en>you get this message when you didn't mean to run the
@c <en>client at all, you probably forgot to specify
@c <en>@code{:local:}, as described in @ref{Repository}.
This, unfortunately, is a rather nonspecific error
message which @sc{cvs} 1.9 will print if you are
running the @sc{cvs} client and it is having trouble
connecting to the server.  Current versions of @sc{cvs}
should print a much more specific error message.  If
you get this message when you didn't mean to run the
client at all, you probably forgot to specify
@code{:local:}, as described in @ref{Repositório}.

@item ci: @var{file},v: bad diff output line: Binary files - and /tmp/T2a22651 differ
@sc{cvs} 1.9 and older will print this message
when trying to check in a binary file if
@sc{rcs} is not correctly installed.  Re-read the
instructions that came with your @sc{rcs} distribution
and the @sc{install} file in the @sc{cvs}
distribution.  Alternately, upgrade to a current
version of @sc{cvs}, which checks in files itself
rather than via @sc{rcs}.

@c <en>@item cvs checkout: could not check out @var{file}
@item cvs checkout: could not check out @var{file}
@c <en>With @sc{cvs} 1.9, this can mean that the @code{co} program
@c <en>(part of @sc{rcs}) returned a failure.  It should be
@c <en>preceded by another error message, however it has been
@c <en>observed without another error message and the cause is
@c <en>not well-understood.  With the current version of @sc{cvs},
@c <en>which does not run @code{co}, if this message occurs
@c <en>without another error message, it is definitely a @sc{cvs}
@c <en>bug (@pxref{BUGS}).
With @sc{cvs} 1.9, this can mean that the @code{co} program
(part of @sc{rcs}) returned a failure.  It should be
preceded by another error message, however it has been
observed without another error message and the cause is
not well-understood.  With the current version of @sc{cvs},
which does not run @code{co}, if this message occurs
without another error message, it is definitely a @sc{cvs}
bug (@pxref{Paus}).
@c My current suspicion is that the RCS in the rcs (not
@c cvs/winnt/rcs57nt.zip) directory on the _Practical_
@c CD is bad (remains to be confirmed).
@c There is also a report of something which looks
@c very similar on SGI, Irix 5.2, so I dunno.

@c <en>@item cvs [login aborted]: could not find out home directory
@item cvs [login aborted]: could not find out home directory
@c <en>This means that you need to set the environment
@c <en>variables that @sc{cvs} uses to locate your home directory.
@c <en>See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in
@c <en>@ref{Environment variables}.
This means that you need to set the environment
variables that @sc{cvs} uses to locate your home directory.
See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in
@ref{Variáveis de ambiente}.

@item cvs update: could not merge revision @var{rev} of @var{file}: No such file or directory
@sc{cvs} 1.9 and older will print this message if there was
a problem finding the @code{rcsmerge} program.  Make
sure that it is in your @code{PATH}, or upgrade to a
current version of @sc{cvs}, which does not require
an external @code{rcsmerge} program.

@item cvs [update aborted]: could not patch @var{file}: No such file or directory
This means that there was a problem finding the
@code{patch} program.  Make sure that it is in your
@code{PATH}.  Note that despite appearances the message
is @emph{not} referring to whether it can find @var{file}.
If both the client and the server are running a current
version of @sc{cvs}, then there is no need for an
external patch program and you should not see this
message.  But if either client or server is running
@sc{cvs} 1.9, then you need @code{patch}.

@item cvs update: could not patch @var{file}; will refetch
This means that for whatever reason the client was
unable to apply a patch that the server sent.  The
message is nothing to be concerned about, because
inability to apply the patch only slows things down and
has no effect on what @sc{cvs} does.
@c xref to update output.  Or File status?
@c Or some place else that
@c explains this whole "patch"/P/Needs Patch thing?

@c <en>@item dying gasps from @var{server} unexpected
@item dying gasps from @var{server} unexpected
@c <en>There is a known bug in the server for @sc{cvs} 1.9.18
@c <en>and older which can cause this.  For me, this was
@c <en>reproducible if I used the @samp{-t} global option.  It
@c <en>was fixed by Andy Piper's 14 Nov 1997 change to
@c <en>src/filesubr.c, if anyone is curious.
@c <en>If you see the message,
@c <en>you probably can just retry the operation which failed,
@c <en>or if you have discovered information concerning its
@c <en>cause, please let us know as described in @ref{BUGS}.
There is a known bug in the server for @sc{cvs} 1.9.18
and older which can cause this.  For me, this was
reproducible if I used the @samp{-t} global option.  It
was fixed by Andy Piper's 14 Nov 1997 change to
src/filesubr.c, if anyone is curious.
If you see the message,
you probably can just retry the operation which failed,
or if you have discovered information concerning its
cause, please let us know as described in @ref{Paus}.

@c <en>@item end of file from server (consult above messages if any)
@item end of file from server (consult above messages if any)
@c <en>The most common cause for this message is if you are
@c <en>using an external @code{rsh} program and it exited with
@c <en>an error.  In this case the @code{rsh} program should
@c <en>have printed a message, which will appear before the
@c <en>above message.  For more information on setting up a
@c <en>@sc{cvs} client and server, see @ref{Remote repositories}.
The most common cause for this message is if you are
using an external @code{rsh} program and it exited with
an error.  In this case the @code{rsh} program should
have printed a message, which will appear before the
above message.  For more information on setting up a
@sc{cvs} client and server, see @ref{Repositórios remotos}.

@c <en>@item cvs [update aborted]: EOF in key in RCS file @var{file},v
@item cvs [update aborted]: EOF in key in RCS file @var{file},v
@c <en>@itemx cvs [checkout aborted]: EOF while looking for end of string in RCS file @var{file},v
@itemx cvs [checkout aborted]: EOF while looking for end of string in RCS file @var{file},v
@c <en>This means that there is a syntax error in the given
@c <en>@sc{rcs} file.  Note that this might be true even if @sc{rcs} can
@c <en>read the file OK; @sc{cvs} does more error checking of
@c <en>errors in the RCS file.  That is why you may see this
@c <en>message when upgrading from @sc{cvs} 1.9 to @sc{cvs}
@c <en>1.10.  The likely cause for the original corruption is
@c <en>hardware, the operating system, or the like.  Of
@c <en>course, if you find a case in which @sc{cvs} seems to
@c <en>corrupting the file, by all means report it,
@c <en>(@pxref{BUGS}).
@c <en>There are quite a few variations of this error message,
@c <en>depending on exactly where in the @sc{rcs} file @sc{cvs}
@c <en>finds the syntax error.
This means that there is a syntax error in the given
@sc{rcs} file.  Note that this might be true even if @sc{rcs} can
read the file OK; @sc{cvs} does more error checking of
errors in the RCS file.  That is why you may see this
message when upgrading from @sc{cvs} 1.9 to @sc{cvs}
1.10.  The likely cause for the original corruption is
hardware, the operating system, or the like.  Of
course, if you find a case in which @sc{cvs} seems to
corrupting the file, by all means report it,
(@pxref{Paus}).
There are quite a few variations of this error message,
depending on exactly where in the @sc{rcs} file @sc{cvs}
finds the syntax error.

@cindex mkmodules
@item cvs commit: Executing 'mkmodules'
This means that your repository is set up for a version
of @sc{cvs} prior to @sc{cvs} 1.8.  When using @sc{cvs}
1.8 or later, the above message will be preceded by

@example
cvs commit: Rebuilding administrative file database
@end example

If you see both messages, the database is being rebuilt
twice, which is unnecessary but harmless.  If you wish
to avoid the duplication, and you have no versions of
@sc{cvs} 1.7 or earlier in use, remove @code{-i mkmodules}
every place it appears in your @code{modules}
file.  For more information on the @code{modules} file,
see @ref{modules}.

@c This message comes from "co", and I believe is
@c possible only with older versions of CVS which call
@c co.  The problem with being able to create the bogus
@c RCS file still exists, though (and I think maybe
@c there is a different symptom(s) now).
@c FIXME: Would be nice to have a more exact wording
@c for this message.
@item missing author
Typically this can happen if you created an RCS file
with your username set to empty.  @sc{cvs} will, bogusly,
create an illegal RCS file with no value for the author
field.  The solution is to make sure your username is
set to a non-empty value and re-create the RCS file.
@c "make sure your username is set" is complicated in
@c and of itself, as there are the environment
@c variables the system login name, &c, and it depends
@c on the version of CVS.

@c <en>@item cvs [checkout aborted]: no such tag @var{tag}
@item cvs [checkout aborted]: no such tag @var{tag}
@c <en>This message means that @sc{cvs} isn't familiar with
@c <en>the tag @var{tag}.  Usually this means that you have
@c <en>mistyped a tag name; however there are (relatively
@c <en>obscure) cases in which @sc{cvs} will require you to
@c <en>@c Search sanity.sh for "no such tag" to see some of
@c <en>@c the relatively obscure cases.
@c <en>try a few other @sc{cvs} commands involving that tag,
@c <en>before you find one which will cause @sc{cvs} to update
This message means that @sc{cvs} isn't familiar with
the tag @var{tag}.  Usually this means that you have
mistyped a tag name; however there are (relatively
obscure) cases in which @sc{cvs} will require you to
@c Search sanity.sh for "no such tag" to see some of
@c the relatively obscure cases.
try a few other @sc{cvs} commands involving that tag,
before you find one which will cause @sc{cvs} to update
@c <en>@cindex CVSROOT/val-tags file, forcing tags into
@cindex CVSROOT/val-tags file, forcing tags into
@c <en>@cindex val-tags file, forcing tags into
@cindex val-tags file, forcing tags into
@c <en>the @file{val-tags} file; see discussion of val-tags in
@c <en>@ref{File permissions}.  You only need to worry about
@c <en>this once for a given tag; when a tag is listed in
@c <en>@file{val-tags}, it stays there.  Note that using
@c <en>@samp{-f} to not require tag matches does not override
@c <en>this check; see @ref{Common options}.
the @file{val-tags} file; see discussion of val-tags in
@ref{Permissões de arquivos}.  You only need to worry about
this once for a given tag; when a tag is listed in
@file{val-tags}, it stays there.  Note that using
@samp{-f} to not require tag matches does not override
this check; see @ref{Opções comuns}.

@c <en>@item *PANIC* administration files missing
@item *PANIC* administration files missing
@c <en>This typically means that there is a directory named
@c <en>@sc{cvs} but it does not contain the administrative files
@c <en>which @sc{cvs} puts in a CVS directory.  If the problem is
@c <en>that you created a CVS directory via some mechanism
@c <en>other than @sc{cvs}, then the answer is simple, use a name
@c <en>other than @sc{cvs}.  If not, it indicates a @sc{cvs} bug
@c <en>(@pxref{BUGS}).
This typically means that there is a directory named
@sc{cvs} but it does not contain the administrative files
which @sc{cvs} puts in a CVS directory.  If the problem is
that you created a CVS directory via some mechanism
other than @sc{cvs}, then the answer is simple, use a name
other than @sc{cvs}.  If not, it indicates a @sc{cvs} bug
(@pxref{Paus}).

@item rcs error: Unknown option: -x,v/
This message will be followed by a usage message for
@sc{rcs}.  It means that you have an old version of
@sc{rcs} (probably supplied with your operating
system), as well as an old version of @sc{cvs}.
@sc{cvs} 1.9.18 and earlier only work with @sc{rcs} version 5 and
later; current versions of @sc{cvs} do not run @sc{rcs} programs.
@c For more information on installing @sc{cvs}, see
@c (FIXME: where?  it depends on whether you are
@c getting binaries or sources or what).
@c The message can also say "ci error" or something
@c instead of "rcs error", I suspect.

@c <en>@item cvs [server aborted]: received broken pipe signal
@item cvs [server aborted]: received broken pipe signal
@c <en>This message seems to be caused by a hard-to-track-down
@c <en>bug in @sc{cvs} or the systems it runs on (we don't
@c <en>know---we haven't tracked it down yet!).  It seems to
@c <en>happen only after a @sc{cvs} command has completed, and
@c <en>you should be able to just ignore the message.
@c <en>However, if you have discovered information concerning its
@c <en>cause, please let us know as described in @ref{BUGS}.
This message seems to be caused by a hard-to-track-down
bug in @sc{cvs} or the systems it runs on (we don't
know---we haven't tracked it down yet!).  It seems to
happen only after a @sc{cvs} command has completed, and
you should be able to just ignore the message.
However, if you have discovered information concerning its
cause, please let us know as described in @ref{Paus}.

@item 'root' is not allowed to commit files
When committing a permanent change, @sc{cvs} makes a log entry of
who committed the change.  If you are committing the change logged
in as "root" (not under "su" or other root-priv giving program),
@sc{cvs} cannot determine who is actually making the change.
As such, by default, @sc{cvs} disallows changes to be committed by users
logged in as "root".  (You can disable this option by passing the
@code{--enable-rootcommit} option to @file{configure} and recompiling @sc{cvs}.
On some systems this means editing the appropriate @file{config.h} file
before building @sc{cvs}.)

@item Too many arguments!
This message is typically printed by the @file{log.pl}
script which is in the @file{contrib} directory in the
@sc{cvs} source distribution.  In some versions of
@sc{cvs}, @file{log.pl} has been part of the default
@sc{cvs} installation.  The @file{log.pl} script gets
called from the @file{loginfo} administrative file.
Check that the arguments passed in @file{loginfo} match
what your version of @file{log.pl} expects.  In
particular, the @file{log.pl} from @sc{cvs} 1.3 and
older expects the logfile as an argument whereas the
@file{log.pl} from @sc{cvs} 1.5 and newer expects the
logfile to be specified with a @samp{-f} option.  Of
course, if you don't need @file{log.pl} you can just
comment it out of @file{loginfo}.

@item cvs [update aborted]: unexpected EOF reading @var{file},v
See @samp{EOF in key in RCS file}.

@c <en>@item cvs [login aborted]: unrecognized auth response from @var{server}
@item cvs [login aborted]: unrecognized auth response from @var{server}
@c <en>This message typically means that the server is not set
@c <en>up properly.  For example, if @file{inetd.conf} points
@c <en>to a nonexistent cvs executable.  To debug it further,
@c <en>find the log file which inetd writes
@c <en>(@file{/var/log/messages} or whatever inetd uses on
@c <en>your system).  For details, see @ref{Connection}, and
@c <en>@ref{Password authentication server}.
This message typically means that the server is not set
up properly.  For example, if @file{inetd.conf} points
to a nonexistent cvs executable.  To debug it further,
find the log file which inetd writes
(@file{/var/log/messages} or whatever inetd uses on
your system).  For details, see @ref{Conexão}, and
@ref{Servidor de autenticação por senha}.

@c <en>@item cvs commit: Up-to-date check failed for `@var{file}'
@item cvs commit: Up-to-date check failed for `@var{file}'
@c <en>This means that someone else has committed a change to
@c <en>that file since the last time that you did a @code{cvs
@c <en>update}.  So before proceeding with your @code{cvs
@c <en>commit} you need to @code{cvs update}.  @sc{cvs} will merge
@c <en>the changes that you made and the changes that the
@c <en>other person made.  If it does not detect any conflicts
@c <en>it will report @samp{M @var{file}} and you are ready
@c <en>to @code{cvs commit}.  If it detects conflicts it will
@c <en>print a message saying so, will report @samp{C @var{file}},
@c <en>and you need to manually resolve the
@c <en>conflict.  For more details on this process see
@c <en>@ref{Conflicts example}.
This means that someone else has committed a change to
that file since the last time that you did a @code{cvs
update}.  So before proceeding with your @code{cvs
commit} you need to @code{cvs update}.  @sc{cvs} will merge
the changes that you made and the changes that the
other person made.  If it does not detect any conflicts
it will report @samp{M @var{file}} and you are ready
to @code{cvs commit}.  If it detects conflicts it will
print a message saying so, will report @samp{C @var{file}},
and you need to manually resolve the
conflict.  For more details on this process see
@ref{Exemplo de conflitos}.

@item Usage:	diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 file2 file3
@example
Only one of [exEX3] allowed
@end example
This indicates a problem with the installation of
@code{diff3} and @code{rcsmerge}.  Specifically
@code{rcsmerge} was compiled to look for GNU diff3, but
it is finding unix diff3 instead.  The exact text of
the message will vary depending on the system.  The
simplest solution is to upgrade to a current version of
@sc{cvs}, which does not rely on external
@code{rcsmerge} or @code{diff3} programs.

@item warning: unrecognized response `@var{text}' from cvs server
If @var{text} contains a valid response (such as
@samp{ok}) followed by an extra carriage return
character (on many systems this will cause the second
part of the message to overwrite the first part), then
it probably means that you are using the @samp{:ext:}
access method with a version of rsh, such as most
non-unix rsh versions, which does not by default
provide a transparent data stream.  In such cases you
probably want to try @samp{:server:} instead of
@samp{:ext:}.  If @var{text} is something else, this
may signify a problem with your @sc{cvs} server.
Double-check your installation against the instructions
for setting up the @sc{cvs} server.
@c FIXCVS: should be printing CR as \r or \015 or some
@c such, probably.

@c <en>@item cvs commit: [@var{time}] waiting for @var{user}'s lock in @var{directory}
@item cvs commit: [@var{time}] waiting for @var{user}'s lock in @var{directory}
@c <en>This is a normal message, not an error.  See
@c <en>@ref{Concurrency}, for more details.
This is a normal message, not an error.  See
@ref{Concorrência}, for more details.

@item cvs commit: warning: editor session failed
@cindex Exit status, of editor
This means that the editor which @sc{cvs} is using exits with a nonzero
exit status.  Some versions of vi will do this even when there was not
a problem editing the file.  If so, point the
@code{CVSEDITOR} environment variable to a small script
such as:

@example
#!/bin/sh
vi $*
exit 0
@end example

@c "warning: foo was lost" and "no longer pertinent" (both normal).
@c Would be nice to write these up--they are
@c potentially confusing for the new user.
@end table

@c <en>@node Connection
@node Conexão
@c <en>@appendixsec Trouble making a connection to a CVS server
@appendixsec Trouble making a connection to a CVS server

This section concerns what to do if you are having
trouble making a connection to a @sc{cvs} server.  If
you are running the @sc{cvs} command line client
running on Windows, first upgrade the client to
@sc{cvs} 1.9.12 or later.  The error reporting in
earlier versions provided much less information about
what the problem was.  If the client is non-Windows,
@sc{cvs} 1.9 should be fine.

If the error messages are not sufficient to track down
the problem, the next steps depend largely on which
access method you are using.

@table @code
@cindex :ext:, troubleshooting
@item :ext:
Try running the rsh program from the command line.  For
example: "rsh servername cvs -v" should print @sc{cvs}
version information.  If this doesn't work, you need to
fix it before you can worry about @sc{cvs} problems.

@cindex :server:, troubleshooting
@item :server:
You don't need a command line rsh program to use this
access method, but if you have an rsh program around,
it may be useful as a debugging tool.  Follow the
directions given for :ext:.

@cindex :pserver:, troubleshooting
@item :pserver:
Errors along the lines of "connection refused" typically indicate
that inetd isn't even listening for connections on port 2401
whereas errors like "connection reset by peer",
"received broken pipe signal", "recv() from server: EOF",
or "end of file from server"
typically indicate that inetd is listening for
connections but is unable to start @sc{cvs} (this is frequently
caused by having an incorrect path in @file{inetd.conf}
or by firewall software rejecting the connection).
"unrecognized auth response" errors are caused by a bad command
line in @file{inetd.conf}, typically an invalid option or forgetting
to put the @samp{pserver} command at the end of the line.
Another less common problem is invisible control characters that
your editor "helpfully" added without you noticing.

One good debugging tool is to "telnet servername
2401".  After connecting, send any text (for example
"foo" followed by return).  If @sc{cvs} is working
correctly, it will respond with

@example
cvs [pserver aborted]: bad auth protocol start: foo
@end example

If instead you get:

@example
Usage: cvs [cvs-options] command [command-options-and-arguments]
...
@end example

@noindent
then you're missing the @samp{pserver} command at the end of the
line in @file{inetd.conf}; check to make sure that the entire command
is on one line and that it's complete.

Likewise, if you get something like:

@example
Unknown command: `pserved'

CVS commands are:
        add          Add a new file/directory to the repository
...
@end example

@noindent
then you've misspelled @samp{pserver} in some way.  If it isn't
obvious, check for invisible control characters (particularly
carriage returns) in @file{inetd.conf}.

If it fails to work at all, then make sure inetd is working
right.  Change the invocation in @file{inetd.conf} to run the
echo program instead of cvs.  For example:

@example
2401  stream  tcp  nowait  root /bin/echo echo hello
@end example

After making that change and instructing inetd to
re-read its configuration file, "telnet servername
2401" should show you the text hello and then the
server should close the connection.  If this doesn't
work, you need to fix it before you can worry about
@sc{cvs} problems.

On AIX systems, the system will often have its own
program trying to use port 2401.  This is AIX's problem
in the sense that port 2401 is registered for use with
@sc{cvs}.  I hear that there is an AIX patch available
to address this problem.

Another good debugging tool is the @samp{-d}
(debugging) option to inetd.  Consult your system
documentation for more information.

If you seem to be connecting but get errors like:

@example
cvs server: cannot open /root/.cvsignore: Permission denied
cvs [server aborted]: can't chdir(/root): Permission denied
@end example

@noindent
then you probably haven't specified @samp{-f} in @file{inetd.conf}.
(In releases prior to @sc{cvs} 1.11.1, this problem can be caused by
your system setting the @code{$HOME} environment variable
for programs being run by inetd.  In this case, you can either
have inetd run a shell script that unsets @code{$HOME} and then runs
@sc{cvs}, or you can use @code{env} to run @sc{cvs} with a pristine
environment.)

If you can connect successfully for a while but then can't,
you've probably hit inetd's rate limit.
(If inetd receives too many requests for the same service
in a short period of time, it assumes that something is wrong
and temporarily disables the service.)
Check your inetd documentation to find out how to adjust the
rate limit (some versions of inetd have a single rate limit,
others allow you to set the limit for each service separately.)
@end table

@c <en>@node Other problems
@node Outros problemas
@c <en>@appendixsec Other common problems
@appendixsec Other common problems

Here is a list of problems which do not fit into the
above categories.  They are in no particular order.

@itemize @bullet
@item
@c <en>On Windows, if there is a 30 second or so delay when
@c <en>you run a @sc{cvs} command, it may mean that you have
@c <en>your home directory set to @file{C:/}, for example (see
@c <en>@code{HOMEDRIVE} and @code{HOMEPATH} in
@c <en>@ref{Environment variables}).  @sc{cvs} expects the home
@c <en>directory to not end in a slash, for example @file{C:}
@c <en>or @file{C:\cvs}.
On Windows, if there is a 30 second or so delay when
you run a @sc{cvs} command, it may mean that you have
your home directory set to @file{C:/}, for example (see
@code{HOMEDRIVE} and @code{HOMEPATH} in
@ref{Variáveis de ambiente}).  @sc{cvs} expects the home
directory to not end in a slash, for example @file{C:}
or @file{C:\cvs}.
@c FIXCVS: CVS should at least detect this and print an
@c error, presumably.

@item
@c <en>If you are running @sc{cvs} 1.9.18 or older, and
@c <en>@code{cvs update} finds a conflict and tries to
@c <en>merge, as described in @ref{Conflicts example}, but
@c <en>doesn't tell you there were conflicts, then you may
@c <en>have an old version of @sc{rcs}.  The easiest solution
@c <en>probably is to upgrade to a current version of
@c <en>@sc{cvs}, which does not rely on external @sc{rcs}
@c <en>programs.
If you are running @sc{cvs} 1.9.18 or older, and
@code{cvs update} finds a conflict and tries to
merge, as described in @ref{Exemplo de conflitos}, but
doesn't tell you there were conflicts, then you may
have an old version of @sc{rcs}.  The easiest solution
probably is to upgrade to a current version of
@sc{cvs}, which does not rely on external @sc{rcs}
programs.
@end itemize

@c ---------------------------------------------------------------------
@c <en>@node Credits
@node Créditos
@c <en>@appendix Credits
@appendix Créditos

@cindex Contributors (manual)
@cindex Credits (manual)
Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}>
wrote the manual pages which were distributed with
@sc{cvs} 1.3.  Much of their text was copied into this
manual.  He also read an early draft
of this manual and contributed many ideas and
corrections.

The mailing-list @code{info-cvs} is sometimes
informative. I have included information from postings
made by the following persons:
David G. Grubbs <@t{dgg@@think.com}>.

Some text has been extracted from the man pages for
@sc{rcs}.

The @sc{cvs} @sc{faq} by David G. Grubbs has provided
useful material.  The @sc{faq} is no longer maintained,
however, and this manual is about the closest thing there
is to a successor (with respect to documenting how to
use @sc{cvs}, at least).

In addition, the following persons have helped by
telling me about mistakes I've made:

@display
Roxanne Brunskill <@t{rbrunski@@datap.ca}>,
Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>,
Karl Pingle <@t{pingle@@acuson.com}>,
Thomas A Peterson <@t{tap@@src.honeywell.com}>,
Inge Wallin <@t{ingwa@@signum.se}>,
Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}>
and Michael Brown <@t{brown@@wi.extrel.com}>.
@end display

The list of contributors here is not comprehensive; for a more
complete list of who has contributed to this manual see
the file @file{doc/ChangeLog} in the @sc{cvs} source
distribution.

@c ---------------------------------------------------------------------
@c <en>@node BUGS
@node Paus
@c <en>@appendix Dealing with bugs in CVS or this manual
@appendix Dealing with bugs in CVS or this manual

@cindex Bugs in this manual or CVS
Neither @sc{cvs} nor this manual is perfect, and they
probably never will be.  If you are having trouble
using @sc{cvs}, or think you have found a bug, there
are a number of things you can do about it.  Note that
if the manual is unclear, that can be considered a bug
in the manual, so these problems are often worth doing
something about as well as problems with @sc{cvs} itself.

@cindex Reporting bugs
@cindex Bugs, reporting
@cindex Errors, reporting
@itemize @bullet
@item
If you want someone to help you and fix bugs that you
report, there are companies which will do that for a
fee.  One such company is:

@cindex Ximbiot
@cindex Support, getting CVS support
@example
Ximbiot
319 S. River St.
Harrisburg, PA  17104-1657
USA
Email: info@@ximbiot.com
Phone: (717) 579-6168
Fax:   (717) 234-3125
@url{http://ximbiot.com/}

@end example

@item
If you got @sc{cvs} through a distributor, such as an
operating system vendor or a vendor of freeware
@sc{cd-rom}s, you may wish to see whether the
distributor provides support.  Often, they will provide
no support or minimal support, but this may vary from
distributor to distributor.

@item
If you have the skills and time to do so, you may wish
to fix the bug yourself.  If you wish to submit your
fix for inclusion in future releases of @sc{cvs}, see
the file @sc{hacking} in the @sc{cvs} source
distribution.  It contains much more information on the
process of submitting fixes.

@item
There may be resources on the net which can help.  Two
good places to start are:

@example
@url{http://cvs.nongnu.org/}
@end example

If you are so inspired, increasing the information
available on the net is likely to be appreciated.  For
example, before the standard @sc{cvs} distribution
worked on Windows 95, there was a web page with some
explanation and patches for running @sc{cvs} on Windows
95, and various people helped out by mentioning this
page on mailing lists or newsgroups when the subject
came up.

@item
It is also possible to report bugs to @email{bug-cvs@@nongnu.org}.
Note that someone may or may not want to do anything
with your bug report---if you need a solution consider
one of the options mentioned above.  People probably do
want to hear about bugs which are particularly severe
in consequences and/or easy to fix, however.  You can
also increase your odds by being as clear as possible
about the exact nature of the bug and any other
relevant information.  The way to report bugs is to
send email to @email{bug-cvs@@nongnu.org}.  Note
that submissions to @email{bug-cvs@@nongnu.org} may be distributed
under the terms of the @sc{gnu} Public License, so if
you don't like this, don't submit them.  There is
usually no justification for sending mail directly to
one of the @sc{cvs} maintainers rather than to
@email{bug-cvs@@nongnu.org}; those maintainers who want to hear
about such bug reports read @email{bug-cvs@@nongnu.org}.  Also note
that sending a bug report to other mailing lists or
newsgroups is @emph{not} a substitute for sending it to
@email{bug-cvs@@nongnu.org}.  It is fine to discuss @sc{cvs} bugs on
whatever forum you prefer, but there are not
necessarily any maintainers reading bug reports sent
anywhere except @email{bug-cvs@@nongnu.org}.
@end itemize

@cindex Known bugs in this manual or CVS
People often ask if there is a list of known bugs or
whether a particular bug is a known one.  The file
@sc{bugs} in the @sc{cvs} source distribution is one
list of known bugs, but it doesn't necessarily try to
be comprehensive.  Perhaps there will never be a
comprehensive, detailed list of known bugs.

@c ---------------------------------------------------------------------
@c <en>@node Index
@node Indice
@c <en>@unnumbered Index
@unnumbered Índice
@c <en>@cindex Index
@cindex Índice

@printindex cp

@summarycontents

@contents

@bye

Local Variables:
fill-column: 55
End:
