\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 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 This info manual describes how to use and administer
Esta página manual ensina a como usar e administrar o
@c @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 * Overview:: An introduction to CVS
* Visão Geral:: Uma introdução ao CVS
@c * Repository:: Where all your sources are stored
* Repositório:: Onde todos os seus fontes são guardados
@c * Starting a new project:: Starting a project with CVS
* Começando um novo projeto:: Começando um projeto com CVS
@c * Revisions:: Numeric and symbolic names for revisions
* Revisões:: Nomes numéricos e simbólicos para revisões
@c * Branching and merging:: Diverging/rejoining branches of development
* Ramificando e mesclando:: Divergindo/reunindo ramos de desenvolvimento
@c * Recursive behavior:: CVS descends directories
* Comportamento recursivo:: CVS adentra nos diretórios
@c * Adding and removing:: Adding/removing/renaming files/directories
* Adicionando e removendo:: Adicionando/apagando/renomeando arquivos/diretórios
@c * 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 CVS and the Real World.
CVS e o mundo Real.
-----------------------
@c * Binary files:: CVS can handle binary files
* Arquivos binários:: CVS pode lidar com arquivos binários
@c * Multiple developers:: How CVS helps a group of developers
* Múltiplos desenvolvedores:: Como CVS ajuda um grupo de desenvolvedores
@c * Revision management:: Policy questions for revision management
* Gerenciamento de revisões:: Questões de política para gerenciamento de revisões
@c * Keyword substitution:: CVS can include the revision inside the file
* Substituição de palavra-chave:: CVS inclui a revisão dentro do arquivo
@c * Tracking sources:: Tracking third-party sources
* Acompanhando fontes:: Acompanhando fontes de terceiros
@c * Builds:: Issues related to CVS and builds
* Builds:: Issues related to CVS and builds
@c * Special Files:: Devices, links and other non-regular files
* Arquivos especiais:: Dispositivos, ligações e outros arquivos diferentes
@c References.
Referências.
-----------
@c * CVS commands:: CVS commands share some things
* Comandos do CVS:: Comandos do CVS têm algo em comum
@c * Invoking CVS:: Quick reference to CVS commands
* Chamando o CVS:: Referência rápida aos comandos do CVS
@c * Administrative files:: Reference manual for the Administrative files
* Arquivos administrativos:: Manual de referência para os arquivos administrativos
@c * Environment variables:: All environment variables which affect CVS
* Variáveis de ambiente:: Todas as variáveis de ambiente que afetam o CVS
@c * Compatibility:: Upgrading CVS versions
* Compatibilidade:: Upgrading CVS versions
@c * Troubleshooting:: Some tips when nothing works
* Resolução de problemas:: Algumas dicas quando nada funciona
@c * Credits:: Some of the contributors to this manual
* Créditos:: Alguns dos contribuidores deste manual
@c * BUGS:: Dealing with bugs in CVS or this manual
* Paus:: Lidando com paus no CVS ou neste manual
@c * Index:: Index
* Indice:: Índice
@end menu
@c ---------------------------------------------------------------------
@c @node Overview
@c @chapter Overview
@c @cindex Overview
@node Visão Geral
@chapter Visão Geral
@cindex Visão Geral
@c This chapter is for people who have never used
@c @sc{cvs}, and perhaps have never used version control
@c 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 If you are already familiar with @sc{cvs} and are just
@c trying to learn a particular feature or remember a
@c 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 * What is CVS?:: What you can do with @sc{cvs}
* O que é CVS?:: O que você pode fazer com @sc{cvs}
@c * 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 * 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 @node What is CVS?
@c @section What is CVS?
@c @cindex What is CVS?
@c @cindex Introduction to CVS
@c @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 @sc{cvs} is a version control system. Using it, you can
@c 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 For example, bugs sometimes creep in when
@c software is modified, and you might not detect the bug
@c until a long time after you make the modification.
@c With @sc{cvs}, you can easily retrieve old versions to see
@c exactly which change caused the bug. This can
@c 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 You could of course save every version of every file
@c you have ever created. This would
@c however waste an enormous amount of disk space. @sc{cvs}
@c stores all the versions of a file in a single file in a
@c clever way that only stores the differences between
@c 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 @sc{cvs} also helps you if you are part of a group of people working
@c on the same project. It is all too easy to overwrite
@c each others' changes unless you are extremely careful.
@c Some editors, like @sc{gnu} Emacs, try to make sure that
@c the same file is never modified by two people at the
@c same time. Unfortunately, if someone is using another
@c editor, that safeguard will not work. @sc{cvs} solves this problem
@c by insulating the different developers from each other. Every
@c developer works in his own directory, and @sc{cvs} merges
@c 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 @cindex History of CVS
@cindex História do CVS
@c @cindex CVS, history of
@cindex CVS, história do
@c @cindex Credits (CVS program)
@cindex Créditos (programa CVS)
@c @cindex Contributors (CVS program)
@cindex Contribuidores (programa CVS)
@c @sc{cvs} started out as a bunch of shell scripts written by
@c Dick Grune, posted to the newsgroup
@c @code{comp.sources.unix} in the volume 6
@c release of July, 1986. While no actual code from
@c these shell scripts is present in the current version
@c of @sc{cvs} much of the @sc{cvs} conflict resolution algorithms
@c 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 In April, 1989, Brian Berliner designed and coded @sc{cvs}.
@c Jeff Polk later helped Brian with the design of the @sc{cvs}
@c 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 @cindex Source, getting CVS source
@cindex Fontes, adquirindo os fontes do CVS
@c You can get @sc{cvs} in a variety of ways, including
@c free download from the internet. For more information
@c 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 @cindex Mailing list
@cindex Lista de Discussão
@c @cindex List, mailing list
@cindex Lista, lista de discussão
@c @cindex Newsgroups
@cindex Newsgroups
@c There is a mailing list, known as @email{info-cvs@@nongnu.org},
@c devoted to @sc{cvs}. To subscribe or
@c unsubscribe
@c write to
@c @email{info-cvs-request@@nongnu.org}.
@c If you prefer a usenet group, there is a one-way mirror (posts to the email
@c list are usually sent to the news group, but not visa versa) of
@c @email{info-cvs@@nongnu.org} at @url{news:gnu.cvs.help}. The right
@c usenet group for posts is @url{news:comp.software.config-mgmt} which is for
@c @sc{cvs} discussions (along with other configuration
@c management systems). In the future, it might be
@c possible to create a
@c @code{comp.software.config-mgmt.cvs}, but probably only
@c if there is sufficient @sc{cvs} traffic on
@c @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 You can also subscribe to the @email{bug-cvs@@nongnu.org} mailing list,
@c described in more detail in @ref{BUGS}. To subscribe
@c send mail to @email{bug-cvs-request@@nongnu.org}. There is a two-way
@c usenet mirror (posts to the usenet group are usually sent to the email list and
@c 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 @node What is CVS not?
@node O que CVS não é?
@c @section What is CVS not?
@section O que CVS não é?
@c @cindex What is CVS not?
@cindex O que CVS não é?
@c @sc{cvs} can do a lot of things for you, but it does
@c 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 @item @sc{cvs} is not a build system.
@item @sc{cvs} não é um sistema de construção (build system).
@c Though the structure of your repository and modules
@c file interact with your build system
@c (e.g. @file{Makefile}s), they are essentially
@c 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 @sc{cvs} does not dictate how you build anything. It
@c merely stores files for retrieval in a tree structure
@c 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 @sc{cvs} does not dictate how to use disk space in the
@c checked out working directories. If you write your
@c @file{Makefile}s or scripts in every directory so they
@c have to know the relative positions of everything else,
@c you wind up requiring the entire repository to be
@c 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 If you modularize your work, and construct a build
@c system that will share files (via links, mounts,
@c @code{VPATH} in @file{Makefile}s, etc.), you can
@c 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 But you have to remember that @emph{any} such system is
@c a lot of work to construct and maintain. @sc{cvs} does
@c 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 Of course, you should place the tools created to
@c support such a build system (scripts, @file{Makefile}s,
@c 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 Figuring out what files need to be rebuilt when
@c something changes is, again, something to be handled
@c outside the scope of @sc{cvs}. One traditional
@c approach is to use @code{make} for building, and use
@c some automated tool for generating the dependencies which
@c @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 Veja em @ref{Builds}, for more information on doing builds
@c in conjunction with @sc{cvs}.
See @ref{Builds}, para mais informações sobre
construção com @sc{cvs}.
@c @item @sc{cvs} is not a substitute for management.
@item @sc{cvs} não substitui gerenciamento.
@c Your managers and project leaders are expected to talk
@c to you frequently enough to make certain you are aware
@c of schedules, merge points, branch names and release
@c 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 @sc{cvs} is an instrument for making sources dance to
@c your tune. But you are the piper and the composer. No
@c 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 @item @sc{cvs} is not a substitute for developer communication.
@item @sc{cvs} não é um substituto para comunicação entre desenvolvedores.
@c When faced with conflicts within a single file, most
@c developers manage to resolve them without too much
@c effort. But a more general definition of ``conflict''
@c includes problems too difficult to solve without
@c 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 @sc{cvs} cannot determine when simultaneous changes
@c within a single file, or across a whole collection of
@c files, will logically conflict with one another. Its
@c concept of a @dfn{conflict} is purely textual, arising
@c when two changes to the same base file are near enough
@c 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 @sc{cvs} does not claim to help at all in figuring out
@c 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 For example: Say you change the arguments to function
@c @code{X} defined in file @file{A}. At the same time,
@c someone edits file @file{B}, adding new calls to
@c function @code{X} using the old arguments. You are
@c 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 Acquire the habit of reading specs and talking to your
@c peers.
Adquira o hábito de ler documentação e conversar com
seus parceiros.
@c @item @sc{cvs} does not have change control
@item @sc{cvs} não tem controle de mudanças
@c Change control refers to a number of things. First of
@c all it can mean @dfn{bug-tracking}, that is being able
@c to keep a database of reported bugs and the status of
@c each one (is it fixed? in what release? has the bug
@c submitter agreed that it is fixed?). For interfacing
@c @sc{cvs} to an external bug-tracking system, see the
@c @file{rcsinfo} and @file{verifymsg} files
@c (@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 Another aspect of change control is keeping track of
@c the fact that changes to several files were in fact
@c changed together as one logical change. If you check
@c in several files in a single @code{cvs commit}
@c operation, @sc{cvs} then forgets that those files were
@c checked in together, and the fact that they have the
@c same log message is the only thing tying them
@c together. Keeping a @sc{gnu} style @file{ChangeLog}
@c 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 Another aspect of change control, in some systems, is
@c the ability to keep track of the status of each
@c change. Some changes have been written by a developer,
@c others have been reviewed by a second developer, and so
@c on. Generally, the way to do this with @sc{cvs} is to
@c generate a diff (using @code{cvs diff} or @code{diff})
@c and email it to someone who can then apply it using the
@c @code{patch} utility. This is very flexible, but
@c depends on mechanisms outside @sc{cvs} to make sure
@c 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 @item @sc{cvs} is not an automated testing program
@item @sc{cvs} não é um programa de testes automático
@c It should be possible to enforce mandatory use of a
@c testsuite using the @code{commitinfo} file. I haven't
@c heard a lot about projects trying to do that or whether
@c 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 @item @sc{cvs} does not have a builtin process model
@item @sc{cvs} não tem um modelo de processo inerente
@c Some systems provide ways to ensure that changes or
@c releases go through various steps, with various
@c approvals as needed. Generally, one can accomplish
@c this with @sc{cvs} but it might be a little more work.
@c In some cases you'll want to use the @file{commitinfo},
@c @file{loginfo}, @file{rcsinfo}, or @file{verifymsg}
@c files, to require that certain steps be performed
@c before cvs will allow a checkin. Also consider whether
@c features such as branches and tags can be used to
@c perform tasks such as doing work in a development tree
@c and then merging certain changes over to a stable tree
@c 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 @node A sample session
@node Uma sessão de exemplo
@c @section A sample session
@section Uma sessão de exemplo
@c @cindex Example of a work-session
@cindex Exemplo de uma sessão de trabalho
@c @cindex Getting started
@cindex Iniciando
@c @cindex Work-session, example of
@cindex Sessão de trabalho, exemplo de uma
@c @cindex tc, Trivial Compiler (example)
@cindex tc, Trivial Compiler (Compilador trivial) (exemplo)
@c @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 As a way of introducing @sc{cvs}, we'll go through a
@c typical work-session using @sc{cvs}. The first thing
@c to understand is that @sc{cvs} stores all files in a
@c centralized @dfn{repository} (@pxref{Repository}); this
@c 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 Suppose you are working on a simple compiler. The source
@c consists of a handful of C files and a @file{Makefile}.
@c The compiler is called @samp{tc} (Trivial Compiler),
@c and the repository is set up so that there is a module
@c 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 * Getting the source:: Creating a workspace
* Obtendo os fontes:: Criando uma área de trabalho
@c * Committing your changes:: Making your work available to others
* Efetivando suas alterações:: Disponibilizando seu trabalho para outros
@c * Cleaning up:: Cleaning up
* Limpando:: Limpando
@c * Viewing differences:: Viewing differences
* Vendo as diferenças:: Vendo as diferenças
@end menu
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@c @node Getting the source
@node Obtendo os fontes
@c @subsection Getting the source
@subsection Obtendo os fontes
@c @cindex Getting the source
@cindex Obtendo os fontes
@c @cindex Checking out source
@cindex Pegando emprestado os fontes
@c @cindex Fetching source
@cindex Recuperando os fontes
@c @cindex Source, getting from CVS
@cindex Fonte, pegando do CVS
@c @cindex Checkout, example
@cindex Checkout, exemplo
@c The first thing you must do is to get your own working copy of the
@c 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 This will create a new directory called @file{tc} and populate it with
@c 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