1\input texinfo @c -*-texinfo-*- 2@comment Documentation for CVS. 3@setfilename cvs.info 4@macro copyleftnotice 5@noindent 6Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 7 2001, 2002, 2003 Free Software Foundation, Inc. 8 9@multitable @columnfractions .12 .88 10@item Portions 11@item @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Derek R. Price, 12@item @tab Copyright @copyright{} 2002, 2003 Ximbiot @url{http://ximbiot.com}, 13@item @tab Copyright @copyright{} 1992, 1993, 1999 Signum Support AB, 14@item @tab and Copyright @copyright{} others. 15@end multitable 16 17@ignore 18Permission is granted to process this file through Tex and print the 19results, provided the printed document carries copying permission 20notice identical to this one except for the removal of this paragraph 21(this paragraph not being relevant to the printed manual). 22 23@end ignore 24Permission is granted to make and distribute verbatim copies of 25this manual provided the copyright notice and this permission notice 26are preserved on all copies. 27 28Permission is granted to copy and distribute modified versions of this 29manual under the conditions for verbatim copying, provided also that the 30entire resulting derived work is distributed under the terms of a 31permission notice identical to this one. 32 33Permission is granted to copy and distribute translations of this manual 34into another language, under the above conditions for modified versions, 35except that this permission notice may be stated in a translation 36approved by the Free Software Foundation. 37@end macro 38 39@comment This file is part of the CVS distribution. 40 41@comment CVS is free software; you can redistribute it and/or modify 42@comment it under the terms of the GNU General Public License as published by 43@comment the Free Software Foundation; either version 2, or (at your option) 44@comment any later version. 45 46@comment CVS is distributed in the hope that it will be useful, 47@comment but WITHOUT ANY WARRANTY; without even the implied warranty of 48@comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 49@comment GNU General Public License for more details. 50 51@c See ../README for A4 vs. US letter size. 52@c When we provided A4 postscript, and people tried to 53@c print it on US letter, the usual complaint was that the 54@c page numbers would get cut off. 55@c If one prints US letter on A4, reportedly there is 56@c some extra space at the top and/or bottom, and the side 57@c margins are a bit narrow, but no text is lost. 58@c 59@c See 60@c http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html 61@c for more on paper sizes. Insuring that margins are 62@c big enough to print on either A4 or US letter does 63@c indeed seem to be the usual approach (RFC2346). 64 65@c This document seems to get overfull hboxes with some 66@c frequency (probably because the tendency is to 67@c sanity-check it with "make info" and run TeX less 68@c often). The big ugly boxes just seem to add insult 69@c to injury, and I'm not aware of them helping to fix 70@c the overfull hboxes at all. 71@finalout 72 73@c ???@include version.texi??? 74@settitle CVS---Concurrent Versions System v@c ???@value{VERSION}??? 75@setchapternewpage odd 76 77@c -- TODO list: 78@c -- Fix all lines that match "^@c -- " 79@c -- Also places marked with FIXME should be manual 80@c problems (as opposed to FIXCVS for CVS problems). 81 82@c @splitrcskeyword{} is used to avoid keyword expansion. It is replaced by 83@c @asis when generating info and dvi, and by <i></i> in the generated html, 84@c such that keywords are not expanded in the generated html. 85@ifnothtml 86@macro splitrcskeyword {arg} 87@asis{}\arg\ 88@end macro 89@end ifnothtml 90 91@ifhtml 92@macro splitrcskeyword {arg} 93@i{}\arg\ 94@end macro 95@end ifhtml 96 97@dircategory GNU Packages 98@direntry 99* CVS: (cvs). Concurrent Versions System 100@end direntry 101@dircategory Individual utilities 102@direntry 103* cvs: (cvs)CVS commands. Concurrent Versions System 104@end direntry 105 106@comment The titlepage section does not appear in the Info file. 107@titlepage 108@sp 4 109@comment The title is printed in a large font. 110@center @titlefont{Version Management} 111@sp 112@center @titlefont{with} 113@sp 114@center @titlefont{CVS} 115@sp 2 116@center for @sc{cvs} @c ???@value{VERSION}??? 117@comment -release- 118@sp 3 119@center Per Cederqvist et al 120 121@comment The following two commands start the copyright page 122@comment for the printed manual. This will not appear in the Info file. 123@page 124@vskip 0pt plus 1filll 125@copyleftnotice 126@end titlepage 127 128@comment ================================================================ 129@comment The real text starts here 130@comment ================================================================ 131 132@ifnottex 133@c --------------------------------------------------------------------- 134@node Top 135@top 136 137@c <en> This info manual describes how to use and administer 138Esta p�gina manual ensina a como usar e administrar o 139@c <en> @sc{cvs} version @value{VERSION}. 140@sc{cvs} vers�o @c ???@value{VERSION}???. 141@end ifnottex 142 143@ifinfo 144@copyleftnotice 145@end ifinfo 146 147@c This menu is pretty long. Not sure how easily that 148@c can be fixed (no brilliant ideas right away)... 149@menu 150@c <en>* Overview:: An introduction to CVS 151* Vis�o Geral:: Uma introdu��o ao CVS 152@c <en>* Repository:: Where all your sources are stored 153* Reposit�rio:: Onde todos os seus fontes s�o guardados 154@c <en>* Starting a new project:: Starting a project with CVS 155* Come�ando um novo projeto:: Come�ando um projeto com CVS 156@c <en>* Revisions:: Numeric and symbolic names for revisions 157* Revis�es:: Nomes num�ricos e simb�licos para revis�es 158@c <en>* Branching and merging:: Diverging/rejoining branches of development 159* Ramificando e mesclando:: Divergindo/reunindo ramos de desenvolvimento 160@c <en>* Recursive behavior:: CVS descends directories 161* Comportamento recursivo:: CVS adentra nos diret�rios 162@c <en>* Adding and removing:: Adding/removing/renaming files/directories 163* Adicionando e removendo:: Adicionando/apagando/renomeando arquivos/diret�rios 164@c <en>* History browsing:: Viewing the history of files in various ways 165* Navega��o no Hist�rico:: Vendo o hist�rico dos arquivos de v�rias formas 166 167@c <en>CVS and the Real World. 168CVS e o mundo Real. 169----------------------- 170@c <en>* Binary files:: CVS can handle binary files 171* Arquivos bin�rios:: CVS pode lidar com arquivos bin�rios 172@c <en>* Multiple developers:: How CVS helps a group of developers 173* M�ltiplos desenvolvedores:: Como CVS ajuda um grupo de desenvolvedores 174@c <en>* Revision management:: Policy questions for revision management 175* Gerenciamento de revis�es:: Quest�es de pol�tica para gerenciamento de revis�es 176@c <en>* Keyword substitution:: CVS can include the revision inside the file 177* Substitui��o de palavra-chave:: CVS inclui a revis�o dentro do arquivo 178@c <en>* Tracking sources:: Tracking third-party sources 179* Acompanhando fontes:: Acompanhando fontes de terceiros 180@c <en>* Builds:: Issues related to CVS and builds 181* Builds:: Issues related to CVS and builds 182@c <en>* Special Files:: Devices, links and other non-regular files 183* Arquivos especiais:: Dispositivos, liga��es e outros arquivos diferentes 184 185@c <en>References. 186Refer�ncias. 187----------- 188@c <en>* CVS commands:: CVS commands share some things 189* Comandos do CVS:: Comandos do CVS t�m algo em comum 190@c <en>* Invoking CVS:: Quick reference to CVS commands 191* Chamando o CVS:: Refer�ncia r�pida aos comandos do CVS 192@c <en>* Administrative files:: Reference manual for the Administrative files 193* Arquivos administrativos:: Manual de refer�ncia para os arquivos administrativos 194@c <en>* Environment variables:: All environment variables which affect CVS 195* Vari�veis de ambiente:: Todas as vari�veis de ambiente que afetam o CVS 196@c <en>* Compatibility:: Upgrading CVS versions 197* Compatibilidade:: Upgrading CVS versions 198@c <en>* Troubleshooting:: Some tips when nothing works 199* Resolu��o de problemas:: Algumas dicas quando nada funciona 200@c <en>* Credits:: Some of the contributors to this manual 201* Cr�ditos:: Alguns dos contribuidores deste manual 202@c <en>* BUGS:: Dealing with bugs in CVS or this manual 203* Paus:: Lidando com paus no CVS ou neste manual 204@c <en>* Index:: Index 205* Indice:: �ndice 206@end menu 207 208@c --------------------------------------------------------------------- 209@c <en>@node Overview 210@c <en>@chapter Overview 211@c <en>@cindex Overview 212@node Vis�o Geral 213@chapter Vis�o Geral 214@cindex Vis�o Geral 215 216@c <en>This chapter is for people who have never used 217@c <en>@sc{cvs}, and perhaps have never used version control 218@c <en>software before. 219Este cap�tulo � para aqueles que nunca usaram o 220@sc{cvs} antes, e talvez nunca tenham usado um programa 221de controle de vers�es antes. 222 223@c <en>If you are already familiar with @sc{cvs} and are just 224@c <en>trying to learn a particular feature or remember a 225@c <en>certain command, you can probably skip everything here. 226Se voc� j� conhece o @sc{cvs} e est� apenas tentando 227aprender sobre uma habilidade em particular ou lembrar 228um certo comando, voc� provavelmente pode pular tudo 229aqui. 230 231@menu 232@c <en>* What is CVS?:: What you can do with @sc{cvs} 233* O que � CVS?:: O que voc� pode fazer com @sc{cvs} 234@c <en>* What is CVS not?:: Problems @sc{cvs} doesn't try to solve 235* O que CVS n�o �?:: Problemas que o @sc{cvs} n�o tenta resolver 236@c <en>* A sample session:: A tour of basic @sc{cvs} usage 237* Uma sess�o de exemplo:: Um tour pelo uso b�sico do @sc{cvs} 238@end menu 239 240@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 241@c <en>@node What is CVS? 242@c <en>@section What is CVS? 243@c <en>@cindex What is CVS? 244@c <en>@cindex Introduction to CVS 245@c <en>@cindex CVS, introduction to 246@node O que � CVS? 247@section O que � CVS? 248@cindex O que � CVS? 249@cindex Introdu��o ao CVS 250@cindex CVS, introdu��o ao 251 252@c <en>@sc{cvs} is a version control system. Using it, you can 253@c <en>record the history of your source files. 254@sc{cvs} � um sistema de controle de vers�es. Ao 255us�-lo, voc� pode registrar a hist�ria dos seus c�digos 256fonte. 257 258@c -- /// 259@c -- ///Those who cannot remember the past are condemned to repeat it. 260@c -- /// -- George Santayana 261@c -- ////// 262 263@c -- Insert history quote here! 264@c <en>For example, bugs sometimes creep in when 265@c <en>software is modified, and you might not detect the bug 266@c <en>until a long time after you make the modification. 267@c <en>With @sc{cvs}, you can easily retrieve old versions to see 268@c <en>exactly which change caused the bug. This can 269@c <en>sometimes be a big help. 270Por exemplo, �s vezes aparecem erros quando um programa 271� modificado e voc� n�o detecta o problema at� muito 272tempo depois de voc� ter feito a modifica��o. Com 273@sc{cvs}, voc� pode recuperar vers�es antigas para ver 274exatamente o que causou o erro. Isto �s vezes � de 275grande ajuda. 276 277@c <en>You could of course save every version of every file 278@c <en>you have ever created. This would 279@c <en>however waste an enormous amount of disk space. @sc{cvs} 280@c <en>stores all the versions of a file in a single file in a 281@c <en>clever way that only stores the differences between 282@c <en>versions. 283Voc� pode, � claro, salvar toda vers�o de todo arquivo 284que um dia voc� criou. Mas isto vai consumir um enorme 285espa�o no disco. O @sc{cvs} guarda todas as vers�es de um 286arquivo em um �nico arquivo em uma forma inteligente 287que guarda apenas as diferen�as entre vers�es. 288 289@c <en>@sc{cvs} also helps you if you are part of a group of people working 290@c <en>on the same project. It is all too easy to overwrite 291@c <en>each others' changes unless you are extremely careful. 292@c <en>Some editors, like @sc{gnu} Emacs, try to make sure that 293@c <en>the same file is never modified by two people at the 294@c <en>same time. Unfortunately, if someone is using another 295@c <en>editor, that safeguard will not work. @sc{cvs} solves this problem 296@c <en>by insulating the different developers from each other. Every 297@c <en>developer works in his own directory, and @sc{cvs} merges 298@c <en>the work when each developer is done. 299@sc{cvs} tamb�m ajuda se voc� � parte de um grupo de 300pessoas trabalhando no mesmo projeto. � muito f�cil uns 301sobreescreverem as mudan�as de outros se n�o forem 302extremamente cuidadosos. Alguns editores, como o 303@sc{gnu} Emacs, tentam se certificar de que o mesmo 304arquivo nunca seja modificado por duas pessoas ao mesmo 305tempo. Infelizmente, se algu�m estiver usando outro 306editor, est� seguran�a n�o vai funcionar. O @sc{cvs} 307resolve este problema isolando os desenvolvedores uns 308dos outros. Todo desenvolvedor trabalha em seu pr�prio 309diret�rio e o @sc{cvs} mescla o trabalho quando cada 310desenvolvedor tiver terminado. 311 312@c <en>@cindex History of CVS 313@cindex Hist�ria do CVS 314@c <en>@cindex CVS, history of 315@cindex CVS, hist�ria do 316@c <en>@cindex Credits (CVS program) 317@cindex Cr�ditos (programa CVS) 318@c <en>@cindex Contributors (CVS program) 319@cindex Contribuidores (programa CVS) 320@c <en>@sc{cvs} started out as a bunch of shell scripts written by 321@c <en>Dick Grune, posted to the newsgroup 322@c <en>@code{comp.sources.unix} in the volume 6 323@c <en>release of July, 1986. While no actual code from 324@c <en>these shell scripts is present in the current version 325@c <en>of @sc{cvs} much of the @sc{cvs} conflict resolution algorithms 326@c <en>come from them. 327@sc{cvs} come�ou como um monte de shell scripts 328escritos por Dick Grune, postados no newsgroup 329@code{comp.sources.unix} no volume 6, de Julho de 3301986. Na verdade, nenhum c�digo daqueles scripts est� 331presente na vers�o atual do @sc{cvs}, mas muito dos 332algoritmos de resolu��o de conflitos do @sc{cvs} vem 333deles. 334 335@c <en>In April, 1989, Brian Berliner designed and coded @sc{cvs}. 336@c <en>Jeff Polk later helped Brian with the design of the @sc{cvs} 337@c <en>module and vendor branch support. 338Em abril de 1989, Brian Berliner projetou e codificou 339@sc{cvs}. Depois, Jeff Polk ajudou Brian com o projeto 340do m�dulo @sc{cvs} e o suporte ao ramo do fornecedor. 341 342@c <en>@cindex Source, getting CVS source 343@cindex Fontes, adquirindo os fontes do CVS 344@c <en>You can get @sc{cvs} in a variety of ways, including 345@c <en>free download from the internet. For more information 346@c <en>on downloading @sc{cvs} and other @sc{cvs} topics, see: 347Voc� pode conseguir o @sc{cvs} de v�rias formas, 348inclusive baixando gratuitamente da internet. Para 349maiores informa��es sobre baixar o @sc{cvs} e para 350outros t�picos sobre @sc{cvs}, veja: 351 352@example 353@url{http://cvs.nongnu.org/} 354@end example 355 356@c <en>@cindex Mailing list 357@cindex Lista de Discuss�o 358@c <en>@cindex List, mailing list 359@cindex Lista, lista de discuss�o 360@c <en>@cindex Newsgroups 361@cindex Newsgroups 362@c <en>There is a mailing list, known as @email{info-cvs@@nongnu.org}, 363@c <en>devoted to @sc{cvs}. To subscribe or 364@c <en>unsubscribe 365@c <en>write to 366@c <en>@email{info-cvs-request@@nongnu.org}. 367@c <en>If you prefer a usenet group, there is a one-way mirror (posts to the email 368@c <en>list are usually sent to the news group, but not visa versa) of 369@c <en>@email{info-cvs@@nongnu.org} at @url{news:gnu.cvs.help}. The right 370@c <en>usenet group for posts is @url{news:comp.software.config-mgmt} which is for 371@c <en>@sc{cvs} discussions (along with other configuration 372@c <en>management systems). In the future, it might be 373@c <en>possible to create a 374@c <en>@code{comp.software.config-mgmt.cvs}, but probably only 375@c <en>if there is sufficient @sc{cvs} traffic on 376@c <en>@url{news:comp.software.config-mgmt}. 377Existe uma lista de discuss�o, conhecida como @email{info-cvs@@nongnu.org}, 378dedicada ao @sc{cvs}. Para se cadastrar ou descadastrar nela 379escreva para @email{info-cvs-request@@nongnu.org}. Se voc� 380preferir um grupo de usenet, existe um espelho de m�o 381�nica (postagens para a lista de email s�o usualmente 382mandadas para o news group, mas n�o vice-versa) da lista 383@email{info-cvs@@nongnu.org} em @url{news:gnu.cvs.help}. O 384grupo usenet correto para postagens � o 385@url{news:comp.software.config-mgmt} que � para 386discuss�es sobre @sc{cvs} (juntamente com outros 387sistemas de ger�ncia de configura��o). No futuro, poder� ser criada uma 388@code{comp.software.config-mgmt.cvs}, mas apenas se 389houver bastante tr�fego sobre o @sc{cvs} na 390@url{news:comp.software.config-mgmt}. 391@c Other random data is that the tale was very 392@c skeptical of comp.software.config-mgmt.cvs when the 393@c subject came up around 1995 or so (for one 394@c thing, because creating it would be a "reorg" which 395@c would need to take a more comprehensive look at the 396@c whole comp.software.config-mgmt.* hierarchy). 397 398@c <en>You can also subscribe to the @email{bug-cvs@@nongnu.org} mailing list, 399@c <en>described in more detail in @ref{BUGS}. To subscribe 400@c <en>send mail to @email{bug-cvs-request@@nongnu.org}. There is a two-way 401@c <en>usenet mirror (posts to the usenet group are usually sent to the email list and 402@c <en>visa versa) of @email{bug-cvs@@nongnu.org} named @url{news:gnu.cvs.bug}. 403Voc� tamb�m pode se cadastrar na lista de discuss�o 404@email{bug-cvs@@nongnu.org}, descrita em maiores detalhes 405em @ref{Paus}. Para se cadastrar mande um e-mail para 406@email{bug-cvs-request@@nongnu.org}. Existe um espelho 407usenet de m�o-dupla (postagens para o grupo usenet s�o 408usualmente mandadas para a lista e vice-versa) de 409@email{bug-cvs@@nongnu.org} chamado 410@url{news:gnu.cvs.bug}. 411 412@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 413@c <en>@node What is CVS not? 414@node O que CVS n�o �? 415@c <en>@section What is CVS not? 416@section O que CVS n�o �? 417@c <en>@cindex What is CVS not? 418@cindex O que CVS n�o �? 419 420@c <en>@sc{cvs} can do a lot of things for you, but it does 421@c <en>not try to be everything for everyone. 422@sc{cvs} pode fazer v�rias coisas para voc�, mas n�o 423tenta fazer tudo para todo mundo. 424 425@table @asis 426@c <en>@item @sc{cvs} is not a build system. 427@item @sc{cvs} n�o � um sistema de constru��o (build system). 428 429@c <en>Though the structure of your repository and modules 430@c <en>file interact with your build system 431@c <en>(e.g. @file{Makefile}s), they are essentially 432@c <en>independent. 433Embora a estrutura do seu reposit�rio e arquivos de 434m�dulo interajam com seu sistema de constru��o 435(e.g. @file{Makefile}s), eles s�o essencialmente 436independentes. 437 438@c <en>@sc{cvs} does not dictate how you build anything. It 439@c <en>merely stores files for retrieval in a tree structure 440@c <en>you devise. 441@sc{cvs} n�o dita como voc� constroi nada. Ele apenas 442guarda arquivos para recupera��o numa estrutura de 443�rvore que voc� concebeu. 444 445@c <en>@sc{cvs} does not dictate how to use disk space in the 446@c <en>checked out working directories. If you write your 447@c <en>@file{Makefile}s or scripts in every directory so they 448@c <en>have to know the relative positions of everything else, 449@c <en>you wind up requiring the entire repository to be 450@c <en>checked out. 451@sc{cvs} n�o dita como usar o espa�o em disco em 452diret�rios de trabalho locais. Se voc� 453escreve seus @file{Makefile}s ou scripts em cada 454diret�rio, eles t�m que saber a posi��o relativa de 455todo o resto, logo voc� acaba tendo que pegar todo o 456reposit�rio. 457 458@c <en>If you modularize your work, and construct a build 459@c <en>system that will share files (via links, mounts, 460@c <en>@code{VPATH} in @file{Makefile}s, etc.), you can 461@c <en>arrange your disk usage however you like. 462Se voc� modularizar o seu trabalho e fizer um sistema 463de constru��o (build) que ir� compartilhar arquivos 464(via links, mounts, @code{VPATH} em @file{Makefile}s, 465etc.), voc� pode organizar a sua utiliza��o de disco de 466qualquer forma. 467 468@c <en>But you have to remember that @emph{any} such system is 469@c <en>a lot of work to construct and maintain. @sc{cvs} does 470@c <en>not address the issues involved. 471Mas voc� tem que lembrar que @emph{qualquer} sistema 472desse � muito trabalhoso para construir e 473manter. O @sc{cvs} n�o se importa com tais quest�es. 474 475@c <en>Of course, you should place the tools created to 476@c <en>support such a build system (scripts, @file{Makefile}s, 477@c <en>etc) under @sc{cvs}. 478Obviamente, voc� pode botar as ferramentas criadas para 479auxiliar tal sistema de constru��o (scripts, 480@file{Makefile}s, etc) dentro do @sc{cvs}. 481 482@c <en>Figuring out what files need to be rebuilt when 483@c <en>something changes is, again, something to be handled 484@c <en>outside the scope of @sc{cvs}. One traditional 485@c <en>approach is to use @code{make} for building, and use 486@c <en>some automated tool for generating the dependencies which 487@c <en>@code{make} uses. 488Definir quais arquivos precisam ser reconstru�dos 489quando algo muda �, novamente, algo para ser visto fora 490do escopo do @sc{cvs}. Uma abordagem tradicional � 491usar o @code{make} para construir, e usar alguma 492ferramenta automatizada para gerar as depend�ncias que 493o @code{make} usa. 494 495@c <en>Veja em @ref{Builds}, for more information on doing builds 496@c <en>in conjunction with @sc{cvs}. 497See @ref{Builds}, para mais informa��es sobre 498constru��o com @sc{cvs}. 499 500@c <en>@item @sc{cvs} is not a substitute for management. 501@item @sc{cvs} n�o substitui gerenciamento. 502 503@c <en>Your managers and project leaders are expected to talk 504@c <en>to you frequently enough to make certain you are aware 505@c <en>of schedules, merge points, branch names and release 506@c <en>dates. If they don't, @sc{cvs} can't help. 507Espera-se que seus gerentes e l�deres de projetos falem 508com voc� com a frequ�ncia suficiente para que voc� 509saiba de prazos, pontos de mescla, nomes de ramos e 510datas de lan�amento (release). Se eles n�o o fizerem, o 511@sc{cvs} n�o pode ajudar. 512 513@c <en>@sc{cvs} is an instrument for making sources dance to 514@c <en>your tune. But you are the piper and the composer. No 515@c <en>instrument plays itself or writes its own music. 516@sc{cvs} � um instrumento para fazer o fonte dan�ar 517conforme a sua m�sica. Mas voc� � o maestro e o 518compositor. Nenhum instrumento toca sozinho ou escreve 519sua pr�pria m�sica. 520 521@c <en>@item @sc{cvs} is not a substitute for developer communication. 522@item @sc{cvs} n�o � um substituto para comunica��o entre desenvolvedores. 523 524@c <en>When faced with conflicts within a single file, most 525@c <en>developers manage to resolve them without too much 526@c <en>effort. But a more general definition of ``conflict'' 527@c <en>includes problems too difficult to solve without 528@c <en>communication between developers. 529Quando se deparam com conflitos num �nico arquivo, a 530maioria dos desenvolvedores conseguem resolv�-los sem 531muito esfor�o. Mas uma defini��o mais geral de 532``conflito'' inclui problemas t�o dif�ceis de resolver 533que � necess�ria a comunica��o entre os desenvolvedores. 534 535@c <en>@sc{cvs} cannot determine when simultaneous changes 536@c <en>within a single file, or across a whole collection of 537@c <en>files, will logically conflict with one another. Its 538@c <en>concept of a @dfn{conflict} is purely textual, arising 539@c <en>when two changes to the same base file are near enough 540@c <en>to spook the merge (i.e. @code{diff3}) command. 541@sc{cvs} n�o pode determinar quando � que altera��es 542simult�neas em um arquivo, ou v�rios, v�o conflitar 543logicamente umas com as outras. Seu conceito de 544@dfn{conflito} � puramente textual, surgindo quando 545duas altera��es num mesmo arquivo base s�o pr�ximas o 546suficiente para intimidar o comando de mescla 547(i.e. @code{diff3}). 548 549@c <en>@sc{cvs} does not claim to help at all in figuring out 550@c <en>non-textual or distributed conflicts in program logic. 551@sc{cvs} n�o se prop�e a dar qualquer ajuda quanto a 552localizar conflitos n�o-textuais ou distribu�dos na 553l�gica de programa��o. 554 555@c <en>For example: Say you change the arguments to function 556@c <en>@code{X} defined in file @file{A}. At the same time, 557@c <en>someone edits file @file{B}, adding new calls to 558@c <en>function @code{X} using the old arguments. You are 559@c <en>outside the realm of @sc{cvs}'s competence. 560Por exemplo: Digamos que voc� altere os argumentos da 561fun��o @code{X} definida no arquivo @file{A}. Neste 562instante, alguem altera o arquivo @file{B}, adicionando 563novas chamadas � fun��o @code{X} usando os argumentos 564antigos. Voc�s est�o fora do escopo da compet�ncia do 565@sc{cvs}. 566 567@c <en>Acquire the habit of reading specs and talking to your 568@c <en>peers. 569Adquira o h�bito de ler documenta��o e conversar com 570seus parceiros. 571 572 573@c <en>@item @sc{cvs} does not have change control 574@item @sc{cvs} n�o tem controle de mudan�as 575 576@c <en>Change control refers to a number of things. First of 577@c <en>all it can mean @dfn{bug-tracking}, that is being able 578@c <en>to keep a database of reported bugs and the status of 579@c <en>each one (is it fixed? in what release? has the bug 580@c <en>submitter agreed that it is fixed?). For interfacing 581@c <en>@sc{cvs} to an external bug-tracking system, see the 582@c <en>@file{rcsinfo} and @file{verifymsg} files 583@c <en>(@pxref{Administrative files}). 584Controle de mudan�as se refere a v�rias coisas. Em 585primeiro lugar, pode significar @dfn{bug-tracking 586(busca de erros)}, que � manter uma base de dados de 587erros relatados e o status de cada um (foi consertado? 588em qual lan�amento? o submissor do erro concordou que o 589erro foi corrigido?). Para fazer a interface do 590@sc{cvs} com um sistema de bug-tracking externo, veja 591os arquivos @file{rcsinfo} e @file{verifymsg} 592(@pxref{Arquivos administrativos}). 593 594@c <en>Another aspect of change control is keeping track of 595@c <en>the fact that changes to several files were in fact 596@c <en>changed together as one logical change. If you check 597@c <en>in several files in a single @code{cvs commit} 598@c <en>operation, @sc{cvs} then forgets that those files were 599@c <en>checked in together, and the fact that they have the 600@c <en>same log message is the only thing tying them 601@c <en>together. Keeping a @sc{gnu} style @file{ChangeLog} 602@c <en>can help somewhat. 603Outra caracter�stica de controle de mudan�as � manter 604um controle no fato de que mudan�as em v�rios arquivos 605foram, de fato, uma �nica mudan�a l�gica. Se voc� 606devolve v�rios arquivos numa �nica opera��o com 607@code{cvs commit} (efetivar), @sc{cvs} esquece que os arquivos 608foram devolvidos juntos, e o fato de eles terem a mesma 609mensagem de log � a �nica coisa que os une. Manter um 610@file{ChangeLog} no estilo @sc{gnu} pode de certa forma 611ajudar. 612@c FIXME: should have an xref to a section which talks 613@c more about keeping ChangeLog's with CVS, but that 614@c section hasn't been written yet. 615 616@c <en>Another aspect of change control, in some systems, is 617@c <en>the ability to keep track of the status of each 618@c <en>change. Some changes have been written by a developer, 619@c <en>others have been reviewed by a second developer, and so 620@c <en>on. Generally, the way to do this with @sc{cvs} is to 621@c <en>generate a diff (using @code{cvs diff} or @code{diff}) 622@c <en>and email it to someone who can then apply it using the 623@c <en>@code{patch} utility. This is very flexible, but 624@c <en>depends on mechanisms outside @sc{cvs} to make sure 625@c <en>nothing falls through the cracks. 626Outro aspecto do controle de mudan�as, em alguns 627sistemas, � a habilidade de se obter informa��o sobre o 628status de cada mudan�a. Algumas mudan�as foram escritas 629por um certo desenvolvedor, outras foram revisadas por 630um segundo desenvolvedor, e por a� vai. Geralmente, a 631forma de fazer isto com o @sc{cvs} � gerando um diff 632(usando @code{cvs diff} ou @code{diff}) e mandando por 633email para alguem que possa resolver as diferen�as usando o 634utilit�rio @code{patch}. Isto � muito flex�vel, mas 635depende de mecanismos externos ao @sc{cvs} para 636garantir que nada d� problema. 637 638@c <en>@item @sc{cvs} is not an automated testing program 639@item @sc{cvs} n�o � um programa de testes autom�tico 640 641@c <en>It should be possible to enforce mandatory use of a 642@c <en>testsuite using the @code{commitinfo} file. I haven't 643@c <en>heard a lot about projects trying to do that or whether 644@c <en>there are subtle gotchas, however. 645� poss�vel refor�ar o uso obrigat�rio de uma su�te de 646testes usando o arquivo @code{commitinfo}. Eu nunca 647ouvi falar muito sobre projetos que tentam fazer isto, 648ou se existem armadilhas sut�s nestes casos. 649 650@c <en>@item @sc{cvs} does not have a builtin process model 651@item @sc{cvs} n�o tem um modelo de processo inerente 652 653@c <en>Some systems provide ways to ensure that changes or 654@c <en>releases go through various steps, with various 655@c <en>approvals as needed. Generally, one can accomplish 656@c <en>this with @sc{cvs} but it might be a little more work. 657@c <en>In some cases you'll want to use the @file{commitinfo}, 658@c <en>@file{loginfo}, @file{rcsinfo}, or @file{verifymsg} 659@c <en>files, to require that certain steps be performed 660@c <en>before cvs will allow a checkin. Also consider whether 661@c <en>features such as branches and tags can be used to 662@c <en>perform tasks such as doing work in a development tree 663@c <en>and then merging certain changes over to a stable tree 664@c <en>only once they have been proven. 665alguns sistemas fornecem formas de garantir que 666mudan�as ou lan�amentos sigam v�rios passos, com v�rias 667aprova��es obrigat�rias. Geralmente, pode-se obter 668isto com o @sc{cvs}, mas acarreta em um pouco mais de 669trabalho. Em alguns casos voc� vai querer usar o 670arquivo @file{commitinfo}, @file{loginfo}, 671@file{rcsinfo}, ou @file{verifymsg} para exigir que 672certos passos sejam executados antes que o cvs permita 673uma devolu��o (checkin). Tamb�m considere se 674caracter�sticas tais como ramos e etiquetas (tags) podem ser usadas 675para realizar tarefas como desenvolver numa �rvore de 676desenvolvimento e ent�o mesclar certas mudan�as numa 677�rvore est�vel apenas quando eles tenham sido confirmados. 678@end table 679 680@c --------------------------------------------------------------------- 681@c <en>@node A sample session 682@node Uma sess�o de exemplo 683@c <en>@section A sample session 684@section Uma sess�o de exemplo 685@c <en>@cindex Example of a work-session 686@cindex Exemplo de uma sess�o de trabalho 687@c <en>@cindex Getting started 688@cindex Iniciando 689@c <en>@cindex Work-session, example of 690@cindex Sess�o de trabalho, exemplo de uma 691@c <en>@cindex tc, Trivial Compiler (example) 692@cindex tc, Trivial Compiler (Compilador trivial) (exemplo) 693@c <en>@cindex Trivial Compiler (example) 694@cindex Trivial Compiler (Compilador trivial) (exemplo) 695 696@c I think an example is a pretty good way to start. But 697@c somewhere in here, maybe after the sample session, 698@c we need something which is kind of 699@c a "roadmap" which is more directed at sketching out 700@c the functionality of CVS and pointing people to 701@c various other parts of the manual. As it stands now 702@c people who read in order get dumped right into all 703@c manner of hair regarding remote repositories, 704@c creating a repository, etc. 705@c 706@c The following was in the old Basic concepts node. I don't 707@c know how good a job it does at introducing modules, 708@c or whether they need to be introduced so soon, but 709@c something of this sort might go into some 710@c introductory material somewhere. 711@ignore 712@cindex Modules (intro) 713The repository contains directories and files, in an 714arbitrary tree. The @dfn{modules} feature can be used 715to group together a set of directories or files into a 716single entity (@pxref{modules}). A typical usage is to 717define one module per project. 718@end ignore 719 720@c <en>As a way of introducing @sc{cvs}, we'll go through a 721@c <en>typical work-session using @sc{cvs}. The first thing 722@c <en>to understand is that @sc{cvs} stores all files in a 723@c <en>centralized @dfn{repository} (@pxref{Repository}); this 724@c <en>section assumes that a repository is set up. 725Vamos apresentar o @sc{cvs} usando numa sess�o de 726trabalho t�pica. A primeira coisa a saber � que 727@sc{cvs} guarda todos os arquivos em um 728@dfn{repository} centralizado (@pxref{Reposit�rio}); 729esta sess�o assume que um reposit�rio esteja ativo. 730@c I'm not sure that the sentence concerning the 731@c repository quite tells the user what they need to 732@c know at this point. Might need to expand on "centralized" 733@c slightly (maybe not here, maybe further down in the example?) 734 735@c <en>Suppose you are working on a simple compiler. The source 736@c <en>consists of a handful of C files and a @file{Makefile}. 737@c <en>The compiler is called @samp{tc} (Trivial Compiler), 738@c <en>and the repository is set up so that there is a module 739@c <en>called @samp{tc}. 740Suponha que voc� esteja trabalhando num compilador 741simples. O fonte � um monte de arquivos C e um 742@file{Makefile}. O compilador � chamado @samp{tc} 743(Trivial Compiler, ou Compilador trivial), e o reposit�rio � feito de 744forma que exista um m�dulo chamado @samp{tc}. 745 746@menu 747@c <en>* Getting the source:: Creating a workspace 748* Obtendo os fontes:: Criando uma �rea de trabalho 749@c <en>* Committing your changes:: Making your work available to others 750* Efetivando suas altera��es:: Disponibilizando seu trabalho para outros 751@c <en>* Cleaning up:: Cleaning up 752* Limpando:: Limpando 753@c <en>* Viewing differences:: Viewing differences 754* Vendo as diferen�as:: Vendo as diferen�as 755@end menu 756 757@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 758@c <en>@node Getting the source 759@node Obtendo os fontes 760@c <en>@subsection Getting the source 761@subsection Obtendo os fontes 762@c <en>@cindex Getting the source 763@cindex Obtendo os fontes 764@c <en>@cindex Checking out source 765@cindex Pegando emprestado os fontes 766@c <en>@cindex Fetching source 767@cindex Recuperando os fontes 768@c <en>@cindex Source, getting from CVS 769@cindex Fonte, pegando do CVS 770@c <en>@cindex Checkout, example 771@cindex Checkout, exemplo 772 773@c <en>The first thing you must do is to get your own working copy of the 774@c <en>source for @samp{tc}. For this, you use the @code{checkout} command: 775A primeira coisa a fazer � pegar sua pr�pria c�pia de 776trabalho dos fontes de @samp{tc}. Para isto, use o comando 777@code{checkout} (pegar emprestado): 778 779@example 780$ cvs checkout tc 781@end example 782 783@noindent 784@c <en>This will create a new directory called @file{tc} and populate it with 785@c <en>the source files. 786Isto vai criar um novo diret�rio chamado @file{tc} e 787povoa-lo com os fontes. 788 789@example 790$ cd tc 791$ ls 792CVS Makefile backend.c driver.c frontend.c parser.c 793@end example 794 795@c <en>The @file{CVS} directory is used internally by 796@c <en>@sc{cvs}. Normally, you should not modify or remove 797@c <en>any of the files in it. 798O diret�rio @file{CVS} � usado internamente pelo 799@sc{cvs}. Normalmente, voc� n�o deve modificar ou 800remover quaisquer arquivos dele. 801 802@c <en>You start your favorite editor, hack away at @file{backend.c}, and a couple 803@c <en>of hours later you have added an optimization pass to the compiler. 804@c <en>A note to @sc{rcs} and @sc{sccs} users: There is no need to lock the files that 805@c <en>you want to edit. @xref{Multiple developers}, for an explanation. 806Voc� abre o seu editor favorito, trabalha no arquivo 807@file{backend.c}, e algumas horas depois voc� deixou o 808compilador mais otimizado. Uma observa��o para usu�rios 809de @sc{rcs} e @sc{sccs}: N�o � necess�rio travar (lock) 810os arquivos que voc� quer editar. @xref{M�ltiplos 811desenvolvedores}, para uma explica��o. 812 813@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 814@c <en>@node Committing your changes 815@node Efetivando suas altera��es 816@c <en>@subsection Committing your changes 817@subsection Efetivando suas altera��es 818@c <en>@cindex Committing changes to files 819@cindex Efetivando mudan�as nos arquivos 820@c <en>@cindex Log message entry 821@cindex Registro de mensagens de log 822 823@c <en>When you have checked that the compiler is still compilable you decide 824@c <en>to make a new version of @file{backend.c}. This will 825@c <en>store your new @file{backend.c} in the repository and 826@c <en>make it available to anyone else who is using that same 827@c <en>repository. 828Quando voc� se certificar que o compilador ainda � 829compil�vel voc� decide criar uma nova vers�o de 830@file{backend.c}. Tal ato vai botar o seu novo 831@file{backend.c} no reposit�rio e torn�-lo dispon�vel 832para qualquer outra pessoa que esteja usando o mesmo 833reposit�rio. 834 835@example 836$ cvs commit backend.c 837@end example 838 839@noindent 840@c <en>@sc{cvs} starts an editor, to allow you to enter a log 841@c <en>message. You type in ``Added an optimization pass.'', 842@c <en>save the temporary file, and exit the editor. 843@sc{cvs} inicia um editor, para que voc� possa digitar 844uma messagem de log. Voc� digita ``Uma otimiza��o adicionada.'', 845salva o arquivo tempor�rio e sai do editor. 846 847@c <en>@cindex CVSEDITOR, environment variable 848@cindex CVSEDITOR, vari�vel de ambiente 849@c <en>@cindex EDITOR, environment variable 850@cindex EDITOR, vari�vel de ambiente 851@c <en>The environment variable @code{$CVSEDITOR} determines 852@c <en>which editor is started. If @code{$CVSEDITOR} is not 853@c <en>set, then if the environment variable @code{$EDITOR} is 854@c <en>set, it will be used. If both @code{$CVSEDITOR} and 855@c <en>@code{$EDITOR} are not set then there is a default 856@c <en>which will vary with your operating system, for example 857@c <en>@code{vi} for unix or @code{notepad} for Windows 858@c <en>NT/95. 859A vari�vel de ambiente @code{$CVSEDITOR} determina qual 860editor vai ser aberto. Se @code{$CVSEDITOR} n�o existe, 861e se a vari�vel de ambiente @code{$EDITOR} existe, esta 862�ltima � usada. Se nenhuma das duas @code{$CVSEDITOR} e 863@code{$EDITOR} existem ent�o o padr�o vai variar 864dependendo do sistema operacional, por exemplo, 865@code{vi} para unix ou @code{notepad} para Windows 866NT/95. 867 868@c <en>@cindex VISUAL, environment variable 869@cindex VISUAL, vari�vel de ambiente 870@c <en>In addition, @sc{cvs} checks the @code{$VISUAL} environment 871@c <en>variable. Opinions vary on whether this behavior is desirable and 872@c <en>whether future releases of @sc{cvs} should check @code{$VISUAL} or 873@c <en>ignore it. You will be OK either way if you make sure that 874@c <en>@code{$VISUAL} is either unset or set to the same thing as 875@c <en>@code{$EDITOR}. 876Adicionalmente, @sc{cvs} busca pela vari�vel de 877ambiente @code{$VISUAL}. Isto gera duas opini�es 878divergentes, se este � um comportamento desej�vel ou se 879releases futuras do @sc{cvs} devem verificar 880@code{$VISUAL} ou ignor�-la. Voc� vai estar OK se n�o 881tiver a vari�vel @code{$VISUAL} ou se ela for igual � 882@code{$EDITOR}. 883 884@c This probably should go into some new node 885@c containing detailed info on the editor, rather than 886@c the intro. In fact, perhaps some of the stuff with 887@c CVSEDITOR and -m and so on should too. 888@c <en>When @sc{cvs} starts the editor, it includes a list of 889@c <en>files which are modified. For the @sc{cvs} client, 890@c <en>this list is based on comparing the modification time 891@c <en>of the file against the modification time that the file 892@c <en>had when it was last gotten or updated. Therefore, if 893@c <en>a file's modification time has changed but its contents 894@c <en>have not, it will show up as modified. The simplest 895@c <en>way to handle this is simply not to worry about it---if 896@c <en>you proceed with the commit @sc{cvs} will detect that 897@c <en>the contents are not modified and treat it as an 898@c <en>unmodified file. The next @code{update} will clue 899@c <en>@sc{cvs} in to the fact that the file is unmodified, 900@c <en>and it will reset its stored timestamp so that the file 901@c <en>will not show up in future editor sessions. 902Quando o @sc{cvs} inicia o editor, ele inclui uma lista 903de arquivos que foram modificados. Para o @sc{cvs} 904cliente, esta lista � baseada na compara��o da data de 905modifica��o do arquivo com a data de modifica��o que o 906arquivo tinha da �ltima vez que foi pego ou 907atualizado. Entretanto, se a data de modifica��o de um 908arquivo mudou mas seu conte�do n�o, ele vai ser 909considerado modificado. A maneira mais f�cil de lidar 910com isto � desconsidarando---se voc� seguir efetivando, 911o @sc{cvs} vai notar que o conte�do est� intacto e vai 912tratar o arquivo como n�o-modificado. O pr�ximo 913@code{update} vai dar a dica para o @sc{cvs} de que o 914arquivo est� igual, e isto vai restaurar a data, 915fazendo com que o arquivo n�o apare�a nas pr�ximas 916apari��es do editor. 917@c FIXCVS: Might be nice if "commit" and other commands 918@c would reset that timestamp too, but currently commit 919@c doesn't. 920@c FIXME: Need to talk more about the process of 921@c prompting for the log message. Like show an example 922@c of what it pops up in the editor, for example. Also 923@c a discussion of how to get the "a)bort, c)ontinue, 924@c e)dit" prompt and what to do with it. Might also 925@c work in the suggestion that if you want a diff, you 926@c should make it before running commit (someone 927@c suggested that the diff pop up in the editor. I'm 928@c not sure that is better than telling people to run 929@c "cvs diff" first if that is what they want, but if 930@c we want to tell people that, the manual possibly 931@c should say it). 932 933@c <en>If you want to avoid 934@c <en>starting an editor you can specify the log message on 935@c <en>the command line using the @samp{-m} flag instead, like 936@c <en>this: 937Se voc� quer evitar o aparecimento de um editor, voc� 938pode especificar a mensagem de log na linha de comando 939usando a op��o @samp{-m}, desta forma: 940 941@example 942$ cvs commit -m "Uma otimiza��o adicionada" backend.c 943@end example 944 945@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 946@c <en>@node Cleaning up 947@node Limpando 948@c <en>@subsection Cleaning up 949@subsection Limpando 950@c <en>@cindex Cleaning up 951@cindex Limpando 952@c <en>@cindex Working copy, removing 953@cindex C�pia de trabalho, removendo 954@c <en>@cindex Removing your working copy 955@cindex Removendo sua c�pia de trabalho 956@c <en>@cindex Releasing your working copy 957@cindex Lan�ando sua c�pia de trabalho 958 959@c <en>Before you turn to other tasks you decide to remove your working copy of 960@c <en>tc. One acceptable way to do that is of course 961Antes de ir fazer outras tarefas, voc� decide remover 962sua c�pia de trabalho de tc. Uma forma aceit�vel de 963fazer isto �, obviamente: 964 965@example 966$ cd .. 967$ rm -r tc 968@end example 969 970@noindent 971mas uma forma melhor � usando o comando @code{release} (@pxref{release}): 972 973@example 974$ cd .. 975$ cvs release -d tc 976M driver.c 977? tc 978You have [1] altered files in this repository. 979Are you sure you want to release (and delete) directory `tc': n 980** `release' aborted by user choice. 981@end example 982 983@c <en>The @code{release} command checks that all your modifications have been 984@c <en>committed. If history logging is enabled it also makes a note in the 985@c <en>history file. @xref{history file}. 986O comando @code{release} verifica se todas as suas 987modifica��es foram efetivadas. Se o registro 988hist�rico (history log) est� ativo ele tamb�m escreve uma 989observa��o no arquivo de hist�rico. @xref{arquivo 990history (hist�rico)}. 991 992@c <en>When you use the @samp{-d} flag with @code{release}, it 993@c <en>also removes your working copy. 994Quando voc� usa a op��o @samp{-d} com o @code{release}, 995ele tamb�m remove a sua c�pia de trabalho local. 996 997@c <en>In the example above, the @code{release} command wrote a couple of lines 998@c <en>of output. @samp{? tc} means that the file @file{tc} is unknown to @sc{cvs}. 999@c <en>That is nothing to worry about: @file{tc} is the executable compiler, 1000@c <en>and it should not be stored in the repository. @xref{cvsignore}, 1001@c <en>for information about how to make that warning go away. 1002@c <en>@xref{release output}, for a complete explanation of 1003@c <en>all possible output from @code{release}. 1004No exemplo acima, o comando @code{release} escreve 1005poucas linhas de sa�da. @samp{? tc} significa que o 1006arquivo @file{tc} � desconhecido pelo @sc{cvs}. N�o h� 1007nada com que se preocupar: @file{tc} � um compilador 1008execut�vel, e n�o deve ser guardado no 1009reposit�rio. @xref{cvsignore}, para ver como fazer para 1010sumir com este aviso. @xref{release output}, para uma 1011explica��o geral de todas as poss�veis sa�das do 1012@code{release}. 1013 1014@c <en>@samp{M driver.c} is more serious. It means that the 1015@c <en>file @file{driver.c} has been modified since it was 1016@c <en>checked out. 1017@samp{M driver.c} � mais s�rio. Significa que o arquivo 1018@file{driver.c} foi modificado desde quando foi pego. 1019 1020@c <en>The @code{release} command always finishes by telling 1021@c <en>you how many modified files you have in your working 1022@c <en>copy of the sources, and then asks you for confirmation 1023@c <en>before deleting any files or making any note in the 1024@c <en>history file. 1025O comando @code{release} sempre termina dizendo quantos 1026arquivos modificados voc� tem em sua c�pia de trabalho 1027dos fontes, e ent�o pergunta por confirma��o antes de 1028apagar qualquer arquivo ou escrever qualquer coisa no 1029arquivo de hist�rico. 1030 1031@c <en>You decide to play it safe and answer @kbd{n @key{RET}} 1032@c <en>when @code{release} asks for confirmation. 1033Voc� decide que executar isto � seguro e responde @kbd{n @key{RET}} 1034quando @code{release} pede uma confirma��o. 1035 1036@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1037@c <en>@node Viewing differences 1038@node Vendo as diferen�as 1039@c <en>@subsection Viewing differences 1040@subsection Vendo diferen�as 1041@c <en>@cindex Viewing differences 1042@cindex Vendo diferen�as 1043@c <en>@cindex Diff 1044@cindex Diff 1045 1046@c <en>You do not remember modifying @file{driver.c}, so you want to see what 1047@c <en>has happened to that file. 1048Voc� n�o lembra se modificou @file{driver.c}. Logo, 1049voc� precisa ver o que aconteceu com este arquivo. 1050 1051@example 1052$ cd tc 1053$ cvs diff driver.c 1054@end example 1055 1056@c <en>This command runs @code{diff} to compare the version of @file{driver.c} 1057@c <en>that you checked out with your working copy. When you see the output 1058@c <en>you remember that you added a command line option that enabled the 1059@c <en>optimization pass. You check it in, and release the module. 1060Este comando roda o @code{diff} para comparar a vers�o 1061de @file{driver.c} que voc� pegou com a da sua c�pia de 1062trabalho. Quando voc� v� a sa�da, voc� lembra de ter 1063adicionado uma op��o de linha de comando que permite a 1064otimiza��o. Voc� devolve e lan�a (release) o m�dulo. 1065@c FIXME: we haven't yet defined the term "check in". 1066 1067@example 1068@c <en>$ cvs commit -m "Added an optimization pass" driver.c 1069$ cvs commit -m "Uma otimiza��o adicionada" driver.c 1070Checking in driver.c; 1071/usr/local/cvsroot/tc/driver.c,v <-- driver.c 1072new revision: 1.2; previous revision: 1.1 1073done 1074$ cd .. 1075$ cvs release -d tc 1076? tc 1077You have [0] altered files in this repository. 1078Are you sure you want to release (and delete) directory `tc': y 1079@end example 1080 1081@c --------------------------------------------------------------------- 1082@c <en>@node Repository 1083@node Reposit�rio 1084@c <en>@chapter The Repository 1085@chapter O Reposit�rio 1086@c <en>@cindex Repository (intro) 1087@cindex Reposit�rio (intro) 1088@c <en>@cindex Repository, example 1089@cindex Reposit�rio, exemplo 1090@c <en>@cindex Layout of repository 1091@cindex Estrutura do reposit�rio 1092@c <en>@cindex Typical repository 1093@cindex Reposit�rio t�pico 1094@c <en>@cindex /usr/local/cvsroot, as example repository 1095@cindex /usr/local/cvsroot, como um reposit�rio de exemplo 1096@c <en>@cindex cvsroot 1097@cindex cvsroot 1098 1099@c <en>The @sc{cvs} @dfn{repository} stores a complete copy of 1100@c <en>all the files and directories which are under version 1101@c <en>control. 1102O @dfn{reposit�rio} do @sc{cvs} guarda uma c�pia 1103completa de todos os arquivos e diret�rios que est�o 1104sob controle de vers�o. 1105 1106@c <en>Normally, you never access any of the files in the 1107@c <en>repository directly. Instead, you use @sc{cvs} 1108@c <en>commands to get your own copy of the files into a 1109@c <en>@dfn{working directory}, and then 1110@c <en>work on that copy. When you've finished a set of 1111@c <en>changes, you check (or @dfn{commit}) them back into the 1112@c <en>repository. The repository then contains the changes 1113@c <en>which you have made, as well as recording exactly what 1114@c <en>you changed, when you changed it, and other such 1115@c <en>information. Note that the repository is not a 1116@c <en>subdirectory of the working directory, or vice versa; 1117@c <en>they should be in separate locations. 1118Normalmente, voc� nunca acessa qualquer dos arquivos do 1119reposit�rio diretamente. Ao inv�s disso, voc� usa os 1120comandos do @sc{cvs} para pegar emprestada a sua c�pia 1121dos arquivos num @dfn{diret�rio de trabalho}, e ent�o 1122trabalhar nesta c�pia. Quando voc� termina um conjunto 1123de mudan�as, voc� as @dfn{efetiva} no reposit�rio. O 1124reposit�rio ent�o passa a conter as mudan�as que voc� 1125fez, assim como gravar exatamente o que voc� fez, 1126quando voc� fez e outras informa��es deste 1127tipo. Observe que o reposit�rio n�o � um subdiret�rio 1128do diret�rio de trabalho nem vice-versa; eles est�o em 1129locais diferentes. 1130@c Need some example, e.g. repository 1131@c /usr/local/cvsroot; working directory 1132@c /home/joe/sources. But this node is too long 1133@c as it is; need a little reorganization... 1134 1135@c <en>@cindex :local:, setting up 1136@cindex :local:, ajustando 1137@c <en>@sc{cvs} can access a repository by a variety of 1138@c <en>means. It might be on the local computer, or it might 1139@c <en>be on a computer across the room or across the world. 1140@c <en>To distinguish various ways to access a repository, the 1141@c <en>repository name can start with an @dfn{access method}. 1142@c <en>For example, the access method @code{:local:} means to 1143@c <en>access a repository directory, so the repository 1144@c <en>@code{:local:/usr/local/cvsroot} means that the 1145@c <en>repository is in @file{/usr/local/cvsroot} on the 1146@c <en>computer running @sc{cvs}. For information on other 1147@c <en>access methods, see @ref{Remote repositories}. 1148@sc{cvs} pode acessar um reposit�rio de v�rias 1149formas. Ele pode estar no mesmo computador, ou num 1150computador do outro lado da sala, ou do outro lado do 1151mundo. Para distinguir as v�rias formas de acessar um 1152reposit�rio o seu nome deve come�ar com um 1153@dfn{m�todo de acesso}. Por exemplo, o m�todo de acesso 1154@code{:local:} significa acessar um diret�rio que � um 1155reposit�rio. Logo, @code{:local:/usr/local/cvsroot} 1156significa que o reposit�rio est� em 1157@file{/usr/local/cvsroot} no computador rodando 1158@sc{cvs}. Para informa��es sobre outros m�todos de 1159acesso, v� em @ref{Reposit�rios remotos}. 1160 1161@c Can se say this more concisely? Like by passing 1162@c more of the buck to the Remote repositories node? 1163@c <en>If the access method is omitted, then if the repository 1164@c <en>starts with @samp{/}, then @code{:local:} is 1165@c <en>assumed. If it does not start with @samp{/} then either 1166@c <en>@code{:ext:} or @code{:server:} is assumed. For 1167@c <en>example, if you have a local repository in 1168@c <en>@file{/usr/local/cvsroot}, you can use 1169@c <en>@code{/usr/local/cvsroot} instead of 1170@c <en>@code{:local:/usr/local/cvsroot}. But if (under 1171@c <en>Windows NT, for example) your local repository is 1172@c <en>@file{c:\src\cvsroot}, then you must specify the access 1173@c <en>method, as in @code{:local:c:/src/cvsroot}. 1174Se o m�todo de acesso � omitido e se o reposit�rio 1175come�a com @samp{/}, ent�o assume-se @code{:local:}. Se 1176n�o come�a com @samp{/} ent�o ou @code{:ext:} ou 1177@code{:server:} � assumido. Por exemplo, se voc� tem um 1178reposit�rio local em @file{/usr/local/cvsroot}, voc� 1179pode usar @code{/usr/local/cvsroot} ao inv�s de 1180@code{:local:/usr/local/cvsroot}. Mas se (no Windows 1181NT, por exemplo) seu reposit�rio local � 1182@file{c:\src\cvsroot}, ent�o voc� deve especificar o 1183m�todo de acesso, como em @code{:local:c:/src/cvsroot}. 1184 1185@c This might appear to go in Repository storage, but 1186@c actually it is describing something which is quite 1187@c user-visible, when you do a "cvs co CVSROOT". This 1188@c isn't necessary the perfect place for that, though. 1189@c <en>The repository is split in two parts. @file{$CVSROOT/CVSROOT} contains 1190@c <en>administrative files for @sc{cvs}. The other directories contain the actual 1191@c <en>user-defined modules. 1192O reposit�rio � separado em duas 1193partes. @file{$CVSROOT/CVSROOT} cont�m arquivos 1194administrativos do @sc{cvs}. Os outros diret�rios 1195cont�m os m�dulos definidos pelo usu�rio. 1196 1197@menu 1198@c <en>* Specifying a repository:: Telling CVS where your repository is 1199* Especificando um reposit�rio:: Dizendo ao CVS onde est� o seu reposit�rio 1200@c <en>* Repository storage:: The structure of the repository 1201* Armazenamento do reposit�rio:: A estrutura do reposit�rio 1202@c <en>* Working directory storage:: The structure of working directories 1203* Armazenamento do Diret�rio de trabalho:: A estrutura dos diret�rios de trabalho 1204@c <en>* Intro administrative files:: Defining modules 1205* Intro aos arquivos administrativos:: Definindo m�dulos 1206@c <en>* Multiple repositories:: Multiple repositories 1207* Reposit�rios m�ltiplos:: Reposit�rios m�ltiplos 1208@c <en>* Creating a repository:: Creating a repository 1209* Criando um reposit�rio:: Criando um reposit�rio 1210@c <en>* Backing up:: Backing up a repository 1211* Fazendo backup:: Criando Backup de um reposit�rio 1212@c <en>* Moving a repository:: Moving a repository 1213* Movendo um reposit�rio:: Movendo um reposit�rio 1214@c <en>* Remote repositories:: Accessing repositories on remote machines 1215* Reposit�rios remotos:: Acessando reposit�rios em m�quinas remotas 1216@c <en>* Read-only access:: Granting read-only access to the repository 1217* Acesso somente-leitura:: Dando acesso somente-leitura ao reposit�rio 1218@c <en>* Server temporary directory:: The server creates temporary directories 1219* Diret�rio tempor�rio do servidor:: O servidor cria diret�rios tempor�rios 1220@end menu 1221 1222@c <en>@node Specifying a repository 1223@node Especificando um reposit�rio 1224@c <en>@section Telling CVS where your repository is 1225@section Dizendo ao CVS onde est� o seu reposit�rio 1226 1227@c <en>There are several ways to tell @sc{cvs} 1228@c <en>where to find the repository. You can name the 1229@c <en>repository on the command line explicitly, with the 1230@c <en>@code{-d} (for "directory") option: 1231Existem v�rias formas de dizer ao @sc{cvs} onde 1232encontrar o reposit�rio. Voc� pode dar o nome do 1233reposit�rio explicitamente na linha de comando, com a 1234op��o @code{-d} (de "diret�rio"): 1235 1236@example 1237cvs -d /usr/local/cvsroot checkout yoyodyne/tc 1238@end example 1239 1240@c <en>@cindex .profile, setting CVSROOT in 1241@cindex .profile, configurando o CVSROOT no 1242@c <en>@cindex .cshrc, setting CVSROOT in 1243@cindex .cshrc, configurando o CVSROOT no 1244@c <en>@cindex .tcshrc, setting CVSROOT in 1245@cindex .tcshrc, configurando o CVSROOT no 1246@c <en>@cindex .bashrc, setting CVSROOT in 1247@cindex .bashrc, configurando o CVSROOT no 1248@c <en>@cindex CVSROOT, environment variable 1249@cindex CVSROOT, vari�vel de ambiente 1250@c <en> Or you can set the @code{$CVSROOT} environment 1251@c <en>variable to an absolute path to the root of the 1252@c <en>repository, @file{/usr/local/cvsroot} in this example. 1253@c <en>To set @code{$CVSROOT}, @code{csh} and @code{tcsh} 1254@c <en>users should have this line in their @file{.cshrc} or 1255@c <en>@file{.tcshrc} files: 1256 Ou voc� pode ajustar a vari�vel de ambiente 1257@code{$CVSROOT} para um caminho absoluto para a raiz 1258(root) do reposit�rio, @file{/usr/local/cvsroot} neste 1259exemplo. Para ajustar o @code{$CVSROOT}, usu�rio de 1260@code{csh} e @code{tcsh} devem ter esta linha no seu 1261arquivo @file{.cshrc} ou @file{.tcshrc}: 1262 1263@example 1264setenv CVSROOT /usr/local/cvsroot 1265@end example 1266 1267@noindent 1268@c <en>@code{sh} and @code{bash} users should instead have these lines in their 1269@c <en>@file{.profile} or @file{.bashrc}: 1270usu�rios de @code{sh} e @code{bash} devem, por sua vez, 1271ter estas linhas nos seus @file{.profile} ou @file{.bashrc}: 1272 1273@example 1274CVSROOT=/usr/local/cvsroot 1275export CVSROOT 1276@end example 1277 1278@c <en>@cindex Root file, in CVS directory 1279@cindex O arquivo Root, no diret�rio CVS 1280@c <en>@cindex CVS/Root file 1281@cindex O arquivo CVS/Root 1282@c <en> A repository specified with @code{-d} will 1283@c <en>override the @code{$CVSROOT} environment variable. 1284@c <en>Once you've checked a working copy out from the 1285@c <en>repository, it will remember where its repository is 1286@c <en>(the information is recorded in the 1287@c <en>@file{CVS/Root} file in the working copy). 1288 Um reposit�rio especificado com @code{-d} se 1289sobrep�e � vari�vel de ambiente @code{$CVSROOT}. Uma 1290vez que voc� tenha pego emprestada uma c�pia de 1291trabalho do reposit�rio, ela vai se lembrar onde est� o 1292seu reposit�rio (a informa��o � registrada no arquivo 1293@file{CVS/Root} na c�pia de trabalho). 1294 1295@c <en>The @code{-d} option and the @file{CVS/Root} file both 1296@c <en>override the @code{$CVSROOT} environment variable. If 1297@c <en>@code{-d} option differs from @file{CVS/Root}, the 1298@c <en>former is used. Of course, for proper operation they 1299@c <en>should be two ways of referring to the same repository. 1300Tanto a op��o @code{-d} quanto o arquivo 1301@file{CVS/Root} sobreescrevem a vari�vel de ambiente 1302@code{$CVSROOT}. Se a op��o @code{-d} � diferente do 1303@file{CVS/Root}, a primeira � usada. Obviamente, para 1304opera��es corretas, elas devem ser duas formas de 1305referenciar o mesmo reposit�rio. 1306 1307@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1308@c <en>@node Repository storage 1309@node Armazenamento do reposit�rio 1310@c <en>@section How data is stored in the repository 1311@section Como os dados s�o guardados no reposit�rio 1312@c <en>@cindex Repository, how data is stored 1313@cindex Reposit�rio, como os dados s�o guardados no 1314 1315@c <en>For most purposes it isn't important @emph{how} 1316@c <en>@sc{cvs} stores information in the repository. In 1317@c <en>fact, the format has changed in the past, and is likely 1318@c <en>to change in the future. Since in almost all cases one 1319@c <en>accesses the repository via @sc{cvs} commands, such 1320@c <en>changes need not be disruptive. 1321Para a maioria das aplica��es, n�o importa @emph{como} 1322o @sc{cvs} guarda as informa��es no reposit�rio. De 1323fato, o formato mudou no passado, e provavelmente vai 1324mudar no futuro. J� que em quase todo os casos o acesso 1325ao reposit�rio � feito via comandos do @sc{cvs}, tais 1326mudan�as n�o ser�o radicais. 1327 1328@c <en>However, in some cases it may be necessary to 1329@c <en>understand how @sc{cvs} stores data in the repository, 1330@c <en>for example you might need to track down @sc{cvs} locks 1331@c <en>(@pxref{Concurrency}) or you might need to deal with 1332@c <en>the file permissions appropriate for the repository. 1333Entretanto, em alguns casos pode ser necess�rio 1334entender como o @sc{cvs} guarda os dados no 1335reposit�rio. Por exemplo, voc� pode precisar localizar 1336travas do @sc{cvs} (@pxref{Concorr�ncia}) ou voc� pode 1337precisar lidar com permiss�es de arquivos apropriadas 1338para o reposit�rio. 1339 1340@menu 1341@c <en>* Repository files:: What files are stored in the repository 1342* Arquivos do reposit�rio:: Quais arquivos s�o guardados no reposit�rio 1343@c <en>* File permissions:: File permissions 1344* Permiss�es de arquivos:: Permis�es de arquivos 1345@c <en>* Windows permissions:: Issues specific to Windows 1346* Permiss�es no Windows:: Quest�es espec�ficas ao Windows 1347@c <en>* Attic:: Some files are stored in the Attic 1348* Attic:: Alguns arquivos s�o guardados no Attic 1349@c <en>* CVS in repository:: Additional information in CVS directory 1350* CVS no reposit�rio:: Informa��es adicionais no diret�rio CVS 1351@c <en>* Locks:: CVS locks control concurrent accesses 1352* Travas:: Travas do CVS controlam acesso concorrente 1353@c <en>* CVSROOT storage:: A few things about CVSROOT are different 1354* Armazenamento do CVSROOT:: Umas poucas coisas sobre CVSROOT s�o diferentes 1355@end menu 1356 1357@c <en>@node Repository files 1358@node Arquivos do reposit�rio 1359@c <en>@subsection Where files are stored within the repository 1360@subsection Onde arquivos s�o guardados dentro do reposit�rio 1361 1362@c @cindex Filenames, legal 1363@c @cindex Legal filenames 1364@c Somewhere we need to say something about legitimate 1365@c characters in filenames in working directory and 1366@c repository. Not "/" (not even on non-unix). And 1367@c here is a specific set of issues: 1368@c Files starting with a - are handled inconsistently. They can not 1369@c be added to a repository with an add command, because it they are 1370@c interpreted as a switch. They can appear in a repository if they are 1371@c part of a tree that is imported. They can not be removed from the tree 1372@c once they are there. 1373@c Note that "--" *is* supported (as a 1374@c consequence of using GNU getopt). Should document 1375@c this somewhere ("Common options"?). The other usual technique, 1376@c "./-foo", isn't as effective, at least for "cvs add" 1377@c which doesn't support pathnames containing "/". 1378 1379@c <en>The overall structure of the repository is a directory 1380@c <en>tree corresponding to the directories in the working 1381@c <en>directory. For example, supposing the repository is in 1382A estrutura geral do reposit�rio � uma �rvore de 1383diret�rios correspondendo aos diret�rios no diret�rio 1384de trabalho. Por exemplo, suponha que o reposit�rio 1385est� em 1386 1387@example 1388/usr/local/cvsroot 1389@end example 1390 1391@noindent 1392@c <en>here is a possible directory tree (showing only the 1393@c <en>directories): 1394Aqui est� uma poss�vel �rvore de diret�rios (mostrando 1395apenas os diret�rios): 1396 1397@example 1398@t{/usr} 1399 | 1400 +--@t{local} 1401 | | 1402 | +--@t{cvsroot} 1403 | | | 1404 | | +--@t{CVSROOT} 1405@c <en> | (administrative files) 1406 | (arquivos administrativos) 1407 | 1408 +--@t{gnu} 1409 | | 1410 | +--@t{diff} 1411@c <en> | | (source code to @sc{gnu} diff) 1412 | | (c�digo fonte do @sc{gnu} diff) 1413 | | 1414 | +--@t{rcs} 1415@c <en> | | (source code to @sc{rcs}) 1416 | | (c�digo fonte do @sc{rcs}) 1417 | | 1418 | +--@t{cvs} 1419@c <en> | (source code to @sc{cvs}) 1420 | (c�digo fonte do @sc{cvs}) 1421 | 1422 +--@t{yoyodyne} 1423 | 1424 +--@t{tc} 1425 | | 1426 | +--@t{man} 1427 | | 1428 | +--@t{testing} 1429 | 1430 +--(other Yoyodyne software) 1431@end example 1432 1433@c <en>With the directories are @dfn{history files} for each file 1434@c <en>under version control. The name of the history file is 1435@c <en>the name of the corresponding file with @samp{,v} 1436@c <en>appended to the end. Here is what the repository for 1437@c <en>the @file{yoyodyne/tc} directory might look like: 1438Nos diret�rios est�o os @dfn{arquivos de hist�rico} para 1439cada arquivo sob controle de vers�o. O nome do arquivo 1440de hist�rico � o nome do arquivo correspondente com um 1441@samp{,v} no final. Aqui est� como o reposit�rio do 1442diret�rio @file{yoyodyne/tc} deve se parecer: 1443@c FIXME: Should also mention CVS (CVSREP) 1444@c FIXME? Should we introduce Attic with an xref to 1445@c Attic? Not sure whether that is a good idea or not. 1446@example 1447 @code{$CVSROOT} 1448 | 1449 +--@t{yoyodyne} 1450 | | 1451 | +--@t{tc} 1452 | | | 1453 +--@t{Makefile,v} 1454 +--@t{backend.c,v} 1455 +--@t{driver.c,v} 1456 +--@t{frontend.c,v} 1457 +--@t{parser.c,v} 1458 +--@t{man} 1459 | | 1460 | +--@t{tc.1,v} 1461 | 1462 +--@t{testing} 1463 | 1464 +--@t{testpgm.t,v} 1465 +--@t{test2.t,v} 1466@end example 1467 1468@c <en>@cindex History files 1469@cindex Arquivos de hist�rico 1470@c <en>@cindex RCS history files 1471@cindex Arquivos de hist�rico do RCS 1472@c The first sentence, about what history files 1473@c contain, is kind of redundant with our intro to what the 1474@c repository does in node Repository.... 1475@c <en>The history files contain, among other things, enough 1476@c <en>information to recreate any revision of the file, a log 1477@c <en>of all commit messages and the user-name of the person 1478@c <en>who committed the revision. The history files are 1479@c <en>known as @dfn{RCS files}, because the first program to 1480@c <en>store files in that format was a version control system 1481@c <en>known as @sc{rcs}. For a full 1482@c <en>description of the file format, see the @code{man} page 1483@c <en>@cite{rcsfile(5)}, distributed with @sc{rcs}, or the 1484@c <en>file @file{doc/RCSFILES} in the @sc{cvs} source 1485@c <en>distribution. This 1486@c <en>file format has become very common---many systems other 1487@c <en>than @sc{cvs} or @sc{rcs} can at least import history 1488@c <en>files in this format. 1489Os arquivos de hist�rico cont�m, entre outras coisas, 1490informa��es suficientes para recriar qualquer revis�o 1491do arquivo, um log com todas as mensagens ???de 1492commit??? e o usu�rio que efetivou (commit) a 1493@comment This is the same as a "log message", "log entry", or whatever else 1494@comment you might want to call it. It is sometimes called a "commit message" 1495@comment in this manual because it is entered into the log at commit time. 1496@comment -DRP 1497revis�o. Os arquivos de hist�rico s�o conhecidos como 1498@dfn{arquivos RCS} (RCS files), pois o primeiro 1499programa a guardar arquivos neste formato foi o sistema 1500de controle de vers�es conhecido como @sc{rcs}. Para 1501uma descri��o completa do formato de arquivo, leia a 1502p�gina @code{man} @cite{rcsfile(5)}, distribu�da com o 1503@sc{rcs}, ou o arquivo @file{doc/RCSFILES} na 1504distribui��o dos fontes do @sc{cvs}. Este formato de 1505arquivo se tornou muito comum---muitos sistemas al�m do 1506@sc{cvs} e do @sc{rcs} podem, pelo menos, importar 1507arquivos de hist�rico neste formato. 1508@c FIXME: Think about including documentation for this 1509@c rather than citing it? In the long run, getting 1510@c this to be a standard (not sure if we can cope with 1511@c a standards process as formal as IEEE/ANSI/ISO/etc, 1512@c though...) is the way to go, so maybe citing is 1513@c better. 1514 1515@c <en>The @sc{rcs} files used in @sc{cvs} differ in a few 1516@c <en>ways from the standard format. The biggest difference 1517@c <en>is magic branches; for more information see @ref{Magic 1518@c <en>branch numbers}. Also in @sc{cvs} the valid tag names 1519@c <en>are a subset of what @sc{rcs} accepts; for @sc{cvs}'s 1520@c <en>rules see @ref{Tags}. 1521Os arquivos @sc{rcs} usados no @sc{cvs} diferem em 1522algumas poucas coisas do formato padr�o. A maior 1523diferen�a s�o os ramos m�gicos; para mais informa��es 1524veja em @ref{N�meros de ramos m�gicos}. Al�m disso, no 1525@sc{cvs} os nomes v�lidos de etiquetas (tags) � um subconjunto dos 1526que s�o aceitos pelo @sc{rcs}; para regras do @sc{cvs}, 1527leia em @ref{Etiquetas}. 1528 1529@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1530@c <en>@node File permissions 1531@node Permiss�es de arquivos 1532@c <en>@subsection File permissions 1533@subsection Permiss�es de arquivos 1534@c -- Move this to @node Creating a repository or similar 1535@c <en>@cindex Security, file permissions in repository 1536@cindex Seguran�a, permiss�es de arquivos no reposit�rio 1537@c <en>@cindex File permissions, general 1538@cindex Permiss�es de arquivos, geral 1539@c <en>@cindex Permissions, general 1540@cindex Permiss�es, geral 1541@c FIXME: we need to somehow reflect "permissions in 1542@c repository" versus "permissions in working 1543@c directory" in the index entries. 1544@c <en>@cindex Group, UNIX file permissions, in repository 1545@cindex Grupo, permiss�es de arquivos UNIX, no reposit�rio 1546@c <en>@cindex Read-only files, in repository 1547@cindex Arquivos somente-leitura, no reposit�rio 1548@c <en>All @samp{,v} files are created read-only, and you 1549@c <en>should not change the permission of those files. The 1550@c <en>directories inside the repository should be writable by 1551@c <en>the persons that have permission to modify the files in 1552@c <en>each directory. This normally means that you must 1553@c <en>create a UNIX group (see group(5)) consisting of the 1554@c <en>persons that are to edit the files in a project, and 1555@c <en>set up the repository so that it is that group that 1556@c <en>owns the directory. 1557@c <en>(On some systems, you also need to set the set-group-ID-on-execution bit 1558@c <en>on the repository directories (see chmod(1)) so that newly-created files 1559@c <en>and directories get the group-ID of the parent directory rather than 1560@c <en>that of the current process.) 1561Todos os arquivos @samp{,v} s�o criados 1562somente-leitura, e voc� n�o deve mudar as permiss�es 1563destes arquivos. Os diret�rios dentro do reposit�rio 1564devem dar permiss�o de escrita para as pessoas que tem 1565permiss�o para modificar os arquivos em cada diret�rio. 1566Isto normalmente significa que voc� deve criar um grupo 1567do UNIX (veja em group(5)) consistindo nas pessoas que 1568v�o editar os arquivos num projeto, e ajustar o 1569reposit�rio tal que aquele grupo seja o dono do 1570diret�rio. (Em alguns sistemas, voc� tamb�m vai 1571precisar ajustar o bit set-group-ID-on-execution nos 1572diret�rios do reposit�rio (veja em chmod(1)) de forma 1573que arquivos e diret�rio criados recebam o ID de grupo 1574do diret�rio pai e n�o do processo atual.) 1575 1576@c See also comment in commitinfo node regarding cases 1577@c which are really awkward with unix groups. 1578 1579@c <en>This means that you can only control access to files on 1580@c <en>a per-directory basis. 1581Isto significa que voc� pode apenas controlar o acesso 1582aos arquivos por diret�rio. 1583 1584@c <en>Note that users must also have write access to check 1585@c <en>out files, because @sc{cvs} needs to create lock files 1586@c <en>(@pxref{Concurrency}). You can use LockDir in CVSROOT/config 1587@c <en>to put the lock files somewhere other than in the repository 1588@c <en>if you want to allow read-only access to some directories 1589@c <en>(@pxref{config}). 1590Observe que os usu�rios devem ter direito de escrita 1591para pegar arquivos emprestados, j� que o @sc{cvs} tem 1592que criar arquivos de trava (@pxref{Concorr�ncia}). Voc� 1593pode usar LockDir (diret�rio de trava) no CVSROOT/config 1594para botar os arquivos de trava num lugar fora do 1595reposit�rio se voc� quer permitir acesso 1596somente-leitura a alguns diret�rios (@pxref{config}). 1597 1598@c CVS seems to use CVSUMASK in picking permissions for 1599@c val-tags, but maybe we should say more about this. 1600@c Like val-tags gets created by someone who doesn't 1601@c have CVSUMASK set right? 1602@c <en>@cindex CVSROOT/val-tags file, and read-only access to projects 1603@cindex O arquivo CVSROOT/val-tags, e acesso somente-leitura a projetos 1604@c <en>@cindex val-tags file, and read-only access to projects 1605@cindex O arquivo val-tags, e acesso somente-leitura a projetos 1606@c <en>Also note that users must have write access to the 1607@c <en>@file{CVSROOT/val-tags} file. @sc{cvs} uses it to keep 1608@c <en>track of what tags are valid tag names (it is sometimes 1609@c <en>updated when tags are used, as well as when they are 1610@c <en>created). 1611Observe tamb�m que os usu�rios devem ter permiss�o de 1612escrita ao arquivo @file{CVSROOT/val-tags}. O @sc{cvs} usa 1613tal arquivo para ter controle sobre quais etiquetas 1614(tags) s�o nomes de etiquetas v�lidos (� �s vezes 1615atualizado quando etiquetas s�o usadas ou criadas). 1616 1617@c <en>Each @sc{rcs} file will be owned by the user who last 1618@c <en>checked it in. This has little significance; what 1619@c <en>really matters is who owns the directories. 1620Cada arquivo @sc{rcs} vai pertencer ao usu�rio que o 1621devolveu por �ltimo. Isto tem pouco significado; o que 1622realmente importa � quem possui os diret�rios. 1623 1624@c <en>@cindex CVSUMASK, environment variable 1625@cindex CVSUMASK, vari�vel de ambiente 1626@c <en>@cindex Umask, for repository files 1627@cindex Umask, para arquivos do reposit�rio 1628@c <en>@sc{cvs} tries to set up reasonable file permissions 1629@c <en>for new directories that are added inside the tree, but 1630@c <en>you must fix the permissions manually when a new 1631@c <en>directory should have different permissions than its 1632@c <en>parent directory. If you set the @code{CVSUMASK} 1633@c <en>environment variable that will control the file 1634@c <en>permissions which @sc{cvs} uses in creating directories 1635@c <en>and/or files in the repository. @code{CVSUMASK} does 1636@c <en>not affect the file permissions in the working 1637@c <en>directory; such files have the permissions which are 1638@c <en>typical for newly created files, except that sometimes 1639@c <en>@sc{cvs} creates them read-only (see the sections on 1640@c <en>watches, @ref{Setting a watch}; -r, @ref{Global 1641@c <en>options}; or @code{CVSREAD}, @ref{Environment variables}). 1642O @sc{cvs} tenta ajustar de forma razo�vel as permiss�es para novos 1643diret�rios que v�o sendo adicionados na �rvore, mas 1644voc� vai ter que mudar as permiss�es manualmente quando 1645um novo diret�rio deve ter permiss�es diferentes das do 1646seu diret�rio pai. Se voc� ajusta a vari�vel de 1647ambiente @code{CVSUMASK} ela vai controlar as 1648permiss�es que o @sc{cvs} usa na cria��o de diret�rios 1649e/ou arquivos no reposit�rio. @code{CVSUMASK} n�o mexe 1650nas permiss�es do diret�rio de trabalho; tais arquivos 1651t�m as permiss�es que s�o t�picas para novos arquivos, 1652exceto que algumas vezes o @sc{cvs} cria os arquivos 1653somente-leitura (veja as se��es em ???watches???, 1654@comment From Webster's: 1655@comment 1. The act of watching; forbearance of sleep; vigil; wakeful, 1656@comment vigilant, or constantly observant attention; close 1657@comment observation; guard; preservative or preventive vigilance; 1658@comment formerly, a watching or guarding by night. 1659@comment 1660@comment A "watch" in CVS terminology, is the command run to request 1661@comment notifications of file status changes. Thus CVS keeps a "watch" on the 1662@comment file for you and notifies you of changes. When you have requested 1663@comment that CVS "watch" several files, it is said to be keeping "watches". 1664@comment -DRP 1665@ref{Ajustando um ???watch???}; -r, @ref{Op��es globais}; or 1666@code{CVSREAD}, @ref{Vari�veis de ambiente}). 1667@c FIXME: Need more discussion of which 1668@c group should own the file in the repository. 1669@c Include a somewhat detailed example of the usual 1670@c case where CVSUMASK is 007, the developers are all 1671@c in a group, and that group owns stuff in the 1672@c repository. Need to talk about group ownership of 1673@c newly-created directories/files (on some unices, 1674@c such as SunOS4, setting the setgid bit on the 1675@c directories will make files inherit the directory's 1676@c group. On other unices, your mileage may vary. I 1677@c can't remember what POSIX says about this, if 1678@c anything). 1679 1680@c <en>Note that using the client/server @sc{cvs} 1681@c <en>(@pxref{Remote repositories}), there is no good way to 1682@c <en>set @code{CVSUMASK}; the setting on the client machine 1683@c <en>has no effect. If you are connecting with @code{rsh}, you 1684@c <en>can set @code{CVSUMASK} in @file{.bashrc} or @file{.cshrc}, as 1685@c <en>described in the documentation for your operating 1686@c <en>system. This behavior might change in future versions 1687@c <en>of @sc{cvs}; do not rely on the setting of 1688@c <en>@code{CVSUMASK} on the client having no effect. 1689Observe que ao usar o @sc{cvs} cliente/servidor 1690(@pxref{Reposit�rios remotos}), n�o h� uma boa maneira 1691de ajustar o @code{CVSUMASK}; o ajuste na m�quina 1692cliente n�o tem efeito. Se voc� est� se conectando com 1693@code{rsh}, voc� pode ajustar o @code{CVSUMASK} em 1694@file{.bashrc} ou @file{.cshrc}, como descrito na 1695documenta��o de seu sistema operacional. Este 1696comportamento pode mudar em futuras vers�es do 1697@sc{cvs}; N�o se basear na configura��o do @code{CVSUMASK} 1698no cliente n�o afeta nada. 1699@c FIXME: need to explain what a umask is or cite 1700@c someplace which does. 1701@c 1702@c There is also a larger (largely separate) issue 1703@c about the meaning of CVSUMASK in a non-unix context. 1704@c For example, whether there is 1705@c an equivalent which fits better into other 1706@c protection schemes like POSIX.6, VMS, &c. 1707@c 1708@c FIXME: Need one place which discusses this 1709@c read-only files thing. Why would one use -r or 1710@c CVSREAD? Why would one use watches? How do they 1711@c interact? 1712@c 1713@c FIXME: We need to state 1714@c whether using CVSUMASK removes the need for manually 1715@c fixing permissions (in fact, if we are going to mention 1716@c manually fixing permission, we better document a lot 1717@c better just what we mean by "fix"). 1718 1719@c <en>Using pserver, you will generally need stricter 1720@c <en>permissions on the @sc{cvsroot} directory and 1721@c <en>directories above it in the tree; see @ref{Password 1722@c <en>authentication security}. 1723Quando usar pserver, voc� deve ser, em geral, mais mais 1724restritivo com permiss�es no diret�rio @sc{cvsroot} e 1725nos diret�rios abaixo dele na �rvore; veja em 1726@ref{Seguran�a com autentica��o por senha}. 1727 1728@c <en>@cindex Setuid 1729@cindex Setuid 1730@c <en>@cindex Setgid 1731@cindex Setgid 1732@c <en>@cindex Security, setuid 1733@cindex Seguran�a, setuid 1734@c <en>@cindex Installed images (VMS) 1735@cindex ???Installed images??? (VMS) 1736@comment I have no idea what I could tell you to help you translate this since 1737@comment I know little of the VMS operating system. Perhaps you could look 1738@comment this up in some VMS documentation somewhere? 1739@comment -DRP 1740@c <en>Some operating systems have features which allow a 1741@c <en>particular program to run with the ability to perform 1742@c <en>operations which the caller of the program could not. 1743@c <en>For example, the set user ID (setuid) or set group ID 1744@c <en>(setgid) features of unix or the installed image 1745@c <en>feature of VMS. @sc{cvs} was not written to use such 1746@c <en>features and therefore attempting to install @sc{cvs} in 1747@c <en>this fashion will provide protection against only 1748@c <en>accidental lapses; anyone who is trying to circumvent 1749@c <en>the measure will be able to do so, and depending on how 1750@c <en>you have set it up may gain access to more than just 1751@c <en>@sc{cvs}. You may wish to instead consider pserver. It 1752@c <en>shares some of the same attributes, in terms of 1753@c <en>possibly providing a false sense of security or opening 1754@c <en>security holes wider than the ones you are trying to 1755@c <en>fix, so read the documentation on pserver security 1756@c <en>carefully if you are considering this option 1757@c <en>(@ref{Password authentication security}). 1758alguns sistemas operacionais t�m a habilidade de 1759permitir que um programa execute com a habilidade de 1760executar certas opera��es que quem chamou o programa 1761n�o n�o tem. Por exemplo, os set user ID (setuid) ou 1762set group ID (setgid) do unix ou a caracteristica de 1763installed image do VMS. @sc{cvs} n�o foi escrito para 1764usar tais habilidades, logo, tentar instalar o @sc{cvs} 1765nesta forma vai gerar prote��o apenas contra erros 1766acidentais; qualquer um que esteja tentando driblar a 1767seguran�a vai ser capaz de faz�-lo, 1768e dependendo de como voc� configurou, o invasor pode ganhar 1769acesso at� a mais do que apenas o @sc{cvs}. Voc� pode 1770estar considerando o uso do pserver. Ele compartilha 1771alguns dos mesmos atributos, em termos de possivelmente 1772fornecer uma falsa sensa��o de seguran�a ou de abrir 1773buracos de seguran�a ainda maiores dos que os que voc� 1774quer fechar. Portanto leia a documenta��o de seguran�a 1775com pserver cuidadosamente se voc� est� pensando nesta 1776op��o (@ref{Seguran�a com autentica��o por senha}). 1777 1778@c <en>@node Windows permissions 1779@node Permiss�es no Windows 1780@c <en>@subsection File Permission issues specific to Windows 1781@subsection Quest�es sobre permiss�es de arquivos espec�ficas ao Windows 1782@c <en>@cindex Windows, and permissions 1783@cindex Windows, e permiss�es 1784@c <en>@cindex File permissions, Windows-specific 1785@cindex Permiss�es de arquivos, espec�ficas ao Windows 1786@c <en>@cindex Permissions, Windows-specific 1787@cindex Permiss�es, espec�ficas ao Windows 1788 1789@c <en>Some file permission issues are specific to Windows 1790@c <en>operating systems (Windows 95, Windows NT, and 1791@c <en>presumably future operating systems in this family. 1792@c <en>Some of the following might apply to OS/2 but I'm not 1793@c <en>sure). 1794Algumas quest�es sobre permiss�es de arquivos s�o 1795espec�ficas ao sistema operacional Windows (Windows 95, 1796Windows NT e presumivelmente futuros sistemas 1797operacionais nesta fam�lia. Algumas coisas abaixo se 1798aplicam ao OS/2 mas n�o estou bem certo). 1799 1800@c <en>If you are using local @sc{cvs} and the repository is on a 1801@c <en>networked file system which is served by the Samba SMB 1802@c <en>server, some people have reported problems with 1803@c <en>permissions. Enabling WRITE=YES in the samba 1804@c <en>configuration is said to fix/workaround it. 1805@c <en>Disclaimer: I haven't investigated enough to know the 1806@c <en>implications of enabling that option, nor do I know 1807@c <en>whether there is something which @sc{cvs} could be doing 1808@c <en>differently in order to avoid the problem. If you find 1809@c <en>something out, please let us know as described in 1810@c <en>@ref{BUGS}. 1811Se voc� est� usando um @sc{cvs} local e o reposit�rio 1812est� num sistema de arquivos em rede de um servidor 1813Samba SMB, algumas pessoas relataram problemas com 1814permiss�es. Habilitando WRITE=YES na configura��o do 1815samba conserta/resolve. ???Disclaimer:??? Eu n�o 1816@comment "Webster's Revised Unabridged Dictionary (1913)" 1817@comment Disclaimer Dis*claim"er, n. 1818@comment 1. One who disclaims, disowns, or renounces. 1819@comment 1820@comment 2. (Law) A denial, disavowal, or renunciation, as of a title, 1821@comment claim, interest, estate, or trust; relinquishment or 1822@comment waiver of an interest or estate. --Burrill. 1823@comment 1824@comment 3. A public disavowal, as of pretensions, claims, opinions, 1825@comment and the like. --Burke. 1826@comment 1827@comment In other words, "Warning:", or "Caution:", might be appropriate. 1828@comment -DRP 1829investiguei o suficiente as implica��es de habilitar 1830esta op��o, nem sei se h� algo que o @sc{cvs} poderia 1831fazer de diferente para evitar este problema. Se voc� 1832souber de algo, por favor nos ponha a par como descrito 1833em @ref{Paus}. 1834 1835@c <en>@node Attic 1836@node Attic 1837@c <en>@subsection The attic 1838@subsection O attic 1839@c <en>@cindex Attic 1840@cindex Attic 1841 1842@c <en>You will notice that sometimes @sc{cvs} stores an 1843@c <en>@sc{rcs} file in the @code{Attic}. For example, if the 1844@c <en>@sc{cvsroot} is @file{/usr/local/cvsroot} and we are 1845@c <en>talking about the file @file{backend.c} in the 1846@c <en>directory @file{yoyodyne/tc}, then the file normally 1847@c <en>would be in 1848Voc� deve ter notado que �s vezes o @sc{cvs} guarda um 1849arquivo @sc{rcs} no @code{Attic}. Por exemplo, se o 1850@sc{cvsroot} � @file{/usr/local/cvsroot} e n�s estamos 1851falando sobre o arquivo @file{backend.c} no diret�rio 1852@file{yoyodyne/tc}, ent�o o arquivo normalmente deve 1853estar em 1854 1855@example 1856/usr/local/cvsroot/yoyodyne/tc/backend.c,v 1857@end example 1858 1859@noindent 1860@c <en>but if it goes in the attic, it would be in 1861mas se ele vai para o attic, ele deve estar em 1862 1863@example 1864/usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v 1865@end example 1866 1867@noindent 1868@c <en>@cindex Dead state 1869@cindex Estado morto 1870@c <en>. It should not matter from a user point of 1871@c <en>view whether a file is in the attic; @sc{cvs} keeps 1872@c <en>track of this and looks in the attic when it needs to. 1873@c <en>But in case you want to know, the rule is that the RCS 1874@c <en>file is stored in the attic if and only if the head 1875@c <en>revision on the trunk has state @code{dead}. A 1876@c <en>@code{dead} state means that file has been removed, or 1877@c <en>never added, for that revision. For example, if you 1878@c <en>add a file on a branch, it will have a trunk revision 1879@c <en>in @code{dead} state, and a branch revision in a 1880@c <en>non-@code{dead} state. 1881ao inv�s. N�o importa ao usu�rio onde, dentro do Attic, 1882fica o arquivo; @sc{cvs} mant�m controle disto e busca 1883no Attic quando � preciso. Mas caso voc� queira saber, 1884a regra � que o arquivo RCS � guardado no attic se e 1885somente se a ???head revision??? no tronco est� no 1886@comment "Head", at the front, etc. In this case, refers to the most recent 1887@comment revision on the trunk, like the head of a snake would be in front. 1888@comment In English, the "head of a line" is the person in front and the "tail" 1889@comment the person in back. 1890@comment -DRP 1891estado @code{morto} (dead). Um estado @code{morto} significa 1892que o arquivo foi removido, ou nunca foi adicionado, 1893naquela revis�o. Por exemplo, se voc� adiciona um 1894arquivo num ramo, ele vai ter uma revis�o de 1895tronco num estado @code{morto} e uma revis�o de 1896ramo num estado n�o-@code{morto}. 1897@c Probably should have some more concrete examples 1898@c here, or somewhere (not sure exactly how we should 1899@c arrange the discussion of the dead state, versus 1900@c discussion of the attic). 1901 1902@c <en>@node CVS in repository 1903@node CVS no reposit�rio 1904@c <en>@subsection The CVS directory in the repository 1905@subsection O diret�rio CVS no reposit�rio 1906@c <en>@cindex CVS directory, in repository 1907@cindex diret�rio CVS, no reposit�rio 1908 1909@c <en>The @file{CVS} directory in each repository directory 1910@c <en>contains information such as file attributes (in a file 1911@c <en>called @file{CVS/fileattr}. In the 1912@c <en>future additional files may be added to this directory, 1913@c <en>so implementations should silently ignore additional 1914@c <en>files. 1915O diret�rio @file{CVS} em cada diret�rio do reposit�rio 1916cont�m informa��es tais como atributos de arquivos (num 1917arquivo chamado @file{CVS/fileattr}. No futuro novos 1918arquivos ficar�o neste diret�rio, logo, implementa��es 1919devem ignorar em sil�ncio arquivos adicionais. 1920 1921@c <en>This behavior is implemented only by @sc{cvs} 1.7 and 1922@c <en>later; for details see @ref{Watches Compatibility}. 1923Este comportamento � implementado apenas pelo @sc{cvs} 19241.7 e posteriores; para detalhes veja em 1925@ref{Compatibilidade de ???Watches???}. 1926@comment As "watches", previously. 1927@comment -DRP 1928 1929@c <en>The format of the fileattr file is a series of entries 1930@c <en>of the following form (where @samp{@{} and @samp{@}} 1931@c <en>means the text between the braces can be repeated zero 1932@c <en>or more times): 1933O formato do arquivo fileattr � uma s�rie de entradas 1934da seguinte forma (onde @samp{@{} e @samp{@}} 1935significam que o texto entre chaves pode ser repetido 1936zero ou v�rias vezes): 1937 1938@var{ent-type} @var{filename} <tab> @var{attrname} = @var{attrval} 1939 @{; @var{attrname} = @var{attrval}@} <linefeed> 1940 1941@c <en>@var{ent-type} is @samp{F} for a file, in which case the entry specifies the 1942@c <en>attributes for that file. 1943@var{ent-type} � @samp{F} para arquivo, neste caso a 1944entrada especifica os atributos para tal arquivo. 1945 1946@c <en>@var{ent-type} is @samp{D}, 1947@c <en>and @var{filename} empty, to specify default attributes 1948@c <en>to be used for newly added files. 1949@var{ent-type} � @samp{D}, 1950e @var{filename} vazio, para especificar atributos 1951padr�o para serem usados em novos arquivos adicionados. 1952 1953@c <en>Other @var{ent-type} are reserved for future expansion. @sc{cvs} 1.9 and older 1954@c <en>will delete them any time it writes file attributes. 1955@c <en>@sc{cvs} 1.10 and later will preserve them. 1956Outros @var{ent-type} s�o reservados para futuras 1957expans�es. @sc{cvs} 1.9 e anteriores v�o delet�-los a 1958toda hora que ele escrever atributos de 1959arquivos. @sc{cvs} 1.10 e posteriores v�o preserv�-los. 1960 1961@c <en>Note that the order of the lines is not significant; 1962@c <en>a program writing the fileattr file may 1963@c <en>rearrange them at its convenience. 1964Observe que a ordem das linhas n�o � significante; um 1965programa escrevendo o arquivo fileattr pode 1966rearranj�-las de acordo com sua pr�pria conveni�ncia. 1967 1968@c <en>There is currently no way of quoting tabs or linefeeds in the 1969@c <en>filename, @samp{=} in @var{attrname}, 1970@c <en>@samp{;} in @var{attrval}, etc. Note: some implementations also 1971@c <en>don't handle a NUL character in any of the fields, but 1972@c <en>implementations are encouraged to allow it. 1973N�o existe atualmente uma forma de tratar tabula��es ou quebras de linha 1974como caractere no nome do arquivo, @samp{=} em @var{attrname}, 1975@samp{;} em @var{attrval}, etc. Obs.: algumas 1976implementa��es tamb�m n�o manipulam o caractere NUL em 1977nenhum dos campos, mas encorajamos implementa��es que 1978permitam isto. 1979 1980@c <en>By convention, @var{attrname} starting with @samp{_} is for an attribute given 1981@c <en>special meaning by @sc{cvs}; other @var{attrname}s are for user-defined attributes 1982@c <en>(or will be, once implementations start supporting user-defined attributes). 1983Por conven��o, @var{attrname} come�ando com @samp{_} � 1984para um atributo ao qual foi dado significado especial 1985pelo @sc{cvs}; outros @var{attrname}s s�o para 1986atributos definidos pelo usu�rio (ou que v�o ser, j� 1987que implementa��es come�aram suporte a atributos 1988definidos pelo usu�rio). 1989 1990@c <en>Builtin attributes: 1991Atributos internos: 1992 1993@table @code 1994@item _watched 1995@c <en>Present means the file is watched and should be checked out 1996@c <en>read-only. 1997Quando presente significa que o arquivo est� 1998???watched??? (watched) e deve ser emprestado como 1999@comment As "watches", before. 2000@comment -DRP 2001somente-leitura. 2002 2003@item _watchers 2004@c <en>Users with watches for this file. Value is 2005@c <en>@var{watcher} > @var{type} @{ , @var{watcher} > @var{type} @} 2006@c <en>where @var{watcher} is a username, and @var{type} 2007@c <en>is zero or more of edit,unedit,commit separated by 2008@c <en>@samp{+} (that is, nothing if none; there is no "none" or "all" keyword). 2009Usu�rios com ???watches??? para este arquivo. O valor � 2010@comment As "watches", before. 2011@comment -DRP 2012@var{watcher} > @var{type} @{ , @var{watcher} > @var{type} @} 2013onde @var{watcher} � um nome de usu�rio, e @var{type} � 2014zero ou mais de edit,unedit,commit separados por 2015@samp{+} (isto �, deixe em branco para nenhum; n�o h� 2016palavras-chave para "nenhum" ou "todos"). 2017 2018@item _editors 2019@c <en>Users editing this file. Value is 2020@c <en>@var{editor} > @var{val} @{ , @var{editor} > @var{val} @} 2021@c <en>@c <en>where @var{editor} is a username, and @var{val} is 2022@c <en>@var{time}+@var{hostname}+@var{pathname}, where 2023@c <en>@var{time} is when the @code{cvs edit} command (or 2024@c <en>equivalent) happened, 2025@c <en>and @var{hostname} and @var{pathname} are for the working directory. 2026Usu�rios editando este arquivo. O valor � 2027@var{editor} > @var{val} @{ , @var{editor} > @var{val} @} 2028onde @var{editor} � um username, e @var{val} � 2029@var{time}+@var{hostname}+@var{pathname}, onde 2030@var{time} � quando o comando @code{cvs edit} (ou outro 2031equivalente) aconteceu, e @var{hostname} e 2032@var{pathname} s�o do diret�rio de trabalho. 2033@end table 2034 2035Example: 2036 2037@c FIXME: sanity.sh should contain a similar test case 2038@c so we can compare this example from something from 2039@c Real Life(TM). See cvsclient.texi (under Notify) for more 2040@c discussion of the date format of _editors. 2041@example 2042Ffile1 _watched=;_watchers=joe>edit,mary>commit 2043Ffile2 _watched=;_editors=sue>8 Jan 1975+workstn1+/home/sue/cvs 2044D _watched= 2045@end example 2046 2047@noindent 2048@c <en>means that the file @file{file1} should be checked out 2049@c <en>read-only. Furthermore, joe is watching for edits and 2050@c <en>mary is watching for commits. The file @file{file2} 2051@c <en>should be checked out read-only; sue started editing it 2052@c <en>on 8 Jan 1975 in the directory @file{/home/sue/cvs} on 2053@c <en>the machine @code{workstn1}. Future files which are 2054@c <en>added should be checked out read-only. To represent 2055@c <en>this example here, we have shown a space after 2056@c <en>@samp{D}, @samp{Ffile1}, and @samp{Ffile2}, but in fact 2057@c <en>there must be a single tab character there and no spaces. 2058significa que o arquivo @file{file1} deve ser pego como 2059somente-leitura. Al�m disso, joe est� ???watching??? 2060edi��es e mary est� ???watching??? ???commits???. O 2061@comment "Watching", as "watches", before. 2062@comment "Commits" are checkins, i.e. via the `cvs commit' command. 2063@comment -DRP 2064arquivo @file{file2} deve ser pego somente-leitura; sue 2065comecou a edita-lo em 8 Jan 1975 no diretorio 2066@file{/home/sue/cvs} na maquina 2067@code{workstn1}. Futuros arquivos que forem adicionados 2068devem ser pegos somente-leitura. Para representar este 2069exemplo aqui, n�s mostramos um espaco depois de 2070@samp{D}, @samp{Ffile1}, e @samp{Ffile2}, mas de fato 2071existe um caractere de tab e nenhum espaco. 2072 2073@c <en>@node Locks 2074@node Travas 2075@c <en>@subsection CVS locks in the repository 2076@subsection travas CVS no reposit�rio 2077 2078@c <en>@cindex #cvs.rfl, technical details 2079@cindex #cvs.rfl, detalhes t�cnicos 2080@c <en>@cindex #cvs.pfl, technical details 2081@cindex #cvs.pfl, detalhes t�cnicos 2082@c <en>@cindex #cvs.wfl, technical details 2083@cindex #cvs.wfl, detalhes t�cnicos 2084@c <en>@cindex #cvs.lock, technical details 2085@cindex #cvs.lock, detalhes t�cnicos 2086@c <en>@cindex Locks, cvs, technical details 2087@cindex Travas, cvs, detalhes t�cnicos 2088@c <en>For an introduction to @sc{cvs} locks focusing on 2089@c <en>user-visible behavior, see @ref{Concurrency}. The 2090@c <en>following section is aimed at people who are writing 2091@c <en>tools which want to access a @sc{cvs} repository without 2092@c <en>interfering with other tools accessing the same 2093@c <en>repository. If you find yourself confused by concepts 2094@c <en>described here, like @dfn{read lock}, @dfn{write lock}, 2095@c <en>and @dfn{deadlock}, you might consult the literature on 2096@c <en>operating systems or databases. 2097Para uma introdu��o �s travas (locks) no @sc{cvs} 2098focando no comportamento vis�vel ao usu�rio, veja em 2099@ref{Concorr�ncia}. A se��o seguinte foi feita para 2100para pessoas que escrevem ferramentas as quais precisam 2101acessar um reposit�rio @sc{cvs} sem interferir com 2102outras ferramentas acessando o mesmo reposit�rio. Se 2103voc� se sentir confuso com os conceitos descritos aqui, 2104como @dfn{read lock}, @dfn{write lock} e 2105@dfn{deadlock}, voc� deve consultar a literatura de 2106sistemas operacionais e bancos de dados. 2107 2108@c <en>@cindex #cvs.tfl 2109@cindex #cvs.tfl 2110@c <en>Any file in the repository with a name starting 2111@c <en>with @file{#cvs.rfl.} is a read lock. Any file in 2112@c <en>the repository with a name starting with 2113@c <en>@file{#cvs.pfl} is a promotable read lock. Any file in 2114@c <en>the repository with a name starting with 2115@c <en>@file{#cvs.wfl} is a write lock. Old versions of @sc{cvs} 2116@c <en>(before @sc{cvs} 1.5) also created files with names starting 2117@c <en>with @file{#cvs.tfl}, but they are not discussed here. 2118@c <en>The directory @file{#cvs.lock} serves as a master 2119@c <en>lock. That is, one must obtain this lock first before 2120@c <en>creating any of the other locks. 2121Qualquer arquivo no reposit�rio com um nome come�ando 2122com @file{#cvs.rfl.} � uma trava de leitura. Qualquer 2123arquivo no reposit�rio com um nome com�ando com 2124@file{#cvs.pfl} � uma trava de leitura 2125???promotable???. Qualquer arquivo no reposit�rio com 2126um nome come�ando com 2127@file{#cvs.wfl} � uma trava de escrita. Vers�es antigas 2128do @sc{cvs} (antes do @sc{cvs} 1.5) tamb�m criavam 2129arquivos com nomes come�ando com @file{#cvs.tfl}, mas 2130estes n�o s�o discutidos aqui. 2131 2132@c <en>The directory @file{#cvs.lock} serves as a master 2133@c <en>lock. That is, one must obtain this lock first before 2134@c <en>creating any of the other locks. 2135O diret�rio @file{#cvs.lock} funciona como uma trava 2136mestra. Isto �, deve-se obter esta trava antes de 2137criar qualquer das outras travas. 2138 2139@c <en>To obtain a readlock, first create the @file{#cvs.lock} 2140@c <en>directory. This operation must be atomic (which should 2141@c <en>be true for creating a directory under most operating 2142@c <en>systems). If it fails because the directory already 2143@c <en>existed, wait for a while and try again. After 2144@c <en>obtaining the @file{#cvs.lock} lock, create a file 2145@c <en>whose name is @file{#cvs.rfl.} followed by information 2146@c <en>of your choice (for example, hostname and process 2147@c <en>identification number). Then remove the 2148@c <en>@file{#cvs.lock} directory to release the master lock. 2149@c <en>Then proceed with reading the repository. When you are 2150@c <en>done, remove the @file{#cvs.rfl} file to release the 2151@c <en>read lock. 2152Para obter uma trava de leitura, primeiro crie o diret�rio 2153@file{#cvs.lock}. Esta opera��o deve ser at�mica (o 2154que deve ser verdade para a cria��o de um diret�rio na 2155maioria dos sistemas operacionais). Se isto falha por 2156que o diret�rio j� existe, espere um tempinho e tente de 2157novo. Depois de obter a trava @file{#cvs.lock}, crie 2158um arquivo cujo nome seja @file{#cvs.rfl.} seguido pela 2159informa��o de sua escolha (por exemplo, nome de host e 2160nmero de identifica�ao de processo). Ent�o remova o 2161diret�rio @file{#cvs.lock} para ativar a trava 2162mestra. Ent�o come�e a ler o reposit�rio. Quando voc� 2163terminar, remova o arquivo @file{#cvs.rfl} para 2164liberar a trava de leitura. 2165 2166@c <en>Promotable read locks are a concept you may not find in other literature on 2167@c <en>concurrency. They are used to allow a two (or more) pass process to only lock 2168@c <en>a file for read on the first (read) pass(es), then upgrade its read locks to 2169@c <en>write locks if necessary for a final pass, still assured that the files have 2170@c <en>not changed since they were first read. @sc{cvs} uses promotable read locks, 2171@c <en>for example, to prevent commit and tag verification passes from interfering 2172@c <en>with other reading processes. It can then lock only a single directory at a 2173@c <en>time for write during the write pass. 2174Promotable read locks are a concept you may not find in other literature on 2175concurrency. They are used to allow a two (or more) pass process to only lock 2176a file for read on the first (read) pass(es), then upgrade its read locks to 2177write locks if necessary for a final pass, still assured that the files have 2178not changed since they were first read. @sc{cvs} uses promotable read locks, 2179for example, to prevent commit and tag verification passes from interfering 2180with other reading processes. It can then lock only a single directory at a 2181time for write during the write pass. 2182 2183@c <en>To obtain a promotable read lock, first create the @file{#cvs.lock} directory, 2184@c <en>as with a non-promotable read lock. Then check 2185@c <en>that there are no files that start with 2186@c <en>@file{#cvs.pfl}. If there are, remove the master @file{#cvs.lock} directory, 2187@c <en>wait awhile (CVS waits 30 seconds between lock attempts), and try again. If 2188@c <en>there are no other promotable locks, go ahead and create a file whose name is 2189@c <en>@file{#cvs.pfl} followed by information of your choice (for example, CVS uses 2190@c <en>its hostname and the process identification number of the CVS server process 2191@c <en>creating the lock). If versions of @sc{cvs} older than version 1.12.4 access 2192@c <en>your repository directly (not via a @sc{cvs} server of version 1.12.4 or 2193@c <en>later), then you should also create a read lock since older versions of CVS 2194@c <en>will ignore the promotable lock when attempting to create their own write lock. 2195@c <en>Then remove the master @file{#cvs.lock} directory in order to allow other 2196@c <en>processes to obtain read locks. 2197To obtain a promotable read lock, first create the @file{#cvs.lock} directory, 2198as with a non-promotable read lock. Then check 2199that there are no files that start with 2200@file{#cvs.pfl}. If there are, remove the master @file{#cvs.lock} directory, 2201wait awhile (CVS waits 30 seconds between lock attempts), and try again. If 2202there are no other promotable locks, go ahead and create a file whose name is 2203@file{#cvs.pfl} followed by information of your choice (for example, CVS uses 2204its hostname and the process identification number of the CVS server process 2205creating the lock). If versions of @sc{cvs} older than version 1.12.4 access 2206your repository directly (not via a @sc{cvs} server of version 1.12.4 or 2207later), then you should also create a read lock since older versions of CVS 2208will ignore the promotable lock when attempting to create their own write lock. 2209Then remove the master @file{#cvs.lock} directory in order to allow other 2210processes to obtain read locks. 2211 2212@c <en>To obtain a writelock, first create the 2213@c <en>@file{#cvs.lock} directory, as with readlocks. Then 2214@c <en>check that there are no files whose names start with 2215@c <en>@file{#cvs.rfl.} and no files whose names start with @file{#cvs.pfl} that are 2216@c <en>not owned by the process attempting to get the write lock. If either exist, 2217@c <en>remove @file{#cvs.lock}, wait for a while, and try again. If 2218@c <en>there are no readers or promotable locks from other processes, then create a 2219@c <en>file whose name is @file{#cvs.wfl} followed by information of your choice 2220@c <en>(again, CVS uses the hostname and server process identification 2221@c <en>number). Remove your @file{#cvs.pfl} file if present. Hang on to the 2222@c <en>@file{#cvs.lock} lock. Proceed 2223@c <en>with writing the repository. When you are done, first 2224@c <en>remove the @file{#cvs.wfl} file and then the 2225@c <en>@file{#cvs.lock} directory. Note that unlike the 2226@c <en>@file{#cvs.rfl} file, the @file{#cvs.wfl} file is just 2227@c <en>informational; it has no effect on the locking operation 2228@c <en>beyond what is provided by holding on to the 2229@c <en>@file{#cvs.lock} lock itself. 2230Para obter uma trava de escrita, primeiro crie o 2231diret�rio @file{#cvs.lock}, da mesma forma que com as 2232travas de leitura. Ent�o verifique se n�o existem 2233arquivos cujos nomes come�am com @file{#cvs.rfl.} e se 2234n�o existem arquivos cujo nome come�a com 2235@file{#cvs.pfl} que n�o tenha como dono o processo 2236tentando ter a trava de escrita. Se ???either??? 2237existe, remova o @file{#cvs.lock}, espere um momento, e 2238tente de novo. Se n�o existem ???readers??? ou travas 2239???promotable??? de outros processos, ent�o crie um 2240arquivo cujo nome � @file{#cvs.wfl} seguido de 2241informa��es da sua escolha (novamente, o CVS usa o 2242hostname e o ???server process identification 2243number??). Remove your @file{#cvs.pfl} file if present. Hang on to the 2244@file{#cvs.lock} lock. Escreva no reposit�rio. Quando 2245tiver terminado, primeiro remova o arquivo 2246@file{#cvs.wfl} e ent�o o diret�rio 2247@file{#cvs.lock}. Observe que ao contr�rio do arquivo 2248@file{#cvs.rfl}, o arquivo @file{#cvs.wfl} � apenas 2249informativo; ele n�o tem efeito na opera��o de trava 2250al�m do que � feito pelo ato de manter a trava 2251@file{#cvs.lock}. 2252 2253@c <en>Note that each lock (writelock or readlock) only locks 2254@c <en>a single directory in the repository, including 2255@c <en>@file{Attic} and @file{CVS} but not including 2256@c <en>subdirectories which represent other directories under 2257@c <en>version control. To lock an entire tree, you need to 2258@c <en>lock each directory (note that if you fail to obtain 2259@c <en>any lock you need, you must release the whole tree 2260@c <en>before waiting and trying again, to avoid deadlocks). 2261Observe que cada trava (de escrita ou leitura) apenas trava um 2262�nico diret�rio no 2263reposit�rio, inclusive no caso do @file{Attic} e do @file{CVS} 2264sem incluir os subdiret�rios que representam outros 2265diret�rios sob controle de vers�o. Para travar uma 2266�rvore inteira, voc precisa travar cada diret�rio 2267(observe que se voc� n�o conseguir obter alguma trava 2268que voc� precise, voc� deve liberar a �rvore toda antes 2269para esperar e tentar novamente, para evitar ???deadlocks???). 2270@comment "Deadlock" is a computer science term which refers to the scenario 2271@comment where two processes end up waiting on each other in such a way that 2272@comment neither will ever get the lock and therefore neither process will 2273@comment ever run again, and therefore both are said to be "dead". 2274@comment 2275@comment For example, say process 1 wants to lock files "A" and "B", and so 2276@comment does process 2. If process 1 locks "A" first, and process 2 locks 2277@comment file "B" first, then process begins waiting to lock "B" while process 2278@comment 2 waits to lock "A", then both processes will wait indefinately, a 2279@comment commonly encountered problem with file locking, especially for 2280@comment inexperienced programmers. 2281@comment -DRP 2282 2283@c <en>Note also that @sc{cvs} expects writelocks to control 2284@c <en>access to individual @file{foo,v} files. @sc{rcs} has 2285@c <en>a scheme where the @file{,foo,} file serves as a lock, 2286@c <en>but @sc{cvs} does not implement it and so taking out a 2287@c <en>@sc{cvs} writelock is recommended. See the comments at 2288@c <en>rcs_internal_lockfile in the @sc{cvs} source code for 2289@c <en>further discussion/rationale. 2290Observe tamb�m que o @sc{cvs} espera travas de escrita 2291para controlar o acesso a arquivos @file{foo,v} 2292individuais. O @sc{rcs} tem um esquema onde o arquivo 2293@file{,foo,} funciona como uma trava, mas o @sc{cvs} 2294n�o implementa isso. Portanto, fazer uma trava de escrita 2295no @sc{cvs} � recomendado. Veja os coment�rios no 2296rcs_internal_lockfile no c�digo fonte do @sc{cvs} para 2297mais discuss�es/explica��es. 2298 2299@c <en>@node CVSROOT storage 2300@node Armazenamento do CVSROOT 2301@c <en>@subsection How files are stored in the CVSROOT directory 2302@subsection Como os arquivos s�o guardados no diret�rio CVSROOT 2303@c <en>@cindex CVSROOT, storage of files 2304@cindex CVSROOT, armazenamento de arquivos 2305 2306@c <en>The @file{$CVSROOT/CVSROOT} directory contains the 2307@c <en>various administrative files. In some ways this 2308@c <en>directory is just like any other directory in the 2309@c <en>repository; it contains @sc{rcs} files whose names end 2310@c <en>in @samp{,v}, and many of the @sc{cvs} commands operate 2311@c <en>on it the same way. However, there are a few 2312@c <en>differences. 2313O diret�rio @file{$CVSROOT/CVSROOT} cont�m os v�rios 2314arquivos administrativos. Em alguns aspectos este 2315diret�rio � igual a qualquer outro diret�rio no 2316reposit�rio; ele cont�m arquivos @sc{rcs} cujos nomes 2317terminam em @samp{,v}, e muitos dos comandos do 2318@sc{cvs} operam neles do mesmo jeito. Entretanto, 2319existem algumas poucas diferen�as. 2320 2321@c <en>For each administrative file, in addition to the 2322@c <en>@sc{rcs} file, there is also a checked out copy of the 2323@c <en>file. For example, there is an @sc{rcs} file 2324@c <en>@file{loginfo,v} and a file @file{loginfo} which 2325@c <en>contains the latest revision contained in 2326@c <en>@file{loginfo,v}. When you check in an administrative 2327@c <en>file, @sc{cvs} should print 2328Para cada arquivo administrativo, al�m do arquivo 2329@sc{rcs}, existe tamb�m uma c�pia de trabalho do 2330arquivo. Por exemplo, existe um arquivo @sc{rcs} 2331@file{loginfo,v} e um arquivo @file{loginfo} que cont�m 2332a ultima revis�o contida em @file{loginfo,v}. Quando 2333voc� devolve um arquivo administrativo, o @sc{cvs} vai 2334mostrar 2335 2336@example 2337cvs commit: Rebuilding administrative file database 2338@end example 2339 2340@noindent 2341@c <en>and update the checked out copy in 2342@c <en>@file{$CVSROOT/CVSROOT}. If it does not, there is 2343@c <en>something wrong (@pxref{BUGS}). To add your own files 2344@c <en>to the files to be updated in this fashion, you can add 2345@c <en>them to the @file{checkoutlist} administrative file 2346@c <en>(@pxref{checkoutlist}). 2347e atualizar a c�pia de trabalho em 2348@file{$CVSROOT/CVSROOT}. Se n�o fizer, tem algo errado 2349(@pxref{Paus}). Para adicionar os seus pr�prios 2350arquivos aos arquivos a serem atualizados desta 2351maneira, voc� pode adicion�-los ao arquivo 2352administrativo @file{checkoutlist} 2353(@pxref{checkoutlist}). 2354 2355@c <en>@cindex modules.db 2356@cindex modules.db 2357@c <en>@cindex modules.pag 2358@cindex modules.pag 2359@c <en>@cindex modules.dir 2360@cindex modules.dir 2361@c <en>By default, the @file{modules} file behaves as 2362@c <en>described above. If the modules file is very large, 2363@c <en>storing it as a flat text file may make looking up 2364@c <en>modules slow (I'm not sure whether this is as much of a 2365@c <en>concern now as when @sc{cvs} first evolved this 2366@c <en>feature; I haven't seen benchmarks). Therefore, by 2367@c <en>making appropriate edits to the @sc{cvs} source code 2368@c <en>one can store the modules file in a database which 2369@c <en>implements the @code{ndbm} interface, such as Berkeley 2370@c <en>db or GDBM. If this option is in use, then the modules 2371@c <en>database will be stored in the files @file{modules.db}, 2372@c <en>@file{modules.pag}, and/or @file{modules.dir}. 2373Por padr�o o arquivo @file{modules} se comporta como 2374descrito acima. Se o arquivo modules � muito grande, 2375guardar ele como um arquivo de texto normal faz a busca 2376por m�dulos lenta (N�o estou bem certo se isso importa 2377tanto agora como quando o @sc{cvs} primeiramente 2378desenvolveu esta habilidade; n�o vi avalia��es). 2379Entretanto, fazendo edi��es apropriadas no c�digo fonte 2380do @sc{cvs} pode-se guardar o arquivo modules num banco 2381de dados que implementa a interface @code{ndbm}, tais 2382como o Berkeley db ou GDBM. Se esta op��o est� em uso, 2383ent�o o banco de dados modules ser� guardado nos 2384arquivos @file{modules.db}, @file{modules.pag}, e/ou @file{modules.dir}. 2385@c I think fileattr also will use the database stuff. 2386@c Anything else? 2387 2388@c <en>For information on the meaning of the various 2389@c <en>administrative files, see @ref{Administrative files}. 2390Para informa��es sobre o significado dos v�rios arquivos administrativos, 2391veja em @ref{Arquivos administrativos}. 2392 2393@c <en>@node Working directory storage 2394@node Armazenamento do Diret�rio de trabalho 2395@c <en>@section How data is stored in the working directory 2396@section Como os dados s�o guardados no diret�rio de trabalho 2397 2398@c FIXME: Somewhere we should discuss timestamps (test 2399@c case "stamps" in sanity.sh). But not here. Maybe 2400@c in some kind of "working directory" chapter which 2401@c would encompass the "Builds" one? But I'm not sure 2402@c whether that is a good organization (is it based on 2403@c what the user wants to do?). 2404 2405@c <en>@cindex CVS directory, in working directory 2406@cindex diret�rio CVS, no diret�rio de trabalho 2407@c <en>While we are discussing @sc{cvs} internals which may 2408@c <en>become visible from time to time, we might as well talk 2409@c <en>about what @sc{cvs} puts in the @file{CVS} directories 2410@c <en>in the working directories. As with the repository, 2411@c <en>@sc{cvs} handles this information and one can usually 2412@c <en>access it via @sc{cvs} commands. But in some cases it 2413@c <en>may be useful to look at it, and other programs, such 2414@c <en>as the @code{jCVS} graphical user interface or the 2415@c <en>@code{VC} package for emacs, may need to look at it. 2416@c <en>Such programs should follow the recommendations in this 2417@c <en>section if they hope to be able to work with other 2418@c <en>programs which use those files, including future 2419@c <en>versions of the programs just mentioned and the 2420@c <en>command-line @sc{cvs} client. 2421Assim como estamos conversando sobre as entranhas do 2422@sc{cvs}, que podem ficar vis�veis de tempos em tempos, 2423tamb�m devemos falar sobre o que o @sc{cvs} bota nos 2424diret�rios @file{CVS} nos diret�rios de trabalho. 2425Assim como com o reposit�rio, o @sc{cvs} manipula esta 2426informa��o e pode-se acess�-la normalmente via comandos 2427@sc{cvs}. Mas em alguns casos pode ser �til dar uma 2428olhada, e outros programas, como a interface de usu�rio 2429gr�fica @code{jCVS} ou o pacote para emacs @code{VC}, 2430precisarem ver o que tem l�. Tais programas devem 2431seguir as recomenda��es nesta se��o se eles querem 2432interagir com outros programas que usam estes arquivos, 2433inclusive vers�es futuras dos programas mencinados logo 2434acima e o cliente em linha-de-comando do @sc{cvs}. 2435 2436@c <en>The @file{CVS} directory contains several files. 2437@c <en>Programs which are reading this directory should 2438@c <en>silently ignore files which are in the directory but 2439@c <en>which are not documented here, to allow for future 2440@c <en>expansion. 2441O diret�rio @file{CVS} cont�m v�rios 2442arquivos. Programas que est�o lendo este diret�rio 2443devem ignorar em sil�ncio arquivos que encontrem no 2444diret�rio mas que n�o estejam documentados aqui, para 2445permitir expans�es futuras. 2446 2447@c <en>The files are stored according to the text file 2448@c <en>convention for the system in question. This means that 2449@c <en>working directories are not portable between systems 2450@c <en>with differing conventions for storing text files. 2451@c <en>This is intentional, on the theory that the files being 2452@c <en>managed by @sc{cvs} probably will not be portable between 2453@c <en>such systems either. 2454Os arquivos s�o guardados de acordo com a conven��o de 2455arquivo de texto do sistema em quest�o. Isto significa 2456que diret�rios de trabalho n�o s�o port�veis entre 2457sistemas com diferentes conven��es para armazenar 2458arquivos de texto. Isto � de prop�sito, baseado na 2459teoria de que os arquivos sendo gerenciados pelo 2460@sc{cvs} provavelmente tamb�m n�o seriam port�veis 2461entre tais sistemas. 2462 2463@table @file 2464@item Root 2465@c <en>This file contains the current @sc{cvs} root, as 2466@c <en>described in @ref{Specifying a repository}. 2467Este arquivo cont�m a raiz atual do @sc{cvs}, como 2468descrito em @ref{Especificando um reposit�rio}. 2469 2470@c <en>@cindex Repository file, in CVS directory 2471@cindex O arquivo Repository, no diret�rio CVS 2472@c <en>@cindex CVS/Repository file 2473@cindex O arquivo CVS/Repository 2474@c <en>@item Repository 2475@item Reposit�rio 2476@c <en>This file contains the directory within the repository 2477@c <en>which the current directory corresponds with. It can 2478@c <en>be either an absolute pathname or a relative pathname; 2479@c <en>@sc{cvs} has had the ability to read either format 2480@c <en>since at least version 1.3 or so. The relative 2481@c <en>pathname is relative to the root, and is the more 2482@c <en>sensible approach, but the absolute pathname is quite 2483@c <en>common and implementations should accept either. For 2484@c <en>example, after the command 2485Este arquivo cont�m o diret�rio no qual est� o 2486reposit�rio correspondente ao diret�rio atual. Pode 2487ser um caminho absoluto ou relativo; @sc{cvs} adquiriu 2488a habilidade de ler ambos os formatos desde a vers�o 24891.3. O caminho � relativo � raiz (root), e � a 2490abordagem mais racional, mas o caminho absoluto � 2491mais comum e ambos devem ser aceitos. Por exemplo, 2492depois do comando 2493 2494@example 2495cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc 2496@end example 2497 2498@noindent 2499@c <en>@file{Root} will contain 2500o @file{Root} vai conter 2501 2502@example 2503:local:/usr/local/cvsroot 2504@end example 2505 2506@noindent 2507@c <en>and @file{Repository} will contain either 2508e o @file{Reposit�rio} vai conter ou 2509 2510@example 2511/usr/local/cvsroot/yoyodyne/tc 2512@end example 2513 2514@noindent 2515@c <en>or 2516ou 2517 2518@example 2519yoyodyne/tc 2520@end example 2521 2522@c <en>If the particular working directory does not correspond 2523@c <en>to a directory in the repository, then @file{Repository} 2524@c <en>should contain @file{CVSROOT/Emptydir}. 2525Se o diret�rio de trabalho particular n�o corresponde a 2526um diret�rio no reposit�rio, ent�o o @file{Reposit�rio} 2527deve conter @file{CVSROOT/Emptydir}. 2528@c <en>@cindex Emptydir, in CVSROOT directory 2529@cindex Emptydir, no diret�rio CVSROOT 2530@c <en>@cindex CVSROOT/Emptydir directory 2531@cindex O diret�rio CVSROOT/Emptydir 2532 2533@c <en>@cindex Entries file, in CVS directory 2534@cindex O arquivo Entries, no diret�rio do CVS 2535@c <en>@cindex CVS/Entries file 2536@cindex O arquivo CVS/Entries 2537@c <en>@item Entries 2538@item Entries 2539@c <en>This file lists the files and directories in the 2540@c <en>working directory. 2541@c <en>The first character of each line indicates what sort of 2542@c <en>line it is. If the character is unrecognized, programs 2543@c <en>reading the file should silently skip that line, to 2544@c <en>allow for future expansion. 2545Este arquivo relaciona os arquivos e diret�rios no 2546diret�rio de trabalho. O primeiro caractere de cada 2547linha indica de que tipo � a linha. Se caractere n�o 2548for reconhecido, os programas lendo o arquivo devem 2549pular de linha em sil�ncio, para permitir futuras expans�es. 2550 2551@c <en>If the first character is @samp{/}, then the format is: 2552Se o primeiro caractere � @samp{/}, ent�o o formato �: 2553 2554@example 2555/@var{name}/@var{revision}/@var{timestamp}[+@var{conflict}]/@var{options}/@var{tagdate} 2556@end example 2557 2558@noindent 2559@c <en>where @samp{[} and @samp{]} are not part of the entry, 2560@c <en>but instead indicate that the @samp{+} and conflict 2561@c <en>marker are optional. @var{name} is the name of the 2562@c <en>file within the directory. @var{revision} is the 2563@c <en>revision that the file in the working derives from, or 2564@c <en>@samp{0} for an added file, or @samp{-} followed by a 2565@c <en>revision for a removed file. @var{timestamp} is the 2566@c <en>timestamp of the file at the time that @sc{cvs} created 2567@c <en>it; if the timestamp differs with the actual 2568@c <en>modification time of the file it means the file has 2569@c <en>been modified. It is stored in 2570@c <en>the format used by the ISO C asctime() function (for 2571@c <en>example, @samp{Sun Apr 7 01:29:26 1996}). One may 2572@c <en>write a string which is not in that format, for 2573@c <en>example, @samp{Result of merge}, to indicate that the 2574@c <en>file should always be considered to be modified. This 2575@c <en>is not a special case; to see whether a file is 2576@c <en>modified a program should take the timestamp of the file 2577@c <en>and simply do a string compare with @var{timestamp}. 2578@c <en>If there was a conflict, @var{conflict} can be set to 2579@c <en>the modification time of the file after the file has been 2580@c <en>written with conflict markers (@pxref{Conflicts example}). 2581@c <en>Thus if @var{conflict} is subsequently the same as the actual 2582@c <en>modification time of the file it means that the user 2583@c <en>has obviously not resolved the conflict. @var{options} 2584@c <en>contains sticky options (for example @samp{-kb} for a 2585@c <en>binary file). @var{tagdate} contains @samp{T} followed 2586@c <en>by a tag name, or @samp{D} for a date, followed by a 2587@c <en>sticky tag or date. Note that if @var{timestamp} 2588@c <en>contains a pair of timestamps separated by a space, 2589@c <en>rather than a single timestamp, you are dealing with a 2590@c <en>version of @sc{cvs} earlier than @sc{cvs} 1.5 (not 2591@c <en>documented here). 2592Onde @samp{[} e @samp{]} n�o s�o partes da entrada, mas 2593indicam que o @samp{+} e o marcador de conflito s�o 2594opcionais. @var{name} � o nome do arquivo no 2595diret�rio. @var{revision} e a revis�o da qual o 2596arquivo no diret�rio de trabalho deriva, ou @samp{0} 2597para um arquivo adicionado, ou @samp{-} seguido de uma 2598revis�o para um arquivo removido. @var{timestamp} � o 2599???timestamp??? do arquivo quando o @sc{cvs} o criou; 2600@comment As a file system timestamp. Usually a creation time or modification 2601@comment time or something. I'm not sure what they were prior to CVS 1.5. 2602@comment -DRP 2603se o timestamp difere da hora de modifica��o do 2604arquivo, significa que o arquivo foi modificado. � 2605armazenado no formato usando pela fun��o ISO C 2606asctime() (por exemplo, @samp{Sun Apr 7 01:29:26 26071996}). Pode-se escrever uma string que n�o esteja 2608neste formato, por exemplo, @samp{Result of merge}, 2609para indicar que o arquivo deve ser sempre considerado 2610como modificado. Este n�o � um caso especial; para ver 2611se um arquivo � modificado, um programa pode pegar o 2612timestamp do arquivo e simplesmente criar uma string e 2613comparar com @var{timestamp}. Se existe um conflito, 2614@var{conflict} pode ser ajustada para o tempo de 2615modifica��o do arquivo depois do arquivo ter sido 2616escrito com marca��es de conflito (@pxref{Exemplo de conflitos}). 2617Logo, se @var{conflict} � posteriormente o mesmo que o 2618tempo de modifica��o real do arquivo significa que o 2619usu�rio obviamente n�o resolveu o conflito. @var{options} 2620cont�m op��es adesivas (por exemplo @samp{-kb} para um 2621arquivo bin�rio). @var{tagdate} cont�m @samp{T} 2622seguindo de um nome de etiqueta (tag), ou @samp{D} para 2623uma data, seguido de uma data ou etiqueta adesiva. 2624Observe que se @var{timestamp} cont�m um par de 2625timestamps separados por um espa�o, ao inv�s de um 2626�nico timestamp, voc� est� lidando com uma vers�o do 2627@sc{cvs} anterior ao @sc{cvs} 1.5 (sem documenta��o aqui). 2628 2629@c <en>The timezone on the timestamp in CVS/Entries (local or 2630@c <en>universal) should be the same as the operating system 2631@c <en>stores for the timestamp of the file itself. For 2632@c <en>example, on Unix the file's timestamp is in universal 2633@c <en>time (UT), so the timestamp in CVS/Entries should be 2634@c <en>too. On @sc{vms}, the file's timestamp is in local 2635@c <en>time, so @sc{cvs} on @sc{vms} should use local time. 2636@c <en>This rule is so that files do not appear to be modified 2637@c <en>merely because the timezone changed (for example, to or 2638@c <en>from summer time). 2639O fuso hor�rio do timestamp no CVS/Entries (local ou 2640universal) deve ser igual ao que o sistema 2641operacional guarda para o timestamp do pr�prio arquivo. 2642Por exemplo, no Unix o timestamp do arquivo est� em 2643tempo universal (universal time - UT). Logo, o 2644timestamp em CVS/Entries deve estar assim tamb�m. No 2645@sc{vms}, o timestamp do arquivo est� em hora 2646local, logo, o @sc{cvs} no @sc{vms} deve usar hora 2647local. Esta regra � para que arquivos n�o pare�am estar 2648modificados simplesmente por que o fuso hor�rio mudou 2649(por exemplo, saindo ou entrando no hor�rio de ver�o). 2650@c See comments and calls to gmtime() and friends in 2651@c src/vers_ts.c (function time_stamp). 2652 2653@c <en>If the first character of a line in @file{Entries} is 2654@c <en>@samp{D}, then it indicates a subdirectory. @samp{D} 2655@c <en>on a line all by itself indicates that the program 2656@c <en>which wrote the @file{Entries} file does record 2657@c <en>subdirectories (therefore, if there is such a line and 2658@c <en>no other lines beginning with @samp{D}, one knows there 2659@c <en>are no subdirectories). Otherwise, the line looks 2660@c <en>like: 2661Se o primeiro caractere de uma linha em @file{Entries} 2662� @samp{D}, ent�o ele indica um subdiret�rio. @samp{D} 2663sozinho em uma linha indica que o programa 2664que escreveu o arquivo @file{Entries} registra 2665subdiret�rios (portanto, se existe tal linha e nenhuma 2666outra linha come�ando com @samp{D}, conclui-se que n�o 2667h� subdiret�rios). Caso contr�rio, a linha vai se 2668parecer com: 2669 2670@example 2671D/@var{name}/@var{filler1}/@var{filler2}/@var{filler3}/@var{filler4} 2672@end example 2673 2674@noindent 2675@c <en>where @var{name} is the name of the subdirectory, and 2676@c <en>all the @var{filler} fields should be silently ignored, 2677@c <en>for future expansion. Programs which modify 2678@c <en>@code{Entries} files should preserve these fields. 2679onde @var{name} � o nome do subdiret�rio, e todos os 2680campos @var{filler} devem ser ignorados em sil�ncio, 2681para expans�es futuras. Programas que modificam 2682arquivos @code{Entries} devem manter estes campos. 2683 2684@c <en>The lines in the @file{Entries} file can be in any order. 2685As linhas no arquivo @file{Entries} podem estar em 2686qualquer ordem. 2687 2688@c <en>@cindex Entries.Log file, in CVS directory 2689@cindex O arquivo Entries.Log, no diret�rio CVS 2690@c <en>@cindex CVS/Entries.Log file 2691@cindex O arquivo CVS/Entries.Log 2692@c <en>@item Entries.Log 2693@item Entries.Log 2694@c <en>This file does not record any information beyond that 2695@c <en>in @file{Entries}, but it does provide a way to update 2696@c <en>the information without having to rewrite the entire 2697@c <en>@file{Entries} file, including the ability to preserve 2698@c <en>the information even if the program writing 2699@c <en>@file{Entries} and @file{Entries.Log} abruptly aborts. 2700@c <en>Programs which are reading the @file{Entries} file 2701@c <en>should also check for @file{Entries.Log}. If the latter 2702@c <en>exists, they should read @file{Entries} and then apply 2703@c <en>the changes mentioned in @file{Entries.Log}. After 2704@c <en>applying the changes, the recommended practice is to 2705@c <en>rewrite @file{Entries} and then delete @file{Entries.Log}. 2706@c <en>The format of a line in @file{Entries.Log} is a single 2707@c <en>character command followed by a space followed by a 2708@c <en>line in the format specified for a line in 2709@c <en>@file{Entries}. The single character command is 2710@c <en>@samp{A} to indicate that the entry is being added, 2711@c <en>@samp{R} to indicate that the entry is being removed, 2712@c <en>or any other character to indicate that the entire line 2713@c <en>in @file{Entries.Log} should be silently ignored (for 2714@c <en>future expansion). If the second character of the line 2715@c <en>in @file{Entries.Log} is not a space, then it was 2716@c <en>written by an older version of @sc{cvs} (not documented 2717@c <en>here). 2718Este arquivo n�o registra qualquer informa��o a mais 2719que no @file{Entries}, mas fornece um jeito de 2720atualizar a informa��o sem ter que reescrever todo o 2721arquivo @file{Entries}, incluindo a habilidade de 2722preservar a informa��o mesmo se o programa que estava 2723escrevendo o @file{Entries} e o @file{Entries.Log} 2724aborta abruptamente. Programas que est�o lendo o 2725arquivo @file{Entries} devem tamb�m verificar pelo 2726@file{Entries.Log}. Se este �ltimo existe, eles devem 2727ler o @file{Entries} e ent�o aplicar as mudan�as 2728mencionadas no @file{Entries.Log}. Depois de aplicar 2729as mudan�as, a pr�tica recomendada � reescrever o 2730@file{Entries} e depois apagar o @file{Entries.Log}. O 2731formato de uma linha no @file{Entries.Log} � um comando 2732de um caractere seguido de um espa�o seguido por uma 2733linha no formato especificado para uma linha no 2734@file{Entries}. O caractere de comando � 2735@samp{A} para indicar que a entrada est� sendo 2736adicionada, @samp{R} para indicar que a entrada est� 2737sendo removida, ou qualquer outro caractere para 2738indicar que a linha inteira em @file{Entries.Log} deve 2739ser ignorada em sil�ncio (para expans�o futura). Se o 2740segundo caractere da linha em @file{Entries.Log} n�o � 2741um espa�o, ent�o foi escrito por uma vers�o antiga do 2742@sc{cvs} (n�o documentada aqui). 2743 2744@c <en>Programs which are writing rather than reading can 2745@c <en>safely ignore @file{Entries.Log} if they so choose. 2746Programas que est�o escrevendo ao inv�s de lendo podem 2747seguramente ignorar @file{Entries.Log} se assim escolherem. 2748 2749@c <en>@cindex Entries.Backup file, in CVS directory 2750@cindex O arquivo Entries.Backup, no diret�rio CVS 2751@c <en>@cindex CVS/Entries.Backup file 2752@cindex O arquivo CVS/Entries.Backup 2753@c <en>@item Entries.Backup 2754@item Entries.Backup 2755@c <en>This is a temporary file. Recommended usage is to 2756@c <en>write a new entries file to @file{Entries.Backup}, and 2757@c <en>then to rename it (atomically, where possible) to @file{Entries}. 2758Este � um arquivo tempor�rio. O uso recomendado � 2759escrever um novo arquivo entries para o 2760@file{Entries.Backup}, e ent�o renome�-lo 2761(atomicamente, quando poss�vel) para @file{Entries}. 2762 2763@c <en>@cindex Entries.Static file, in CVS directory 2764@cindex O arquivo Entries.Static, no diret�rio CVS 2765@c <en>@cindex CVS/Entries.Static file 2766@cindex O arquivo CVS/Entries.Static 2767@c <en>@item Entries.Static 2768@item Entries.Static 2769@c <en>The only relevant thing about this file is whether it 2770@c <en>exists or not. If it exists, then it means that only 2771@c <en>part of a directory was gotten and @sc{cvs} will 2772@c <en>not create additional files in that directory. To 2773@c <en>clear it, use the @code{update} command with the 2774@c <en>@samp{-d} option, which will get the additional files 2775@c <en>and remove @file{Entries.Static}. 2776A �nica coisa relevante sobre este arquivo � se ele 2777existe ou n�o. Se ele existe, ent�o quer dizer que 2778apenas parte de um diret�rio foi pego e o @sc{cvs} n�o 2779vai criar arquivos adicionais neste diret�rio. Para 2780limpar isto, use o comando @code{update} com a op��o 2781@samp{-d}, a qual vai pegar os arquivos adicionais e 2782remover @file{Entries.Static}. 2783@c FIXME: This needs to be better documented, in places 2784@c other than Working Directory Storage. 2785@c FIXCVS: The fact that this setting exists needs to 2786@c be more visible to the user. For example "cvs 2787@c status foo", in the case where the file would be 2788@c gotten except for Entries.Static, might say 2789@c something to distinguish this from other cases. 2790@c One thing that periodically gets suggested is to 2791@c have "cvs update" print something when it skips 2792@c files due to Entries.Static, but IMHO that kind of 2793@c noise pretty much makes the Entries.Static feature 2794@c useless. 2795 2796@c <en>@cindex Tag file, in CVS directory 2797@cindex O arquivo Tag, no diret�rio CVS 2798@c <en>@cindex CVS/Tag file 2799@cindex O arquivo CVS/Tag 2800@c <en>@cindex Sticky tags/dates, per-directory 2801@cindex Por diret�rio, etiquetas/datas adesivas 2802@c <en>@cindex Per-directory sticky tags/dates 2803@cindex Etiquetas/datas adesivas por diret�rio 2804@c <en>@item Tag 2805@item Tag (Etiqueta) 2806@c <en>This file contains per-directory sticky tags or dates. 2807@c <en>The first character is @samp{T} for a branch tag, 2808@c <en>@samp{N} for a non-branch tag, or @samp{D} for a date, 2809@c <en>or another character to mean the file should be 2810@c <en>silently ignored, for future expansion. This character 2811@c <en>is followed by the tag or date. Note that 2812@c <en>per-directory sticky tags or dates are used for things 2813@c <en>like applying to files which are newly added; they 2814@c <en>might not be the same as the sticky tags or dates on 2815@c <en>individual files. For general information on sticky 2816@c <en>tags and dates, see @ref{Sticky tags}. 2817Este arquivo cont�m as etiquetas (tags) ou datas 2818adesivas por diret�rio. O primeiro caractere � @samp{T} 2819para uma etiqueta de ramo, @samp{N} para uma etiqueta 2820que n�o � de ramo, ou @samp{D} para uma data, ou outro 2821caractere que quer dizer que o arquivo deve ser 2822ignorado em sil�ncio, para expans�o futura. Este 2823caractere � seguido de uma etiqueta ou data. Observe 2824que etiquetas ou data adesivas por diret�rio s�o usadas 2825para coisas como ???applying to??? arquivos que 2826acabaram de ser adicionados; ???they (the tags or the files)??? 2827podem n�o ser os mesmos assim como as etiquetas 2828adesivas ou datas em arquivos isolados. Para 2829informa��es gerais sobre etiquetas adesivas ou datas, 2830veja em @ref{Etiquetas adesivas}. 2831@c FIXME: This needs to be much better documented, 2832@c preferably not in the context of "working directory 2833@c storage". 2834@c FIXME: The Sticky tags node needs to discuss, or xref to 2835@c someplace which discusses, per-directory sticky 2836@c tags and the distinction with per-file sticky tags. 2837 2838@c <en>@cindex Notify file, in CVS directory 2839@cindex O arquivo Notify, no diret�rio CVS 2840@c <en>@cindex CVS/Notify file 2841@cindex O arquivo CVS/Notify 2842@c <en>@item Notify 2843@item Notify 2844@c <en>This file stores notifications (for example, for 2845@c <en>@code{edit} or @code{unedit}) which have not yet been 2846@c <en>sent to the server. Its format is not yet documented 2847@c <en>here. 2848Este arquivo guarda notifica��es (por exemplo, sobre 2849@code{edit} ou @code{unedit}) que ainda n�o foram 2850mandadas para o servidor. Seu formato ainda n�o est� 2851documentado aqui. 2852 2853@c <en>@cindex Notify.tmp file, in CVS directory 2854@cindex O arquivo Notify.tmp, no diret�rio CVS 2855@c <en>@cindex CVS/Notify.tmp file 2856@cindex O arquivo CVS/Notify.tmp 2857@c <en>@item Notify.tmp 2858@item Notify.tmp 2859@c <en>This file is to @file{Notify} as @file{Entries.Backup} 2860@c <en>is to @file{Entries}. That is, to write @file{Notify}, 2861@c <en>first write the new contents to @file{Notify.tmp} and 2862@c <en>then (atomically where possible), rename it to 2863@c <en>@file{Notify}. 2864Este arquivo est� para @file{Notify} como o @file{Entries.Backup} 2865est� para @file{Entries}. Ou seja, para escrever em 2866@file{Notify}, escreva o novo conte�do primeiro em 2867@file{Notify.tmp} e ent�o (atomicamente, quando 2868poss�vel), renomeie-o para @file{Notify}. 2869 2870@c <en>@cindex Base directory, in CVS directory 2871@cindex Diret�rio Base, no diret�rio CVS 2872@c <en>@cindex CVS/Base directory 2873@cindex Diret�rio CVS/Base 2874@c <en>@item Base 2875@item Base 2876@c <en>If watches are in use, then an @code{edit} command 2877@c <en>stores the original copy of the file in the @file{Base} 2878@c <en>directory. This allows the @code{unedit} command to 2879@c <en>operate even if it is unable to communicate with the 2880@c <en>server. 2881Se os ???watches??? est�o em uso, ent�o um comando 2882@code{edit} guarda a c�pia original do arquivo no 2883diret�rio @file{Base}. Isto permite que o comando 2884@code{unedit} opere mesmo se estiver sem comunica��o 2885com o servidor. 2886 2887@c <en>@cindex Baserev file, in CVS directory 2888@cindex O arquivo Baserev, no diret�rio CVS 2889@c <en>@cindex CVS/Baserev file 2890@cindex O arquivo CVS/Baserev 2891@c <en>@item Baserev 2892@item Baserev 2893@c <en>The file lists the revision for each of the files in 2894@c <en>the @file{Base} directory. The format is: 2895O arquivo lista a revis�o de cada arquivo no diret�rio 2896@file{Base}. O formato �: 2897 2898@example 2899B@var{name}/@var{rev}/@var{expansion} 2900@end example 2901 2902@noindent 2903@c <en>where @var{expansion} should be ignored, to allow for 2904@c <en>future expansion. 2905Onde @var{expansion} deve ser ignorada para permitir 2906expans�o futura. 2907 2908@c <en>@cindex Baserev.tmp file, in CVS directory 2909@cindex O arquivo Baserev.tmp, no diret�rio CVS 2910@c <en>@cindex CVS/Baserev.tmp file 2911@cindex O arquivo CVS/Baserev.tmp 2912@c <en>@item Baserev.tmp 2913@item Baserev.tmp 2914@c <en>This file is to @file{Baserev} as @file{Entries.Backup} 2915@c <en>is to @file{Entries}. That is, to write @file{Baserev}, 2916@c <en>first write the new contents to @file{Baserev.tmp} and 2917@c <en>then (atomically where possible), rename it to 2918@c <en>@file{Baserev}. 2919Este arquivo est� para @file{Baserev} assim como 2920@file{Entries.Backup} est� para @file{Entries}. Ou 2921seja, para escrever em @file{Baserev}, escreva o novo 2922conte�do primeiro em @file{Baserev.tmp} e ent�o 2923(atomicamente, quando poss�vel), renomei-o para @file{Baserev}. 2924 2925@c <en>@cindex Template file, in CVS directory 2926@cindex O arquivo Template, no diret�rio CVS 2927@c <en>@cindex CVS/Template file 2928@cindex O arquivo CVS/Template 2929@c <en>@item Template 2930@item Template 2931@c <en>This file contains the template specified by the 2932@c <en>@file{rcsinfo} file (@pxref{rcsinfo}). It is only used 2933@c <en>by the client; the non-client/server @sc{cvs} consults 2934@c <en>@file{rcsinfo} directly. 2935Este arquivo cont�m o modelo (template) especificado 2936pelo arquivo @file{rcsinfo} (@pxref{rcsinfo}). Ele � 2937usado apenas pelo cliente; o ???non-client/server??? 2938@sc{cvs} consulta o @file{rcsinfo} diretamente. 2939@end table 2940 2941@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2942@c <en>@node Intro administrative files 2943@node Intro aos arquivos administrativos 2944@c <en>@section The administrative files 2945@section Os arquivos administrativos 2946@c <en>@cindex Administrative files (intro) 2947@cindex Arquivos administrativos (intro) 2948@c <en>@cindex Modules file 2949@cindex O arquivo Modules 2950@c <en>@cindex CVSROOT, module name 2951@cindex CVSROOT, nome de m�dulo 2952@c <en>@cindex Defining modules (intro) 2953@cindex Definindo m�dulos (intro) 2954 2955@c FIXME: this node should be reorganized into "general 2956@c information about admin files" and put the "editing 2957@c admin files" stuff up front rather than jumping into 2958@c the details of modules right away. Then the 2959@c Administrative files node can go away, the information 2960@c on each admin file distributed to a place appropriate 2961@c to its function, and this node can contain a table 2962@c listing each file and a @ref to its detailed description. 2963 2964@c <en>The directory @file{$CVSROOT/CVSROOT} contains some @dfn{administrative 2965@c <en>files}. @xref{Administrative files}, for a complete description. 2966@c <en>You can use @sc{cvs} without any of these files, but 2967@c <en>some commands work better when at least the 2968@c <en>@file{modules} file is properly set up. 2969O diret�rio @file{$CVSROOT/CVSROOT} cont�m alguns 2970@dfn{Arquivos administrativos}. @xref{Arquivos 2971administrativos}, para uma descri��o completa. Voc� 2972pode usar o @sc{cvs} sem nenhum destes arquivos, mas 2973alguns comandos funcionam melhor quando pelo menos o 2974arquivo @file{modules} est� bem configurado. 2975 2976@c <en>The most important of these files is the @file{modules} 2977@c <en>file. It defines all modules in the repository. This 2978@c <en>is a sample @file{modules} file. 2979O mais importante destes arquivos � o arquivo 2980@file{modules}. Ele define todos os m�dulos no 2981reposit�rio. Este � um exemplo de um arquivo @file{modules}. 2982 2983@c FIXME: The CVSROOT line is a goofy example now that 2984@c mkmodules doesn't exist. 2985@example 2986CVSROOT CVSROOT 2987modules CVSROOT modules 2988cvs gnu/cvs 2989rcs gnu/rcs 2990diff gnu/diff 2991tc yoyodyne/tc 2992@end example 2993 2994@c <en>The @file{modules} file is line oriented. In its 2995@c <en>simplest form each line contains the name of the 2996@c <en>module, whitespace, and the directory where the module 2997@c <en>resides. The directory is a path relative to 2998@c <en>@code{$CVSROOT}. The last four lines in the example 2999@c <en>above are examples of such lines. 3000O arquivo @file{modules} � baseado em linha. Na sua 3001forma simples, cada linha cont�m o nome do m�dulo, um 3002espa�o e o diret�rio onde o m�dulo est�. O diret�rio � 3003um caminho relativo em @code{$CVSROOT}. As �ltimas 3004quatro linhas no exemplo acima s�o exemplos de tais linhas. 3005 3006@c FIXME: might want to introduce the concept of options in modules file 3007@c (the old example which was here, -i mkmodules, is obsolete). 3008 3009@c <en>The line that defines the module called @samp{modules} 3010@c <en>uses features that are not explained here. 3011@c <en>@xref{modules}, for a full explanation of all the 3012@c <en>available features. 3013A linha que define o m�dulo chamado @samp{modules} usa 3014funcionalidades que n�o s�o explicadas 3015aqui. @xref{modules}, para uma explica��o completa 3016destas funcionalidades. 3017 3018@c FIXME: subsection without node is bogus 3019@c <en>@subsection Editing administrative files 3020@subsection Editando arquivos administrativos 3021@c <en>@cindex Editing administrative files 3022@cindex Editando arquivos administrativos 3023@c <en>@cindex Administrative files, editing them 3024@cindex Arquivos administrativos, editando 3025 3026@c <en>You edit the administrative files in the same way that you would edit 3027@c <en>any other module. Use @samp{cvs checkout CVSROOT} to get a working 3028@c <en>copy, edit it, and commit your changes in the normal way. 3029Voc� edita os arquivos administrativos da mesma forma 3030que voc� deve deve editar qualquer outro m�dulo. Use 3031@samp{cvs checkout CVSROOT} para obter uma c�pia de 3032trabalho, edite-a e ???commit??? suas mudan�as normalmente. 3033 3034@c <en>It is possible to commit an erroneous administrative 3035@c <en>file. You can often fix the error and check in a new 3036@c <en>revision, but sometimes a particularly bad error in the 3037@c <en>administrative file makes it impossible to commit new 3038@c <en>revisions. 3039� poss�vel ???commit??? um arquivo administrativo 3040corrompido. Em geral, voc� pode consertar o erro e 3041devolv�-lo numa nova revis�o, mas �s vezes um erro 3042particularmente ruim nos arquivos administrativos torna 3043imposs�vel ???commit??? novas revis�es. 3044@c @xref{Bad administrative files} for a hint 3045@c about how to solve such situations. 3046@c -- administrative file checking-- 3047 3048@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3049@c <en>@node Multiple repositories 3050@node Reposit�rios m�ltiplos 3051@c <en>@section Multiple repositories 3052@section Reposit�rios m�ltiplos 3053@c <en>@cindex Multiple repositories 3054@cindex Reposit�rios m�ltiplos 3055@c <en>@cindex Repositories, multiple 3056@cindex Reposit�rios, m�ltiplos 3057@c <en>@cindex Many repositories 3058@cindex Muitos reposit�rios 3059@c <en>@cindex Parallel repositories 3060@cindex Reposit�rios paralelos 3061@c <en>@cindex Disjoint repositories 3062@cindex Reposit�rios Disjuntos 3063@c <en>@cindex CVSROOT, multiple repositories 3064@cindex CVSROOT, Reposit�rios M�ltiplos 3065 3066@c <en>In some situations it is a good idea to have more than 3067@c <en>one repository, for instance if you have two 3068@c <en>development groups that work on separate projects 3069@c <en>without sharing any code. All you have to do to have 3070@c <en>several repositories is to specify the appropriate 3071@c <en>repository, using the @code{CVSROOT} environment 3072@c <en>variable, the @samp{-d} option to @sc{cvs}, or (once 3073@c <en>you have checked out a working directory) by simply 3074@c <en>allowing @sc{cvs} to use the repository that was used 3075@c <en>to check out the working directory 3076@c <en>(@pxref{Specifying a repository}). 3077Em algumas situa��es � uma boa id�ia ter mais de um 3078reposit�rio. Por exemplo, se voc� tem duas equipes de 3079desenvolvimento que trabalham em projetos separados sem 3080compartilhar nenhum c�digo. Tudo que voc� tem que 3081fazer para ter v�rios reposit�rios � especificar o 3082reposit�rio apropriado, usando a vari�vel de ambiente 3083@code{CVSROOT} ou a op��o @samp{-d} com o @sc{cvs}, ou 3084(depois de ter pego um diret�rio de trabalho) 3085simplesmente deixando o @sc{cvs} usar o reposit�rio de 3086onde veio o diret�rio de trabalho (@pxref{Especificando 3087um reposit�rio}). 3088 3089@c <en>The big advantage of having multiple repositories is 3090@c <en>that they can reside on different servers. With @sc{cvs} 3091@c <en>version 1.10, a single command cannot recurse into 3092@c <en>directories from different repositories. With development 3093@c <en>versions of @sc{cvs}, you can check out code from multiple 3094@c <en>servers into your working directory. @sc{cvs} will 3095@c <en>recurse and handle all the details of making 3096@c <en>connections to as many server machines as necessary to 3097@c <en>perform the requested command. Here is an example of 3098@c <en>how to set up a working directory: 3099A grande vantagem de ter m�ltiplos reposit�rios � que 3100eles podem residir em diferentes servidores. Com o 3101@sc{cvs} vers�o 1.10, um comando n�o pode fazer 3102recurs�o ???into??? diret�rios ???from??? reposit�rios 3103diferentes. Com ???development versions??? do 3104@sc{cvs}, voc� pode obter c�digo de m�ltiplos 3105servidores para o seu diret�rio de trabalho. @sc{cvs} 3106vai fazer a recurs�o e cuidar dos detalhes para fazer 3107conex�o em quantas m�quinas quantas forem necess�rias 3108para executar o comando pedido. Aqui est� um exemplo 3109de como preparar um diret�rio de trabalho: 3110 3111@example 3112cvs -d server1:/cvs co dir1 3113cd dir1 3114cvs -d server2:/root co sdir 3115cvs update 3116@end example 3117 3118@c <en>The @code{cvs co} commands set up the working 3119@c <en>directory, and then the @code{cvs update} command will 3120@c <en>contact server2, to update the dir1/sdir subdirectory, 3121@c <en>and server1, to update everything else. 3122Os comandos @code{cvs co} acima preparam o diret�rio de 3123trabalho. Depois de feitos, o comando @code{cvs update} 3124vai contactar o server2, para atualizar o subdiret�rio 3125dir1/sdir e o server1, para atualizar o resto. 3126 3127@c FIXME: Does the FAQ have more about this? I have a 3128@c dim recollection, but I'm too lazy to check right now. 3129 3130@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3131@c <en>@node Creating a repository 3132@node Criando um reposit�rio 3133@c <en>@section Creating a repository 3134@section Criando um reposit�rio 3135 3136@c <en>@cindex Repository, setting up 3137@cindex Reposit�rio, preparando 3138@c <en>@cindex Creating a repository 3139@cindex Criando um reposit�rio 3140@c <en>@cindex Setting up a repository 3141@cindex Preparando um reposit�rio 3142 3143@c <en>To set up a @sc{cvs} repository, first choose the 3144@c <en>machine and disk on which you want to store the 3145@c <en>revision history of the source files. CPU and memory 3146@c <en>requirements are modest, so most machines should be 3147@c <en>adequate. For details see @ref{Server requirements}. 3148Para preparar um reposit�rio do @sc{cvs}, escolha 3149primeiramente a m�quina e o disco onde voc� deseja 3150armazenar o hist�rico de revis�es dos fontes. 3151requisitos de CPU e mem�ria s�o modestos. Portanto, 3152muitas m�quinas ser�o adequadas. Para detalhes, veja 3153em @ref{Requisitos do servidor}. 3154@c Possible that we should be providing a quick rule of 3155@c thumb, like the 32M memory for the server. That 3156@c might increase the number of people who are happy 3157@c with the answer, without following the xref. 3158 3159@c <en>To estimate disk space 3160@c <en>requirements, if you are importing RCS files from 3161@c <en>another system, the size of those files is the 3162@c <en>approximate initial size of your repository, or if you 3163@c <en>are starting without any version history, a rule of 3164@c <en>thumb is to allow for the server approximately three 3165@c <en>times the size of the code to be under @sc{cvs} for the 3166@c <en>repository (you will eventually outgrow this, but not 3167@c <en>for a while). On the machines on which the developers 3168@c <en>will be working, you'll want disk space for 3169@c <en>approximately one working directory for each developer 3170@c <en>(either the entire tree or a portion of it, depending 3171@c <en>on what each developer uses). 3172Para estimar os requisitos de espa�o em disco, se voc� 3173estiver importando arquivos RCS de outro sistema, o 3174tamanho destes arquivos vai ser o tamanho inicial do 3175seu reposit�rio, ou se voc� est� come�ando sem nenhum 3176hist�rico de vers�es, uma boa regra � reservar para o 3177reposit�rio do servidor tr�s vezes o tamanho do c�digo 3178que estar� sob os cuidados do @sc{cvs} (Isto vai 3179eventualmente estourar, mas n�o por enquanto). 3180Nas m�quinas dos desenvolvedores, voc� vai pracisar de 3181aproximadamente o espa�o em disco de um diret�rio de 3182trabalho para cada desenvolvedor (ou a �rvore inteira 3183ou uma por��o dela, dependendo do que o desenvolvedor 3184usa). 3185 3186@c <en>The repository should be accessible 3187@c <en>(directly or via a networked file system) from all 3188@c <en>machines which want to use @sc{cvs} in server or local 3189@c <en>mode; the client machines need not have any access to 3190@c <en>it other than via the @sc{cvs} protocol. It is not 3191@c <en>possible to use @sc{cvs} to read from a repository 3192@c <en>which one only has read access to; @sc{cvs} needs to be 3193@c <en>able to create lock files (@pxref{Concurrency}). 3194O reposit�rio deve estar acess�vel (diretamente ou 3195atrav�s de um sistema de arquivos de rede) ???from??? 3196@c from-translator-to-reviewer: "from" or "to"? 3197todas as m�quinas que queiram usar o @sc{cvs} em modo 3198servidor ou localmente; a m�quina cliente s� precisa 3199ter acesso a ele atrav�s do protocolo do @sc{cvs}. N�o 3200� poss�vel usar o @sc{cvs} para ler de um reposit�rio 3201onde s� se tem permiss�o de leitura, pois o @sc{cvs} 3202tem que ser capaz de criar arquivos de trava 3203(@pxref{Concorr�ncia}). 3204 3205@c <en>@cindex init (subcommand) 3206@cindex init (subcommand) 3207@c <en>To create a repository, run the @code{cvs init} 3208@c <en>command. It will set up an empty repository in the 3209@c <en>@sc{cvs} root specified in the usual way 3210@c <en>(@pxref{Repository}). For example, 3211Para criar um reposit�rio, rode o comando @code{cvs 3212init}. Ele vai criar um reposit�rio vazio no raiz do 3213@sc{cvs} especificado da forma usual 3214(@pxref{Reposit�rio}). For example, 3215 3216@example 3217cvs -d /usr/local/cvsroot init 3218@end example 3219 3220@c <en>@code{cvs init} is careful to never overwrite any 3221@c <en>existing files in the repository, so no harm is done if 3222@c <en>you run @code{cvs init} on an already set-up 3223@c <en>repository. 3224O @code{cvs init} tem o cuidado de nunca sobreescrever 3225nenhum arquivo no reposit�rio, logo, n�o h� perigo em 3226rodar o @code{cvs init} num reposit�rio j� criado. 3227 3228@c <en>@code{cvs init} will enable history logging; if you 3229@c <en>don't want that, remove the history file after running 3230@c <en>@code{cvs init}. @xref{history file}. 3231@code{cvs init} pode guardar um registro hist�rico 3232(history log); se 3233voc� n�o quer guardar isto, remova o arquivo history 3234depois de rodar o @code{cvs init}. @xref{arquivo 3235history (hist�rico)}. 3236 3237@c <en>@node Backing up 3238@node Fazendo backup 3239@c <en>@section Backing up a repository 3240@section Fazendo backup de um reposit�rio 3241@c <en>@cindex Repository, backing up 3242@cindex Reposit�rio, fazendo backup 3243@c <en>@cindex Backing up, repository 3244@cindex Fazendo backup, reposit�rio 3245 3246@c <en>There is nothing particularly magical about the files 3247@c <en>in the repository; for the most part it is possible to 3248@c <en>back them up just like any other files. However, there 3249@c <en>are a few issues to consider. 3250N�o h� nada particularmente m�gico sobre os arquivos no 3251reposit�rio; Para a maior parte deles � poss�vel fazer 3252backup da mesma forma que com qualquer 3253arquivo. Entretanto, existem alguns fatos a considerar. 3254 3255@c <en>@cindex Locks, cvs, and backups 3256@cindex Travas, cvs e backups 3257@c <en>@cindex #cvs.rfl, and backups 3258@cindex #cvs.rfl, and backups 3259@c <en>The first is that to be paranoid, one should either not 3260@c <en>use @sc{cvs} during the backup, or have the backup 3261@c <en>program lock @sc{cvs} while doing the backup. To not 3262@c <en>use @sc{cvs}, you might forbid logins to machines which 3263@c <en>can access the repository, turn off your @sc{cvs} 3264@c <en>server, or similar mechanisms. The details would 3265@c <en>depend on your operating system and how you have 3266@c <en>@sc{cvs} set up. To lock @sc{cvs}, you would create 3267@c <en>@file{#cvs.rfl} locks in each repository directory. 3268@c <en>See @ref{Concurrency}, for more on @sc{cvs} locks. 3269@c <en>Having said all this, if you just back up without any 3270@c <en>of these precautions, the results are unlikely to be 3271@c <en>particularly dire. Restoring from backup, the 3272@c <en>repository might be in an inconsistent state, but this 3273@c <en>would not be particularly hard to fix manually. 3274Primeiramente, para ser paran�ico, alguem n�o deve nem 3275sequer usar o @sc{cvs} durante o backup, ou fazer o 3276programa de backup travar o @sc{cvs} enquanto estiver 3277executando. Para o @sc{cvs} n�o ser usado, voc� deve 3278proibir logins para m�quinas que possam acessar o 3279reposit�rio ou desligar o seu servidor @sc{cvs} or 3280algum mecanismo similar. Os detalhes v�o depender do 3281seu sistema operacional e de como voc� configurou o seu 3282@sc{cvs}. Para travar o @sc{cvs}, voc� deve criar 3283travas @file{#cvs.rfl} em cada diret�rio do 3284reposit�rio. Veja em @ref{Concorr�ncia}, para saber 3285mais sobre travas no @sc{cvs}. ???Having said all 3286this???, 3287@c from-translator-to-reviewer can I substitute for 3288@c "nevertheless"? 3289se voc� apenas fizer o backup sem nenhuma 3290destas precau��es, os resultados dificilmente v�o ser 3291catastr�ficos. Ao recuperar do backup, o reposit�rio 3292pode estar em um estado inconsistente, mas isto n�o 3293deve ser muito dif�cil de consertar manualmente. 3294 3295@c <en>When you restore a repository from backup, assuming 3296@c <en>that changes in the repository were made after the time 3297@c <en>of the backup, working directories which were not 3298@c <en>affected by the failure may refer to revisions which no 3299@c <en>longer exist in the repository. Trying to run @sc{cvs} 3300@c <en>in such directories will typically produce an error 3301@c <en>message. One way to get those changes back into the 3302@c <en>repository is as follows: 3303Quando voc� recupera um reposit�rio de um backup, 3304supondo que mudan�as no reposit�rio foram feitas depois 3305da cria��o do backup, diret�rio de trabalho que n�o 3306foram afetados pela falha podem se referenciar a 3307revis�es que n�o mais existam no reposit�rio. Tentar 3308rodar o @sc{cvs} em tais diret�rios vai gerar uma 3309mensagem de erro. uma forma de desfazer estas mudan�as 3310no reposit�rio � dada a seguir: 3311 3312@itemize @bullet 3313@item 3314@c <en>Get a new working directory. 3315Gere um novo diret�rio de trabalho. 3316 3317@item 3318@c <en>Copy the files from the working directory from before 3319@c <en>the failure over to the new working directory (do not 3320@c <en>copy the contents of the @file{CVS} directories, of 3321@c <en>course). 3322Copie os arquivos do diret�rio de trabalho de 3323antes da falha para o novo diret�rio de trabalho (n�o 3324copie o conte�do dos diret�rios @file{CVS}, obviamente). 3325 3326@item 3327@c <en>Working in the new working directory, use commands such 3328@c <en>as @code{cvs update} and @code{cvs diff} to figure out 3329@c <en>what has changed, and then when you are ready, commit 3330@c <en>the changes into the repository. 3331Mexa no novo diret�rio de trabalho, usando comandos 3332como @code{cvs update} e @code{cvs diff} para descobrir 3333o que mudou, e quando terminar, fa�a ???commit??? nas 3334mudan�as para o reposit�rio. 3335@end itemize 3336 3337@c <en>@node Moving a repository 3338@node Movendo um reposit�rio 3339@c <en>@section Moving a repository 3340@section Movendo um reposit�rio 3341@c <en>@cindex Repository, moving 3342@cindex Reposit�rio, movendo 3343@c <en>@cindex Moving a repository 3344@cindex Movendo um reposit�rio 3345@c <en>@cindex Copying a repository 3346@cindex Copiando um reposit�rio 3347 3348@c <en>Just as backing up the files in the repository is 3349@c <en>pretty much like backing up any other files, if you 3350@c <en>need to move a repository from one place to another it 3351@c <en>is also pretty much like just moving any other 3352@c <en>collection of files. 3353Assim como fazer backup dos arquivos no reposit�rio � 3354muito parecido com fazer backup de quaisquer outros 3355arquivos, se voc� precisar mover um reposit�rio de um 3356lugar para outro, � muito parecido com simplesmente 3357mover uma cole��o de arquivos. 3358 3359@c <en>The main thing to consider is that working directories 3360@c <en>point to the repository. The simplest way to deal with 3361@c <en>a moved repository is to just get a fresh working 3362@c <en>directory after the move. Of course, you'll want to 3363@c <en>make sure that the old working directory had been 3364@c <en>checked in before the move, or you figured out some 3365@c <en>other way to make sure that you don't lose any 3366@c <en>changes. If you really do want to reuse the existing 3367@c <en>working directory, it should be possible with manual 3368@c <en>surgery on the @file{CVS/Repository} files. You can 3369@c <en>see @ref{Working directory storage}, for information on 3370@c <en>the @file{CVS/Repository} and @file{CVS/Root} files, but 3371@c <en>unless you are sure you want to bother, it probably 3372@c <en>isn't worth it. 3373O mais importante a se considerar � que diret�rios de 3374trabalho apontam para o reposit�rio. A forma mais 3375simples de lidar com um reposit�rio movido � 3376simplesmente pegar um diret�rio de trabalho novo logo 3377ap�s da mudan�a. � claro que voc� vai querer se 3378certificar que o diret�rio de trabalho antigo foi 3379devolvido antes da mudan�a, ou usar de qualquer outro 3380artif�cio para se certificar de que n�o perder� nenhuma 3381mudan�a. Se voc� realmente quer reusar o antigo diret�rio de 3382trabalho, � poss�vel, desde que voc� fa�a uma opera��o 3383manual nos arquivos @file{CVS/Repository}. Voc� pode 3384ver em @ref{Armazenamento do Diret�rio de trabalho}, 3385para informa��es sobre os arquivos 3386@file{CVS/Repository} e @file{CVS/Root}, mas s� se voc� 3387quiser ter aborrecimentos, caso contr�rio esta op��o 3388n�o � boa. 3389@c FIXME: Surgery on CVS/Repository should be avoided 3390@c by making RELATIVE_REPOS the default. 3391@c FIXME-maybe: might want some documented way to 3392@c change the CVS/Root files in some particular tree. 3393@c But then again, I don't know, maybe just having 3394@c people do this in perl/shell/&c isn't so bad... 3395 3396@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3397@c <en>@node Remote repositories 3398@node Reposit�rios remotos 3399@c <en>@section Remote repositories 3400@section Reposit�rios remotos 3401@c <en>@cindex Repositories, remote 3402@cindex Reposit�rios, remotos 3403@c <en>@cindex Remote repositories 3404@cindex Reposit�rios remotos 3405@c <en>@cindex Client/Server Operation 3406@cindex Opera��o cliente/Servidor 3407@c <en>@cindex Server, CVS 3408@cindex Servidor, CVS 3409@c <en>@cindex Remote repositories, port specification 3410@cindex Reposit�rios remotos, especifica��o de porta 3411@c <en>@cindex Repositories, remote, port specification 3412@cindex Reposit�rios, remotos, especifica��o de porta 3413@c <en>@cindex Client/Server Operation, port specification 3414@cindex Opera��o cliente/Servidor, especifica��o de porta 3415@c <en>@cindex pserver (client/server connection method), port specification 3416@cindex pserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3417@c <en>@cindex kserver (client/server connection method), port specification 3418@cindex kserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3419@c <en>@cindex gserver (client/server connection method), port specification 3420@cindex gserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3421@c <en>@cindex port, specifying for remote repositories 3422@cindex porta, especifica��o para reposit�rios remotos 3423 3424@c <en> Your working copy of the sources can be on a 3425@c <en>different machine than the repository. Using @sc{cvs} 3426@c <en>in this manner is known as @dfn{client/server} 3427@c <en>operation. You run @sc{cvs} on a machine which can 3428@c <en>mount your working directory, known as the 3429@c <en>@dfn{client}, and tell it to communicate to a machine 3430@c <en>which can mount the repository, known as the 3431@c <en>@dfn{server}. Generally, using a remote 3432@c <en>repository is just like using a local one, except that 3433@c <en>the format of the repository name is: 3434Sua c�pia de trabalho dos fontes pode estar em 3435uma m�quina diferente da do reposit�rio. Esta forma de 3436usar o @sc{cvs} � chamada opera��o 3437@dfn{client/server}. Voc� roda o @sc{cvs} numa m�quina 3438que possa montar seu diret�rio de trabalho, conhecida 3439como o @dfn{cliente}, e diz a ela para se comunicar com 3440uma m�quina que pode montar o reposit�rio, chamada de 3441@dfn{servidor}. No geral, usar um reposit�rio remoto 3442� a mesma coisa que usar um local, exceto que o formato 3443do nome do reposit�rio �: 3444 3445@example 3446[:@var{method}:][[@var{user}][:@var{password}]@@]@var{hostname}[:[@var{port}]]/path/to/repository 3447@end example 3448 3449@c <en>Specifying a password in the repository name is not recommended during 3450@c <en>checkout, since this will cause @sc{cvs} to store a cleartext copy of the 3451@c <en>password in each created directory. @code{cvs login} first instead 3452@c <en>(@pxref{Password authentication client}). 3453Colocar a senha no nome do reposit�rio durante 3454opera��es de checkout n�o � recomendado, j� que isto 3455vai fazer com que o @sc{cvs} guarde uma c�pia da senha 3456em texto em cada diret�rio criado. D� um @code{cvs 3457login} primeiro ao inv�s disto 3458(@pxref{Cliente de autentica��o por senha}). 3459 3460@c <en>The details of exactly what needs to be set up depend 3461@c <en>on how you are connecting to the server. 3462Os detalhes de exatamente o que precisa ser preparado 3463depende de como voc� est� conectado ao seu servidor. 3464 3465@c <en>If @var{method} is not specified, and the repository 3466@c <en>name contains @samp{:}, then the default is @code{ext} 3467@c <en>or @code{server}, depending on your platform; both are 3468@c <en>described in @ref{Connecting via rsh}. 3469Se @var{method} n�o est� especificado, e se o nome do 3470reposit�rio cont�m @samp{:}, ent�o o padr�o � 3471@code{ext} ou @code{server}, dependendo de sua 3472plataforma; ambos est�o descritos em 3473@ref{Se conectando via rsh}. 3474@c Should we try to explain which platforms are which? 3475@c Platforms like unix and VMS, which only allow 3476@c privileged programs to bind to sockets <1024 lose on 3477@c :server: 3478@c Platforms like Mac and VMS, whose rsh program is 3479@c unusable or nonexistent, lose on :ext: 3480@c Platforms like OS/2 and NT probably could plausibly 3481@c default either way (modulo -b troubles). 3482 3483@c FIXME: We need to have a better way of explaining 3484@c what method to use. This presentation totally 3485@c obscures the fact that :ext: and CVS_RSH is the way to 3486@c use SSH, for example. Plus it incorrectly implies 3487@c that you need an @code{rsh} binary on the client to use 3488@c :server:. 3489@c Also note that rsh not pserver is the right choice if you want 3490@c users to be able to create their own repositories 3491@c (because of the --allow-root related issues). 3492@menu 3493@c <en>* Server requirements:: Memory and other resources for servers 3494* Requisitos do servidor:: Mem�ria e outros recursos para servidores 3495@c <en>* Connecting via rsh:: Using the @code{rsh} program to connect 3496* Se conectando via rsh:: Usando o programa @code{rsh} para se conectar 3497@c <en>* Password authenticated:: Direct connections using passwords 3498* Autentica��o por senha:: Conex�es diretas usando senhas 3499@c <en>* GSSAPI authenticated:: Direct connections using GSSAPI 3500* Autentica��o GSSAPI:: Conex�es diretas usando GSSAPI 3501@c <en>* Kerberos authenticated:: Direct connections with kerberos 3502* Autentica��o kerberos:: Conex�es diretas com kerberos 3503@c <en>* Connecting via fork:: Using a forked @code{cvs server} to connect 3504* Conectando via fork:: Usando um forked @code{cvs server} para conectar 3505@end menu 3506 3507@c <en>@node Server requirements 3508@node Requisitos do servidor 3509@c <en>@subsection Server requirements 3510@subsection Requisitos do servidor 3511 3512@c <en>The quick answer to what sort of machine is suitable as 3513@c <en>a server is that requirements are modest---a server 3514@c <en>with 32M of memory or even less can handle a fairly 3515@c <en>large source tree with a fair amount of activity. 3516A resposta r�pida para que tipo de m�quina � adequada 3517para um servidor � que os requisitos s�o modestos---um 3518servidor com 32M de mem�ria ou at� menos pode manipular 3519uma �rvore de fontes realmente grande com uma boa 3520quantidade de atividade. 3521@c Say something about CPU speed too? I'm even less sure 3522@c what to say on that subject... 3523 3524@c <en>The real answer, of course, is more complicated. 3525@c <en>Estimating the known areas of large memory consumption 3526@c <en>should be sufficient to estimate memory requirements. 3527@c <en>There are two such areas documented here; other memory 3528@c <en>consumption should be small by comparison (if you find 3529@c <en>that is not the case, let us know, as described in 3530@c <en>@ref{BUGS}, so we can update this documentation). 3531A resposta real, obviamente, � mais complicada. Estimar 3532as �reas conhecidas de grande consumo de mem�ria deve 3533ser suficiente para estimar os requisitos de 3534mem�ria. Existem duas destas tais �reas documentadas 3535aqui; Outros consumos de mem�ria devem ser pequenos 3536relativamente (se voc� notar que este n�o � o caso, nos 3537fa�a saber, como descrito em @ref{Paus}, assim 3538poderemos atualizar este documento). 3539 3540@c <en>The first area of big memory consumption is large 3541@c <en>checkouts, when using the @sc{cvs} server. The server 3542@c <en>consists of two processes for each client that it is 3543@c <en>serving. Memory consumption on the child process 3544@c <en>should remain fairly small. Memory consumption on the 3545@c <en>parent process, particularly if the network connection 3546@c <en>to the client is slow, can be expected to grow to 3547@c <en>slightly more than the size of the sources in a single 3548@c <en>directory, or two megabytes, whichever is larger. 3549A primeira �rea de grande consumo de mem�ria s�o os 3550grandes checkouts, quando usando o servidor @sc{cvs}. 3551O servidor consiste de dois processos para cada cliente 3552que est� servindo. O consumo de mem�ria no processo 3553filho deve permanecer pequeno. O consumo de mem�ria no 3554processo pai, perticularmente se a conex�o de rede com 3555o cliente � pequena, pode crescer para algo um pouco 3556maior que o tamanho dos fontes num diret�rio, ou dois 3557megabytes, o que for maior. 3558@c "two megabytes" of course is SERVER_HI_WATER. But 3559@c we don't mention that here because we are 3560@c documenting the default configuration of CVS. If it 3561@c is a "standard" thing to change that value, it 3562@c should be some kind of run-time configuration. 3563@c 3564@c See cvsclient.texi for more on the design decision 3565@c to not have locks in place while waiting for the 3566@c client, which is what results in memory consumption 3567@c as high as this. 3568 3569@c <en>Multiplying the size of each @sc{cvs} server by the 3570@c <en>number of servers which you expect to have active at 3571@c <en>one time should give an idea of memory requirements for 3572@c <en>the server. For the most part, the memory consumed by 3573@c <en>the parent process probably can be swap space rather 3574@c <en>than physical memory. 3575Multiplicando o tamanho de cada servidor @sc{cvs} pelo 3576n�mero de servidores que voc� espera ter ativos em cada 3577momento deve dar uma id�ia dos requisitos de mem�ria 3578para cada servidor. Para a maior parte, a mem�ria 3579consumida pelo processo pai pode provavelmente ser 3580espa�o de troca ao inv�s de mem�ria f�sica. 3581@c Has anyone verified that notion about swap space? 3582@c I say it based pretty much on guessing that the 3583@c ->text of the struct buffer_data only gets accessed 3584@c in a first in, first out fashion, but I haven't 3585@c looked very closely. 3586 3587@c What about disk usage in /tmp on the server? I think that 3588@c it can be substantial, but I haven't looked at this 3589@c again and tried to figure it out ("cvs import" is 3590@c probably the worst case...). 3591 3592@c <en>The second area of large memory consumption is 3593@c <en>@code{diff}, when checking in large files. This is 3594@c <en>required even for binary files. The rule of thumb is 3595@c <en>to allow about ten times the size of the largest file 3596@c <en>you will want to check in, although five times may be 3597@c <en>adequate. For example, if you want to check in a file 3598@c <en>which is 10 megabytes, you should have 100 megabytes of 3599@c <en>memory on the machine doing the checkin (the server 3600@c <en>machine for client/server, or the machine running 3601@c <en>@sc{cvs} for non-client/server). This can be swap 3602@c <en>space rather than physical memory. Because the memory 3603@c <en>is only required briefly, there is no particular need 3604@c <en>to allow memory for more than one such checkin at a 3605@c <en>time. 3606A segunda �rea de grande consumo de mem�ria � o 3607@code{diff}, quando trazendo grandes arquivos. Isto � 3608preciso mesmo para arquivos bin�rios. A boa pr�tica � 3609permitir cerca de dez vezes o tamanho do maior arquivo 3610que voc� vai devolver ao servidor, embora cinco vezes 3611seja adequado. Por exemplo, se voc� quer devolver um 3612arquivo de 10 megabytes, voc� deve ter 100 megabytes of 3613memory na m�quina fazendo a devolu��o (o servidor para 3614o caso cliente/servidor, ou a m�quina rodando o 3615@sc{cvs} para n�o-cliente/servidor). Esta mem�ria pode 3616ser espa�o de troca ao inv�s de mem�ria f�sica. J� que 3617a mem�ria � requerida apenas brevemente, n�o existe 3618necessidade especial para fornecer mem�ria para mais 3619de uma devolu��o ao mesmo tempo. 3620@c The 5-10 times rule of thumb is from Paul Eggert for 3621@c GNU diff. I don't think it is in the GNU diff 3622@c manual or anyplace like that. 3623@c 3624@c Probably we could be saying more about 3625@c non-client/server CVS. 3626@c I would guess for non-client/server CVS in an NFS 3627@c environment the biggest issues are the network and 3628@c the NFS server. 3629 3630@c <en>Resource consumption for the client is even more 3631@c <en>modest---any machine with enough capacity to run the 3632@c <en>operating system in question should have little 3633@c <en>trouble. 3634O consumo de recursos no cliente � ainda mais 3635modesto---qualquer m�quina com capacidade suficiente 3636para rodar o SO em quest�o n�o deve ter muitos 3637problemas. 3638@c Is that true? I think the client still wants to 3639@c (bogusly) store entire files in memory at times. 3640 3641@c <en>For information on disk space requirements, see 3642@c <en>@ref{Creating a repository}. 3643Para informa��es sobre requisitos de espa�o em disco, 3644veja em @ref{Criando um reposit�rio}. 3645 3646@c <en>@node Connecting via rsh 3647@node Se conectando via rsh 3648@c <en>@subsection Connecting with rsh 3649@subsection Se conectando via rsh 3650 3651@c <en>@cindex rsh 3652@cindex rsh 3653@c <en>@sc{cvs} uses the @samp{rsh} protocol to perform these 3654@c <en>operations, so the remote user host needs to have a 3655@c <en>@file{.rhosts} file which grants access to the local 3656@c <en>user. Note that the program that @sc{cvs} uses for this 3657@c <en>purpose may be specified using the @file{--with-rsh} 3658@c <en>flag to configure. 3659O @sc{cvs} usa o protocolo @samp{rsh} para realizar 3660estas opera��es, logo, a m�quina do usu�rio remoto tem 3661que ter um arquivo @file{.rhosts} que d� acesso para o 3662usu�rio local. Observe que o programa que o @sc{cvs} 3663usa para este objetivo deve ser especificado usando a 3664op��o @file{--with-rsh} para configurar. 3665 3666@c <en>For example, suppose you are the user @samp{mozart} on 3667@c <en>the local machine @samp{toe.example.com}, and the 3668@c <en>server machine is @samp{faun.example.org}. On 3669@c <en>faun, put the following line into the file 3670@c <en>@file{.rhosts} in @samp{bach}'s home directory: 3671Por exemplo, suponha que voc� � o usu�rio @samp{mozart} 3672na m�quina local @samp{toe.example.com}, e a m�quina 3673servidora � @samp{faun.example.org}. Em faun, ponha a 3674seguinte linha no arquivo @file{.rhosts} no diret�rio 3675pessoal de @samp{bach}: 3676 3677@example 3678toe.example.com mozart 3679@end example 3680 3681@noindent 3682@c <en>Then test that @samp{rsh} is working with 3683E fa�a o teste para ver que o @samp{rsh} est� 3684funcionando com 3685 3686@example 3687rsh -l bach faun.example.org 'echo $PATH' 3688@end example 3689 3690@c <en>@cindex CVS_SERVER, environment variable 3691@cindex CVS_SERVER, vari�vel de ambiente 3692@c <en>Next you have to make sure that @code{rsh} will be able 3693@c <en>to find the server. Make sure that the path which 3694@c <en>@code{rsh} printed in the above example includes the 3695@c <en>directory containing a program named @code{cvs} which 3696@c <en>is the server. You need to set the path in 3697@c <en>@file{.bashrc}, @file{.cshrc}, etc., not @file{.login} 3698@c <en>or @file{.profile}. Alternately, you can set the 3699@c <en>environment variable @code{CVS_SERVER} on the client 3700@c <en>machine to the filename of the server you want to use, 3701@c <en>for example @file{/usr/local/bin/cvs-1.6}. 3702A seguir voc� vai ter que se certificar que o 3703@code{rsh} vai ser capaz de acessar o servidor. 3704Verifique se o caminho que o @code{rsh} mostrou no 3705exemplo acima inclui o diret�rio contendo um programa 3706chamado @code{cvs} que est� no servidor. Voc� precisa 3707ajustar o caminho no @file{.bashrc}, @file{.cshrc}, 3708etc., n�o no @file{.login} ou no @file{.profile}. 3709Alternativamente, voc� pode ajustar a vari�vel de 3710ambiente @code{CVS_SERVER} na m�quina cliente para o 3711nome do arquivo do servidor que voc� quer usar, por 3712exemplo @file{/usr/local/bin/cvs-1.6}. 3713@c FIXME: there should be a way to specify the 3714@c program in CVSROOT, not CVS_SERVER, so that one can use 3715@c different ones for different roots. e.g. ":server;cvs=cvs-1.6:" 3716@c instead of ":server:". 3717 3718@c <en>There is no need to edit @file{inetd.conf} or start a 3719@c <en>@sc{cvs} server daemon. 3720N�o h� necessidade de se editar o @file{inetd.conf} ou 3721iniciar um daemon (servi�o) servidor de @sc{cvs}. 3722 3723@c <en>@cindex :server:, setting up 3724@cindex :servidor:, ajustando 3725@c <en>@cindex :ext:, setting up 3726@cindex :ext:, ajustando 3727@c <en>@cindex Kerberos, using kerberized rsh 3728@cindex Kerberos, usando rsh kerberizado 3729@c <en>@cindex SSH (rsh replacement) 3730@cindex SSH (substituto do rsh) 3731@c <en>@cindex rsh replacements (Kerberized, SSH, &c) 3732@cindex Substitutos do rsh (Kerberizado, SSH, &c) 3733@c <en>There are two access methods that you use in @code{CVSROOT} 3734@c <en>for rsh. @code{:server:} specifies an internal rsh 3735@c <en>client, which is supported only by some @sc{cvs} ports. 3736@c <en>@code{:ext:} specifies an external rsh program. By 3737@c <en>default this is @code{rsh} (unless otherwise specified 3738@c <en>by the @file{--with-rsh} flag to configure) but you may set the 3739@c <en>@code{CVS_RSH} environment variable to invoke another 3740@c <en>program which can access the remote server (for 3741@c <en>example, @code{remsh} on HP-UX 9 because @code{rsh} is 3742@c <en>something different). It must be a program which can 3743@c <en>transmit data to and from the server without modifying 3744@c <en>it; for example the Windows NT @code{rsh} is not 3745@c <en>suitable since it by default translates between CRLF 3746@c <en>and LF. The OS/2 @sc{cvs} port has a hack to pass @samp{-b} 3747@c <en>to @code{rsh} to get around this, but since this could 3748@c <en>potentially cause problems for programs other than the 3749@c <en>standard @code{rsh}, it may change in the future. If 3750@c <en>you set @code{CVS_RSH} to @code{SSH} or some other rsh 3751@c <en>replacement, the instructions in the rest of this 3752@c <en>section concerning @file{.rhosts} and so on are likely 3753@c <en>to be inapplicable; consult the documentation for your rsh 3754@c <en>replacement. 3755Existem dois m�todos de acesso que voc� pode usar no 3756@code{CVSROOT} para rsh. @code{:server:} especifica um 3757cliente rsh interno, que � suportado apenas por 3758alguns portes do @sc{cvs}. @code{:ext:} especifica um 3759programa rsh externo. Por padr�o � o @code{rsh} (a 3760menos que se especifique o contr�rio pela op��o 3761@file{--with-rsh}) mas voc� pode ajustar a vari�vel de 3762ambiente @code{CVS_RSH} para invocar outro programa que 3763pode acessar o servidor remoto (por exemplo, 3764@code{remsh} num HP-UX 9 j� que o @code{rsh} � de certa 3765forma diferente). Deve ser um programa que transmita 3766dados de e para o servidor sem modificar nada; por 3767exemplo, o @code{rsh} do Windows NT n�o � adequado j� 3768que por padr�o ele permuta CRLF com LF. O porte do 3769@sc{cvs} para OS/2 tem um ???hack??? para passar 3770@samp{-b} para o @code{rsh} para contornar isso, mas 3771j� que isso pode potencialmente causar problemas para 3772outros programas que n�o sejam o @code{rsh} padr�o, 3773isso deve mudar no futuro. Se voc� ajustar o 3774@code{CVS_RSH} para @code{SSH} ou algum outro 3775substituto do rsh, as instru��es no restante desta se��o a 3776respeito do arquivo @file{.rhosts} e outros 3777provavelmente n�o se aplicar�o; consulte a documenta��o 3778do seu substituto do rsh. 3779@c FIXME: there should be a way to specify the 3780@c program in CVSROOT, not CVS_RSH, so that one can use 3781@c different ones for different roots. e.g. ":ext;rsh=remsh:" 3782@c instead of ":ext:". 3783@c See also the comment in src/client.c for rationale 3784@c concerning "rsh" being the default and never 3785@c "remsh". 3786 3787@c <en>Continuing our example, supposing you want to access 3788@c <en>the module @file{foo} in the repository 3789@c <en>@file{/usr/local/cvsroot/}, on machine 3790@c <en>@file{faun.example.org}, you are ready to go: 3791Continuando nosso exemplo, supondo que voc� quer 3792acessar o m�dulo @file{foo} no reposit�rio 3793@file{/usr/local/cvsroot/}, da m�quina 3794@file{faun.example.org}, voc� est� pronto para seguir: 3795 3796@example 3797cvs -d :ext:bach@@faun.example.org:/usr/local/cvsroot checkout foo 3798@end example 3799 3800@noindent 3801@c <en>(The @file{bach@@} can be omitted if the username is 3802@c <en>the same on both the local and remote hosts.) 3803(O @file{bach@@} pode ser omitido se o nome de usu�rio 3804� o mesmo tanto no servidor como no cliente.) 3805 3806@c Should we mention "rsh host echo hi" and "rsh host 3807@c cat" (the latter followed by typing text and ^D) 3808@c as troubleshooting techniques? Probably yes 3809@c (people tend to have trouble setting this up), 3810@c but this kind of thing can be hard to spell out. 3811 3812@c <en>@node Password authenticated 3813@node Autentica��o por senha 3814@c <en>@subsection Direct connection with password authentication 3815@subsection Conex�es diretas com autentica��o por senha 3816 3817@c <en>The @sc{cvs} client can also connect to the server 3818@c <en>using a password protocol. This is particularly useful 3819@c <en>if using @code{rsh} is not feasible (for example, 3820@c <en>the server is behind a firewall), and Kerberos also is 3821@c <en>not available. 3822O cliente @sc{cvs} tamb�m pode se conectar ao servidor 3823usando um protocolo de senha. Isto � particularmente 3824�til se n�o se pode usar o @code{rsh} (por exemplo, se 3825o servidor est� atr�s de um firewall), e o Kerberos 3826tamb�m n�o est� dispon�vel. 3827 3828@c <en> To use this method, it is necessary to make 3829@c <en>some adjustments on both the server and client sides. 3830 Para usar este m�todo � necess�rio fazer 3831ajustes tanto do lado do cliente como no do servidor. 3832 3833@menu 3834@c <en>* Password authentication server:: Setting up the server 3835* Servidor de autentica��o por senha:: Ajustando o servidor 3836@c <en>* Password authentication client:: Using the client 3837* Cliente de autentica��o por senha:: Usando o cliente 3838@c <en>* Password authentication security:: What this method does and does not do 3839* Seguran�a com autentica��o por senha:: O que este m�todo faz e o que ele n�o faz 3840@end menu 3841 3842@c <en>@node Password authentication server 3843@node Servidor de autentica��o por senha 3844@c <en>@subsubsection Setting up the server for password authentication 3845@subsubsection Ajustando o servidor para autentica��o por senha 3846 3847@c <en>First of all, you probably want to tighten the 3848@c <en>permissions on the @file{$CVSROOT} and 3849@c <en>@file{$CVSROOT/CVSROOT} directories. See @ref{Password 3850@c <en>authentication security}, for more details. 3851Antes de tudo, voc� provavelmente vai querer amarrar as 3852permiss�es nos diret�rios @file{$CVSROOT} e 3853@file{$CVSROOT/CVSROOT}. Veja em 3854@ref{Seguran�a com autentica��o por senha} 3855para mais informa��es. 3856 3857@c <en>@cindex pserver (subcommand) 3858@cindex pserver (subcomando) 3859@c <en>@cindex Remote repositories, port specification 3860@cindex Reposit�rios remotos, especifica��o de porta 3861@c <en>@cindex Repositories, remote, port specification 3862@cindex Reposit�rios, remotos, especifica��o de porta 3863@c <en>@cindex Client/Server Operation, port specification 3864@cindex Opera��o cliente/Servidor, especifica��o de porta 3865@c <en>@cindex pserver (client/server connection method), port specification 3866@cindex pserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3867@c <en>@cindex kserver (client/server connection method), port specification 3868@cindex kserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3869@c <en>@cindex gserver (client/server connection method), port specification 3870@cindex gserver (m�todo de conex�o cliente/servidor), especifica��o de porta 3871@c <en>@cindex port, specifying for remote repositories 3872@cindex porta, especifica��o para reposit�rios remotos 3873@c <en>@cindex Password server, setting up 3874@cindex Servidor por senha, ajustando 3875@c <en>@cindex Authenticating server, setting up 3876@cindex Servidor por autentica��o, ajustando 3877@c <en>@cindex inetd, configuring for pserver 3878@cindex inetd, configurando para pserver 3879@c <en>@cindex xinetd, configuring for pserver 3880@cindex xinetd, configurando para pserver 3881@c FIXME: this isn't quite right regarding port 3882@c numbers; CVS looks up "cvspserver" in 3883@c /etc/services (on unix, but what about non-unix?). 3884@c <en>On the server side, the file @file{/etc/inetd.conf} 3885@c <en>needs to be edited so @code{inetd} knows to run the 3886@c <en>command @code{cvs pserver} when it receives a 3887@c <en>connection on the right port. By default, the port 3888@c <en>number is 2401; it would be different if your client 3889@c <en>were compiled with @code{CVS_AUTH_PORT} defined to 3890@c <en>something else, though. This can also be specified in the CVSROOT variable 3891@c <en>(@pxref{Remote repositories}) or overridden with the CVS_CLIENT_PORT 3892@c <en>environment variable (@pxref{Environment variables}). 3893No lado do servidor, o arquivo @file{/etc/inetd.conf} 3894precisa ser editado para que o @code{inetd} saiba rodar 3895o comando @code{cvs pserver} quando ele recebe uma 3896conex�o pela porta certa. Por padr�o, a porta de 3897n�mero 2401; entretanto, isto pode ser diferente se seu 3898cliente foi compilado com @code{CVS_AUTH_PORT} definido 3899para outra coisa. Esta porta tamb�m pode ser 3900especificada na vari�vel CVSROOT 3901(@pxref{Reposit�rios remotos}) ou sobreescrita com a vari�vel de 3902ambiente CVS_CLIENT_PORT (@pxref{Vari�veis de ambiente}). 3903 3904@c <en> If your @code{inetd} allows raw port numbers in 3905@c <en>@file{/etc/inetd.conf}, then the following (all on a 3906@c <en>single line in @file{inetd.conf}) should be sufficient: 3907 Se seu @code{inetd} permite ???raw port 3908numbers??? no @file{/etc/inetd.conf}, ent�o o seguinte 3909(tudo na mesma linha do @file{inetd.conf}) deve ser suficiente: 3910 3911@example 39122401 stream tcp nowait root /usr/local/bin/cvs 3913cvs -f --allow-root=/usr/cvsroot pserver 3914@end example 3915 3916@noindent 3917@c <en>(You could also use the 3918@c <en>@samp{-T} option to specify a temporary directory.) 3919(Voc� pode usar tamb�m a op��o @samp{-T} para 3920especificar um diret�rio tempor�rio.) 3921 3922@c <en>The @samp{--allow-root} option specifies the allowable 3923@c <en>@sc{cvsroot} directory. Clients which attempt to use a 3924@c <en>different @sc{cvsroot} directory will not be allowed to 3925@c <en>connect. If there is more than one @sc{cvsroot} 3926@c <en>directory which you want to allow, repeat the option. 3927@c <en>(Unfortunately, many versions of @code{inetd} have very small 3928@c <en>limits on the number of arguments and/or the total length 3929@c <en>of the command. The usual solution to this problem is 3930@c <en>to have @code{inetd} run a shell script which then invokes 3931@c <en>@sc{cvs} with the necessary arguments.) 3932A op��o @samp{--allow-root} especifica o diret�rio 3933@sc{cvsroot} permitido. Clientes que tentem usar um 3934diret�rio @sc{cvsroot} diferente n�o conseguir�o se 3935conectar. Se voc� quer permitir mais de um diret�rio 3936@sc{cvsroot}, repita a op��o. 3937(Infelismente, muitas vers�es do @code{inetd} t�m um 3938limite muito baixo do n�mero de argumentos e/ou do 3939comprimento total do comando. A solu��o usual para 3940este problema � fazer o @code{inetd} rodar um script de 3941shell que invoque o @sc{cvs} com os argumentos 3942necess�rios.) 3943 3944@c <en> If your @code{inetd} wants a symbolic service 3945@c <en>name instead of a raw port number, then put this in 3946@c <en>@file{/etc/services}: 3947 Se seu @code{inetd} precisa de um nome 3948simb�lico de servi�o ao inv�s de um n�mero de porta, 3949ponha em @file{/etc/services}: 3950 3951@example 3952cvspserver 2401/tcp 3953@end example 3954 3955@noindent 3956@c <en>and put @code{cvspserver} instead of @code{2401} in @file{inetd.conf}. 3957e ponha @code{cvspserver} no lugar de @code{2401} no @file{inetd.conf}. 3958 3959@c <en>If your system uses @code{xinetd} instead of @code{inetd}, 3960@c <en>the procedure is slightly different. 3961@c <en>Create a file called @file{/etc/xinetd.d/cvspserver} containing the following: 3962Se seu sistema usa @code{xinetd} no lugar de @code{inetd}, 3963o procedimento � um pouco diferente. Crie um arquivo 3964chamado @file{/etc/xinetd.d/cvspserver} contendo o seguinte: 3965 3966@example 3967service cvspserver 3968@{ 3969 port = 2401 3970 socket_type = stream 3971 protocol = tcp 3972 wait = no 3973 user = root 3974 passenv = PATH 3975 server = /usr/local/bin/cvs 3976 server_args = -f --allow-root=/usr/cvsroot pserver 3977@} 3978@end example 3979 3980@noindent 3981@c <en>(If @code{cvspserver} is defined in @file{/etc/services}, you can omit 3982@c <en>the @code{port} line.) 3983(Se @code{cvspserver} � definido no 3984@file{/etc/services}, voc� pode omitir a linha @code{port}.) 3985 3986@c <en> Once the above is taken care of, restart your 3987@c <en>@code{inetd}, or do whatever is necessary to force it 3988@c <en>to reread its initialization files. 3989 Uma vez que as instru��es acima foram seguidas, 3990reinicie seu @code{inetd}, ou fa�a o que for necess�rio 3991para for��-lo a reler seus arquivos de inicializa��o. 3992 3993@c <en>If you are having trouble setting this up, see 3994@c <en>@ref{Connection}. 3995Se voc� enfrentar problemas, veja em @ref{Conex�o}. 3996 3997@c <en>@cindex CVS passwd file 3998@cindex Arquivo passwd do CVS 3999@c <en>@cindex passwd (admin file) 4000@cindex passwd (arquivo administrativo) 4001@c <en>Because the client stores and transmits passwords in 4002@c <en>cleartext (almost---see @ref{Password authentication 4003@c <en>security}, for details), a separate @sc{cvs} password 4004@c <en>file is generally used, so people don't compromise 4005@c <en>their regular passwords when they access the 4006@c <en>repository. This file is 4007@c <en>@file{$CVSROOT/CVSROOT/passwd} (@pxref{Intro 4008@c <en>administrative files}). It uses a colon-separated 4009@c <en>format, similar to @file{/etc/passwd} on Unix systems, 4010@c <en>except that it has fewer fields: @sc{cvs} username, 4011@c <en>optional password, and an optional system username for 4012@c <en>@sc{cvs} to run as if authentication succeeds. Here is 4013@c <en>an example @file{passwd} file with five entries: 4014Como o cliente guarda e transmite as senhas em texto simples 4015(praticamente---veja @ref{Seguran�a com autentica��o por senha} 4016para detalhes), um arquivo de senhas do @sc{cvs} � 4017geralmente usado, de forma que as pessoas nao 4018comprometam suas senhas regulares quando acessam o 4019reposit�rio. Este arquivo � o 4020@file{$CVSROOT/CVSROOT/passwd} (@pxref{Intro aos 4021arquivos administrativos}). Ele usa um formato 4022separado por dois pontos, similar ao do 4023@file{/etc/passwd} dos sistemas Unix, exceto que este 4024tem menos campos: nome do usu�rio @sc{cvs}, senha 4025opcional, e um nome de usu�rio de sistema opcional para 4026o @sc{cvs} rodar como ele se ocorrer a autentica��o. 4027Aqui est� um exemplo de arquivo @file{passwd} com cinco 4028entradas: 4029 4030@example 4031anonymous: 4032bach:ULtgRLXo7NRxs 4033spwang:1sOp854gDF3DY 4034melissa:tGX1fS8sun6rY:pubcvs 4035qproj:XR4EZcEs0szik:pubcvs 4036@end example 4037 4038@noindent 4039@c <en>(The passwords are encrypted according to the standard 4040@c <en>Unix @code{crypt()} function, so it is possible to 4041@c <en>paste in passwords directly from regular Unix 4042@c <en>@file{/etc/passwd} files.) 4043(As senhas s�o criptografadas de acordo com a fun��o 4044Unix @code{crypt()} padr�o, portanto � poss�vel copiar 4045senhas diretamente de arquivos @file{/etc/passwd} 4046normais do Unix.) 4047 4048@c <en>The first line in the example will grant access to any 4049@c <en>@sc{cvs} client attempting to authenticate as user 4050@c <en>@code{anonymous}, no matter what password they use, 4051@c <en>including an empty password. (This is typical for 4052@c <en>sites granting anonymous read-only access; for 4053@c <en>information on how to do the "read-only" part, see 4054@c <en>@ref{Read-only access}.) 4055A primeira linha no exemplo vai dar acesso a qualquer 4056cliente @sc{cvs} que tente se autenticar como o usu�rio 4057@code{anonymous} (an�nimo), qualquer que seja a senha 4058que ele esteja usando, at� mesmo uma senha vazia. 4059(Isto � t�pico de s�tios que d�o acesso somente-leitura 4060an�nimo; para informa��es sobre como fazer a parte 4061"somente-leitura", veja em @ref{Acesso somente-leitura}.) 4062 4063@c <en>The second and third lines will grant access to 4064@c <en>@code{bach} and @code{spwang} if they supply their 4065@c <en>respective plaintext passwords. 4066As segunda e terceira linhas v�o fornecer acesso a 4067@code{bach} e @code{spwang} se eles fornecerem suas 4068respectivas senhas em texto simples. 4069 4070@c <en>@cindex User aliases 4071@cindex User aliases 4072@c <en>The fourth line will grant access to @code{melissa}, if 4073@c <en>she supplies the correct password, but her @sc{cvs} 4074@c <en>operations will actually run on the server side under 4075@c <en>the system user @code{pubcvs}. Thus, there need not be 4076@c <en>any system user named @code{melissa}, but there 4077@c <en>@emph{must} be one named @code{pubcvs}. 4078A quarta linha vai dar acesso a @code{melissa}, se ela 4079fornecer a senha correta, mas suas opare��es no 4080@sc{cvs} v�o ser rodadas, na verdade, como o usu�rio de 4081sistema @code{pubcvs} no lado do servidor. Logo, n�o 4082h� a necessidade de haver qualquer usu�rio chamado 4083@code{melissa}, mas @emph{tem que} haver um chamado 4084@code{pubcvs}. 4085 4086@c <en>The fifth line shows that system user identities can be 4087@c <en>shared: any client who successfully authenticates as 4088@c <en>@code{qproj} will actually run as @code{pubcvs}, just 4089@c <en>as @code{melissa} does. That way you could create a 4090@c <en>single, shared system user for each project in your 4091@c <en>repository, and give each developer their own line in 4092@c <en>the @file{$CVSROOT/CVSROOT/passwd} file. The @sc{cvs} 4093@c <en>username on each line would be different, but the 4094@c <en>system username would be the same. The reason to have 4095@c <en>different @sc{cvs} usernames is that @sc{cvs} will log their 4096@c <en>actions under those names: when @code{melissa} commits 4097@c <en>a change to a project, the checkin is recorded in the 4098@c <en>project's history under the name @code{melissa}, not 4099@c <en>@code{pubcvs}. And the reason to have them share a 4100@c <en>system username is so that you can arrange permissions 4101@c <en>in the relevant area of the repository such that only 4102@c <en>that account has write-permission there. 4103A quinta linha mostra que identidades de usu�rios de 4104sistema podem ser compartilhadas: qualquer cliente que 4105se autentique com sucesso como @code{qproj} vai na 4106verdade rodar como @code{pubcvs}, da mesma forma que 4107@code{melissa} faz. Desta forma voc� pode criar um 4108�nico e compartilhado usu�rio de sistema para cada 4109projeto no seu reposit�rio, e dar a cada desenvolvedor 4110sua pr�pria linha no arquivo 4111@file{$CVSROOT/CVSROOT/passwd}. O nome de usu�rio do 4112@sc{cvs} em cada linha vai ser diferente, mas o usu�rio 4113de sistema vai ser o mesmo. A raz�o para se ter 4114diferentes nomes de usu�rios do @sc{cvs} � que o 4115@sc{cvs} vai registrar suas a��es sob estes nomes: 4116quando @code{melissa} submete (commit) uma mudan�a ao 4117projeto, o checkin � gravado no hist�rico do projeto em 4118nome de @code{melissa}, n�o de @code{pubcvs}. E a 4119raz�o para t�-los compartilhando um usu�rio de sistema 4120� que voc� pode ajeitar as permiss�es da �rea relevante 4121do reposit�rio de forma que apenas aquela conta tenha 4122permiss�o de leitura l�. 4123 4124@c <en>If the system-user field is present, all 4125@c <en>password-authenticated @sc{cvs} commands run as that 4126@c <en>user; if no system user is specified, @sc{cvs} simply 4127@c <en>takes the @sc{cvs} username as the system username and 4128@c <en>runs commands as that user. In either case, if there 4129@c <en>is no such user on the system, then the @sc{cvs} 4130@c <en>operation will fail (regardless of whether the client 4131@c <en>supplied a valid password). 4132Se o campo do usu�rio de sistema est� presente, todos 4133os comandos do @sc{cvs} com autentica��o por senha 4134rodar�o como aquele usu�rio; se nenhum usu�rio � 4135especificado, o @sc{cvs} simplesmente vai usar o nome 4136de usu�rio do @sc{cvs} como o nome de usu�rio de 4137sistema e rodar os comandos como este usu�rio. Em 4138qualquer caso, se n�o existir tal usu�rio no sistema, a 4139opera��o do @sc{cvs} vai falhar (independente do 4140cliente ter fornecido uma senha v�lida). 4141 4142@c <en>The password and system-user fields can both be omitted 4143@c <en>(and if the system-user field is omitted, then also 4144@c <en>omit the colon that would have separated it from the 4145@c <en>encrypted password). For example, this would be a 4146@c <en>valid @file{$CVSROOT/CVSROOT/passwd} file: 4147Os campos de senha e usu�rio de sistema podem ser ambos 4148omitidos (e se o campo de usu�rio de sistema for 4149omitido, ent�o a v�rgula que o separava da senha 4150criptografada tamb�m pode ser omitida). Por exemplo, 4151isto pode ser um arquivo @file{$CVSROOT/CVSROOT/passwd} v�lido: 4152 4153@example 4154anonymous::pubcvs 4155fish:rKa5jzULzmhOo:kfogel 4156sussman:1sOp854gDF3DY 4157@end example 4158 4159@noindent 4160@c <en>When the password field is omitted or empty, then the 4161@c <en>client's authentication attempt will succeed with any 4162@c <en>password, including the empty string. However, the 4163@c <en>colon after the @sc{cvs} username is always necessary, 4164@c <en>even if the password is empty. 4165Quando o campo senha n�o existe ou � vazio, ent�o uma 4166tentativa de autentica��o do cliente vai funcionar 4167qualquer que seja a senha, inclusive a senha vazia. 4168Entretanto, o dois pontos antes do nome de usu�rio do 4169@sc{cvs} � sempre necess�rio, mesmo se a senha for vazia. 4170 4171@c <en>@sc{cvs} can also fall back to use system authentication. 4172@c <en>When authenticating a password, the server first checks 4173@c <en>for the user in the @file{$CVSROOT/CVSROOT/passwd} 4174@c <en>file. If it finds the user, it will use that entry for 4175@c <en>authentication as described above. But if it does not 4176@c <en>find the user, or if the @sc{cvs} @file{passwd} file 4177@c <en>does not exist, then the server can try to authenticate 4178@c <en>the username and password using the operating system's 4179@c <en>user-lookup routines (this "fallback" behavior can be 4180@c <en>disabled by setting @code{SystemAuth=no} in the 4181@c <en>@sc{cvs} @file{config} file, @pxref{config}). 4182O @sc{cvs} tamb�m pode recorrer � autentica��o do 4183sistema. Quando autenticando uma senha, o servidor 4184primeiro procura pelo usu�rio no arquivo 4185@file{$CVSROOT/CVSROOT/passwd}. Se ele encontra o 4186usu�rio, ele vai usar aquela entrada para autenticar 4187como descrito acima. Mas se o usu�rio n�o for 4188encontrado, ou se o arquivo @file{passwd} do @sc{cvs} 4189n�o existe, ent�o o servidor pode tentar autenticar o 4190nome de usu�rio e a senha usando as rotinas de 4191???user-lookup??? do sistema operacional (Este 4192comportamento "alternativo" pode ser desabilitado ajustando 4193o @code{SystemAuth=no} no arquivo @file{config} do 4194@sc{cvs}, @pxref{config}). 4195 4196@c <en>The default fallback behaviour is to look in 4197@c <en>@file{/etc/passwd} for this system password unless your 4198@c <en>system has PAM (Pluggable Authentication Modules) 4199@c <en>and your @sc{cvs} server executable was configured to 4200@c <en>use it at compile time (using @code{./configure --enable-pam} - see the 4201@c <en>INSTALL file for more). In this case, PAM will be consulted instead. 4202@c <en>This means that @sc{cvs} can be configured to use any password 4203@c <en>authentication source PAM can be configured to use (possibilities 4204@c <en>include a simple UNIX password, NIS, LDAP, and others) in its 4205@c <en>global configuration file (usually @file{/etc/pam.conf} 4206@c <en>or possibly @file{/etc/pam.d/cvs}). See your PAM documentation 4207@c <en>for more details on PAM configuration. 4208O comportamento alternativo � procurar no 4209@file{/etc/passwd} por este usu�rio de sistema a menos 4210que seu sistema tenha PAM (Pluggable Authentication 4211Modules) e seu servidor do @sc{cvs} execut�vel foi 4212configurado para usar PAM em tempo de compila��o 4213(usando @code{./configure --enable-pam} - veja no 4214arquivo INSTALL para saber mais). Neste caso, PAM � 4215que vai autenticar. Isto significa que o @sc{cvs} pode 4216ser configurado para usar qualquer fonte de 4217autentica��o por senha que PAM possa ser configurada 4218para usar (as possibilidades incluem senha simples de 4219UNIX, NIS, LDAP, e outras) no seu arquivo de 4220configura��o global (em geral @file{/etc/pam.conf} 4221ou possivelmente @file{/etc/pam.d/cvs}). Veja em sua 4222documenta��o do PAM para mais detalhes sobre a 4223configura��o do PAM. 4224 4225@c <en>Note that PAM is an experimental feature in @sc{cvs} and feedback is 4226@c <en>encouraged. Please send a mail to one of the @sc{cvs} mailing lists 4227@c <en>(@code{info-cvs@@nongnu.org} or @code{bug-cvs@@nongnu.org}) if you use the 4228@c <en>@sc{cvs} PAM support. 4229Observe que PAM � uma funcionalidade experimental no 4230@sc{cvs} e feedback � encorajado. Por favor, mande 4231e-mail para uma das listas do @sc{cvs} 4232(@code{info-cvs@@nongnu.org} ou @code{bug-cvs@@nongnu.org}) 4233se voc� usa o suporte a PAM do @sc{cvs}. As listas s�o 4234em ingl�s. 4235 4236@c <en>@strong{WARNING: Using PAM gives the system administrator much more 4237@c <en>flexibility about how @sc{cvs} users are authenticated but 4238@c <en>no more security than other methods. See below for more.} 4239@strong{ATEN��O: Usar PAM d� ao administrador do 4240sistema muito mais flexibilidade sobre como os usu�rios 4241do @sc{cvs} s�o autenticados mas n�o d� mais seguran�a 4242que outros m�todos. Veja abaixo mais detalhes.} 4243 4244@c <en>CVS needs an "auth" and "account" module in the 4245@c <en>PAM configuration file. A typical PAM configuration 4246@c <en>would therefore have the following lines 4247@c <en>in @file{/etc/pam.conf} to emulate the standard @sc{cvs} 4248@c <en>system @file{/etc/passwd} authentication: 4249CVS precisa de um m�dulo "auth" e "account" no arquivo 4250de configura��o PAM. Uma configura��o PAM t�pica deve 4251portanto ter as seguintes linhas no 4252@file{/etc/pam.conf} para simular a autentica��o 4253@file{/etc/passwd} do sistema @sc{cvs} padr�o: 4254 4255@example 4256cvs auth required pam_unix.so 4257cvs account required pam_unix.so 4258@end example 4259 4260@c <en>The the equivalent @file{/etc/pam.d/cvs} would contain 4261O @file{/etc/pam.d/cvs} equivalente deve conter 4262 4263@example 4264auth required pam_unix.so 4265account required pam_unix.so 4266@end example 4267 4268@c <en>Some systems require a full path to the module so that 4269@c <en>@file{pam_unix.so} (Linux) would become something like 4270@c <en>@file{/usr/lib/security/$ISA/pam_unix.so.1} (Sun Solaris). 4271@c <en>See the @file{contrib/pam} subdirectory of the @sc{cvs} 4272@c <en>source distribution for further example configurations. 4273Alguns sistemas necessitam de um caminho completo para 4274o m�dulo de forma que @file{pam_unix.so} (Linux) vai se 4275tornar algo do tipo 4276@file{/usr/lib/security/$ISA/pam_unix.so.1} (Sun 4277Solaris). Veja o subdiret�rio @file{contrib/pam} da 4278distribui��o em c�digo fonte do @sc{cvs} para mais 4279exemplos de configura��o. 4280 4281@c <en>The PAM service name given above as "cvs" is just 4282@c <en>the service name in the default configuration amd can be 4283@c <en>set using 4284@c <en>@code{./configure --with-hardcoded-pam-service-name=<pam-service-name>} 4285@c <en>before compiling. @sc{cvs} can also be configured to use whatever 4286@c <en>name it is invoked as as its PAM service name using 4287@c <en>@code{./configure --without-hardcoded-pam-service-name}, but this 4288@c <en>feature should not be used if you may not have control of the name 4289@c <en>@sc{cvs} will be invoked as. 4290O nome de servi�o PAM dado abaixo como "cvs" � apenas o 4291nome do servi�o na configura��o padr�o e pode ser 4292mudado usando 4293@code{./configure --with-hardcoded-pam-service-name=<pam-service-name>} 4294antes de compilar. ??? @sc{cvs} can also be configured to use whatever 4295name it is invoked as as its PAM service name using 4296@code{./configure 4297--without-hardcoded-pam-service-name}???, mas esta 4298caracter�stica n�o deve ser usada se voc� n�o tiver 4299controle do nome com o qual o @sc{cvs} ser� chamado. 4300 4301@c <en>Be aware, also, that falling back to system 4302@c <en>authentication might be a security risk: @sc{cvs} 4303@c <en>operations would then be authenticated with that user's 4304@c <en>regular login password, and the password flies across 4305@c <en>the network in plaintext. See @ref{Password 4306@c <en>authentication security} for more on this. 4307@c <en>This may be more of a problem with PAM authentication 4308@c <en>because it is likely that the source of the system 4309@c <en>password is some central authentication service like 4310@c <en>LDAP which is also used to authenticate other services. 4311Esteja avisado, al�m disso, que recorrer a autentica��o 4312do sistema pode ser um risco de seguran�a: as opera��es 4313do @sc{cvs} deveram ser autenticadas com a senha do 4314usu�rio regular, e a senha vai passar pela rede em 4315texto plano. Veja em @ref{Seguran�a com autentica��o por senha} 4316para saber mais. Isto pode ser um problema a mais com 4317autentica��o PAM por que � prov�vel que a fonte do 4318sistema de senhas � algum servi�o de autentica��o 4319central como o LDAP, que � usado para autenticar outros 4320servi�os. 4321 4322@c <en>On the other hand, PAM makes it very easy to change your password 4323@c <en>regularly. If they are given the option of a one-password system for 4324@c <en>all of their activities, users are often more willing to change their 4325@c <en>password on a regular basis. 4326Por outro lado, PAM faz com que seja f�cil mudar a 4327senha regularmente. Se os usu�rios t�m um sistema de 4328senha �nica, s�o mais f�ceis de convencer a trocar de 4329senha regularmente. 4330 4331@c <en>In the non-PAM configuration where the password is stored in the 4332@c <en>@file{CVSROOT/passwd} file, it is difficult to change passwords on a 4333@c <en>regular basis since only administrative users (or in some cases 4334@c <en>processes that act as an administrative user) are typicaly given 4335@c <en>access to modify this file. Either there needs to be some 4336@c <en>hand-crafted web page or set-uid program to update the file, or the 4337@c <en>update needs to be done by submitting a request to an administrator to 4338@c <en>perform the duty by hand. In the first case, having to remember to 4339@c <en>update a separate password on a periodic basis can be difficult. In 4340@c <en>the second case, the manual nature of the change will typically mean 4341@c <en>that the password will not be changed unless it is absolutely 4342@c <en>necessary. 4343Numa configura��o n�o-PAM, onde a senha � guardada no 4344arquivo @file{CVSROOT/passwd}, � dif�cil mudar as 4345senhas regularmente j� que apenas usu�rios 4346administradores (ou em alguns casos, processos que agem 4347como usu�rios administradores) t�m acesso de escrita ao 4348arquivo. ???Either there needs to be some 4349hand-crafted web page or set-uid program to update the file, or the 4350update needs to be done by submitting a request to an administrator to 4351perform the duty by hand???. No primeiro caso, ter que 4352lembrar de uma senha a parte periodicamente pode ser 4353dif�cil. No segundo caso, a natureza manual da mudan�a 4354vai significar que a senha n�o vai ser mudada at� que 4355seja absolutamente necess�rio. 4356 4357@c <en>Note that PAM administrators should probably avoid configuring 4358@c <en>one-time-passwords (OTP) for @sc{cvs} authentication/authorization. If 4359@c <en>OTPs are desired, the administrator may wish to encourage the use of 4360@c <en>one of the other Client/Server access methods. See the section on 4361@c <en>@pxref{Remote repositories} for a list of other methods. 4362Observe que os administradores do PAM v�o evitar 4363configurar one-time-passwords (OTP) para 4364autentica��o/autoriza��o do @sc{cvs}. Se os OTPs s�o 4365desejados, o administrador vai querer encorajar o uso 4366de um dos outros m�todos de acesso cliente/servidor. 4367Veja a se��o em @pxref{Reposit�rios remotos} para uma 4368lista de outros m�todos. 4369 4370@c <en>Right now, the only way to put a password in the 4371@c <en>@sc{cvs} @file{passwd} file is to paste it there from 4372@c <en>somewhere else. Someday, there may be a @code{cvs 4373@c <en>passwd} command. 4374Por agora, a �nica forma de botar uma senha no arquivo 4375@file{passwd} do @sc{cvs} � colar de algum outro lugar. 4376Algum dia vai haver um comando @code{cvs passwd}. 4377 4378@c <en>Unlike many of the files in @file{$CVSROOT/CVSROOT}, it 4379@c <en>is normal to edit the @file{passwd} file in-place, 4380@c <en>rather than via @sc{cvs}. This is because of the 4381@c <en>possible security risks of having the @file{passwd} 4382@c <en>file checked out to people's working copies. If you do 4383@c <en>want to include the @file{passwd} file in checkouts of 4384@c <en>@file{$CVSROOT/CVSROOT}, see @ref{checkoutlist}. 4385Ao contr�rio da maioria dos arquivos no 4386@file{$CVSROOT/CVSROOT}, � normal editar o arquivo 4387@file{passwd} in loco, ao inv�s de pelo @sc{cvs}. Isto 4388� devido a poss�veis riscos de seguran�a ao se ter 4389c�pias do arquivo @file{passwd} baixadas para o 4390diret�rio de trabalho das pessoas. Se voc� quer 4391incluir o arquivo @file{passwd} nos checkouts de 4392@file{$CVSROOT/CVSROOT}, veja em @ref{checkoutlist}. 4393 4394@c We might also suggest using the @code{htpasswd} command 4395@c from freely available web servers as well, but that 4396@c would open up a can of worms in that the users next 4397@c questions are likely to be "where do I get it?" and 4398@c "how do I use it?" 4399@c Also note that htpasswd, at least the version I had, 4400@c likes to clobber the third field. 4401 4402@c <en>@node Password authentication client 4403@node Cliente de autentica��o por senha 4404@c <en>@subsubsection Using the client with password authentication 4405@subsubsection Usando o cliente com autentica��o por senha 4406@c <en>@cindex Login (subcommand) 4407@cindex Login (subcomando) 4408@c <en>@cindex Password client, using 4409@cindex Cliente por senha, usando 4410@c <en>@cindex Authenticated client, using 4411@cindex Cliente autenticado, usando 4412@c <en>@cindex :pserver:, setting up 4413@cindex :pserver:, ajustando 4414@c <en>To run a @sc{cvs} command on a remote repository via 4415@c <en>the password-authenticating server, one specifies the 4416@c <en>@code{pserver} protocol, optional username, repository host, an 4417@c <en>optional port number, and path to the repository. For example: 4418Para rodar um comando @sc{cvs} num reposit�rio remoto 4419via servidor de autentica��o por senha, deve-se 4420espedificar o protocolo @code{pserver}, um nome de 4421usu�rio opcional, a m�quina do reposit�rio, uma porta 4422opcional, e o caminho para o reposit�rio. Por exemplo: 4423 4424@example 4425cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj 4426@end example 4427 4428@noindent 4429@c <en>or 4430or 4431 4432@example 4433CVSROOT=:pserver:bach@@faun.example.org:2401/usr/local/cvsroot 4434cvs checkout someproj 4435@end example 4436 4437@c <en>However, unless you're connecting to a public-access 4438@c <en>repository (i.e., one where that username doesn't 4439@c <en>require a password), you'll need to supply a password or @dfn{log in} first. 4440@c <en>Logging in verifies your password with the repository and stores it in a file. 4441@c <en>It's done with the @code{login} command, which will 4442@c <en>prompt you interactively for the password if you didn't supply one as part of 4443@c <en>@var{$CVSROOT}: 4444Entretanto, a menos que voc� esteja conectado a um 4445reposit�rio de acesso p�blico (i.e., um daqueles que o 4446usu�rio n�o precisa de senha), voc� vai precisar 4447fornecer uma senha ou @dfn{se logar} antes. Ao se 4448logar, a sua senha � comparada com a do reposit�rio e 4449guardada num arquivo. Isto � feito com o comando 4450@code{login}, que vai pedir a sua senha interativamente 4451se voc� n�o forneceu ela como parte do @var{$CVSROOT}: 4452 4453@example 4454cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot login 4455CVS password: 4456@end example 4457 4458@noindent 4459@c <en>or 4460or 4461 4462@example 4463cvs -d :pserver:bach:p4ss30rd@@faun.example.org:/usr/local/cvsroot login 4464@end example 4465 4466@c <en>After you enter the password, @sc{cvs} verifies it with 4467@c <en>the server. If the verification succeeds, then that 4468@c <en>combination of username, host, repository, and password 4469@c <en>is permanently recorded, so future transactions with 4470@c <en>that repository won't require you to run @code{cvs 4471@c <en>login}. (If verification fails, @sc{cvs} will exit 4472@c <en>complaining that the password was incorrect, and 4473@c <en>nothing will be recorded.) 4474Depois de fornecer a senha, o @sc{cvs} a verifica no 4475servidor. Se a verifica��o procede, ent�o esta 4476combina��o de usu�rio, m�quina, reposit�rio e senha � 4477gravada permanentemente de forma que futuras transa��es 4478com este reposit�rio n�o v�o requerer a execu��o de 4479@code{cvs login}. (Se a verifica��o falhar, @sc{cvs} 4480vai sair avisando que a senha est� incorreta e nada vai 4481ser gravado.) 4482 4483@c <en>The records are stored, by default, in the file 4484@c <en>@file{$HOME/.cvspass}. That file's format is 4485@c <en>human-readable, and to a degree human-editable, but 4486@c <en>note that the passwords are not stored in 4487@c <en>cleartext---they are trivially encoded to protect them 4488@c <en>from "innocent" compromise (i.e., inadvertent viewing 4489@c <en>by a system administrator or other non-malicious 4490@c <en>person). 4491A grava��o � feita, por padr�o, no arquivo 4492@file{$HOME/.cvspass}. O arquivo tem formato 4493leg�vel, e num certo n�vel, edit�vel, mas observe que 4494as senhas n�o s�o guardadas em texto plano---elas s�o 4495codificadas trivialmente para proteger contra 4496???compromise??? "inocente" (i.e., um administrador 4497desavisado dar uma olhada ou outra pessoa sem segundas 4498inten��es). 4499 4500@c <en>@cindex CVS_PASSFILE, environment variable 4501@c <en>You can change the default location of this file by 4502@c <en>setting the @code{CVS_PASSFILE} environment variable. 4503@c <en>If you use this variable, make sure you set it 4504@c <en>@emph{before} @code{cvs login} is run. If you were to 4505@c <en>set it after running @code{cvs login}, then later 4506@c <en>@sc{cvs} commands would be unable to look up the 4507@c <en>password for transmission to the server. 4508@cindex CVS_PASSFILE, vari�vel de ambiente 4509Voc� pode mudar o local padr�o deste arquivo ajustando 4510a vari�vel de ambiente @code{CVS_PASSFILE}. Se voc� 4511usar esta vari�vel, certifique-se de fazer isto 4512@emph{antes} de rodar @code{cvs login}. Se voc� fizer 4513isto depois de rodar o @code{cvs login}, ent�o mais 4514tarde os comandos do @sc{cvs} v�o ser incapazes de 4515encontrar a senha para mandar para o servidor. 4516 4517@c <en>Once you have logged in, all @sc{cvs} commands using 4518@c <en>that remote repository and username will authenticate 4519@c <en>with the stored password. So, for example 4520Uma vez que voc� esteja autenticado, todos os comandos 4521do @sc{cvs} que usam o reposit�rio remoto e senha v�o 4522se autenticar com a senha armazenada. Ent�o, por exemplo 4523 4524@example 4525cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot checkout foo 4526@end example 4527 4528@c <en>@noindent 4529@c <en>should just work (unless the password changes on the 4530@c <en>server side, in which case you'll have to re-run 4531@c <en>@code{cvs login}). 4532@noindent 4533vai funcionar (a menos que a senha mude no servidor, 4534onde neste caso voc� vai ter que rodar de novo 4535@code{cvs login}). 4536 4537@c <en>Note that if the @samp{:pserver:} were not present in 4538@c <en>the repository specification, @sc{cvs} would assume it 4539@c <en>should use @code{rsh} to connect with the server 4540@c <en>instead (@pxref{Connecting via rsh}). 4541Observe que se o @samp{:pserver:} n�o estiver presente 4542na especifica��o do reposit�rio, o @sc{cvs} vai assumir 4543que deve usar o @code{rsh} para se conectar com o 4544servidor, neste caso (@pxref{Se conectando via rsh}). 4545 4546@c <en>Of course, once you have a working copy checked out and 4547@c <en>are running @sc{cvs} commands from within it, there is 4548@c <en>no longer any need to specify the repository 4549@c <en>explicitly, because @sc{cvs} can deduce the repository 4550@c <en>from the working copy's @file{CVS} subdirectory. 4551� claro que, uma vez que voc� tenha uma c�pia de 4552trabalho baixada e est� rodando comandos @sc{cvs} de 4553dentro dela, n�o existe mais a necessidade de 4554explicitar o reposit�rio, j� que o @sc{cvs} pode 4555deduzir o reposit�rio a partir do subdiret�rio 4556@file{CVS} da c�pia de trabalho. 4557 4558@c FIXME: seems to me this needs somewhat more 4559@c explanation. 4560@c <en>@cindex Logout (subcommand) 4561@c <en>The password for a given remote repository can be 4562@c <en>removed from the @code{CVS_PASSFILE} by using the 4563@c <en>@code{cvs logout} command. 4564@cindex Logout (subcomando) 4565A senha para um dado reposit�rio remoto pode ser 4566removida do @code{CVS_PASSFILE} usando o comando 4567@code{cvs logout}. 4568 4569@c <en>@node Password authentication security 4570@node Seguran�a com autentica��o por senha 4571@c <en>@subsubsection Security considerations with password authentication 4572@subsubsection Considera��es de seguran�a com autentica��o por senha 4573 4574@c <en>@cindex Security, of pserver 4575@cindex Seguran�a com pserver 4576@c <en>The passwords are stored on the client side in a 4577@c <en>trivial encoding of the cleartext, and transmitted in 4578@c <en>the same encoding. The encoding is done only to 4579@c <en>prevent inadvertent password compromises (i.e., a 4580@c <en>system administrator accidentally looking at the file), 4581@c <en>and will not prevent even a naive attacker from gaining 4582@c <en>the password. 4583As senhas s�o guardadas no cliente com uma codifica��o 4584trivial de texto, e transmitidas na mesma codifica��o. 4585Esta codifica��o � feita apenas para prevenir uma 4586quebra de segredo inadvertida (i.e., um administrador 4587de sistema acidentalmente olhar o arquivo), e n�o 4588evita nem mesmo que um atacante ing�nuo consiga a 4589senha. 4590 4591@c FIXME: The bit about "access to the repository 4592@c implies general access to the system is *not* specific 4593@c to pserver; it applies to kerberos and SSH and 4594@c everything else too. Should reorganize the 4595@c documentation to make this clear. 4596@c <en>The separate @sc{cvs} password file (@pxref{Password 4597@c <en>authentication server}) allows people 4598@c <en>to use a different password for repository access than 4599@c <en>for login access. On the other hand, once a user has 4600@c <en>non-read-only 4601@c <en>access to the repository, she can execute programs on 4602@c <en>the server system through a variety of means. Thus, repository 4603@c <en>access implies fairly broad system access as well. It 4604@c <en>might be possible to modify @sc{cvs} to prevent that, 4605@c <en>but no one has done so as of this writing. 4606O arquivo de senhas do @sc{cvs} em separado 4607(@pxref{Servidor de autentica��o por senha}) permite 4608que as pessoas usem uma senha de acesso ao reposit�rio 4609deferente da senha de login. Por outro lado, uma vez 4610que um usu�rio tenha acesso maior que somente-leitura, 4611ele pode executar programas no sistema do servidor de 4612v�rias formas. Ent�o, o acesso ao reposit�rio implica 4613acesso ao sistema como um todo. � poss�vel modificar o 4614@sc{cvs} para evitar isto, mas at� agora ninguem agiu 4615neste sentido. 4616@c OpenBSD uses chroot() and copies the repository to 4617@c provide anonymous read-only access (for details see 4618@c http://www.openbsd.org/anoncvs.shar). While this 4619@c closes the most obvious holes, I'm not sure it 4620@c closes enough holes to recommend it (plus it is 4621@c *very* easy to accidentally screw up a setup of this 4622@c type). 4623 4624@c <en>Note that because the @file{$CVSROOT/CVSROOT} directory 4625@c <en>contains @file{passwd} and other files which are used 4626@c <en>to check security, you must control the permissions on 4627@c <en>this directory as tightly as the permissions on 4628@c <en>@file{/etc}. The same applies to the @file{$CVSROOT} 4629@c <en>directory itself and any directory 4630@c <en>above it in the tree. Anyone who has write access to 4631@c <en>such a directory will have the ability to become any 4632@c <en>user on the system. Note that these permissions are 4633@c <en>typically tighter than you would use if you are not 4634@c <en>using pserver. 4635observe que j� que o diret�rio @file{$CVSROOT/CVSROOT} 4636cont�m o arquivo @file{passwd} e outros arquivos que 4637s�o usados para verifica��es de seguran�a, voc� deve 4638controlar as permiss�es neste diret�rio com o mesmo 4639cuidado que tem com as permiss�es em @file{/etc}. O 4640mesmo se aplica ao pr�prio diret�rio @file{$CVSROOT} e 4641qualquer diret�rio acima dele na �rvore de diret�rios. 4642Qualquer pessoas que tenha permiss�o de escrita a algum 4643destes diret�rios vai ter a habilidade de se tornar 4644qualquer usu�rio do sistema. Observe que estas 4645permiss�es s�o em geral mais r�gidas que as que voc� 4646usaria se voc� n�o estivesse usando o pserver. 4647@c TODO: Would be really nice to document/implement a 4648@c scheme where the CVS server can run as some non-root 4649@c user, e.g. "cvs". CVSROOT/passwd would contain a 4650@c bunch of entries of the form foo:xxx:cvs (or the "cvs" 4651@c would be implicit). This would greatly reduce 4652@c security risks such as those hinted at in the 4653@c previous paragraph. I think minor changes to CVS 4654@c might be required but mostly this would just need 4655@c someone who wants to play with it, document it, &c. 4656 4657@c <en>In summary, anyone who gets the password gets 4658@c <en>repository access (which may imply some measure of general system 4659@c <en>access as well). The password is available to anyone 4660@c <en>who can sniff network packets or read a protected 4661@c <en>(i.e., user read-only) file. If you want real 4662@c <en>security, get Kerberos. 4663Resumindo, qualquer um que consiga as senhas vai ter 4664acesso ao reposit�rio (que implica de certa forma 4665acesso ao sistema em geral). A senha est� dispon�vel 4666para qualquer um que possa ???sniff??? pacotes de rede 4667ou ler um arquivo protegido (i.e., somente-leitura para 4668usu�rios). Se voc� quer seguran�a real, use Kerberos. 4669 4670@c <en>@node GSSAPI authenticated 4671@node Autentica��o GSSAPI 4672@c <en>@subsection Direct connection with GSSAPI 4673@subsection Conex�o direta com GSSAPI 4674 4675@c <en>@cindex GSSAPI 4676@cindex GSSAPI 4677@c <en>@cindex Security, GSSAPI 4678@cindex Seguran�a, GSSAPI 4679@c <en>@cindex :gserver:, setting up 4680@cindex :gserver:, ajustando 4681@c <en>@cindex Kerberos, using :gserver: 4682@cindex Kerberos, usando :gserver: 4683@c <en>GSSAPI is a generic interface to network security 4684@c <en>systems such as Kerberos 5. 4685@c <en>If you have a working GSSAPI library, you can have 4686@c <en>@sc{cvs} connect via a direct @sc{tcp} connection, 4687@c <en>authenticating with GSSAPI. 4688GSSAPI � uma interface gen�rica para sistemas de 4689seguran�a em rede como o Kerberos 5. Se voc� tem uma 4690biblioteca GSSAPI funcionando, voc� pode ter seu 4691@sc{cvs} conectado via uma conex�o @sc{tcp} direta, se 4692autenticando com GSSAPI. 4693 4694@c <en>To do this, @sc{cvs} needs to be compiled with GSSAPI 4695@c <en>support; when configuring @sc{cvs} it tries to detect 4696@c <en>whether GSSAPI libraries using kerberos version 5 are 4697@c <en>present. You can also use the @file{--with-gssapi} 4698@c <en>flag to configure. 4699Para isto, o @sc{cvs} precisa ter sido compilado com 4700suporte a GSSAPI; quando voc� estiver configurando o 4701@sc{cvs} ele vai tentar detectar se as bibliotecas 4702GSSAPI usando kerberos vers�o 5 est�o presentes. Voc� 4703tamb�m pode configurar isto com op��o @file{--with-gssapi}. 4704 4705@c <en>The connection is authenticated using GSSAPI, but the 4706@c <en>message stream is @emph{not} authenticated by default. 4707@c <en>You must use the @code{-a} global option to request 4708@c <en>stream authentication. 4709A conex�o � autenticada usando GSSAPI, mas o fluxo de 4710mensagem @emph{n�o �} autenticado por padr�o. Voc� deve 4711usar a op��o global @code{-a} para pedir autentica��o 4712de fluxo. 4713 4714@c <en>The data transmitted is @emph{not} encrypted by 4715@c <en>default. Encryption support must be compiled into both 4716@c <en>the client and the server; use the 4717@c <en>@file{--enable-encrypt} configure option to turn it on. 4718@c <en>You must then use the @code{-x} global option to 4719@c <en>request encryption. 4720Os dados transmitidos @emph{n�o} s�o criptografados por 4721padr�o. Suporte a criptografia deve ser compilado 4722tanto no cliente quanto no servidor; use a op��o de 4723configura��o @file{--enable-encrypt} para ativar isto. 4724Com isto voc� deve usar a op��o global @code{-x} para 4725pedir criptografia. 4726 4727@c <en>GSSAPI connections are handled on the server side by 4728@c <en>the same server which handles the password 4729@c <en>authentication server; see @ref{Password authentication 4730@c <en>server}. If you are using a GSSAPI mechanism such as 4731@c <en>Kerberos which provides for strong authentication, you 4732@c <en>will probably want to disable the ability to 4733@c <en>authenticate via cleartext passwords. To do so, create 4734@c <en>an empty @file{CVSROOT/passwd} password file, and set 4735@c <en>@code{SystemAuth=no} in the config file 4736@c <en>(@pxref{config}). 4737Conex�es GSSAPI s�o tratadas no lado servidor pelo 4738mesmo servidor que cuida de autentica��o por senha; 4739veja em @ref{Servidor de autentica��o por senha}. Se 4740voc� est� usando um mecanismo GSSAPI como o Kerberos, 4741que fornece autentica��o forte, voc� vai provavelmente 4742querer impedir autentica��o via senhas em texto plano. 4743Para tal, crie um arquivo de senha 4744@file{CVSROOT/passwd} vazio e fa�a @code{SystemAuth=no} 4745no arquivo config (@pxref{config}). 4746 4747@c <en>The GSSAPI server uses a principal name of 4748@c <en>cvs/@var{hostname}, where @var{hostname} is the 4749@c <en>canonical name of the server host. You will have to 4750@c <en>set this up as required by your GSSAPI mechanism. 4751O servidor GSSAPI usa um nome principal de 4752cvs/@var{hostname}, onde @var{hostname} � o nome 4753can�nico da m�quina servidora. Voc� vai ter que 4754ajustar isto como � exigido pelo seu mecanismo GSSAPI. 4755 4756@c <en>To connect using GSSAPI, use @samp{:gserver:}. For 4757@c <en>example, 4758Para se conectar usando GSSAPI, use @samp{:gserver:}. Por 4759exemplo, 4760 4761@example 4762cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo 4763@end example 4764 4765@c <en>@node Kerberos authenticated 4766@node Autentica��o kerberos 4767@c <en>@subsection Direct connection with kerberos 4768@subsection Conex�o direta com kerberos 4769 4770@c <en>@cindex Kerberos, using :kserver: 4771@cindex Kerberos, usando :kserver: 4772@c <en>@cindex Security, kerberos 4773@cindex Seguran�a, kerberos 4774@c <en>@cindex :kserver:, setting up 4775@cindex :kserver:, ajustando 4776@c <en>The easiest way to use kerberos is to use the kerberos 4777@c <en>@code{rsh}, as described in @ref{Connecting via rsh}. 4778@c <en>The main disadvantage of using rsh is that all the data 4779@c <en>needs to pass through additional programs, so it may be 4780@c <en>slower. So if you have kerberos installed you can 4781@c <en>connect via a direct @sc{tcp} connection, 4782@c <en>authenticating with kerberos. 4783A forma mais f�cil de usar kerberos � usar o @code{rsh} 4784kerberos, como descrito em @ref{Se conectando via 4785rsh}. A principal desvantagem de usar rsh � que todos 4786os dados precisam passar por outros programas, o que � 4787mais lento. Portanto, se voc� tem kerberos instalado, 4788voc� pode se conectar via conex�o @sc{tcp} direta, 4789autenticando com kerberos. 4790 4791@c <en>This section concerns the kerberos network security 4792@c <en>system, version 4. Kerberos version 5 is supported via 4793@c <en>the GSSAPI generic network security interface, as 4794@c <en>described in the previous section. 4795Esta se��o diz respeito ao sistema de seguran�a de rede 4796kerberos (kerberos network security system), vers�o 4. 4797Kerberos vers�o 5 � suportado pela interface de 4798seguran�a de rede gen�rica GSSAPI, como descrito na 4799se��o anterior. 4800 4801@c <en>To do this, @sc{cvs} needs to be compiled with kerberos 4802@c <en>support; when configuring @sc{cvs} it tries to detect 4803@c <en>whether kerberos is present or you can use the 4804@c <en>@file{--with-krb4} flag to configure. 4805Para isto, o @sc{cvs} precisa ter sido compilado com 4806suporte a kerberos; quando voc� estiver configurando o 4807@sc{cvs} ele vai tentar detectar se as bibliotecas 4808kerberos est�o presentes ou voc� pode configurar isto 4809com a op��o @file{--with-krb4}. 4810 4811@c <en>The data transmitted is @emph{not} encrypted by 4812@c <en>default. Encryption support must be compiled into both 4813@c <en>the client and server; use the 4814@c <en>@file{--enable-encryption} configure option to turn it 4815@c <en>on. You must then use the @code{-x} global option to 4816@c <en>request encryption. 4817Os dados transmitidos @emph{n�o} s�o criptografados por 4818padr�o. Suporte a criptografia deve ser compilado 4819tanto no cliente quanto no servidor; use a op��o de 4820configura��o @file{--enable-encryption} para ativar 4821isto. Voc� deve ent�o usar a op��o global @code{-x} 4822para pedir criptografia. 4823 4824@c <en>@cindex CVS_CLIENT_PORT 4825@cindex CVS_CLIENT_PORT 4826@c <en>You need to edit @file{inetd.conf} on the server 4827@c <en>machine to run @code{cvs kserver}. The client uses 4828@c <en>port 1999 by default; if you want to use another port 4829@c <en>specify it in the @code{CVSROOT} (@pxref{Remote repositories}) 4830@c <en>or the @code{CVS_CLIENT_PORT} environment variable 4831@c <en>(@pxref{Environment variables}) on the client. 4832Voc� precisa editar o @file{inetd.conf} no servidor 4833para rodar @code{cvs kserver}. O cliente usa a porta 48341999 por padr�o; se voc� quer usar outra porta 4835especifique ela no @code{CVSROOT} (@pxref{Reposit�rios remotos}) 4836ou na vari�vel de ambiente @code{CVS_CLIENT_PORT} 4837(@pxref{Vari�veis de ambiente}) no cliente. 4838 4839@c <en>@cindex kinit 4840@cindex kinit 4841@c <en>When you want to use @sc{cvs}, get a ticket in the 4842@c <en>usual way (generally @code{kinit}); it must be a ticket 4843@c <en>which allows you to log into the server machine. Then 4844@c <en>you are ready to go: 4845Quando voc� quiser usar o @sc{cvs}, pegue um t�quete da 4846forma usual (geralmente @code{kinit}); ele pode ser um 4847t�quete que te permite se autenticar na m�quina 4848servidora. Ent�o voc� estar� pronto para seguir: 4849 4850@example 4851cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo 4852@end example 4853 4854@c <en>Previous versions of @sc{cvs} would fall back to a 4855@c <en>connection via rsh; this version will not do so. 4856Vers�es anteriores do @sc{cvs} podem recair numa 4857conex�o via rsh; esta vers�o n�o vai fazer isso. 4858 4859@c <en>@node Connecting via fork 4860@node Conectando via fork 4861@c <en>@subsection Connecting with fork 4862@subsection Conectando via fork 4863 4864@c <en>@cindex fork, access method 4865@cindex fork, m�todo de acesso 4866@c <en>@cindex :fork:, setting up 4867@cindex :fork:, ajustando 4868@c <en>This access method allows you to connect to a 4869@c <en>repository on your local disk via the remote protocol. 4870@c <en>In other words it does pretty much the same thing as 4871@c <en>@code{:local:}, but various quirks, bugs and the like are 4872@c <en>those of the remote @sc{cvs} rather than the local 4873@c <en>@sc{cvs}. 4874Este m�todo de acesso permite a voc� conectar a um 4875reposit�rio no seu disco local via um protocolo 4876remoto. Em outras palavras, ele faz praticamente a 4877mesma coisa que @code{:local:}, mas v�rias peduliaridades, paus 4878e coisas do g�nero s�o os mesmos do @sc{cvs} remoto ao 4879inv�s do @sc{cvs} local. 4880 4881@c <en>For day-to-day operations you might prefer either 4882@c <en>@code{:local:} or @code{:fork:}, depending on your 4883@c <en>preferences. Of course @code{:fork:} comes in 4884@c <en>particularly handy in testing or 4885@c <en>debugging @code{cvs} and the remote protocol. 4886@c <en>Specifically, we avoid all of the network-related 4887@c <en>setup/configuration, timeouts, and authentication 4888@c <en>inherent in the other remote access methods but still 4889@c <en>create a connection which uses the remote protocol. 4890Para trabalhar no dia-a-dia voc� vai preferir ou o 4891@code{:local:} ou o @code{:fork:}, dependendo de suas 4892prefer�ncias. � claro que @code{:fork:} � bastante 4893�til em testes ou depura��o do @code{cvs} e o protocolo 4894remoto. Especificamente, n�s evitamos todas as 4895configura��es/ajustes relacionados a redes, sess�es 4896expirando e autentica��o inerentes de m�todos de acesso 4897remoto mas ainda assim criamos uma conex�o que usa o 4898protocolo remoto. 4899 4900@c <en>To connect using the @code{fork} method, use 4901@c <en>@samp{:fork:} and the pathname to your local 4902@c <en>repository. For example: 4903Para se conectar usando o m�todo @code{fork}, use 4904@samp{:fork:} e o caminho para seu reposit�rio local. 4905Por exemplo: 4906 4907@example 4908cvs -d :fork:/usr/local/cvsroot checkout foo 4909@end example 4910 4911@c <en>@cindex CVS_SERVER, and :fork: 4912@cindex CVS_SERVER, and :fork: 4913@c <en>As with @code{:ext:}, the server is called @samp{cvs} 4914@c <en>by default, or the value of the @code{CVS_SERVER} 4915@c <en>environment variable. 4916Assim como com @code{:ext:}, o servidor � chamado 4917@samp{cvs} por padr�o, ou o valor da vari�vel de 4918ambiente @code{CVS_SERVER}. 4919 4920@c --------------------------------------------------------------------- 4921@c <en>@node Read-only access 4922@node Acesso somente-leitura 4923@c <en>@section Read-only repository access 4924@section Acesso somente-leitura ao reposit�rio 4925@c <en>@cindex Read-only repository access 4926@cindex Acesso somente-leitura ao reposit�rio 4927@c <en>@cindex readers (admin file) 4928@cindex readers (arquivo administrativo) 4929@c <en>@cindex writers (admin file) 4930@cindex writers (arquivo administrativo) 4931 4932@c <en> It is possible to grant read-only repository 4933@c <en>access to people using the password-authenticated 4934@c <en>server (@pxref{Password authenticated}). (The 4935@c <en>other access methods do not have explicit support for 4936@c <en>read-only users because those methods all assume login 4937@c <en>access to the repository machine anyway, and therefore 4938@c <en>the user can do whatever local file permissions allow 4939@c <en>her to do.) 4940 � poss�vel permitir acesso somente-leitura ao 4941reposit�rio a pessoas usando o servidor de autentica��o 4942por senha (@pxref{Autentica��o por senha}). (Os outros 4943m�todos de acesso n�o tem suporte expl�cito para 4944somente-leitura de usu�rios, j� que todos estes m�todos 4945assumem acesso por login � m�quina do reposit�rio de 4946qualquer forma, e portanto o usu�rio pode fazer o que 4947as permiss�es de arquivos locais permitirem.) 4948 4949@c <en> A user who has read-only access can do only 4950@c <en>those @sc{cvs} operations which do not modify the 4951@c <en>repository, except for certain ``administrative'' files 4952@c <en>(such as lock files and the history file). It may be 4953@c <en>desirable to use this feature in conjunction with 4954@c <en>user-aliasing (@pxref{Password authentication server}). 4955Um usu�rio que tem acesso somente-leitura pode realizar 4956apenas as opera��es do @sc{cvs} que n�o modificam o 4957reposit�rio, exceto alguns arquivos ``administrativos'' 4958(tais como arquivos de trava e o arquivo history). 4959Pode ser desej�vel usar esta habilidade em conjunto com 4960???``user-aliasing''??? (@pxref{Servidor de autentica��o por 4961senha}). 4962 4963@c <en>Unlike with previous versions of @sc{cvs}, read-only 4964@c <en>users should be able merely to read the repository, and 4965@c <en>not to execute programs on the server or otherwise gain 4966@c <en>unexpected levels of access. Or to be more accurate, 4967@c <en>the @emph{known} holes have been plugged. Because this 4968@c <en>feature is new and has not received a comprehensive 4969@c <en>security audit, you should use whatever level of 4970@c <en>caution seems warranted given your attitude concerning 4971@c <en>security. 4972Ao contr�rio de vers�es anteriores do @sc{cvs}, 4973usu�rios somente-leitura s�o capazes de simplesmente 4974ler o reposit�rio, e n�o de executar programas no 4975servidor ou ainda conseguir n�veis de acessos extras. 4976Ou, para ser mais preciso, os pap�is @emph{conhecidos} 4977foram ???plugged???. Pelo fato de esta caracter�stica 4978ser nova e ainda n�o ter recebido uma auditoria de 4979seguran�a abrangente, voc� deve usar quaisquer n�veis 4980de precau��o que pare�am seguros de acordo com a sua 4981forma de agir com respeito a seguran�a. 4982 4983@c <en> There are two ways to specify read-only access 4984@c <en>for a user: by inclusion, and by exclusion. 4985 Existem duas formas de estabelecer acesso 4986somente-leitura para um usu�rio: por inclus�o ou por exclus�o. 4987 4988@c <en> "Inclusion" means listing that user 4989@c <en>specifically in the @file{$CVSROOT/CVSROOT/readers} 4990@c <en>file, which is simply a newline-separated list of 4991@c <en>users. Here is a sample @file{readers} file: 4992 "Inclus�o" significa botar aquele usu�rio 4993espec�fico no arquivo @file{$CVSROOT/CVSROOT/readers}, 4994que � simplesmente uma lista de usu�rios separados por 4995quebra de linha. Aqui est� um exemplo do @file{readers}: 4996 4997@example 4998melissa 4999splotnik 5000jrandom 5001@end example 5002 5003@noindent 5004@c <en> (Don't forget the newline after the last user.) 5005 (N�o esque�a a quebra de linha depois do �ltimo 5006usu�rio.) 5007 5008@c <en> "Exclusion" means explicitly listing everyone 5009@c <en>who has @emph{write} access---if the file 5010 "Exclus�o" significa listar explicitamente 5011todos que t�m acesso de @emph{escrita}---se o arquivo 5012 5013@example 5014$CVSROOT/CVSROOT/writers 5015@end example 5016 5017@noindent 5018@c <en>exists, then only 5019@c <en>those users listed in it have write access, and 5020@c <en>everyone else has read-only access (of course, even the 5021@c <en>read-only users still need to be listed in the 5022@c <en>@sc{cvs} @file{passwd} file). The 5023@c <en>@file{writers} file has the same format as the 5024@c <en>@file{readers} file. 5025existe, ent�o apenas os usu�rios que constam nele teram 5026acesso de escrita, e qualquer outra pessoa acesso 5027somente-leitura (obviamente, mesmo os usu�rios 5028somente-leitura devem ainda ser listados no arquivo 5029@file{passwd} do @sc{cvs}). O arquivo @file{writers} 5030tem o mesmo formato do arquivo @file{readers}. 5031 5032@c <en> Note: if your @sc{cvs} @file{passwd} 5033@c <en>file maps cvs users onto system users (@pxref{Password 5034@c <en>authentication server}), make sure you deny or grant 5035@c <en>read-only access using the @emph{cvs} usernames, not 5036@c <en>the system usernames. That is, the @file{readers} and 5037@c <en>@file{writers} files contain cvs usernames, which may 5038@c <en>or may not be the same as system usernames. 5039 Observa��o: se seu arquivo @file{passwd} do 5040@sc{cvs} associa usu�rios do cvs com usu�rios do 5041sistema (@pxref{Servidor de autentica��o por 5042senha}), certifique-se de que voc� esteja 5043negando ou fornecendo acesso somente-leitura usando os 5044usu�rios @emph{do cvs}, e n�o os do sistema. Ou seja, 5045os arquivos @file{readers} e @file{writers} cont�m 5046nomes de usu�rios do cvs, que n�o necess�riamente t�m o 5047mesmo nome que usu�rios do sistema. 5048 5049@c <en> Here is a complete description of the server's 5050@c <en>behavior in deciding whether to grant read-only or 5051@c <en>read-write access: 5052 Here is a complete description of the server's 5053behavior in deciding whether to grant read-only or 5054read-write access: 5055 5056@c <en> If @file{readers} exists, and this user is 5057@c <en>listed in it, then she gets read-only access. Or if 5058@c <en>@file{writers} exists, and this user is NOT listed in 5059@c <en>it, then she also gets read-only access (this is true 5060@c <en>even if @file{readers} exists but she is not listed 5061@c <en>there). Otherwise, she gets full read-write access. 5062 If @file{readers} exists, and this user is 5063listed in it, then she gets read-only access. Or if 5064@file{writers} exists, and this user is NOT listed in 5065it, then she also gets read-only access (this is true 5066even if @file{readers} exists but she is not listed 5067there). Otherwise, she gets full read-write access. 5068 5069@c <en> Of course there is a conflict if the user is 5070@c <en>listed in both files. This is resolved in the more 5071@c <en>conservative way, it being better to protect the 5072@c <en>repository too much than too little: such a user gets 5073@c <en>read-only access. 5074 Of course there is a conflict if the user is 5075listed in both files. This is resolved in the more 5076conservative way, it being better to protect the 5077repository too much than too little: such a user gets 5078read-only access. 5079 5080@c <en>@node Server temporary directory 5081@node Diret�rio tempor�rio do servidor 5082@c <en>@section Temporary directories for the server 5083@section Temporary directories for the server 5084@c <en>@cindex Temporary directories, and server 5085@cindex Temporary directories, and server 5086@c <en>@cindex Server, temporary directories 5087@cindex Server, temporary directories 5088 5089@c <en>While running, the @sc{cvs} server creates temporary 5090@c <en>directories. They are named 5091While running, the @sc{cvs} server creates temporary 5092directories. They are named 5093 5094@example 5095cvs-serv@var{pid} 5096@end example 5097 5098@noindent 5099@c <en>where @var{pid} is the process identification number of 5100@c <en>the server. 5101@c <en>They are located in the directory specified by 5102@c <en>the @samp{-T} global option (@pxref{Global options}), 5103@c <en>the @code{TMPDIR} environment variable (@pxref{Environment variables}), 5104@c <en>or, failing that, @file{/tmp}. 5105where @var{pid} is the process identification number of 5106the server. 5107They are located in the directory specified by 5108the @samp{-T} global option (@pxref{Op��es globais}), 5109the @code{TMPDIR} environment variable (@pxref{Vari�veis de ambiente}), 5110or, failing that, @file{/tmp}. 5111 5112@c <en>In most cases the server will remove the temporary 5113@c <en>directory when it is done, whether it finishes normally 5114@c <en>or abnormally. However, there are a few cases in which 5115@c <en>the server does not or cannot remove the temporary 5116@c <en>directory, for example: 5117In most cases the server will remove the temporary 5118directory when it is done, whether it finishes normally 5119or abnormally. However, there are a few cases in which 5120the server does not or cannot remove the temporary 5121directory, for example: 5122 5123@itemize @bullet 5124@item 5125@c <en>If the server aborts due to an internal server error, 5126@c <en>it may preserve the directory to aid in debugging 5127If the server aborts due to an internal server error, 5128it may preserve the directory to aid in debugging 5129 5130@item 5131@c <en>If the server is killed in a way that it has no way of 5132@c <en>cleaning up (most notably, @samp{kill -KILL} on unix). 5133If the server is killed in a way that it has no way of 5134cleaning up (most notably, @samp{kill -KILL} on unix). 5135 5136@item 5137@c <en>If the system shuts down without an orderly shutdown, 5138@c <en>which tells the server to clean up. 5139If the system shuts down without an orderly shutdown, 5140which tells the server to clean up. 5141@end itemize 5142 5143@c <en>In cases such as this, you will need to manually remove 5144@c <en>the @file{cvs-serv@var{pid}} directories. As long as 5145@c <en>there is no server running with process identification 5146@c <en>number @var{pid}, it is safe to do so. 5147In cases such as this, you will need to manually remove 5148the @file{cvs-serv@var{pid}} directories. As long as 5149there is no server running with process identification 5150number @var{pid}, it is safe to do so. 5151 5152@c --------------------------------------------------------------------- 5153@c <en>@node Starting a new project 5154@node Come�ando um novo projeto 5155@c <en>@chapter Starting a project with CVS 5156@chapter Come�ando um projeto com o CVS 5157@c <en>@cindex Starting a project with CVS 5158@cindex Come�ando um projeto com CVS 5159@c <en>@cindex Creating a project 5160@cindex Criando um projeto 5161 5162@comment --moduledb-- 5163@c <en>Because renaming files and moving them between 5164@c <en>directories is somewhat inconvenient, the first thing 5165@c <en>you do when you start a new project should be to think 5166@c <en>through your file organization. It is not impossible 5167@c <en>to rename or move files, but it does increase the 5168@c <en>potential for confusion and @sc{cvs} does have some 5169@c <en>quirks particularly in the area of renaming 5170@c <en>directories. @xref{Moving files}. 5171J� que renomear e mover arquivos entre diret�rios � um 5172tanto quanto inconveniente, a primeira coisa a fazer 5173quando voc� come�a um novo projeto deve ser ponderar a 5174respeito da organiza��o dos arquivos. N�o � imposs�vel 5175renomear ou mover arquivos, mas isto aumenta as chances 5176de erro e o @sc{cvs} tem algumas idiossincrasias em 5177especial quanto a renomear diret�rios. @xref{Movendo arquivos}. 5178 5179@c <en>What to do next depends on the situation at hand. 5180O que fazer depende da situa��o em que voc� est�. 5181 5182@menu 5183@c <en>* Setting up the files:: Getting the files into the repository 5184* Ajustando os arquivos:: Botando os arquivos no reposit�rio 5185@c <en>* Defining the module:: How to make a module of the files 5186* Definindo o m�dulo:: How to make a module of the files 5187@end menu 5188@c -- File permissions! 5189 5190@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5191@c <en>@node Setting up the files 5192@node Ajustando os arquivos 5193@c <en>@section Setting up the files 5194@section Ajustando os arquivos 5195 5196@c <en>The first step is to create the files inside the repository. This can 5197@c <en>be done in a couple of different ways. 5198O primeiro passo � criar os arquivos dentro do 5199reposit�rio. Isto pode ser feito de algumas maneiras diferentes. 5200 5201@c -- The contributed scripts 5202@menu 5203@c <en>* From files:: This method is useful with old projects 5204@c <en> where files already exists. 5205* De arquivos:: Este m�todo � �til para projetos 5206 antigos cujos arquivos j� existem. 5207@c <en>* From other version control systems:: Old projects where you want to 5208@c <en> preserve history from another system. 5209* De outros sistemas de controle de vers�o:: Projetos antigos onde voc� quer 5210 preservar o hist�rico de outro sistema. 5211@c <en>* From scratch:: Creating a directory tree from scratch. 5212* Do zero:: Criando uma �rvore de diret�rios 5213 do zero. 5214@end menu 5215 5216@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5217@c <en>@node From files 5218@node De arquivos 5219@c <en>@subsection Creating a directory tree from a number of files 5220@subsection Criando uma �rvore de diret�rios de uma quantidade de arquivos 5221@c <en>@cindex Importing files 5222@cindex Importando arquivos 5223 5224@c <en>When you begin using @sc{cvs}, you will probably already have several 5225@c <en>projects that can be 5226@c <en>put under @sc{cvs} control. In these cases the easiest way is to use the 5227@c <en>@code{import} command. An example is probably the easiest way to 5228@c <en>explain how to use it. If the files you want to install in 5229@c <en>@sc{cvs} reside in @file{@var{wdir}}, and you want them to appear in the 5230@c <en>repository as @file{$CVSROOT/yoyodyne/@var{rdir}}, you can do this: 5231Quando voc� come�a a usar o @sc{cvs}, provavelmente vai 5232ter v�rios projetos que podem ser postos sob controle 5233do @sc{cvs}. Nestes casos a forma mais f�cil � usar o 5234comando @code{import}. Um exemplo � provavelmente a 5235forma mais f�cil de explicar como se usa o 5236@code{import}. Se os arquivos que voc� quer instalar 5237no @sc{cvs} est�o em @file{@var{wdir}}, e voc� quer que 5238eles estejam no reposit�rio 5239@file{$CVSROOT/yoyodyne/@var{rdir}}, voc� pode fazer isto: 5240 5241@example 5242$ cd @var{wdir} 5243$ cvs import -m "Imported sources" yoyodyne/@var{rdir} yoyo start 5244@end example 5245 5246@c <en>Unless you supply a log message with the @samp{-m} 5247@c <en>flag, @sc{cvs} starts an editor and prompts for a 5248@c <en>message. The string @samp{yoyo} is a @dfn{vendor tag}, 5249@c <en>and @samp{start} is a @dfn{release tag}. They may fill 5250@c <en>no purpose in this context, but since @sc{cvs} requires 5251@c <en>them they must be present. @xref{Tracking sources}, for 5252@c <en>more information about them. 5253A menos que voc� forneca uma mensagem de log (registro) 5254com a op��o @samp{-m}, o @sc{cvs} vai iniciar um editor 5255e esperar uma mensagem. A string @samp{yoyo} � uma 5256@dfn{etiqueta de fornecedor} (vendor tag), e 5257@samp{start} � uma @dfn{etiqueta de release} (release 5258tag). Eles podem n�o fazer sentido neste contexto, mas 5259j� que o @sc{cvs} exige, elas devem estar presentes. 5260@xref{Acompanhando fontes}, para mais informa��es sobre 5261isto. 5262 5263@c <en>You can now verify that it worked, and remove your 5264@c <en>original source directory. 5265Voc� agora pode verificar se est� funcionando, e ent�o 5266apagar seu diret�rio do c�digo fonte original. 5267@c FIXME: Need to say more about "verify that it 5268@c worked". What should the user look for in the output 5269@c from "diff -r"? 5270 5271@example 5272$ cd .. 5273@c <en>$ cvs checkout yoyodyne/@var{rdir} # @r{Explanation below} 5274$ cvs checkout yoyodyne/@var{rdir} # @r{Explanation below} 5275$ diff -r @var{wdir} yoyodyne/@var{rdir} 5276$ rm -r @var{wdir} 5277@end example 5278 5279@noindent 5280@c <en>Erasing the original sources is a good idea, to make sure that you do 5281@c <en>not accidentally edit them in @var{wdir}, bypassing @sc{cvs}. 5282@c <en>Of course, it would be wise to make sure that you have 5283@c <en>a backup of the sources before you remove them. 5284Erasing the original sources is a good idea, to make sure that you do 5285not accidentally edit them in @var{wdir}, bypassing @sc{cvs}. 5286Of course, it would be wise to make sure that you have 5287a backup of the sources before you remove them. 5288 5289@c <en>The @code{checkout} command can either take a module 5290@c <en>name as argument (as it has done in all previous 5291@c <en>examples) or a path name relative to @code{$CVSROOT}, 5292@c <en>as it did in the example above. 5293The @code{checkout} command can either take a module 5294name as argument (as it has done in all previous 5295examples) or a path name relative to @code{$CVSROOT}, 5296as it did in the example above. 5297 5298@c <en>It is a good idea to check that the permissions 5299@c <en>@sc{cvs} sets on the directories inside @code{$CVSROOT} 5300@c <en>are reasonable, and that they belong to the proper 5301@c <en>groups. @xref{File permissions}. 5302It is a good idea to check that the permissions 5303@sc{cvs} sets on the directories inside @code{$CVSROOT} 5304are reasonable, and that they belong to the proper 5305groups. @xref{Permiss�es de arquivos}. 5306 5307@c <en>If some of the files you want to import are binary, you 5308@c <en>may want to use the wrappers features to specify which 5309@c <en>files are binary and which are not. @xref{Wrappers}. 5310If some of the files you want to import are binary, you 5311may want to use the wrappers features to specify which 5312files are binary and which are not. @xref{Wrappers}. 5313 5314@c The node name is too long, but I am having trouble 5315@c thinking of something more concise. 5316@c <en>@node From other version control systems 5317@node De outros sistemas de controle de vers�o 5318@c <en>@subsection Creating Files From Other Version Control Systems 5319@subsection Criando os Arquivos de Outros Sistemas de Controle de Vers�es 5320@c <en>@cindex Importing files, from other version control systems 5321@cindex Outros Sistemas de Controle de Vers�es, Importando Arquivos de 5322 5323@c <en>If you have a project which you are maintaining with 5324@c <en>another version control system, such as @sc{rcs}, you 5325@c <en>may wish to put the files from that project into 5326@c <en>@sc{cvs}, and preserve the revision history of the 5327@c <en>files. 5328If you have a project which you are maintaining with 5329another version control system, such as @sc{rcs}, you 5330may wish to put the files from that project into 5331@sc{cvs}, and preserve the revision history of the 5332files. 5333 5334@table @asis 5335@cindex RCS, importing files from 5336@cindex RCS, importing files from 5337@item From RCS 5338@item From RCS 5339@c <en>If you have been using @sc{rcs}, find the @sc{rcs} 5340@c <en>files---usually a file named @file{foo.c} will have its 5341@c <en>@sc{rcs} file in @file{RCS/foo.c,v} (but it could be 5342@c <en>other places; consult the @sc{rcs} documentation for 5343@c <en>details). Then create the appropriate directories in 5344@c <en>@sc{cvs} if they do not already exist. Then copy the 5345@c <en>files into the appropriate directories in the @sc{cvs} 5346@c <en>repository (the name in the repository must be the name 5347@c <en>of the source file with @samp{,v} added; the files go 5348@c <en>directly in the appropriate directory of the repository, 5349@c <en>not in an @file{RCS} subdirectory). This is one of the 5350@c <en>few times when it is a good idea to access the @sc{cvs} 5351@c <en>repository directly, rather than using @sc{cvs} 5352@c <en>commands. Then you are ready to check out a new 5353@c <en>working directory. 5354If you have been using @sc{rcs}, find the @sc{rcs} 5355files---usually a file named @file{foo.c} will have its 5356@sc{rcs} file in @file{RCS/foo.c,v} (but it could be 5357other places; consult the @sc{rcs} documentation for 5358details). Then create the appropriate directories in 5359@sc{cvs} if they do not already exist. Then copy the 5360files into the appropriate directories in the @sc{cvs} 5361repository (the name in the repository must be the name 5362of the source file with @samp{,v} added; the files go 5363directly in the appropriate directory of the repository, 5364not in an @file{RCS} subdirectory). This is one of the 5365few times when it is a good idea to access the @sc{cvs} 5366repository directly, rather than using @sc{cvs} 5367commands. Then you are ready to check out a new 5368working directory. 5369@c Someday there probably should be a "cvs import -t 5370@c rcs" or some such. It could even create magic 5371@c branches. It could also do something about the case 5372@c where the RCS file had a (non-magic) "0" branch. 5373 5374@c <en>The @sc{rcs} file should not be locked when you move it 5375@c <en>into @sc{cvs}; if it is, @sc{cvs} will have trouble 5376@c <en>letting you operate on it. 5377The @sc{rcs} file should not be locked when you move it 5378into @sc{cvs}; if it is, @sc{cvs} will have trouble 5379letting you operate on it. 5380@c What is the easiest way to unlock your files if you 5381@c have them locked? Especially if you have a lot of them? 5382@c This is a CVS bug/misfeature; importing RCS files 5383@c should ignore whether they are locked and leave them in 5384@c an unlocked state. Yet another reason for a separate 5385@c "import RCS file" command. 5386 5387@c How many is "many"? Or do they just import RCS files? 5388@c <en>@item From another version control system 5389@item From another version control system 5390@c <en>Many version control systems have the ability to export 5391@c <en>@sc{rcs} files in the standard format. If yours does, 5392@c <en>export the @sc{rcs} files and then follow the above 5393@c <en>instructions. 5394Many version control systems have the ability to export 5395@sc{rcs} files in the standard format. If yours does, 5396export the @sc{rcs} files and then follow the above 5397instructions. 5398 5399@c <en>Failing that, probably your best bet is to write a 5400@c <en>script that will check out the files one revision at a 5401@c <en>time using the command line interface to the other 5402@c <en>system, and then check the revisions into @sc{cvs}. 5403@c <en>The @file{sccs2rcs} script mentioned below may be a 5404@c <en>useful example to follow. 5405Failing that, probably your best bet is to write a 5406script that will check out the files one revision at a 5407time using the command line interface to the other 5408system, and then check the revisions into @sc{cvs}. 5409The @file{sccs2rcs} script mentioned below may be a 5410useful example to follow. 5411 5412@c <en>@cindex SCCS, importing files from 5413@cindex SCCS, importing files from 5414@c <en>@item From SCCS 5415@item From SCCS 5416@c <en>There is a script in the @file{contrib} directory of 5417@c <en>the @sc{cvs} source distribution called @file{sccs2rcs} 5418@c <en>which converts @sc{sccs} files to @sc{rcs} files. 5419@c <en>Note: you must run it on a machine which has both 5420@c <en>@sc{sccs} and @sc{rcs} installed, and like everything 5421@c <en>else in contrib it is unsupported (your mileage may 5422@c <en>vary). 5423There is a script in the @file{contrib} directory of 5424the @sc{cvs} source distribution called @file{sccs2rcs} 5425which converts @sc{sccs} files to @sc{rcs} files. 5426Note: you must run it on a machine which has both 5427@sc{sccs} and @sc{rcs} installed, and like everything 5428else in contrib it is unsupported (your mileage may 5429vary). 5430 5431@c <en>@cindex PVCS, importing files from 5432@cindex PVCS, importing files from 5433@c <en>@item From PVCS 5434@item From PVCS 5435@c <en>There is a script in the @file{contrib} directory of 5436@c <en>the @sc{cvs} source distribution called @file{pvcs_to_rcs} 5437@c <en>which converts @sc{pvcs} archives to @sc{rcs} files. 5438@c <en>You must run it on a machine which has both 5439@c <en>@sc{pvcs} and @sc{rcs} installed, and like everything 5440@c <en>else in contrib it is unsupported (your mileage may 5441@c <en>vary). See the comments in the script for details. 5442There is a script in the @file{contrib} directory of 5443the @sc{cvs} source distribution called @file{pvcs_to_rcs} 5444which converts @sc{pvcs} archives to @sc{rcs} files. 5445You must run it on a machine which has both 5446@sc{pvcs} and @sc{rcs} installed, and like everything 5447else in contrib it is unsupported (your mileage may 5448vary). See the comments in the script for details. 5449@end table 5450@c CMZ and/or PATCHY were systems that were used in the 5451@c high energy physics community (especially for 5452@c CERNLIB). CERN has replaced them with CVS, but the 5453@c CAR format seems to live on as a way to submit 5454@c changes. There is a program car2cvs which converts 5455@c but I'm not sure where one gets a copy. 5456@c Not sure it is worth mentioning here, since it would 5457@c appear to affect only one particular community. 5458@c Best page for more information is: 5459@c http://wwwcn1.cern.ch/asd/cvs/index.html 5460@c See also: 5461@c http://ecponion.cern.ch/ecpsa/cernlib.html 5462 5463@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5464@c <en>@node From scratch 5465@node Do zero 5466@c <en>@subsection Creating a directory tree from scratch 5467@subsection Criando uma �rvore de diret�rios do zero 5468 5469@c Also/instead should be documenting 5470@c $ cvs co -l . 5471@c $ mkdir tc 5472@c $ cvs add tc 5473@c $ cd tc 5474@c $ mkdir man 5475@c $ cvs add man 5476@c etc. 5477@c Using import to create the directories only is 5478@c probably a somewhat confusing concept. 5479@c <en>For a new project, the easiest thing to do is probably 5480@c <en>to create an empty directory structure, like this: 5481For a new project, the easiest thing to do is probably 5482to create an empty directory structure, like this: 5483 5484@example 5485$ mkdir tc 5486$ mkdir tc/man 5487$ mkdir tc/testing 5488@end example 5489 5490@c <en>After that, you use the @code{import} command to create 5491@c <en>the corresponding (empty) directory structure inside 5492@c <en>the repository: 5493After that, you use the @code{import} command to create 5494the corresponding (empty) directory structure inside 5495the repository: 5496 5497@example 5498$ cd tc 5499@c <en>$ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start 5500$ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start 5501@end example 5502 5503@c <en>Then, use @code{add} to add files (and new directories) 5504@c <en>as they appear. 5505Then, use @code{add} to add files (and new directories) 5506as they appear. 5507 5508@c <en>Check that the permissions @sc{cvs} sets on the 5509@c <en>directories inside @code{$CVSROOT} are reasonable. 5510Check that the permissions @sc{cvs} sets on the 5511directories inside @code{$CVSROOT} are reasonable. 5512 5513@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5514@c <en>@node Defining the module 5515@node Definindo o m�dulo 5516@c <en>@section Defining the module 5517@section Definindo o m�dulo 5518@c <en>@cindex Defining a module 5519@cindex Defining a module 5520@c <en>@cindex Editing the modules file 5521@cindex Editing the modules file 5522@c <en>@cindex Module, defining 5523@cindex Module, defining 5524@c <en>@cindex Modules file, changing 5525@cindex Modules file, changing 5526 5527@c <en>The next step is to define the module in the 5528@c <en>@file{modules} file. This is not strictly necessary, 5529@c <en>but modules can be convenient in grouping together 5530@c <en>related files and directories. 5531The next step is to define the module in the 5532@file{modules} file. This is not strictly necessary, 5533but modules can be convenient in grouping together 5534related files and directories. 5535 5536@c <en>In simple cases these steps are sufficient to define a module. 5537In simple cases these steps are sufficient to define a module. 5538 5539@enumerate 5540@item 5541@c <en>Get a working copy of the modules file. 5542Get a working copy of the modules file. 5543 5544@example 5545$ cvs checkout CVSROOT/modules 5546$ cd CVSROOT 5547@end example 5548 5549@item 5550@c <en>Edit the file and insert a line that defines the module. @xref{Intro 5551@c <en>administrative files}, for an introduction. @xref{modules}, for a full 5552@c <en>description of the modules file. You can use the 5553@c <en>following line to define the module @samp{tc}: 5554Edit the file and insert a line that defines the module. 5555@xref{Intro aos arquivos administrativos}, for an 5556introduction. @xref{modules}, for a full description 5557of the modules file. You can use the following line to 5558define the module @samp{tc}: 5559 5560@example 5561tc yoyodyne/tc 5562@end example 5563 5564@item 5565@c <en>Commit your changes to the modules file. 5566Commit your changes to the modules file. 5567 5568@example 5569@c <en>$ cvs commit -m "Added the tc module." modules 5570$ cvs commit -m "Added the tc module." modules 5571@end example 5572 5573@item 5574@c <en>Release the modules module. 5575Release the modules module. 5576 5577@example 5578$ cd .. 5579$ cvs release -d CVSROOT 5580@end example 5581@end enumerate 5582 5583@c --------------------------------------------------------------------- 5584@c <en>@node Revisions 5585@node Revis�es 5586@c <en>@chapter Revisions 5587@chapter Revis�es 5588 5589@comment <en>For many uses of @sc{cvs}, one doesn't need to worry 5590@comment <en>too much about revision numbers; @sc{cvs} assigns 5591@comment <en>numbers such as @code{1.1}, @code{1.2}, and so on, and 5592@comment <en>that is all one needs to know. However, some people 5593@comment <en>prefer to have more knowledge and control concerning 5594@comment <en>how @sc{cvs} assigns revision numbers. 5595Para muitos usos do @sc{cvs}, n�o � necess�rio se 5596preocupar com o n�mero de revis�es; o @sc{cvs} atribui 5597n�meros tais como @code{1.1}, @code{1.2} e por a� vai, 5598e isto � tudo que se precisa saber. Entretanto, 5599Algumas pessoas preferem ter mais conhecimento e 5600controle a respeito de como o @sc{cvs} atribui n�meros 5601de revis�o. 5602 5603@c <en>If one wants to keep track of a set of revisions 5604@c <en>involving more than one file, such as which revisions 5605@c <en>went into a particular release, one uses a @dfn{tag}, 5606@c <en>which is a symbolic revision which can be assigned to a 5607@c <en>numeric revision in each file. 5608Se voc� quiser marcar um conjunto de revis�es 5609envolvendo mais de um arquivo, tais como as revis�es 5610que integram uma release, pode usar uma @dfn{etiqueta} (tag), 5611que � uma revis�o simb�lica que pode ser associada a uma 5612revis�o num�rica em cada um dos arquivos. 5613 5614@menu 5615@c <en>* Revision numbers:: The meaning of a revision number 5616* N�meros de revis�o:: O significado dos n�meros de revis�o 5617@c <en>* Versions revisions releases:: Terminology used in this manual 5618* Vers�es revis�es releases:: Terminologia usada neste manual 5619@c <en>* Assigning revisions:: Assigning revisions 5620* Atribuindo revis�es:: Atribuindo revis�es 5621@c <en>* Tags:: Tags--Symbolic revisions 5622* Etiquetas:: Etiquetas (Tags)--Revis�es Simb�licas 5623@c <en>* Tagging the working directory:: The cvs tag command 5624* Etiquetando o diret�rio de trabalho:: O comando cvs tag 5625@c <en>* Tagging by date/tag:: The cvs rtag command 5626* Etiquetando por data/etiqueta:: O comando cvs rtag 5627@c <en>* Modifying tags:: Adding, renaming, and deleting tags 5628* Modificando etiquetas:: Adicionando, renomeando e apagando etiquetas 5629@c <en>* Tagging add/remove:: Tags with adding and removing files 5630* Etiquetando adicionados/removidos:: Etiquetas com arquivos adicionados e removidos 5631@c <en>* Sticky tags:: Certain tags are persistent 5632* Etiquetas adesivas:: Certas etiquetas s�o persistentes 5633@end menu 5634 5635@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5636@c <en>@node Revision numbers 5637@node N�meros de revis�o 5638@c <en>@section Revision numbers 5639@section N�meros de revis�o 5640@c <en>@cindex Revision numbers 5641@cindex N�meros de revis�o 5642@c <en>@cindex Revision tree 5643@cindex �rvore de revis�o 5644@c <en>@cindex Linear development 5645@cindex Desenvolvimento linear 5646@c <en>@cindex Number, revision- 5647@cindex Revis�o, n�mero de 5648@c <en>@cindex Decimal revision number 5649@cindex N�mero de revis�o decimal 5650@c <en>@cindex Branch number 5651@cindex N�mero de ramo 5652@c <en>@cindex Number, branch 5653@cindex Ramo, n�mero de 5654 5655@c <en>Each version of a file has a unique @dfn{revision 5656@c <en>number}. Revision numbers look like @samp{1.1}, 5657@c <en>@samp{1.2}, @samp{1.3.2.2} or even @samp{1.3.2.2.4.5}. 5658@c <en>A revision number always has an even number of 5659@c <en>period-separated decimal integers. By default revision 5660@c <en>1.1 is the first revision of a file. Each successive 5661@c <en>revision is given a new number by increasing the 5662@c <en>rightmost number by one. The following figure displays 5663@c <en>a few revisions, with newer revisions to the right. 5664Cada vers�o de um arquivo tem um @dfn{n�mero de 5665revis�o} �nico. N�meros de revis�o s�o coisas do tipo 5666@samp{1.1}, @samp{1.2}, @samp{1.3.2.2} ou at� mesmo 5667@samp{1.3.2.2.4.5}. Um n�mero de revis�o sempre tem uma 5668quantidade par de n�meros inteiros na base dez 5669separados por ponto. Por padr�o, a revis�o 1.1 � a 5670primeira revis�o de um arquivo. Cada revis�o sucessiva 5671ganha um novo n�mero somando um ao n�mero mais a 5672direita. A figura a seguir mostra mostra algumas 5673revis�es, com a revis�o mais nova mais � direita. 5674 5675@example 5676 +-----+ +-----+ +-----+ +-----+ +-----+ 5677 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! 5678 +-----+ +-----+ +-----+ +-----+ +-----+ 5679@end example 5680 5681@c <en>It is also possible to end up with numbers containing 5682@c <en>more than one period, for example @samp{1.3.2.2}. Such 5683@c <en>revisions represent revisions on branches 5684@c <en>(@pxref{Branching and merging}); such revision numbers 5685@c <en>are explained in detail in @ref{Branches and 5686@c <en>revisions}. 5687Tamb�m � poss�vel ter n�meros com mais de um ponto, por 5688exemplo @samp{1.3.2.2}. Tais revis�es representam 5689revis�es em ramos (@pxref{Ramificando e mesclando}); 5690estes n�meros de revis�o s�o explicados em detalhes em 5691@ref{Ramos e revis�es}. 5692 5693@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5694@c <en>@node Versions revisions releases 5695@node Vers�es revis�es releases 5696@c <en>@section Versions, revisions and releases 5697@section Vers�es, revis�es e releases 5698@c <en>@cindex Revisions, versions and releases 5699@cindex Revis�es, vers�es e releases 5700@c <en>@cindex Versions, revisions and releases 5701@cindex Vers�es, revis�es e releases 5702@c <en>@cindex Releases, revisions and versions 5703@cindex Releases, revis�es e vers�es 5704 5705@c <en>A file can have several versions, as described above. 5706@c <en>Likewise, a software product can have several versions. 5707@c <en>A software product is often given a version number such 5708@c <en>as @samp{4.1.1}. 5709Um arquivo pode ter v�rias vers�es, como descrito 5710acima. Da mesma forma, um produto de software tamb�m 5711pode ter v�rias vers�es. Frequentemente um produto de 5712software recebe um n�mero de vers�o, tal como @samp{4.1.1}. 5713 5714@c <en>Versions in the first sense are called @dfn{revisions} 5715@c <en>in this document, and versions in the second sense are 5716@c <en>called @dfn{releases}. To avoid confusion, the word 5717@c <en>@dfn{version} is almost never used in this document. 5718Vers�es, neste documento s�o chamadas, principalmente, 5719de @dfn{revis�es} , e tamb�m de @dfn{releases}. Para evitar 5720confus�o, o termo @dfn{vers�o} praticamente n�o � usado 5721neste documento. 5722 5723@c <en>@node Assigning revisions 5724@node Atribuindo revis�es 5725@c <en>@section Assigning revisions 5726@section Atribuindo revis�es 5727 5728@c We avoid the "major revision" terminology. It seems 5729@c like jargon. Hopefully "first number" is clear enough. 5730@c 5731@c Well, in the context of software release numbers, 5732@c "major" and "minor" release or version numbers are 5733@c documented in at least the GNU Coding Standards, but I'm 5734@c still not sure I find that a valid reason to apply the 5735@c terminology to RCS revision numbers. "First", "Second", 5736@c "subsequent", and so on is almost surely clearer, 5737@c especially to a novice reader. -DRP 5738@c <en>By default, @sc{cvs} will assign numeric revisions by 5739@c <en>leaving the first number the same and incrementing the 5740@c <en>second number. For example, @code{1.1}, @code{1.2}, 5741@c <en>@code{1.3}, etc. 5742Por padr�o, @sc{cvs} vai atribuir revis�es num�ricas 5743mantendo o primeiro n�mero e aumentando o segundo. Por 5744exemplo, @code{1.1}, @code{1.2}, @code{1.3}, etc. 5745 5746@c <en>When adding a new file, the second number will always 5747@c <en>be one and the first number will equal the highest 5748@c <en>first number of any file in that directory. For 5749@c <en>example, the current directory contains files whose 5750@c <en>highest numbered revisions are @code{1.7}, @code{3.1}, 5751@c <en>and @code{4.12}, then an added file will be given the 5752@c <en>numeric revision @code{4.1}. 5753Quando um novo arquivo � adicionado, o segundo n�mero 5754vai ser sempre o um e o primeiro n�mero vai ser igual 5755ao maior primeiro n�mero de qualquer arquivo no 5756diret�rio. Por exemplo, se o diret�rio atual contiver 5757arquivos os quais o maior n�mero de revis�o seram 5758@code{1.7}, @code{3.1} e @code{4.12}, ent�o um arquivo 5759adicionado vai receber a revis�o num�rica @code{4.1}. 5760 5761@c This is sort of redundant with something we said a 5762@c while ago. Somewhere we need a better way of 5763@c introducing how the first number can be anything 5764@c except "1", perhaps. Also I don't think this 5765@c presentation is clear on why we are discussing releases 5766@c and first numbers of numeric revisions in the same 5767@c breath. 5768@c <en>Normally there is no reason to care 5769@c <en>about the revision numbers---it is easier to treat them 5770@c <en>as internal numbers that @sc{cvs} maintains, and tags 5771@c <en>provide a better way to distinguish between things like 5772@c <en>release 1 versus release 2 of your product 5773@c <en>(@pxref{Tags}). However, if you want to set the 5774@c <en>numeric revisions, the @samp{-r} option to @code{cvs 5775@c <en>commit} can do that. The @samp{-r} option implies the 5776@c <en>@samp{-f} option, in the sense that it causes the 5777@c <en>files to be committed even if they are not modified. 5778Normalmente n�o h� raz�o para se preocupar com n�meros 5779de revis�o---� melhor trat�-los como numera��o interna 5780que o @sc{cvs} mant�m, e etiquetas (tags) fornecem uma 5781forma melhor de distinguir entre coisas tais como 5782release 1 e release 2 de seu produto 5783(@pxref{Etiquetas}). Entretando, se voc� quiser 5784ajustar as revis�es num�ricas, a op��o @samp{-r} do 5785@code{cvs commit} pode fazer isto. A op��o @samp{-r} 5786implica na op��o @samp{-f}, no sentido de que ela faz 5787com que os arquivos sejam submetidos mesmo caso eles 5788n�o estejam modificados. 5789 5790@c <en>For example, to bring all your files up to 5791@c <en>revision 3.0 (including those that haven't changed), 5792@c <en>you might invoke: 5793Por exemplo, para subir todos os arquivos para a 5794revis�o 3.0 (inclusive os que n�o sofreram mudan�as), 5795voc� deve invocar: 5796 5797@example 5798$ cvs commit -r 3.0 5799@end example 5800 5801@c <en>Note that the number you specify with @samp{-r} must be 5802@c <en>larger than any existing revision number. That is, if 5803@c <en>revision 3.0 exists, you cannot @samp{cvs commit 5804@c <en>-r 1.3}. If you want to maintain several releases in 5805@c <en>parallel, you need to use a branch (@pxref{Branching and merging}). 5806Observe que o n�mero que voc� especificar com a op��o 5807@samp{-r} deve ser maior que qualquer n�mero de revis�o 5808existente. Ou seja, se a revis�o 3.0 existe, voc� n�o 5809pode fazer @samp{cvs commit -r 1.3}. Se voc� quiser 5810manter v�rias releases em paralelo, voc� deve usar um ramo 5811(@pxref{Ramificando e mesclando}). 5812 5813@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5814@c <en>@node Tags 5815@node Etiquetas 5816@c <en>@section Tags--Symbolic revisions 5817@section Etiquetas (Tags)--Revis�es simb�licas 5818@c <en>@cindex Tags 5819@cindex Etiquetas 5820 5821@c <en>The revision numbers live a life of their own. They 5822@c <en>need not have anything at all to do with the release 5823@c <en>numbers of your software product. Depending 5824@c <en>on how you use @sc{cvs} the revision numbers might change several times 5825@c <en>between two releases. As an example, some of the 5826@c <en>source files that make up @sc{rcs} 5.6 have the following 5827@c <en>revision numbers: 5828Os n�meros de revis�o tem uma vida a parte. Eles n�o 5829precisam ter nada a ver com os n�meros de release de 5830seu produto de software. Dependendo de como voc� usa o 5831@sc{cvs}, os n�meros de revis�o podem mudar v�rias 5832vezes entre duas releases. Como um exemplo, alguns dos 5833arquivos fonte do @sc{rcs} 5.6 tinham os seguintes 5834n�meros de revis�o: 5835@c <en>@cindex RCS revision numbers 5836@cindex n�meros de revis�o do RCS 5837 5838@example 5839ci.c 5.21 5840co.c 5.9 5841ident.c 5.3 5842rcs.c 5.12 5843rcsbase.h 5.11 5844rcsdiff.c 5.10 5845rcsedit.c 5.11 5846rcsfcmp.c 5.9 5847rcsgen.c 5.10 5848rcslex.c 5.11 5849rcsmap.c 5.2 5850rcsutil.c 5.10 5851@end example 5852 5853@c <en>@cindex tag (subcommand), introduction 5854@cindex tag (subcomando), introdu��o 5855@c <en>@cindex Tags, symbolic name 5856@cindex Etiquetas, nome simb�lico 5857@c <en>@cindex Symbolic name (tag) 5858@cindex Nome simb�lico (etiqueta) 5859@c <en>@cindex Name, symbolic (tag) 5860@cindex Simb�lico, nome (etiqueta) 5861@c <en>@cindex HEAD, as reserved tag name 5862@cindex HEAD, nome de etiqueta reservado 5863@c <en>@cindex BASE, as reserved tag name 5864@cindex BASE, nome de etiqueta reservado 5865@c <en>You can use the @code{tag} command to give a symbolic name to a 5866@c <en>certain revision of a file. You can use the @samp{-v} flag to the 5867@c <en>@code{status} command to see all tags that a file has, and 5868@c <en>which revision numbers they represent. Tag names must 5869@c <en>start with an uppercase or lowercase letter and can 5870@c <en>contain uppercase and lowercase letters, digits, 5871@c <en>@samp{-}, and @samp{_}. The two tag names @code{BASE} 5872@c <en>and @code{HEAD} are reserved for use by @sc{cvs}. It 5873@c <en>is expected that future names which are special to 5874@c <en>@sc{cvs} will be specially named, for example by 5875@c <en>starting with @samp{.}, rather than being named analogously to 5876@c <en>@code{BASE} and @code{HEAD}, to avoid conflicts with 5877@c <en>actual tag names. 5878Voc� pode usar o comando @code{tag} para dar um nome 5879simb�lico para uma certa revis�o de um arquivo. Voc� 5880pode usar a op��o @samp{-v} com o comando @code{status} 5881para ver todas as etiquetas que um arquivo possui, e 5882que n�meros de revis�o elas representam. Nomes de 5883etiqueta devem come�ar com letra mai�scula ou min�scula 5884e pode conter letras mai�sculas e min�sculas, d�gitos, 5885@samp{-} e @samp{_}. Os dois nomes de etiqueta 5886@code{BASE} e @code{HEAD} s�o reservados para o 5887@sc{cvs}. � esperado que nomes futuros que sejam 5888especiais para o @sc{cvs} recebam nomes especiais, por 5889exemplo come�ando com @samp{.}, sendo ent�o nomeados de 5890forma an�loga a @code{BASE} e @code{HEAD}, para evitar 5891conflitos com os nomes de etiqueta atuais. 5892@c Including a character such as % or = has also been 5893@c suggested as the naming convention for future 5894@c special tag names. Starting with . is nice because 5895@c that is not a legal tag name as far as RCS is concerned. 5896@c FIXME: CVS actually accepts quite a few characters 5897@c in tag names, not just the ones documented above 5898@c (see RCS_check_tag). RCS 5899@c defines legitimate tag names by listing illegal 5900@c characters rather than legal ones. CVS is said to lose its 5901@c mind if you try to use "/" (try making such a tag sticky 5902@c and using "cvs status" client/server--see remote 5903@c protocol format for entries line for probable cause). 5904@c TODO: The testsuite 5905@c should test for whatever are documented above as 5906@c officially-OK tag names, and CVS should at least reject 5907@c characters that won't work, like "/". 5908 5909@c <en>You'll want to choose some convention for naming tags, 5910@c <en>based on information such as the name of the program 5911@c <en>and the version number of the release. For example, 5912@c <en>one might take the name of the program, immediately 5913@c <en>followed by the version number with @samp{.} changed to 5914@c <en>@samp{-}, so that @sc{cvs} 1.9 would be tagged with the name 5915@c <en>@code{cvs1-9}. If you choose a consistent convention, 5916@c <en>then you won't constantly be guessing whether a tag is 5917@c <en>@code{cvs-1-9} or @code{cvs1_9} or what. You might 5918@c <en>even want to consider enforcing your convention in the 5919@c <en>@file{taginfo} file (@pxref{taginfo}). 5920Voc� vai querer definir algumas conven��es para nomear 5921etiquetas, baseado em informa��es tais como nome do 5922programa e n�mero da vers�o da release. Por exemplo, 5923algume pode pegar o nome do programa, seguindo pelo 5924n�mero de vers�o com o @samp{.} trocado por @samp{-}, 5925de forma que o @sc{cvs} 1.9 seja etiquetado com o nome 5926de @code{cvs1-9}. Se voc� escolhe uma conven��o 5927consistente, voc� n�o vai precisar ficar constantemente 5928adivinhando se a etiqueta � @code{cvs-1-9} ou 5929@code{cvs1_9} ou sei l� o que. Voc� pode at� mesmo 5930considerar refor�ar esta conven��o no arquivo 5931@file{taginfo} (@pxref{taginfo}). 5932@c Might be nice to say more about using taginfo this 5933@c way, like giving an example, or pointing out any particular 5934@c issues which arise. 5935 5936@c <en>@cindex Adding a tag 5937@cindex Adicionando uma etiqueta 5938@c <en>@cindex Tags, example 5939@cindex Etiquetas, exemplo 5940@c <en>The following example shows how you can add a tag to a 5941@c <en>file. The commands must be issued inside your working 5942@c <en>directory. That is, you should issue the 5943@c <en>command in the directory where @file{backend.c} 5944@c <en>resides. 5945O exemplo seguinte mostra como voc� pode adicionar uma 5946etiqueta a um arquivo. Os comandos devem ser 5947executados de dentro do seu diret�rio de trabalho. Ou 5948seja, voc� deve executar o comando no diret�rio onde @file{backend.c} 5949fica. 5950 5951@example 5952$ cvs tag rel-0-4 backend.c 5953T backend.c 5954$ cvs status -v backend.c 5955=================================================================== 5956File: backend.c Status: Up-to-date 5957 5958 Version: 1.4 Tue Dec 1 14:39:01 1992 5959 RCS Version: 1.4 /u/cvsroot/yoyodyne/tc/backend.c,v 5960 Sticky Tag: (none) 5961 Sticky Date: (none) 5962 Sticky Options: (none) 5963 5964 Existing Tags: 5965 rel-0-4 (revision: 1.4) 5966 5967@end example 5968 5969@c <en>For a complete summary of the syntax of @code{cvs tag}, 5970@c <en>including the various options, see @ref{Invoking CVS}. 5971Para um resumo completo da sintaxe de @code{cvs tag}, 5972incluindo as v�rias op��es, veja em @ref{Chamando o CVS}. 5973 5974@c <en>There is seldom reason to tag a file in isolation. A more common use is 5975@c <en>to tag all the files that constitute a module with the same tag at 5976@c <en>strategic points in the development life-cycle, such as when a release 5977@c <en>is made. 5978Existem poucas raz�es para etiquetar um arquivo em 5979separado. Um uso mais comum � etiquetar todos os 5980arquivos que fazem parte de um m�dulo com a mesma 5981etiqueta em momentos estrat�gicos do ciclo de vida do 5982desenvolvimento, como por exemplo, quando fica pronta 5983uma release. 5984 5985@example 5986$ cvs tag rel-1-0 . 5987cvs tag: Tagging . 5988T Makefile 5989T backend.c 5990T driver.c 5991T frontend.c 5992T parser.c 5993@end example 5994 5995@noindent 5996@c <en>(When you give @sc{cvs} a directory as argument, it generally applies the 5997@c <en>operation to all the files in that directory, and (recursively), to any 5998@c <en>subdirectories that it may contain. @xref{Recursive behavior}.) 5999(Quando voc� passa um diret�rio para o @sc{cvs} como 6000argumento, ele geralmente realiza a opera��o em todos 6001os arquivos do diret�rio e (recursivamente) a todo 6002subdiret�rio que ele contenha. 6003@xref{Comportamento recursivo}.) 6004 6005@c <en>@cindex Retrieving an old revision using tags 6006@cindex Retrieving an old revision using tags 6007@c <en>@cindex Tags, retrieving old revisions 6008@cindex Tags, retrieving old revisions 6009@c <en>The @code{checkout} command has a flag, @samp{-r}, that lets you check out 6010@c <en>a certain revision of a module. This flag makes it easy to 6011@c <en>retrieve the sources that make up release 1.0 of the module @samp{tc} at 6012@c <en>any time in the future: 6013O comando @code{checkout} tem uma op��o, @samp{-r}, que 6014permite pegar uma certa revis�o de um m�dulo. Esta 6015op��o torna f�cil recuperar as ontes que fizeram parte 6016da release 1.0 do m�dulo @samp{tc} a qualquer momento 6017no futuro: 6018 6019@example 6020$ cvs checkout -r rel-1-0 tc 6021@end example 6022 6023@noindent 6024@c <en>This is useful, for instance, if someone claims that there is a bug in 6025@c <en>that release, but you cannot find the bug in the current working copy. 6026Isto pode ser �til, por exemplo, se alguem afirma que 6027tem um pau naquela vers�o, mas voc� n�o acha o pau na 6028c�pia de trabalho mais recente. 6029 6030@c <en>You can also check out a module as it was at any given date. 6031@c <en>@xref{checkout options}. When specifying @samp{-r} to 6032@c <en>any of these commands, you will need beware of sticky 6033@c <en>tags; see @ref{Sticky tags}. 6034Voc� tamb�m pode pegar um m�dulo do jeito que ele 6035estava em qualquer data. @xref{checkout options}. 6036Quando usar @samp{-r} em qualquer destes comandos, voc� 6037vai precisar estar atento �s etiquetas adesivas; veja 6038em @ref{Etiquetas adesivas}. 6039 6040@c <en>When you tag more than one file with the same tag you 6041@c <en>can think about the tag as "a curve drawn through a 6042@c <en>matrix of filename vs. revision number." Say we have 5 6043@c <en>files with the following revisions: 6044Quando voc� etiqueta mais de um arquivo com a mesma 6045etiqueta voc� pode pensar na etiqueta como "uma curva 6046desenhada ao longo da matriz de nomes de arquivo por 6047n�meros de revis�o". Digamos que temos 5 arquivos com 6048as seguintes revis�es: 6049 6050@example 6051@group 6052 file1 file2 file3 file4 file5 6053 6054 1.1 1.1 1.1 1.1 /--1.1* <-*- TAG 6055 1.2*- 1.2 1.2 -1.2*- 6056 1.3 \- 1.3*- 1.3 / 1.3 6057 1.4 \ 1.4 / 1.4 6058 \-1.5*- 1.5 6059 1.6 6060@end group 6061@end example 6062 6063@c <en>At some time in the past, the @code{*} versions were tagged. 6064@c <en>You can think of the tag as a handle attached to the curve 6065@c <en>drawn through the tagged revisions. When you pull on 6066@c <en>the handle, you get all the tagged revisions. Another 6067@c <en>way to look at it is that you "sight" through a set of 6068@c <en>revisions that is "flat" along the tagged revisions, 6069@c <en>like this: 6070Em algum momento no passado, as vers�es com @code{*} 6071foram etiquetadas. Voc� pode pensar na etiqueta como 6072uma al�a presa � curva que passa pelas revis�es 6073marcadas. Quando voc� puxa a al�a, vem as revis�es 6074etiquetadas. outra maneira de perceber isto � ver 6075atrav�s de um conjunto de revis�es que foram alinhadas 6076pelas revis�es etiquetadas, como isto: 6077 6078@example 6079@group 6080 file1 file2 file3 file4 file5 6081 6082 1.1 6083 1.2 6084 1.1 1.3 _ 6085 1.1 1.2 1.4 1.1 / 6086 1.2*----1.3*----1.5*----1.2*----1.1* (--- <--- Look here 6087 1.3 1.6 1.3 \_ 6088 1.4 1.4 6089 1.5 6090@end group 6091@end example 6092 6093@c <en>@node Tagging the working directory 6094@node Etiquetando o diret�rio de trabalho 6095@c <en>@section Specifying what to tag from the working directory 6096@section Especificando o que etiquetar no diret�rio de trabalho 6097 6098@c <en>@cindex tag (subcommand) 6099@cindex tag (subcomando) 6100@c <en>The example in the previous section demonstrates one of 6101@c <en>the most common ways to choose which revisions to tag. 6102@c <en>Namely, running the @code{cvs tag} command without 6103@c <en>arguments causes @sc{cvs} to select the revisions which 6104@c <en>are checked out in the current working directory. For 6105@c <en>example, if the copy of @file{backend.c} in working 6106@c <en>directory was checked out from revision 1.4, then 6107@c <en>@sc{cvs} will tag revision 1.4. Note that the tag is 6108@c <en>applied immediately to revision 1.4 in the repository; 6109@c <en>tagging is not like modifying a file, or other 6110@c <en>operations in which one first modifies the working 6111@c <en>directory and then runs @code{cvs commit} to transfer 6112@c <en>that modification to the repository. 6113O exemplo na se��o anterior demonstra uma das formas 6114mais comuns de escolher que revis�es etiquetar. A 6115saber, rodando o comando @code{cvs tag} sem argumentos 6116faz com que o @sc{cvs} selecione as revis�es que est�o 6117presentes no diret�rio de trabalho atual. Por exemplo, 6118se a c�pia do arquivo @file{backend.c} no diret�rio de 6119trabalho foi pega da revis�o 1.4, ent�o o @sc{cvs} vai 6120etiquetar a revis�o 1.4. Observe que a etiqueta � 6121aplicada na revis�o 1.4 no reposit�rio imediatamente; 6122Etiquetar n�o funciona como modificar arquivos ou 6123outras opera��es nas quais primeiros voc� modifica o 6124diret�rio de trabalho e ent�o roda o @code{cvs commit} 6125para mandar as modifica��es para o reposit�rio. 6126 6127@c <en>One potentially surprising aspect of the fact that 6128@c <en>@code{cvs tag} operates on the repository is that you 6129@c <en>are tagging the checked-in revisions, which may differ 6130@c <en>from locally modified files in your working directory. 6131@c <en>If you want to avoid doing this by mistake, specify the 6132@c <en>@samp{-c} option to @code{cvs tag}. If there are any 6133@c <en>locally modified files, @sc{cvs} will abort with an 6134@c <en>error before it tags any files: 6135Um aspecto potencialmente confuso no fato de o comando 6136@code{cvs tag} operar no reposit�rio � que voc� est� 6137etiquetando revis�es devolvidas, que podem diferir de 6138arquivos localmente modificados no seu diret�rio de 6139trabalho. Se voc� quer evitar fazer isto por engano, 6140use a op��o @samp{-c} no @code{cvs tag}. Se existe 6141qualquer arquivo localmente modificado, o @sc{cvs} vai 6142abortar com erro antes de etiquetar qualquer arquivo: 6143 6144@example 6145$ cvs tag -c rel-0-4 6146cvs tag: backend.c is locally modified 6147cvs [tag aborted]: correct the above errors first! 6148@end example 6149 6150@c <en>@node Tagging by date/tag 6151@node Etiquetando por data/etiqueta 6152@c <en>@section Specifying what to tag by date or revision 6153@section Especificando o que etiquetar por data ou revis�o 6154@c <en>@cindex rtag (subcommand) 6155@cindex rtag (subcomando) 6156 6157@c <en>The @code{cvs rtag} command tags the repository as of a 6158@c <en>certain date or time (or can be used to tag the latest 6159@c <en>revision). @code{rtag} works directly on the 6160@c <en>repository contents (it requires no prior checkout and 6161@c <en>does not look for a working directory). 6162O comando @code{cvs rtag} etiqueta o reposit�rio em uma 6163certa data ou hora (ou pode ser usado para etiquetar a 6164�ltima revis�o). @code{rtag} trabalha diretamente no 6165reposit�rio (n�o requer um checkout e n�o procura por 6166um diret�rio de trabalho). 6167 6168@c <en>The following options specify which date or revision to 6169@c <en>tag. See @ref{Common options}, for a complete 6170@c <en>description of them. 6171As seguintes op��es especificam que data ou revis�o 6172etiquetar. Veja em @ref{Op��es comuns}, para uma 6173descri��o completa delas. 6174 6175@table @code 6176@c <en>@item -D @var{data} 6177@item -D @var{data} 6178@c <en>Tag the most recent revision no later than @var{date}. 6179Etiqueta a revis�o mais recente que seja anterior a @var{data}. 6180 6181@c <en>@item -f 6182@item -f 6183@c <en>Only useful with the @samp{-D @var{date}} or @samp{-r @var{tag}} 6184@c <en>flags. If no matching revision is found, use the most 6185@c <en>recent revision (instead of ignoring the file). 6186�til apenas em conjunto com @samp{-D @var{data}} ou 6187@samp{-r @var{etiqueta}}. Se n�o encontrar uma revis� 6188casando com o padr�o, usar a revis�o mais recente (ao 6189inv�s de ignorar o arquivo). 6190 6191@c <en>@item -r @var{tag} 6192@item -r @var{etiqueta} 6193@c <en>Only tag those files that contain existing tag @var{tag}. 6194Etiqueta apenas os arquivos que cont�m a etiqueta 6195@var{etiqueta} existente. 6196@end table 6197 6198@c <en>The @code{cvs tag} command also allows one to specify 6199@c <en>files by revision or date, using the same @samp{-r}, 6200@c <en>@samp{-D}, and @samp{-f} options. However, this 6201@c <en>feature is probably not what you want. The reason is 6202@c <en>that @code{cvs tag} chooses which files to tag based on 6203@c <en>the files that exist in the working directory, rather 6204@c <en>than the files which existed as of the given tag/date. 6205@c <en>Therefore, you are generally better off using @code{cvs 6206@c <en>rtag}. The exceptions might be cases like: 6207O comando @code{cvs tag} tamb�m permite que voc� 6208especifique arquivos por revis�o ou data, usando as 6209mesmas op��es @samp{-r}, @samp{-D} e @samp{-f}. 6210Entretanto, este caracter�stica n�o � provavelmente o 6211que voc� quer. A raz�o � que o @code{cvs tag} escolhe 6212que arquivos etiquetar baseado nos arquivos que existem 6213no diret�rio de trabalho, ao inv�s de arquivos que 6214existem na dada etiqueta/data. Portanto, voc� � 6215geralmente ???better off??? usar @code{cvs rtag}. As 6216exce��es devem ser casos como: 6217 6218@example 6219cvs tag -r 1.4 stable backend.c 6220@end example 6221 6222@c <en>@node Modifying tags 6223@node Modificando etiquetas 6224@c <en>@section Deleting, moving, and renaming tags 6225@section Apagando, movendo e renomeando etiquetas 6226 6227@c Also see: 6228@c "How do I move or rename a magic branch tag?" 6229@c in the FAQ (I think the issues it talks about still 6230@c apply, but this could use some sanity.sh work). 6231 6232@c <en>Normally one does not modify tags. They exist in order 6233@c <en>to record the history of the repository and so deleting 6234@c <en>them or changing their meaning would, generally, not be 6235@c <en>what you want. 6236Normalmente n�o se modificam etiquetas. Elas existem 6237para registrar o hist�rico do reposit�rio e, portanto, 6238apag�-las ou alterar o significado delas n�o �, em 6239geral, o que voc� quer. 6240 6241@c <en>However, there might be cases in which one uses a tag 6242@c <en>temporarily or accidentally puts one in the wrong 6243@c <en>place. Therefore, one might delete, move, or rename a 6244@c <en>tag. 6245Entretanto, podem haver casos nos quais alguem usa a 6246etiqueta temporariamente ou bota no lugar errado por 6247acidente. Logo, � poss�vel apagar, mover, ou renomear 6248uma etiqueta. 6249 6250@noindent 6251@c <en>@strong{WARNING: the commands in this section are 6252@c <en>dangerous; they permanently discard historical 6253@c <en>information and it can be difficult or impossible to 6254@c <en>recover from errors. If you are a @sc{cvs} 6255@c <en>administrator, you may consider restricting these 6256@c <en>commands with the @file{taginfo} file (@pxref{taginfo}).} 6257@strong{ATEN��O: os comandos nesta se��o s�o perigosos; 6258eles apagam permanentemente informa��es hist�ricas e 6259pode ser dif�cil ou imposs�vel recuperar tais 6260informa��es em caso de erro. Se voc� � um 6261administrador do @sc{cvs}, voc� deve considerar 6262restringir estes comandos com o arquivo @file{taginfo} 6263(@pxref{taginfo}).} 6264 6265@c <en>@cindex Deleting tags 6266@cindex Apagando etiquetas 6267@c <en>@cindex Deleting branch tags 6268@cindex Apagando etiquetas de ramos 6269@c <en>@cindex Removing tags 6270@cindex Removendo etiquetas 6271@c <en>@cindex Removing branch tags 6272@cindex Removendo etiquetas de ramos 6273@c <en>@cindex Tags, deleting 6274@cindex Etiquetas, apagando 6275@c <en>@cindex Branch tags, deleting 6276@cindex Etiquetas de ramos, apagando 6277@c <en>To delete a tag, specify the @samp{-d} option to either 6278@c <en>@code{cvs tag} or @code{cvs rtag}. For example: 6279Para apagar uma etiqueta, especifique a op��o @samp{-d} 6280tanto para @code{cvs tag} quanto para @code{cvs rtag}. Por exemplo: 6281 6282@example 6283cvs rtag -d rel-0-4 tc 6284@end example 6285 6286@noindent 6287@c <en>deletes the non-branch tag @code{rel-0-4} from the module @code{tc}. 6288@c <en>In the event that branch tags are encountered within the repository 6289@c <en>with the given name, a warning message will be issued and the branch 6290@c <en>tag will not be deleted. If you are absolutely certain you know what 6291@c <en>you are doing, the @code{-B} option may be specified to allow deletion 6292@c <en>of branch tags. In that case, any non-branch tags encountered will 6293@c <en>trigger warnings and will not be deleted. 6294apaga a etiqueta ???non-branch??? @code{rel-0-4} do 6295m�dulo @code{tc}. No caso de etiquetas de ramos serem 6296encontradas no reposit�rio com o nome dado, uma 6297mensagem de aviso vai ser mostrada e a etiqueta de ramo 6298n�o vai ser apagada. Se voc� est� absolutamente certo 6299de que sabe o que est� fazendo, a op��o @code{-B} pode 6300ser especificada para permitir que se apague as 6301etiquetas de ramos. Neste caso, qualquer etiqueta 6302???non-branch??? encontrada vai disparar avisos e n�o 6303vai ser apagada. 6304 6305@noindent 6306@c <en>@strong{WARNING: Moving branch tags is very dangerous! If you think 6307@c <en>you need the @code{-B} option, think again and ask your @sc{cvs} 6308@c <en>administrator about it (if that isn't you). There is almost certainly 6309@c <en>another way to accomplish what you want to accomplish.} 6310@strong{ATEN��O: Mover etiquetas de ramos � muito 6311perigoso! Se voc� pensa que precisa da op��o 6312@code{-B}, pense duas vezes e pergunte a seu 6313administrador do @sc{cvs} sobre ela (se n�o for voc�). 6314� quase certo que existe outra forma de alcan�ar o seu objetivo.} 6315 6316@c <en>@cindex Moving tags 6317@cindex Movendo etiquetas 6318@c <en>@cindex Moving branch tags 6319@cindex Movendo etiquetas de ramos 6320@c <en>@cindex Tags, moving 6321@cindex Etiquetas, movendo 6322@c <en>@cindex Branch tags, moving 6323@cindex Etiquetas de ramos, movendo 6324@c <en>When we say @dfn{move} a tag, we mean to make the same 6325@c <en>name point to different revisions. For example, the 6326@c <en>@code{stable} tag may currently point to revision 1.4 6327@c <en>of @file{backend.c} and perhaps we want to make it 6328@c <en>point to revision 1.6. To move a non-branch tag, specify the 6329@c <en>@samp{-F} option to either @code{cvs tag} or @code{cvs 6330@c <en>rtag}. For example, the task just mentioned might be 6331@c <en>accomplished as: 6332Quando falamos em @dfn{mover} uma etiqueta, queremos 6333dizer fazer com que o mesmo nome aponte para diferentes 6334revis�es. Por exemplo, a etiqueta @code{stable} pode 6335atualmente apontar para a revis�o 1.4 do arquivo 6336@file{backend.c} e talvez n�s queiramos faz�-la apontar 6337para a revis�o 1.6. Para mover uma etiqueta 6338???non-branch???, Use a op��o @samp{-F} tanto com o 6339@code{cvs tag} oquanto com o @code{cvs rtag}. Por 6340exemplo, esta mudan�a pode ser alcan�ada com: 6341 6342@example 6343cvs tag -r 1.6 -F stable backend.c 6344@end example 6345 6346@noindent 6347@c <en>If any branch tags are encountered in the repository 6348@c <en>with the given name, a warning is issued and the branch 6349@c <en>tag is not disturbed. If you are absolutely certain you 6350@c <en>wish to move the branch tag, the @code{-B} option may be specified. 6351@c <en>In that case, non-branch tags encountered with the given 6352@c <en>name are ignored with a warning message. 6353Se alguma etiqueta de ramo for encontrada no 6354reposit�rio com o nome dado, um aviso � mostrado e a 6355etiqueta de ramo n�o � alterada. Se voc� est� 6356absolutamente certo de que voc� quer mover a etiquta de 6357ramo, a op��o @code{-B} pode ser especificada. Neste 6358caso, etiquetas ???non-branch??? encontradas com o nome 6359dado ser�o ignoradas com uma mensagem de aviso. 6360 6361@noindent 6362@c <en>@strong{WARNING: Moving branch tags is very dangerous! If you think you 6363@c <en>need the @code{-B} option, think again and ask your @sc{cvs} 6364@c <en>administrator about it (if that isn't you). There is almost certainly 6365@c <en>another way to accomplish what you want to accomplish.} 6366@strong{ATEN��O: Mover etiquetas de ramos � muito 6367perigoso! Se voc� pensa que precisa da op��o 6368@code{-B}, pense duas vezes e pergunte a seu 6369administrador do @sc{cvs} sobre ela (se n�o for voc�). 6370� quase certo que existe outra forma de alcan�ar o seu objetivo.} 6371 6372@c <en>@cindex Renaming tags 6373@cindex Renomeando etiquetas 6374@c <en>@cindex Tags, renaming 6375@cindex Etiquetas, renomeando 6376@c <en>When we say @dfn{rename} a tag, we mean to make a 6377@c <en>different name point to the same revisions as the old 6378@c <en>tag. For example, one may have misspelled the tag name 6379@c <en>and want to correct it (hopefully before others are 6380@c <en>relying on the old spelling). To rename a tag, first 6381@c <en>create a new tag using the @samp{-r} option to 6382@c <en>@code{cvs rtag}, and then delete the old name. (Caution: 6383@c <en>this method will not work with branch tags.) 6384@c <en>This leaves the new tag on exactly the 6385@c <en>same files as the old tag. For example: 6386Quando falamos em @dfn{renomear} uma etiqueta, queremos 6387dizer fazer com que um nome diferente aponte para para 6388as mesmas revis�es que a etiqueta antiga. Por exemplo, 6389alguem pode ter digitado errado o nome de uma etiqueta 6390e quer corrigir isto (de prefer�ncia antes que outros 6391caiam no mesmo erro). Para renomear uma etiqueta, 6392primeiro crie uma nova etiqueta usando a op��o 6393@samp{-r} para o @code{cvs rtag}, e ent�o apague o nome 6394antigo. (Cuidado: este m�todo n�o vai funcionar com 6395etiquetas de ramos). Isto deixa a nova etiqueta 6396exatamente nos mesmos arquivos que a etiqueta antiga. 6397Por exemplo: 6398 6399@example 6400cvs rtag -r old-name-0-4 rel-0-4 tc 6401cvs rtag -d old-name-0-4 tc 6402@end example 6403 6404@c <en>@node Tagging add/remove 6405@node Etiquetando adicionados/removidos 6406@c <en>@section Tagging and adding and removing files 6407@section Etiquetando e adicionando e removendo arquivos 6408 6409@c <en>The subject of exactly how tagging interacts with 6410@c <en>adding and removing files is somewhat obscure; for the 6411@c <en>most part @sc{cvs} will keep track of whether files 6412@c <en>exist or not without too much fussing. By default, 6413@c <en>tags are applied to only files which have a revision 6414@c <en>corresponding to what is being tagged. Files which did 6415@c <en>not exist yet, or which were already removed, simply 6416@c <en>omit the tag, and @sc{cvs} knows to treat the absence 6417@c <en>of a tag as meaning that the file didn't exist as of 6418@c <en>that tag. 6419O tema a respeito de como exatamente etiquetas 6420interagem com arquivos adicionados e removidos � de 6421certa forma obscuro; Normalmente, o @sc{cvs} vai 6422verificar quais arquivos existem ou n�o sem muita 6423confus�o. Por padr�o, etiquetas s�o aplicadas apenas a 6424arquivos que tenham uma revis�o correspondendo ao que 6425est� sendo etiquetado. Arquivos que ainda n�o existem, 6426ou que j� foram removidos, simplesmente omitem a 6427etiqueta, e o @sc{cvs} trata a aus�ncia de uma 6428etiqueta como significando que o arquivo n�o existia na 6429cria��o da etiqueta. 6430 6431@c <en>However, this can lose a small amount of information. 6432@c <en>For example, suppose a file was added and then removed. 6433@c <en>Then, if the tag is missing for that file, there is no 6434@c <en>way to know whether the tag refers to the time before 6435@c <en>the file was added, or the time after it was removed. 6436@c <en>If you specify the @samp{-r} option to @code{cvs rtag}, 6437@c <en>then @sc{cvs} tags the files which have been removed, 6438@c <en>and thereby avoids this problem. For example, one 6439@c <en>might specify @code{-r HEAD} to tag the head. 6440Entretanto, Isto pode perder uma pequena quantidade de 6441informa��o. Por exemplo, suponha que um arquivo foi 6442adicionado e ent�o removido. Ent�o, se a etiqueta est� 6443faltando para aquele arquivo, n�o h� como se descobrir 6444se a data da etiqueta � posterior � adi��o ou anterior 6445� remo��o do arquivo. Se voc� usa a op��o @samp{-r} 6446para @code{cvs rtag}, ent�o o @sc{cvs} etiqueta os 6447arquivos que foram removidos, e portanto remove este 6448problema. Por exemplo, alguem pode especificar @code{-r 6449HEAD} para etiquetar a head. 6450 6451@c <en>On the subject of adding and removing files, the 6452@c <en>@code{cvs rtag} command has a @samp{-a} option which 6453@c <en>means to clear the tag from removed files that would 6454@c <en>not otherwise be tagged. For example, one might 6455@c <en>specify this option in conjunction with @samp{-F} when 6456@c <en>moving a tag. If one moved a tag without @samp{-a}, 6457@c <en>then the tag in the removed files might still refer to 6458@c <en>the old revision, rather than reflecting the fact that 6459@c <en>the file had been removed. I don't think this is 6460@c <en>necessary if @samp{-r} is specified, as noted above. 6461A respeito de adicionar e remover arquivos, o comando 6462@code{cvs rtag} tem a op��o @samp{-a} que significa 6463limpar a etiqueta de arquivos removidos que ???would 6464not otherwise be tagged???. Por exemplo, alguem pode 6465especificar esta op��o em conjunto com @samp{-F} quando 6466mover uma etiqueta. Se alguem mover uma etiqueta sem o 6467@samp{-a}, ent�o a etiqueta nos arquivos removidos vai 6468continuar fazendo refer�ncia � revis�o antiga, Ao inv�s 6469de refletir o fato de que o arquivo foi removido. Eu 6470n�o acho que isto seja necess�rio se @samp{-r} � 6471especificado, como falado acima. 6472 6473@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6474@c <en>@node Sticky tags 6475@node Etiquetas adesivas 6476@c <en>@section Sticky tags 6477@section Etiquetas adesivas 6478@c <en>@cindex Sticky tags 6479@cindex Etiquetas adesivas 6480@c <en>@cindex Tags, sticky 6481@cindex Adesivas, etiquetas 6482 6483@c A somewhat related issue is per-directory sticky 6484@c tags (see comment at CVS/Tag in node Working 6485@c directory storage); we probably want to say 6486@c something like "you can set a sticky tag for only 6487@c some files, but you don't want to" or some such. 6488 6489@c <en>Sometimes a working copy's revision has extra data 6490@c <en>associated with it, for example it might be on a branch 6491@c <en>(@pxref{Branching and merging}), or restricted to 6492@c <en>versions prior to a certain date by @samp{checkout -D} 6493@c <en>or @samp{update -D}. Because this data persists -- 6494@c <en>that is, it applies to subsequent commands in the 6495@c <en>working copy -- we refer to it as @dfn{sticky}. 6496Algumas vezes, um c�pia de tabalho de uma revis�o tem 6497dados extra associados a ela, por exemplo, ela pode 6498estar num ramo (@pxref{Ramificando e mesclando}), ou 6499restrita a uma vers�o anterior a uma certa data por 6500@samp{checkout -D} ou @samp{update -D}. J� que este 6501dado persiste -- ou seja, ele se aplica a comandos 6502subseq�entes na c�pia de trabalho -- n�s o chamamos de 6503@dfn{adesivos}. 6504 6505@c <en>Most of the time, stickiness is an obscure aspect of 6506@c <en>@sc{cvs} that you don't need to think about. However, 6507@c <en>even if you don't want to use the feature, you may need 6508@c <en>to know @emph{something} about sticky tags (for 6509@c <en>example, how to avoid them!). 6510Na maioria das vezes, ser adesivo � um aspecto obscuro 6511do @sc{cvs} que voc� n�o precisa saber a respeito. 6512Entretanto, mesmo se voc� n�o quiser usar esta 6513habilidade, voc� vai precisar saber @emph{alguma 6514coisa} sobre etiquetas adesivas (sticky tags) (por 6515exemplo, como evit�-las!). 6516 6517@c <en>You can use the @code{status} command to see if any 6518@c <en>sticky tags or dates are set: 6519Voc� pode usar o comando @code{status} para ver se 6520alguma etiqueta ou data adesiva est�o ligadas: 6521 6522@example 6523$ cvs status driver.c 6524=================================================================== 6525File: driver.c Status: Up-to-date 6526 6527 Version: 1.7.2.1 Sat Dec 5 19:35:03 1992 6528 RCS Version: 1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v 6529 Sticky Tag: rel-1-0-patches (branch: 1.7.2) 6530 Sticky Date: (none) 6531 Sticky Options: (none) 6532 6533@end example 6534 6535@c <en>@cindex Resetting sticky tags 6536@cindex Zerando etiquetas adesivas 6537@c <en>@cindex Sticky tags, resetting 6538@cindex Etiquetas adesivas, zerando 6539@c <en>@cindex Deleting sticky tags 6540@cindex Apagando etiquetas adesivas 6541@c <en>The sticky tags will remain on your working files until 6542@c <en>you delete them with @samp{cvs update -A}. The 6543@c <en>@samp{-A} option merges local changes into the version of the 6544@c <en>file from the head of the trunk, removing any sticky tags, 6545@c <en>dates, or options. See @ref{update} for more on the operation 6546@c <en>of @code{cvs update}. 6547As etiquetas adesivas v�o permanecer nos seus arquivos 6548de trabalho at� que voc� apague elas com @samp{cvs 6549update -A}. A op��o @samp{-A} mescla as altera��es 6550locais na vers�o do arquivo na cabe�a (head) do tronco, 6551removendo qualquer etiqueta, data ou op��o adesiva. 6552Veja em @ref{update} para mais a respeito desta 6553opera��o do @code{cvs update}. 6554 6555@c <en>@cindex Sticky date 6556@cindex Data adesiva 6557@c <en>The most common use of sticky tags is to identify which 6558@c <en>branch one is working on, as described in 6559@c <en>@ref{Accessing branches}. However, non-branch 6560@c <en>sticky tags have uses as well. For example, 6561@c <en>suppose that you want to avoid updating your working 6562@c <en>directory, to isolate yourself from possibly 6563@c <en>destabilizing changes other people are making. You 6564@c <en>can, of course, just refrain from running @code{cvs 6565@c <en>update}. But if you want to avoid updating only a 6566@c <en>portion of a larger tree, then sticky tags can help. 6567@c <en>If you check out a certain revision (such as 1.4) it 6568@c <en>will become sticky. Subsequent @code{cvs update} 6569@c <en>commands will 6570@c <en>not retrieve the latest revision until you reset the 6571@c <en>tag with @code{cvs update -A}. Likewise, use of the 6572@c <en>@samp{-D} option to @code{update} or @code{checkout} 6573@c <en>sets a @dfn{sticky date}, which, similarly, causes that 6574@c <en>date to be used for future retrievals. 6575O uso mais comum de etiquetas adesivas � identificar em 6576que ramo se est� trabalhando, como descrito em 6577@ref{Acessando ramos}. Entretanto, etiquetas adesivas 6578em ???non-branch??? tamb�m t�m seu uso. Por exemplo, 6579suponha que voc� quer evitar atualizar seu diret�rio de 6580trabalho, para se isolar de mudan�as que outras pessoas 6581est�o fazendo que possam que possam desestabilizar seu 6582trabalho. Voc� pode, claro, simplesmente n�o rodar o @code{cvs 6583update}. Mas se voc� quer evitar atualizar (fazer 6584update) apenas uma parte de uma grande �rvore, ent�o 6585etiquetas adesivas podem ajudar. Se voc� pega uma certa 6586revs�o (como a 1.4) ela vai se tornar adesiva. 6587comandos @code{cvs update} subsequentes n�o v�o trazer 6588a revis�o mais nova at� que voc� limpe a etiqueta com os 6589comandos @code{cvs update -A}. Da mesma forma, o uso da 6590op��o @samp{-D} em @code{update} ou @code{checkout} 6591define uma @dfn{data adesiva}, que, similarmente, faz 6592com que a data seja usada para futuras ???retrievals???. 6593 6594@c <en>People often want to retrieve an old version of 6595@c <en>a file without setting a sticky tag. This can 6596@c <en>be done with the @samp{-p} option to @code{checkout} or 6597@c <en>@code{update}, which sends the contents of the file to 6598@c <en>standard output. For example: 6599� normal as pessoas quererem recuperar uma vers�o 6600antiga de um arquivo sem definir uma etiqueta adesiva. 6601Isto pode ser feito com a op��o @samp{-p} no 6602@code{checkout} ou @code{update}, que manda o conte�do 6603do arquivo para a sa�da padr�o. Por exemplo: 6604@example 6605$ cvs update -p -r 1.1 file1 >file1 6606=================================================================== 6607Checking out file1 6608RCS: /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v 6609VERS: 1.1 6610*************** 6611$ 6612@end example 6613 6614@c <en>However, this isn't the easiest way, if you are asking 6615@c <en>how to undo a previous checkin (in this example, put 6616@c <en>@file{file1} back to the way it was as of revision 6617@c <en>1.1). In that case you are better off using the 6618@c <en>@samp{-j} option to @code{update}; for further 6619@c <en>discussion see @ref{Merging two revisions}. 6620Entretanto, esta n�o � a forma mais f�cil, se voc� est� 6621querendo desfazer um envio anterior (neste exemplo, 6622devolver o arquivo @file{file1} ao que ele era na 6623revis�o 1.1). Neste caso � melhor usar a op��o 6624@samp{-j} com o @code{update}; Para maiores detalhes, 6625veja em @ref{Mesclando duas revis�es}. 6626 6627@c --------------------------------------------------------------------- 6628@c <en>@node Branching and merging 6629@node Ramificando e mesclando 6630@c <en>@chapter Branching and merging 6631@chapter Ramificando e mesclando 6632@c <en>@cindex Branching 6633@cindex Ramificando 6634@c <en>@cindex Merging 6635@cindex Mesclando 6636@c <en>@cindex Copying changes 6637@cindex Copying changes 6638@c <en>@cindex Main trunk and branches 6639@cindex Tronco principal e ramos 6640@c <en>@cindex Revision tree, making branches 6641@cindex Revision tree, making branches 6642@c <en>@cindex Branches, copying changes between 6643@cindex Branches, copying changes between 6644@c <en>@cindex Changes, copying between branches 6645@cindex Changes, copying between branches 6646@c <en>@cindex Modifications, copying between branches 6647@cindex Modifications, copying between branches 6648 6649@c <en>@sc{cvs} allows you to isolate changes onto a separate 6650@c <en>line of development, known as a @dfn{branch}. When you 6651@c <en>change files on a branch, those changes do not appear 6652@c <en>on the main trunk or other branches. 6653O @sc{cvs} permite isolar mudan�as em uma linha de 6654desenvolvimento separada, chamada de @dfn{ramo}. 6655Quando voc� muda os arquivos de um ramo, aquelas 6656mudan�as n�o aparecem no tronco principal ou em outros ramos. 6657 6658@c <en>Later you can move changes from one branch to another 6659@c <en>branch (or the main trunk) by @dfn{merging}. Merging 6660@c <en>involves first running @code{cvs update -j}, to merge 6661@c <en>the changes into the working directory. 6662@c <en>You can then commit that revision, and thus effectively 6663@c <en>copy the changes onto another branch. 6664Mais tarde voc� pode mover as mudan�as de um ramo para 6665outro (ou para o tronco principal) com uma 6666@dfn{mesclagem}. Mesclar � primeiro rodar um @code{cvs 6667update -j}, para mesclar as mudan�as no seu diret�rio 6668de trabalho. Depois efetivar (commit) esta revis�o, e 6669finalmente fazer a efetiva destas mudan�as de um ramo 6670para outro. 6671 6672@menu 6673@c <en>* Branches motivation:: What branches are good for 6674* Motiva��o para ramos:: Para que ramos s�o bons 6675@c <en>* Creating a branch:: Creating a branch 6676* Criando um ramo:: Criando um ramo 6677@c <en>* Accessing branches:: Checking out and updating branches 6678* Acessando ramos:: Pegando e devolvendo ramos 6679@c <en>* Branches and revisions:: Branches are reflected in revision numbers 6680* Ramos e revis�es:: Ramificar se reflete nos n�meros de revis�o 6681@c <en>* Magic branch numbers:: Magic branch numbers 6682* N�meros de ramos m�gicos:: Magic branch numbers 6683@c <en>* Merging a branch:: Merging an entire branch 6684* Mesclando um ramo:: Mesclando um ramo inteiro 6685@c <en>* Merging more than once:: Merging from a branch several times 6686* Mesclando mais de uma vez:: Mesclando a partir de um ramo v�rias vezes 6687@c <en>* Merging two revisions:: Merging differences between two revisions 6688* Mesclando duas revis�es:: Mesclando diferen�as entre duas revis�es 6689@c <en>* Merging adds and removals:: What if files are added or removed? 6690* Mesclando adicionados e removidos:: E se arquivos forem adicionados ou removidos? 6691@c <en>* Merging and keywords:: Avoiding conflicts due to keyword substitution 6692* Mesclagem e palavras-chave:: Evitando conflitos devido a substitui��o de palavras-chave 6693@end menu 6694 6695@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6696@c <en>@node Branches motivation 6697@node Motiva��o para ramos 6698@c <en>@section What branches are good for 6699@section Para que ramos s�o bons 6700@c <en>@cindex Branches motivation 6701@cindex Motiva��o para ramos 6702@c <en>@cindex What branches are good for 6703@cindex Para que ramos s�o bons 6704@c <en>@cindex Motivation for branches 6705@cindex Motivation for branches 6706 6707@c FIXME: this node mentions one way to use branches, 6708@c but it is by no means the only way. For example, 6709@c the technique of committing a new feature on a branch, 6710@c until it is ready for the main trunk. The whole 6711@c thing is generally speaking more akin to the 6712@c "Revision management" node although it isn't clear to 6713@c me whether policy matters should be centralized or 6714@c distributed throughout the relevant sections. 6715@c <en>Suppose that release 1.0 of tc has been made. You are continuing to 6716@c <en>develop tc, planning to create release 1.1 in a couple of months. After a 6717@c <en>while your customers start to complain about a fatal bug. You check 6718@c <en>out release 1.0 (@pxref{Tags}) and find the bug 6719@c <en>(which turns out to have a trivial fix). However, the current revision 6720@c <en>of the sources are in a state of flux and are not expected to be stable 6721@c <en>for at least another month. There is no way to make a 6722@c <en>bugfix release based on the newest sources. 6723Suponha que a release 1.0 de tc est� pronta. Voc� est� 6724continua desenvolvendo tc, e planeja lan�ar a release 67251.1 em alguns meses. Depois de um tempo seus 6726consumidores come�am a reclamar de um erro fatal. Voc� 6727baixa a release 1.0 (@pxref{Etiquetas}) e encontra o 6728erro (que tem um conserto f�cil). Entretanto, a 6729revis�o atual dos fontes est� num estado do fluxo de 6730desenvolvimento que voc� n�o espera que estaja est�vel 6731em pelo menos um m�s. N�o tem jeito de lan�ar uma 6732release baseada nos fontes mais novos. 6733 6734@c <en>The thing to do in a situation like this is to create a @dfn{branch} on 6735@c <en>the revision trees for all the files that make up 6736@c <en>release 1.0 of tc. You can then make 6737@c <en>modifications to the branch without disturbing the main trunk. When the 6738@c <en>modifications are finished you can elect to either incorporate them on 6739@c <en>the main trunk, or leave them on the branch. 6740O que se h� para fazer numa situa��o como esta � criar 6741um @dfn{ramo} na �rvore de revis�es para todos os 6742arquivos que integram a release 1.0 de tc. Voc� pode 6743ent�o fazer modifica��es no ramo sem perturbar o tronco 6744principal. Quando as modifica��es terminarem voc� pode 6745decidir se incorporam elas ao tronco ou deixa elas no ramo. 6746 6747@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6748@c <en>@node Creating a branch 6749@node Criando um ramo 6750@c <en>@section Creating a branch 6751@section Criando um ramo 6752@c <en>@cindex Creating a branch 6753@cindex Criando um ramo 6754@c <en>@cindex Branch, creating a 6755@cindex Ramo, criando um 6756@c <en>@cindex tag (subcommand), creating a branch using 6757@cindex tag (subcomando), criando um ramo usando 6758@c <en>@cindex rtag (subcommand), creating a branch using 6759@cindex rtag (subcomando), criando um ramo usando 6760 6761@c <en>You can create a branch with @code{tag -b}; for 6762@c <en>example, assuming you're in a working copy: 6763Voc� pode criar um ramo com @code{tag -b}; por exemplo, 6764supondo que voc� est� numa c�pia de trabalho: 6765 6766@example 6767$ cvs tag -b rel-1-0-patches 6768@end example 6769 6770@c FIXME: we should be more explicit about the value of 6771@c having a tag on the branchpoint. For example 6772@c "cvs tag rel-1-0-patches-branchpoint" before 6773@c the "cvs tag -b". This points out that 6774@c rel-1-0-patches is a pretty awkward name for 6775@c this example (more so than for the rtag example 6776@c below). 6777 6778@c <en>This splits off a branch based on the current revisions 6779@c <en>in the working copy, assigning that branch the name 6780@c <en>@samp{rel-1-0-patches}. 6781Isto inicia um ramo baseado nas revis�es atuais na 6782c�pia de trabalho, dando a este ramo o nome 6783@samp{rel-1-0-patches}. 6784 6785@c <en>It is important to understand that branches get created 6786@c <en>in the repository, not in the working copy. Creating a 6787@c <en>branch based on current revisions, as the above example 6788@c <en>does, will @emph{not} automatically switch the working 6789@c <en>copy to be on the new branch. For information on how 6790@c <en>to do that, see @ref{Accessing branches}. 6791� importante entender que ramos s�o criados no 6792reposit�rio, e n�o na c�pia de tarbalho. Criar um ramo 6793baseado nas revis�es atuais, como no exemplo acima, 6794@emph{N�o} vai mudar automaticamente a c�pia de 6795trabalho para o novo ramo. Para informa��es sobre 6796como fazer isto, veja em @ref{Acessando ramos}. 6797 6798@c <en>You can also create a branch without reference to any 6799@c <en>working copy, by using @code{rtag}: 6800Voc� tamb�m pode criar um ramo sem refer�ncia a 6801qualquer c�pia de trabalho usando @code{rtag}: 6802 6803@example 6804$ cvs rtag -b -r rel-1-0 rel-1-0-patches tc 6805@end example 6806 6807@c <en>@samp{-r rel-1-0} says that this branch should be 6808@c <en>rooted at the revision that 6809@c <en>corresponds to the tag @samp{rel-1-0}. It need not 6810@c <en>be the most recent revision -- it's often useful to 6811@c <en>split a branch off an old revision (for example, when 6812@c <en>fixing a bug in a past release otherwise known to be 6813@c <en>stable). 6814@samp{-r rel-1-0} diz que este ramo deve ser iniciado 6815na revis�o que corresponde � etiqueta (tag) 6816@samp{rel-1-0}. N�o precisa ser a revis�o mais recente 6817-- � �til �s vezes separar um ramo a partir de uma 6818revis�o antiga (por exemplo, quando se est� consertando 6819um erro numa release anterior que se pensava estar 6820est�vel). 6821 6822@c <en>As with @samp{tag}, the @samp{-b} flag tells 6823@c <en>@code{rtag} to create a branch (rather than just a 6824@c <en>symbolic revision name). Note that the numeric 6825@c <en>revision number that matches @samp{rel-1-0} will 6826@c <en>probably be different from file to file. 6827Assim como no @samp{tag}, a op��o @samp{-b} diz ao 6828@code{rtag} para criar um ramo (ao inv�s de 6829simplesmente um nome de revis�o simb�lico). Observe 6830que o n�mero de revis�o simb�lico que casa com 6831@samp{rel-1-0} provavelmente ser diferente de arquivo 6832para arquivo. 6833 6834@c <en>So, the full effect of the command is to create a new 6835@c <en>branch -- named @samp{rel-1-0-patches} -- in module 6836@c <en>@samp{tc}, rooted in the revision tree at the point tagged 6837@c <en>by @samp{rel-1-0}. 6838Ent�o, O efeito total do comando � criar um novo ramo 6839-- chamado @samp{rel-1-0-patches} -- no m�dulo 6840@samp{tc}, partindo da �rvore de revis�o no ponto 6841etiquetado como @samp{rel-1-0}. 6842 6843@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6844@c <en>@node Accessing branches 6845@node Acessando ramos 6846@c <en>@section Accessing branches 6847@section Acessando ramos 6848@c <en>@cindex Check out a branch 6849@cindex Check out a branch 6850@c <en>@cindex Retrieve a branch 6851@cindex Retrieve a branch 6852@c <en>@cindex Access a branch 6853@cindex Access a branch 6854@c <en>@cindex Identifying a branch 6855@cindex Identifying a branch 6856@c <en>@cindex Branch, check out 6857@cindex Branch, check out 6858@c <en>@cindex Branch, retrieving 6859@cindex Branch, retrieving 6860@c <en>@cindex Branch, accessing 6861@cindex Branch, accessing 6862@c <en>@cindex Branch, identifying 6863@cindex Branch, identifying 6864 6865@c <en>You can retrieve a branch in one of two ways: by 6866@c <en>checking it out fresh from the repository, or by 6867@c <en>switching an existing working copy over to the branch. 6868Voc� pode recuperar um ramo de duas formas: pegando um 6869c�pia zerada dele do reposit�rio, ou alternando de uma 6870c�pia de trabalho j� existente para o ramo. 6871 6872@c <en>To check out a branch from the repository, invoke 6873@c <en>@samp{checkout} with the @samp{-r} flag, followed by 6874@c <en>the tag name of the branch (@pxref{Creating a branch}): 6875Para pegar um ramo do reposit�rio, chame o 6876@samp{checkout} com a op��o @samp{-r}, seguida pelo 6877nome da etiqueta do ramo (@pxref{Criando um ramo}): 6878 6879@example 6880$ cvs checkout -r rel-1-0-patches tc 6881@end example 6882 6883@c <en>Or, if you already have a working copy, you can switch 6884@c <en>it to a given branch with @samp{update -r}: 6885Ou, se voc� j� tem uma c�pia de trabalho, voc� pode 6886alternar dela para um dado ramo com @samp{update -r}: 6887 6888@example 6889$ cvs update -r rel-1-0-patches tc 6890@end example 6891 6892@noindent 6893@c <en>or equivalently: 6894ou equivalentemente: 6895 6896@example 6897$ cd tc 6898$ cvs update -r rel-1-0-patches 6899@end example 6900 6901@c <en>It does not matter if the working copy was originally 6902@c <en>on the main trunk or on some other branch -- the above 6903@c <en>command will switch it to the named branch. And 6904@c <en>similarly to a regular @samp{update} command, 6905@c <en>@samp{update -r} merges any changes you have made, 6906@c <en>notifying you of conflicts where they occur. 6907N�o importa se a c�pia de tabalho estava originalmente 6908no tronco principal ou em algum outro ramo -- o comando 6909acima vai alternar ela para o ramo dado. E 6910similarmente ao comando @samp{update} normal, 6911@samp{update -r} mescla quaisquer mudan�as que voc� 6912tenha feito, notificando voc� sobre conflitos onde eles 6913ocorrerem. 6914 6915@c <en>Once you have a working copy tied to a particular 6916@c <en>branch, it remains there until you tell it otherwise. 6917@c <en>This means that changes checked in from the working 6918@c <en>copy will add new revisions on that branch, while 6919@c <en>leaving the main trunk and other branches unaffected. 6920Uma vez que voc� tenha uma c�pia de trabalho referente 6921a um dado, ela continua no ramo at� que se diga o 6922contr�rio. Isto significa que mudan�as inseridas a 6923partir da c�pia de trabalho v�o adicionar novas 6924revis�es naquele ramo, enquanto que n�o afeta o tronco 6925principal nem os outros ramos. 6926 6927@c <en>@cindex Branches, sticky 6928@cindex Ramos, adesivos 6929@c <en>To find out what branch a working copy is on, you can 6930@c <en>use the @samp{status} command. In its output, look for 6931@c <en>the field named @samp{Sticky tag} (@pxref{Sticky tags}) 6932@c <en>-- that's @sc{cvs}'s way of telling you the branch, if 6933@c <en>any, of the current working files: 6934Para saber em qual ramo uma c�pia de trabalho est�, 6935voc� precisa usar o comando @samp{status}. Na sa�da do 6936comando procure pelo campo chamado @samp{Sticky tag} 6937(etiqueta adesiva) (@pxref{Etiquetas adesivas}) 6938-- esta � a forma do @sc{cvs} de dizer a voc� o ramo, 6939se � que se est� num, dos arquivos de trabalho atuais: 6940 6941@example 6942$ cvs status -v driver.c backend.c 6943=================================================================== 6944File: driver.c Status: Up-to-date 6945 6946 Version: 1.7 Sat Dec 5 18:25:54 1992 6947 RCS Version: 1.7 /u/cvsroot/yoyodyne/tc/driver.c,v 6948 Sticky Tag: rel-1-0-patches (branch: 1.7.2) 6949 Sticky Date: (none) 6950 Sticky Options: (none) 6951 6952 Existing Tags: 6953 rel-1-0-patches (branch: 1.7.2) 6954 rel-1-0 (revision: 1.7) 6955 6956=================================================================== 6957File: backend.c Status: Up-to-date 6958 6959 Version: 1.4 Tue Dec 1 14:39:01 1992 6960 RCS Version: 1.4 /u/cvsroot/yoyodyne/tc/backend.c,v 6961 Sticky Tag: rel-1-0-patches (branch: 1.4.2) 6962 Sticky Date: (none) 6963 Sticky Options: (none) 6964 6965 Existing Tags: 6966 rel-1-0-patches (branch: 1.4.2) 6967 rel-1-0 (revision: 1.4) 6968 rel-0-4 (revision: 1.4) 6969 6970@end example 6971 6972@c <en>Don't be confused by the fact that the branch numbers 6973@c <en>for each file are different (@samp{1.7.2} and 6974@c <en>@samp{1.4.2} respectively). The branch tag is the 6975@c <en>same, @samp{rel-1-0-patches}, and the files are 6976@c <en>indeed on the same branch. The numbers simply reflect 6977@c <en>the point in each file's revision history at which the 6978@c <en>branch was made. In the above example, one can deduce 6979@c <en>that @samp{driver.c} had been through more changes than 6980@c <en>@samp{backend.c} before this branch was created. 6981N�o se confunda pelo fato de que os n�meros de ramo de 6982cada arquivo serem diferentes (@samp{1.7.2} e 6983@samp{1.4.2} respectivamente). A etiqueta do ramo � a 6984mesma, @samp{rel-1-0-patches}, e os arquivos est�o na 6985verdade no mesmo ramo. Os n�meros simplesmente 6986refletem o ponto em que cada arquivo estava no 6987hist�rico de revis�o quando o ramo foi criado. No 6988exemplo acima, pode-se deduzir que @samp{driver.c} 6989tinha tido mais altera��es que @samp{backend.c} antes 6990do ramo ter sido criado. 6991 6992@c <en>See @ref{Branches and revisions} for details about how 6993@c <en>branch numbers are constructed. 6994Veja em @ref{Ramos e revis�es} para detalhes a respeito 6995de como n�meros de ramos s�o criados. 6996 6997@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6998@c <en>@node Branches and revisions 6999@node Ramos e revis�es 7000@c <en>@section Branches and revisions 7001@section Ramos e revis�es 7002@c <en>@cindex Branch number 7003@cindex N�mero de ramo 7004@c <en>@cindex Number, branch 7005@cindex Ramo, n�mero de 7006@c <en>@cindex Revision numbers (branches) 7007@cindex N�meros de revis�o (ramos) 7008 7009@c <en>Ordinarily, a file's revision history is a linear 7010@c <en>series of increments (@pxref{Revision numbers}): 7011Normalmente, um hist�rico da revis�o do arquivo � uma 7012s�ria linear de incrementos (@pxref{N�meros de 7013revis�o}): 7014 7015@example 7016 +-----+ +-----+ +-----+ +-----+ +-----+ 7017 ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! 7018 +-----+ +-----+ +-----+ +-----+ +-----+ 7019@end example 7020 7021@c <en>However, @sc{cvs} is not limited to linear development. The 7022@c <en>@dfn{revision tree} can be split into @dfn{branches}, 7023@c <en>where each branch is a self-maintained line of 7024@c <en>development. Changes made on one branch can easily be 7025@c <en>moved back to the main trunk. 7026Entretanto, o @sc{cvs} n�o est� limitado a 7027desenvolvimento linear. A @dfn{�rvore de revis�es} 7028pode ser separada em @dfn{ramos}, 7029onde cada ramo � uma linha de desenvolvimento que se 7030mant�m. Mudan�as feitas em um ramo podem ser facilmente 7031movidas para o tronco principal. 7032 7033@c <en>Each branch has a @dfn{branch number}, consisting of an 7034@c <en>odd number of period-separated decimal integers. The 7035@c <en>branch number is created by appending an integer to the 7036@c <en>revision number where the corresponding branch forked 7037@c <en>off. Having branch numbers allows more than one branch 7038@c <en>to be forked off from a certain revision. 7039Cada ramo tem um @dfn{n�mero de ramo}, formado por uma 7040quantidade �mpar de n�meros inteiros decimais separados 7041por ponto. O n�mero do ramo � criado anexando um 7042inteiro ao n�mero de revis�o de onde o ramo 7043correpondente saiu. Com n�meros de ramo � poss�vel se 7044ter mais de uma ramifica��o partindo de uma certa revis�o. 7045 7046@need 3500 7047@c <en>All revisions on a branch have revision numbers formed 7048@c <en>by appending an ordinal number to the branch number. 7049@c <en>The following figure illustrates branching with an 7050@c <en>example. 7051Todas as revis�es num ramo t�m n�meros de revis�o 7052formados pela anexa��o de um n�mero ordinal ao n�mero 7053do ramo. A figura seguinte ilustra a ramifica��o com um exemplo. 7054 7055@example 7056@c This example used to have a 1.2.2.4 revision, which 7057@c might help clarify that development can continue on 7058@c 1.2.2. Might be worth reinstating if it can be done 7059@c without overfull hboxes. 7060@group 7061 +-------------+ 7062 Branch 1.2.2.3.2 -> ! 1.2.2.3.2.1 ! 7063 / +-------------+ 7064 / 7065 / 7066 +---------+ +---------+ +---------+ 7067Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! 7068 / +---------+ +---------+ +---------+ 7069 / 7070 / 7071+-----+ +-----+ +-----+ +-----+ +-----+ 7072! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk 7073+-----+ +-----+ +-----+ +-----+ +-----+ 7074 ! 7075 ! 7076 ! +---------+ +---------+ +---------+ 7077Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 ! 7078 +---------+ +---------+ +---------+ 7079 7080@end group 7081@end example 7082 7083@c -- However, at least for me the figure is not enough. I suggest more 7084@c -- text to accompany it. "A picture is worth a thousand words", so you 7085@c -- have to make sure the reader notices the couple of hundred words 7086@c -- *you* had in mind more than the others! 7087 7088@c -- Why an even number of segments? This section implies that this is 7089@c -- how the main trunk is distinguished from branch roots, but you never 7090@c -- explicitly say that this is the purpose of the [by itself rather 7091@c -- surprising] restriction to an even number of segments. 7092 7093@c <en>The exact details of how the branch number is 7094@c <en>constructed is not something you normally need to be 7095@c <en>concerned about, but here is how it works: When 7096@c <en>@sc{cvs} creates a branch number it picks the first 7097@c <en>unused even integer, starting with 2. So when you want 7098@c <en>to create a branch from revision 6.4 it will be 7099@c <en>numbered 6.4.2. All branch numbers ending in a zero 7100@c <en>(such as 6.4.0) are used internally by @sc{cvs} 7101@c <en>(@pxref{Magic branch numbers}). The branch 1.1.1 has a 7102@c <en>special meaning. @xref{Tracking sources}. 7103Os detalhes exatos de como o n�mero de ramo � 7104constru�do n�o s�o algo com os quais voc� precisa estar 7105preocupado, mas aqui vai como a coisa funciona: quando 7106o @sc{cvs} cria um n�mero de ramo ele pega o primeiro 7107n�mero par n�o usado, a partir de 2. Logo, quando voc� 7108quer criar um ramo a partir da revis�o 6.4 ele vai ser 7109numerado 6.4.2. Todos os n�meros de ramos terminados 7110com um zero (tal como 6.4.0) s�o usados internamente 7111pelo @sc{cvs} (@pxref{N�meros de ramos m�gicos}). O 7112ramo 1.1.1 tem um significado especial. 7113@xref{Acompanhando fontes}. 7114 7115@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7116@c <en>@node Magic branch numbers 7117@node N�meros de ramos m�gicos 7118@c <en>@section Magic branch numbers 7119@section N�meros de ramos m�gicos 7120 7121@c Want xref to here from "log"? 7122 7123@c <en>This section describes a @sc{cvs} feature called 7124@c <en>@dfn{magic branches}. For most purposes, you need not 7125@c <en>worry about magic branches; @sc{cvs} handles them for 7126@c <en>you. However, they are visible to you in certain 7127@c <en>circumstances, so it may be useful to have some idea of 7128@c <en>how it works. 7129Esta se��o descreve uma habilidade do @sc{cvs} chamada 7130@dfn{ramos m�gicos}. Para a maioria dos casos, voc� 7131n�o precisa se preocupar com os ramos m�gicos; o 7132@sc{cvs} cuida deles para voc�. Entretanto, eles 7133aparecem em algumas situa��es, sendo importante se ter 7134alguma id�ia de como eles funcionam. 7135 7136@c <en>Externally, branch numbers consist of an odd number of 7137@c <en>dot-separated decimal integers. @xref{Revision 7138@c <en>numbers}. That is not the whole truth, however. For 7139@c <en>efficiency reasons @sc{cvs} sometimes inserts an extra 0 7140@c <en>in the second rightmost position (1.2.4 becomes 7141@c <en>1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so 7142@c <en>on). 7143Externamente, n�meros de ramos consistem de uma quantidade 7144�mpar de inteiros decimais separados por 7145ponto. @xref{N�meros de revis�o}. Isto n�o � toda a 7146verdade, entretanto. Por quest�es de efici�ncia, o 7147@sc{cvs} insere, em alguns momentos, um 0 extra na 7148segunda posi��o da direita para a esquerda (1.2.4 se torna 71491.2.0.4, 8.9.10.11.12 se torna 8.9.10.11.0.12 e assim 7150por diante). 7151 7152@c <en>@sc{cvs} does a pretty good job at hiding these so 7153@c <en>called magic branches, but in a few places the hiding 7154@c <en>is incomplete: 7155O @sc{cvs} faz um bom trabalho escondendo estes tais 7156ramos m�gicos, mas em alguns lugares alguma coisa aparece: 7157 7158@itemize @bullet 7159@ignore 7160@c This is in ignore as I'm taking their word for it, 7161@c that this was fixed 7162@c a long time ago. But before deleting this 7163@c entirely, I'd rather verify it (and add a test 7164@c case to the testsuite). 7165@item 7166@c <en>The magic branch can appear in the output from 7167@c <en>@code{cvs status} in vanilla @sc{cvs} 1.3. This is 7168@c <en>fixed in @sc{cvs} 1.3-s2. 7169The magic branch can appear in the output from 7170@code{cvs status} in vanilla @sc{cvs} 1.3. This is 7171fixed in @sc{cvs} 1.3-s2. 7172 7173@end ignore 7174@item 7175@c <en>The magic branch number appears in the output from 7176@c <en>@code{cvs log}. 7177O n�mero de ramo m�gico aparece na sa�da do 7178@code{cvs log}. 7179@c What output should appear instead? 7180 7181@item 7182@c <en>You cannot specify a symbolic branch name to @code{cvs 7183@c <en>admin}. 7184Voc� n�o pode especificar um nome de ramo simb�lico 7185para o @code{cvs admin}. 7186 7187@end itemize 7188 7189@c Can CVS do this automatically the first time 7190@c you check something in to that branch? Should 7191@c it? 7192@c <en>You can use the @code{admin} command to reassign a 7193@c <en>symbolic name to a branch the way @sc{rcs} expects it 7194@c <en>to be. If @code{R4patches} is assigned to the branch 7195@c <en>1.4.2 (magic branch number 1.4.0.2) in file 7196@c <en>@file{numbers.c} you can do this: 7197Voc� pode usar o comando @code{admin} para reatribuir 7198um nome simb�lico para um ramo da forma que o @sc{rcs} 7199espera que seja. Se o @code{R4patches} est� atribu�do 7200para o ramo 1.4.2 (n�mero de ramo m�gico 1.4.0.2) no 7201arquivo @file{numbers.c} voc� pode fazer isto: 7202 7203@example 7204$ cvs admin -NR4patches:1.4.2 numbers.c 7205@end example 7206 7207@c <en>It only works if at least one revision is already 7208@c <en>committed on the branch. Be very careful so that you 7209@c <en>do not assign the tag to the wrong number. (There is 7210@c <en>no way to see how the tag was assigned yesterday). 7211Isto apenas funciona se pelo menos uma revis�o j� est� 7212efetivada no ramo. Seja bastante cuidadoso para n�o 7213atribuir a etiqueta ao n�mero errado. (N�o existe 7214jeito de ver como a etiqueta estava atribu�da ontem). 7215 7216@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7217@c <en>@node Merging a branch 7218@node Mesclando um ramo 7219@c <en>@section Merging an entire branch 7220@section Mesclando um ramo inteiro 7221@c <en>@cindex Merging a branch 7222@cindex Mesclando um ramo 7223@c <en>@cindex -j (merging branches) 7224@cindex -j (mesclando ramos) 7225 7226@c <en>You can merge changes made on a branch into your working copy by giving 7227@c <en>the @samp{-j @var{branchname}} flag to the @code{update} subcommand. With one 7228@c <en>@samp{-j @var{branchname}} option it merges the changes made between the 7229@c <en>greatest common ancestor (GCA) of the branch and the destination revision (in 7230@c <en>the simple case below the GCA is the point where the branch forked) and the 7231@c <en>newest revision on that branch into your working copy. 7232Voc� pode mesclar mudan�as feitas num ramo em seu 7233diret�rio de trabalho passando a op��o @samp{-j 7234@var{nome_do_ramo}} para o subcomando @code{update}. 7235Com uma op��o @samp{-j @var{nome_do_ramo}} ele mescla 7236as mudan��s feitas entre o maior ancestral comum 7237(greatest common ancestor - GCA) do ramo e a revis�o de 7238destino (no caso mais simples abaixo, o GCA � o ponto 7239onde o ramo bifurcou) e a nova revis�o neste ramo na 7240sua c�pia de trabalho. 7241 7242@cindex Join 7243@c <en>The @samp{-j} stands for ``join''. 7244O @samp{-j} significa ``join'', ``juntar''. 7245 7246@c <en>@cindex Branch merge example 7247@cindex Exemplo de mesclagem de ramo 7248@c <en>@cindex Example, branch merge 7249@cindex Mesclagem de ramo, exemplo 7250@c <en>@cindex Merge, branch example 7251@cindex Mesclagem, de ramo, exemplo 7252@c <en>Consider this revision tree: 7253Considere esta �rvore de revis�o: 7254 7255@example 7256+-----+ +-----+ +-----+ +-----+ 7257! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 ! <- The main trunk 7258+-----+ +-----+ +-----+ +-----+ 7259 ! 7260 ! 7261 ! +---------+ +---------+ 7262Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! 7263 +---------+ +---------+ 7264@end example 7265 7266@noindent 7267@c <en>The branch 1.2.2 has been given the tag (symbolic name) @samp{R1fix}. The 7268@c <en>following example assumes that the module @samp{mod} contains only one 7269@c <en>file, @file{m.c}. 7270O ramo 1.2.2 recebeu a etiqueta (nome simb�lico) 7271@samp{R1fix}. O exemplo seguinte assume que o m�dulo 7272@samp{mod} cont�m apenas um arquivo, @file{m.c}. 7273 7274@example 7275$ cvs checkout mod # @r{Retrieve the latest revision, 1.4} 7276 7277$ cvs update -j R1fix m.c # @r{Merge all changes made on the branch,} 7278 # @r{i.e. the changes between revision 1.2} 7279 # @r{and 1.2.2.2, into your working copy} 7280 # @r{of the file.} 7281 7282$ cvs commit -m "Included R1fix" # @r{Create revision 1.5.} 7283@end example 7284 7285@c <en>A conflict can result from a merge operation. If that 7286@c <en>happens, you should resolve it before committing the 7287@c <en>new revision. @xref{Conflicts example}. 7288Um conflito pode resultar de uma opera��o de mesclagem. 7289Se isto acontecer, voc� deve resolver isto antes de 7290efetivar a nova revis�o. @xref{Exemplo de conflitos}. 7291 7292@c <en>If your source files contain keywords (@pxref{Keyword substitution}), 7293@c <en>you might be getting more conflicts than strictly necessary. See 7294@c <en>@ref{Merging and keywords}, for information on how to avoid this. 7295Se seu c�digo fonte cont�m palavras-chave 7296(@pxref{Substitui��o de palavra-chave}), voc� deve 7297obter mais conflitos que os ???strictly necessary???. 7298Veja em @ref{Mesclagem e palavras-chave}, para saber 7299como evitar isto. 7300 7301@c <en>The @code{checkout} command also supports the @samp{-j @var{branchname}} flag. The 7302@c <en>same effect as above could be achieved with this: 7303O comando @code{checkout} tamb�m suporta a op��o 7304@samp{-j @var{branchname}}. O mesmo efeito que o visto 7305logo acima pode ser obtido com isto: 7306 7307@example 7308$ cvs checkout -j R1fix mod 7309$ cvs commit -m "Included R1fix" 7310@end example 7311 7312@c <en>It should be noted that @code{update -j @var{tagname}} will also work but may 7313@c <en>not produce the desired result. @xref{Merging adds and removals}, for more. 7314Observe que o @code{update -j @var{tagname}} tamb�m vai 7315funcionar mas pode n�o produzir o efeito desejado. 7316@xref{Mesclando adicionados e removidos}, para mais informa��es. 7317 7318@c <en>@node Merging more than once 7319@node Mesclando mais de uma vez 7320@c <en>@section Merging from a branch several times 7321@section Mesclando a partir de um ramo v�rias vezes 7322 7323@c <en>Continuing our example, the revision tree now looks 7324@c <en>like this: 7325Continuando nosso exemplo, a �rvore de revis�o agora 7326vai parecer com isto: 7327 7328@example 7329+-----+ +-----+ +-----+ +-----+ +-----+ 7330! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk 7331+-----+ +-----+ +-----+ +-----+ +-----+ 7332 ! * 7333 ! * 7334 ! +---------+ +---------+ 7335Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 ! 7336 +---------+ +---------+ 7337@end example 7338 7339@noindent 7340@c <en>where the starred line represents the merge from the 7341@c <en>@samp{R1fix} branch to the main trunk, as just 7342@c <en>discussed. 7343Onde a linha de asteriscos representa a mescla entre o 7344ramo @samp{R1fix} e o tronco principal, como acabamos 7345de ver. 7346 7347@c <en>Now suppose that development continues on the 7348@c <en>@samp{R1fix} branch: 7349Agora suponha que o desenvolvimento continua no ramo @samp{R1fix}: 7350 7351@example 7352+-----+ +-----+ +-----+ +-----+ +-----+ 7353! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 ! <- The main trunk 7354+-----+ +-----+ +-----+ +-----+ +-----+ 7355 ! * 7356 ! * 7357 ! +---------+ +---------+ +---------+ 7358Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 ! 7359 +---------+ +---------+ +---------+ 7360@end example 7361 7362@noindent 7363@c <en>and then you want to merge those new changes onto the 7364@c <en>main trunk. If you just use the @code{cvs update -j 7365@c <en>R1fix m.c} command again, @sc{cvs} will attempt to 7366@c <en>merge again the changes which you have already merged, 7367@c <en>which can have undesirable side effects. 7368e ent�o voc� quer mesclar as novas mudan�as dentro do 7369tronco principal. Se voc� usar simplesmente o comando 7370@code{cvs update -j R1fix m.c} de novo, o @sc{cvs} vai 7371tentar mesclar de novo as mudan�as que voc� j� mesclou, 7372o que pode gerar efeitos indesejados. 7373 7374@c <en>So instead you need to specify that you only want to 7375@c <en>merge the changes on the branch which have not yet been 7376@c <en>merged into the trunk. To do that you specify two 7377@c <en>@samp{-j} options, and @sc{cvs} merges the changes from 7378@c <en>the first revision to the second revision. For 7379@c <en>example, in this case the simplest way would be 7380Ent�o, ao inv�s disto, voc� precisa especificar que voc� 7381quer apenas mesclar no tronco as mudan�as que ainda n�o 7382foram mescladas. Para fazer isto voc� especifica duas 7383op��es @samp{-j}, e o @sc{cvs} mescla as mudan�as da 7384primeira revis�o na segunda revis�o. Por exemplo, 7385neste caso a forma mais simples ser� 7386 7387@example 7388cvs update -j 1.2.2.2 -j R1fix m.c # @r{Merge changes from 1.2.2.2 to the} 7389 # @r{head of the R1fix branch} 7390@end example 7391 7392@c <en>The problem with this is that you need to specify the 7393@c <en>1.2.2.2 revision manually. A slightly better approach 7394@c <en>might be to use the date the last merge was done: 7395O problema com isto � que voc� precisa especificar a 7396revis�o 1.2.2.2 manualmente. Uma abordagem um pouco 7397melhor seria usar a data em que a �ltima mesclagem foi 7398feita: 7399 7400@example 7401cvs update -j R1fix:yesterday -j R1fix m.c 7402@end example 7403 7404@c <en>Better yet, tag the R1fix branch after every merge into 7405@c <en>the trunk, and then use that tag for subsequent merges: 7406Ou ainda melhor, etiquete o ramo R1fix depois de cada 7407mesclagem no tronco, e ent�o use a etiqueta para 7408mesclagens subseq�entes: 7409 7410@example 7411cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c 7412@end example 7413 7414@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7415@c <en>@node Merging two revisions 7416@node Mesclando duas revis�es 7417@c <en>@section Merging differences between any two revisions 7418@section Mesclando diferen�as entre duas revis�es quaisquer 7419@c <en>@cindex Merging two revisions 7420@cindex Mesclando duas revis�es 7421@c <en>@cindex Revisions, merging differences between 7422@cindex Revis�es, mesclando diferen�as entre 7423@c <en>@cindex Differences, merging 7424@cindex Diferen�as, mesclando 7425 7426@c <en>With two @samp{-j @var{revision}} flags, the @code{update} 7427@c <en>(and @code{checkout}) command can merge the differences 7428@c <en>between any two revisions into your working file. 7429Com duas op��es @samp{-j @var{revis�o}}, o comando @code{update} 7430(e @code{checkout}) pode mesclar as diferen�as entre 7431quaisquer duas revis�es no arquivo do diret�rio de trabalho. 7432 7433@c <en>@cindex Undoing a change 7434@cindex Desfazendo uma altera��o 7435@c <en>@cindex Removing a change 7436@cindex Removendo uma altera��o 7437@example 7438$ cvs update -j 1.5 -j 1.3 backend.c 7439@end example 7440 7441@noindent 7442@c <en>will undo all changes made between revision 7443@c <en>1.3 and 1.5. Note the order of the revisions! 7444vai desfazer todas as altera��es feitas entre as 7445revis�es 1.3 e 1.5. Observe a ordem das revis�es! 7446 7447@c <en>If you try to use this option when operating on 7448@c <en>multiple files, remember that the numeric revisions will 7449@c <en>probably be very different between the various files. 7450@c <en>You almost always use symbolic 7451@c <en>tags rather than revision numbers when operating on 7452@c <en>multiple files. 7453Se voc� tentar usar esta op��o quando estiver agindo em 7454v�rios arquivos, lembre-se que as revis�es num�ricas 7455provavelmente v�o ser bastante diferentes nos v�rios 7456arquivos. Voc� vai quase sempre usar etiquetas 7457simb�licas ao inv�s de n�meros de revis�o quando 7458estiver operando em v�rios arquivos. 7459 7460@c <en>@cindex Restoring old version of removed file 7461@cindex Recuperando uma vers�o antiga de um arquivo removido 7462@c <en>@cindex Resurrecting old version of dead file 7463@cindex Ressucitando uma vers�o antiga de um arquivo morto 7464@c <en>Specifying two @samp{-j} options can also undo file 7465@c <en>removals or additions. For example, suppose you have 7466@c <en>a file 7467@c <en>named @file{file1} which existed as revision 1.1, and 7468@c <en>you then removed it (thus adding a dead revision 1.2). 7469@c <en>Now suppose you want to add it again, with the same 7470@c <en>contents it had previously. Here is how to do it: 7471Ao especificar duas op��es @samp{-j} voc� pode tamb�m 7472desfazer uma remo��o ou adi��o de arquivo. Por 7473exemplo, suponhao que voc� tem um arquivo chamado 7474@file{file1} que existia numa revis�o 1.1, e voc� 7475removeu ele (adicionando ent�o uma revis�o morta 1.2). 7476Agora suponha que voc� quer adicion�-lo novamente, com 7477o mesmo conte�do que ele tinha anteriormente. Aqui 7478est� como fazer isto: 7479 7480@example 7481$ cvs update -j 1.2 -j 1.1 file1 7482U file1 7483$ cvs commit -m test 7484Checking in file1; 7485/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 7486new revision: 1.3; previous revision: 1.2 7487done 7488$ 7489@end example 7490 7491@c <en>@node Merging adds and removals 7492@node Mesclando adicionados e removidos 7493@c <en>@section Merging can add or remove files 7494@section Mesclar pode adicionar ou remover arquivos 7495 7496@c <en>If the changes which you are merging involve removing 7497@c <en>or adding some files, @code{update -j} will reflect 7498@c <en>such additions or removals. 7499Se as mudan�as que voc� est� mesclando envolvem remover 7500ou adicionar alguns arquivos, @code{update -j} vai 7501resultar em algumas adi��es ou remo��es. 7502 7503@c FIXME: This example needs a lot more explanation. 7504@c We also need other examples for some of the other 7505@c cases (not all--there are too many--as long as we present a 7506@c coherent general principle). 7507@c <en>For example: 7508Por exemplo: 7509@example 7510cvs update -A 7511touch a b c 7512cvs add a b c ; cvs ci -m "added" a b c 7513cvs tag -b branchtag 7514cvs update -r branchtag 7515touch d ; cvs add d 7516rm a ; cvs rm a 7517cvs ci -m "added d, removed a" 7518cvs update -A 7519cvs update -jbranchtag 7520@end example 7521 7522@c <en>After these commands are executed and a @samp{cvs commit} is done, 7523@c <en>file @file{a} will be removed and file @file{d} added in the main branch. 7524Depois destes comandos terem sido executados e um 7525@samp{cvs commit} ser feito, o arquivo @file{a} vai ser 7526removido e o arquivo @file{d} adicionado no ramo principal. 7527@c (which was determined by trying it) 7528 7529@c <en>Note that using a single static tag (@samp{-j @var{tagname}}) 7530@c <en>rather than a dynamic tag (@samp{-j @var{branchname}}) to merge 7531@c <en>changes from a branch will usually not remove files which were removed on the 7532@c <en>branch since @sc{cvs} does not automatically add static tags to dead revisions. 7533@c <en>The exception to this rule occurs when 7534@c <en>a static tag has been attached to a dead revision manually. Use the branch tag 7535@c <en>to merge all changes from the branch or use two static tags as merge endpoints 7536@c <en>to be sure that all intended changes are propagated in the merge. 7537Observe que ao se usar uma �nica etiqueta est�tica 7538(@samp{-j @var{tagname}}) ao inv�s de uma etiqueta 7539din�mica (@samp{-j @var{branchname}}) para mesclar 7540mudan�as a partir de um ramo normalmente n�o vai 7541remover arquivos que foram removidos do ramo, j� que o 7542@sc{cvs} n�o adiona etiquetas est�ticas a revis�es 7543mortas. A exce��o a esta regra ocorre quando uma 7544etiqueta est�tica foi colocada numa revis�o morta 7545manualmente. Use a etiqueta do ramo para mesclar todas 7546as mudan�as a partir do ramo ou use duas etiquetas 7547est�ticas como limites da mescla para ter certeza que 7548todas as mudan�as pretendidas v�o ser propagadas na mesclagem. 7549 7550@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 7551@c <en>@node Merging and keywords 7552@node Mesclagem e palavras-chave 7553@c <en>@section Merging and keywords 7554@section Mesclagem e palavras-chave 7555@c <en>@cindex Merging, and keyword substitution 7556@cindex Mesclagem, e substitui��o de palavra-chave 7557@c <en>@cindex Keyword substitution, and merging 7558@cindex Substitui��o de palavra-chave, e mesclagem 7559@c <en>@cindex -j (merging branches), and keyword substitution 7560@cindex -j (mesclando ramos), e substitui��o de palavra-chave 7561@c <en>@cindex -kk, to avoid conflicts during a merge 7562@cindex -kk, para evitar conflitos durante uma mesclagem 7563 7564@c <en>If you merge files containing keywords (@pxref{Keyword 7565@c <en>substitution}), you will normally get numerous 7566@c <en>conflicts during the merge, because the keywords are 7567@c <en>expanded differently in the revisions which you are 7568@c <en>merging. 7569Se voc� mescla arquivos contendo palavras-chave 7570(@pxref{Substitui��o de palavra-chave}), voc� 7571normalmente vai ter muitos conflitos durante a 7572mesclagem, j� que as palavras-chave s�o expandidas de 7573forma diferente nas revis�es que voc� est� mesclando. 7574 7575@c <en>Therefore, you will often want to specify the 7576@c <en>@samp{-kk} (@pxref{Substitution modes}) switch to the 7577@c <en>merge command line. By substituting just the name of 7578@c <en>the keyword, not the expanded value of that keyword, 7579@c <en>this option ensures that the revisions which you are 7580@c <en>merging will be the same as each other, and avoid 7581@c <en>spurious conflicts. 7582Portanto, voc� vai freq�entemente querer especificar a op��o 7583@samp{-kk} (@pxref{Modos de substitui��o}) na linha de 7584comando do merge. Simplesmente substituindo o nome da 7585palavra-chave, e n�o o valor expandido dela, vai 7586garantir que as revis�es que voc� vai estar mesclando 7587???will be the same as each other???, e assim evitar 7588conflitos falsos. 7589 7590@c <en>For example, suppose you have a file like this: 7591Por exemplo, suponha que voc� tenha um arquivo como este: 7592 7593@example 7594 +---------+ 7595 _! 1.1.2.1 ! <- br1 7596 / +---------+ 7597 / 7598 / 7599+-----+ +-----+ 7600! 1.1 !----! 1.2 ! 7601+-----+ +-----+ 7602@end example 7603 7604@noindent 7605@c <en>and your working directory is currently on the trunk 7606@c <en>(revision 1.2). Then you might get the following 7607@c <en>results from a merge: 7608E seu diret�rio de trabalho est� no momento no tronco 7609(revis�o 1.2). Ent�o pode acontecer de voc� obter os 7610seguintes resultados de uma mescla: 7611 7612@example 7613$ cat file1 7614key $@splitrcskeyword{}Revision: 1.2 $ 7615. . . 7616$ cvs update -j br1 7617U file1 7618RCS file: /cvsroot/first-dir/file1,v 7619retrieving revision 1.1 7620retrieving revision 1.1.2.1 7621Merging differences between 1.1 and 1.1.2.1 into file1 7622rcsmerge: warning: conflicts during merge 7623$ cat file1 7624@asis{}<<<<<<< file1 7625key $@splitrcskeyword{}Revision: 1.2 $ 7626@asis{}======= 7627key $@splitrcskeyword{}Revision: 1.1.2.1 $ 7628@asis{}>>>>>>> 1.1.2.1 7629. . . 7630@end example 7631 7632@c <en>What happened was that the merge tried to merge the 7633@c <en>differences between 1.1 and 1.1.2.1 into your working 7634@c <en>directory. So, since the keyword changed from 7635@c <en>@code{Revision: 1.1} to @code{Revision: 1.1.2.1}, 7636@c <en>@sc{cvs} tried to merge that change into your working 7637@c <en>directory, which conflicted with the fact that your 7638@c <en>working directory had contained @code{Revision: 1.2}. 7639O que aconteceu � que a mesclagem tentou mesclar as 7640diferen�as entre 1.1 e 1.1.2.1 dentro de seu diret�rio 7641de trabalho. Ent�o, uma vez que a palavra-chave mudou 7642de @code{Revision: 1.1} para @code{Revision: 1.1.2.1}, 7643o @sc{cvs} tentou mesclar esta mudan�a no seu diret�rio 7644de trabalho, o que gerou um conflito com o fato de seu 7645diret�rio de trabalho continha @code{Revision: 1.2}. 7646 7647@c <en>Here is what happens if you had used @samp{-kk}: 7648Isto � o que aconteceria se voc� tivesse usado @samp{-kk}: 7649 7650@example 7651$ cat file1 7652key $@splitrcskeyword{}Revision: 1.2 $ 7653. . . 7654$ cvs update -kk -j br1 7655U file1 7656RCS file: /cvsroot/first-dir/file1,v 7657retrieving revision 1.1 7658retrieving revision 1.1.2.1 7659Merging differences between 1.1 and 1.1.2.1 into file1 7660$ cat file1 7661key $@splitrcskeyword{}Revision$ 7662. . . 7663@end example 7664 7665@c <en>What is going on here is that revision 1.1 and 1.1.2.1 7666@c <en>both expand as plain @code{Revision}, and therefore 7667@c <en>merging the changes between them into the working 7668@c <en>directory need not change anything. Therefore, there 7669@c <en>is no conflict. 7670O que est� acontecendo aqui � que ambas as revis�es 1.1 7671e 1.1.2.1 expandem em um simples @code{Revision}, e 7672consequentemente, n�o h� nenhuma mudan�a para mesclar entre elas no 7673diret�rio de trabalho. Portanto, n�o h� conflito. 7674 7675@c <en>@strong{WARNING: In versions of @sc{cvs} prior to 1.12.2, there was a 7676@c <en>major problem with using @samp{-kk} on merges. Namely, @samp{-kk} 7677@c <en>overrode any default keyword expansion mode set in the archive file in 7678@c <en>the repository. This could, unfortunately for some users, cause data 7679@c <en>corruption in binary files (with a default keyword expansion mode set 7680@c <en>to @samp{-kb}). Therefore, when a repository contained binary files, 7681@c <en>conflicts had to be dealt with manually rather than using @samp{-kk} in 7682@c <en>a merge command.} 7683@strong{WARNING: Em vers�es do @sc{cvs} anteriores � 76841.12.2, existia um grande problema ao usar @samp{-kk} 7685em mesclagens. A saber, @samp{-kk} sobreescrevia 7686qualquer modo de expans�o de palavra-chave padr�o 7687ajustado no arquivo do reposit�rio. Isto podia, 7688infelizmente para alguns usu�rios, corromper arquivos 7689bin�rios (com um modo de expans�o de palavra-chave 7690padr�o em @samp{-kb}). Portanto, quando um reposit�rio 7691cont�m arquivos bin�rios, conflitos t�m que ser 7692tratados manualmente ao inv�s de serem tratados com 7693@samp{-kk} no comando de mescla.} 7694 7695@c <en>In @sc{cvs} version 1.12.2 and later, the keyword expansion mode 7696@c <en>provided on the command line to any @sc{cvs} command no longer 7697@c <en>overrides the @samp{-kb} keyword expansion mode setting for binary 7698@c <en>files, though it will still override other default keyword expansion 7699@c <en>modes. You can now safely merge using @samp{-kk} to avoid spurious conflicts 7700@c <en>on lines containing RCS keywords, even when your repository contains 7701@c <en>binary files. 7702Da vers�o 1.12.2 para frente do @sc{cvs}, a expans�o 7703por palavra-chave dispon�vel na linha de comando para 7704qualquer comando do @sc{cvs} n�o mais sobreescreve o 7705modo de expans�o de palavra-chave @samp{-kb} para 7706arquivos bin�rios, embora ainda sobreescreva os outros 7707modos de expans�o de palavra-chave. Voc� pode agora 7708mesclar com tranquilidade usando @samp{-kk} para evitar 7709conflitos falsos em linhas contendo palavras-chave do 7710RCS, mesmo quando seu reposit�rio cont�m arquivos bin�rios. 7711 7712@c --------------------------------------------------------------------- 7713@c <en>@node Recursive behavior 7714@node Comportamento recursivo 7715@c <en>@chapter Recursive behavior 7716@chapter Comportamento recursivo 7717@c <en>@cindex Recursive (directory descending) 7718@cindex Recursivo (directory descending) 7719@c <en>@cindex Directory, descending 7720@cindex Directory, descending 7721@c <en>@cindex Descending directories 7722@cindex Descending directories 7723@c <en>@cindex Subdirectories 7724@cindex Subdiret�rios 7725 7726@c <en>Almost all of the subcommands of @sc{cvs} work 7727@c <en>recursively when you specify a directory as an 7728@c <en>argument. For instance, consider this directory 7729@c <en>structure: 7730Quase todos os subcomandos do @sc{cvs} trabalham de 7731forma recursiva quando voc� passa um diret�rio como 7732argumento. Por exemplo, considere esta estrutura: 7733 7734@example 7735 @code{$HOME} 7736 | 7737 +--@t{tc} 7738 | | 7739 +--@t{CVS} 7740@c <en> | (internal @sc{cvs} files) 7741 | (internal @sc{cvs} files) 7742 +--@t{Makefile} 7743 +--@t{backend.c} 7744 +--@t{driver.c} 7745 +--@t{frontend.c} 7746 +--@t{parser.c} 7747 +--@t{man} 7748 | | 7749 | +--@t{CVS} 7750@c <en> | | (internal @sc{cvs} files) 7751 | | (internal @sc{cvs} files) 7752 | +--@t{tc.1} 7753 | 7754 +--@t{testing} 7755 | 7756 +--@t{CVS} 7757@c <en> | (internal @sc{cvs} files) 7758 | (internal @sc{cvs} files) 7759 +--@t{testpgm.t} 7760 +--@t{test2.t} 7761@end example 7762 7763@noindent 7764@c <en>If @file{tc} is the current working directory, the 7765@c <en>following is true: 7766Se @file{tc} � o diret�rio atual, ent�o � verdade que: 7767 7768@itemize @bullet 7769@item 7770@c <en>@samp{cvs update testing} is equivalent to 7771@samp{cvs update testing} � equivalente a 7772 7773@example 7774cvs update testing/testpgm.t testing/test2.t 7775@end example 7776 7777@item 7778@c <en>@samp{cvs update testing man} updates all files in the 7779@c <en>subdirectories 7780@samp{cvs update testing man} atualiza todos os 7781arquivos nos subdiret�rios 7782 7783@item 7784@c <en>@samp{cvs update .} or just @samp{cvs update} updates 7785@c <en>all files in the @code{tc} directory 7786@samp{cvs update .} ou simplesmente @samp{cvs update} 7787atualiza todos os arquivos no diret�rio @code{tc} 7788@end itemize 7789 7790@c <en>If no arguments are given to @code{update} it will 7791@c <en>update all files in the current working directory and 7792@c <en>all its subdirectories. In other words, @file{.} is a 7793@c <en>default argument to @code{update}. This is also true 7794@c <en>for most of the @sc{cvs} subcommands, not only the 7795@c <en>@code{update} command. 7796Se nenhum argumento � dado ao @code{update} ele 7797atualiza todos os arquivos no diret�rio atual e nos 7798seus subdiret�rios recursivamente. Em outras palavras, 7799O @file{.} � um argumento padr�o para o @code{update}. 7800O mesmo vale para a maioria dos subcomandos do 7801@sc{cvs}, e n�o apenas para o @code{update}. 7802 7803@c <en>The recursive behavior of the @sc{cvs} subcommands can be 7804@c <en>turned off with the @samp{-l} option. 7805@c <en>Conversely, the @samp{-R} option can be used to force recursion if 7806@c <en>@samp{-l} is specified in @file{~/.cvsrc} (@pxref{~/.cvsrc}). 7807O comportamento recursivo dos subcomandos do @sc{cvs} 7808pode ser desligado com a op��o @samp{-l}. De forma 7809oposta, a op��o @samp{-R} pode ser usada para for�ar a 7810recurs�o se o @samp{-l} estiver especificado no 7811@file{~/.cvsrc} (@pxref{~/.cvsrc}). 7812 7813@example 7814$ cvs update -l # @r{Don't update files in subdirectories} 7815@end example 7816 7817@c --------------------------------------------------------------------- 7818@c <en>@node Adding and removing 7819@node Adicionando e removendo 7820@c <en>@chapter Adding, removing, and renaming files and directories 7821@chapter Adicionando, removendo e renomeando arquivos e diret�rios 7822 7823@c <en>In the course of a project, one will often add new 7824@c <en>files. Likewise with removing or renaming, or with 7825@c <en>directories. The general concept to keep in mind in 7826@c <en>all these cases is that instead of making an 7827@c <en>irreversible change you want @sc{cvs} to record the 7828@c <en>fact that a change has taken place, just as with 7829@c <en>modifying an existing file. The exact mechanisms to do 7830@c <en>this in @sc{cvs} vary depending on the situation. 7831No decorrer de um projeto, normalmente se adicionam 7832arquivos. Da mesma forma se remove e se renomeia. E 7833tudo isto tamb�m para diret�rios. O conceito geral que 7834se deve ter em mente em todos estes casos � que ao 7835inv�s de fazer uma mudan�a irrevers�vel voc� vai querer 7836que o @sc{cvs} registre o fato de que uma mudan�a 7837ocorreu, da mesma forma que � feito com a modifica��o 7838de um arquivo existente. O mecanismo exato para se 7839fazer isto com o @sc{cvs} varia conforme o caso. 7840 7841@menu 7842@c <en>* Adding files:: Adding files 7843* Adicionando arquivos:: Adicionando arquivos 7844@c <en>* Removing files:: Removing files 7845* Removendo arquivos:: Removendo arquivos 7846@c <en>* Removing directories:: Removing directories 7847* Removendo diret�rios:: Removendo diret�rios 7848@c <en>* Moving files:: Moving and renaming files 7849* Movendo arquivos:: Movendo e renomeando arquivos 7850@c <en>* Moving directories:: Moving and renaming directories 7851* Movendo diret�rios:: Movendo e renomeando diret�rios 7852@end menu 7853 7854@c <en>@node Adding files 7855@node Adicionando arquivos 7856@c <en>@section Adding files to a directory 7857@section Adicionando arquivos a um diret�rio 7858@c <en>@cindex Adding files 7859@cindex Adicionando arquivos 7860 7861@c <en>To add a new file to a directory, follow these steps. 7862Para adicionar um novo arquivo a um diret�rio, siga 7863estes passos. 7864 7865@itemize @bullet 7866@item 7867@c <en>You must have a working copy of the directory. 7868@c <en>@xref{Getting the source}. 7869Voc� deve ter uma c�pia de trabalho do diret�rio. 7870@xref{Obtendo os fontes}. 7871 7872@item 7873@c <en>Create the new file inside your working copy of the directory. 7874Crie o novo arquivo dentro da c�pia local do diret�rio. 7875 7876@item 7877@c <en>Use @samp{cvs add @var{filename}} to tell @sc{cvs} that you 7878@c <en>want to version control the file. If the file contains 7879@c <en>binary data, specify @samp{-kb} (@pxref{Binary files}). 7880Use @samp{cvs add @var{filename}} para dizer ao 7881@sc{cvs} que voc� quer fazer controle de vers�es no 7882arquivo. Se o arquivo cont�m dados em bin�rio, 7883especifique @samp{-kb} (@pxref{Arquivos bin�rios}). 7884 7885@item 7886@c <en>Use @samp{cvs commit @var{filename}} to actually check 7887@c <en>in the file into the repository. Other developers 7888@c <en>cannot see the file until you perform this step. 7889Use @samp{cvs commit @var{filename}} para de fato 7890colocar o arquivo no reposit�rio. Outros 7891desenvolvedores n�o poderam ver o arquivo at� que voc� 7892tenha feito isto. 7893@end itemize 7894 7895@c <en>You can also use the @code{add} command to add a new 7896@c <en>directory. 7897Voc� tamb�m pode usar o comando @code{add} para 7898adicionar um novo diret�rio. 7899@c FIXCVS and/or FIXME: Adding a directory doesn't 7900@c require the commit step. This probably can be 7901@c considered a CVS bug, but it is possible we should 7902@c warn people since this behavior probably won't be 7903@c changing right away. 7904 7905@c <en>Unlike most other commands, the @code{add} command is 7906@c <en>not recursive. You cannot even type @samp{cvs add 7907@c <en>foo/bar}! Instead, you have to 7908Ao contr�rio da maioria dos outros comandos, o comando 7909@code{add} n�o � recursivo. Voc� n�o pode sequer digitar @samp{cvs add 7910foo/bar}! Ao inv�s disso, voc� tem que fazer 7911@c FIXCVS: This is, of course, not a feature. It is 7912@c just that no one has gotten around to fixing "cvs add 7913@c foo/bar". 7914 7915@example 7916$ cd foo 7917$ cvs add bar 7918@end example 7919 7920@c <en>@cindex add (subcommand) 7921@cindex add (subcomando) 7922@c <en>@deffn Command {cvs add} [@code{-k} kflag] [@code{-m} message] files @dots{} 7923@deffn Comando {cvs add} [@code{-k} kflag] [@code{-m} mensagem] arquivos @dots{} 7924 7925@c <en>Schedule @var{files} to be added to the repository. 7926@c <en>The files or directories specified with @code{add} must 7927@c <en>already exist in the current directory. To add a whole 7928@c <en>new directory hierarchy to the source repository (for 7929@c <en>example, files received from a third-party vendor), use 7930@c <en>the @code{import} command instead. @xref{import}. 7931Agenda @var{arquivos} para serem adicionados ao reposit�rio. 7932Os arquivos ou diret�rios especificados com @code{add} 7933j� devem existir no diret�rio atual. Para adicionar 7934toda uma estrutura de diret�rios nova ao reposit�rio 7935de fontes (por exemplo, arquivos recebidos de um 7936fornecedor terceiro), use o comando @code{import} ao 7937inv�s do @code{add}. @xref{import}. 7938 7939@c <en>The added files are not placed in the source repository 7940@c <en>until you use @code{commit} to make the change 7941@c <en>permanent. Doing an @code{add} on a file that was 7942@c <en>removed with the @code{remove} command will undo the 7943@c <en>effect of the @code{remove}, unless a @code{commit} 7944@c <en>command intervened. @xref{Removing files}, for an 7945@c <en>example. 7946Os arquivos adicionados n�o s�o colocados no 7947reposit�rio de fontes at� que voc� use o @code{commit} 7948para tornar a mudan�a permanente. Aplicar um 7949@code{add} num arquivo que foi removido com o comando 7950@code{remove} vai desfazer o efeito do @code{remove}, a 7951menos que haja um @code{commit} entre os dois. 7952@xref{Removendo arquivos}, para um exemplo. 7953 7954@c <en>The @samp{-k} option specifies the default way that 7955@c <en>this file will be checked out; for more information see 7956@c <en>@ref{Substitution modes}. 7957A op��o @samp{-k} especifica a forma padr�o como este 7958arquivo vai ser ???checked out???; para mais 7959informa��es veja @ref{Modos de substitui��o}. 7960 7961@c As noted in BUGS, -m is broken client/server (Nov 7962@c 96). Also see testsuite log2-* tests. 7963@c <en>The @samp{-m} option specifies a description for the 7964@c <en>file. This description appears in the history log (if 7965@c <en>it is enabled, @pxref{history file}). It will also be 7966@c <en>saved in the version history inside the repository when 7967@c <en>the file is committed. The @code{log} command displays 7968@c <en>this description. The description can be changed using 7969@c <en>@samp{admin -t}. @xref{admin}. If you omit the 7970@c <en>@samp{-m @var{description}} flag, an empty string will 7971@c <en>be used. You will not be prompted for a description. 7972A op��o @samp{-m} especifica uma descri��o para o 7973arquivo. Esta descri��o aparece no registro hist�rico (history log) 7974(se este estiver habilitado, @pxref{arquivo history (hist�rico)}). 7975Ela tamb�m vai ser guardada no hist�rico de vers�es 7976dentro do reposit�rio quando o arquivo � 7977???committed???. O comando @code{log} mostra esta 7978descri��o. A descri��o pode ser alterada usando-se 7979@samp{admin -t}. @xref{admin}. Se voc� omitir a op��o 7980@samp{-m @var{description}}, uma string vazia vai ser 7981usada. N�o vai ser pedido a voc� uma descri��o. 7982@end deffn 7983 7984@c <en>For example, the following commands add the file 7985@c <en>@file{backend.c} to the repository: 7986Por exemplo, os seguintes comandos adicionam o arquivo 7987@file{backend.c} ao reposit�rio: 7988 7989@c This example used to specify 7990@c -m "Optimizer and code generation passes." 7991@c to the cvs add command, but that doesn't work 7992@c client/server (see log2 in sanity.sh). Should fix CVS, 7993@c but also seems strange to document things which 7994@c don't work... 7995@example 7996$ cvs add backend.c 7997$ cvs commit -m "Early version. Not yet compilable." backend.c 7998@end example 7999 8000@c <en>When you add a file it is added only on the branch 8001@c <en>which you are working on (@pxref{Branching and merging}). You can 8002@c <en>later merge the additions to another branch if you want 8003@c <en>(@pxref{Merging adds and removals}). 8004Quando voc� adiciona um arquivo ele � adicionado apenas 8005no ramo no qual voc� est� trabalhando 8006(@pxref{Ramificando e mesclando}). Voc� pode mais 8007tarde mesclar as adi��es a outro ramo se voc� quiser 8008(@pxref{Mesclando adicionados e removidos}). 8009@c Should we mention that earlier versions of CVS 8010@c lacked this feature (1.3) or implemented it in a buggy 8011@c way (well, 1.8 had many bugs in cvs update -j)? 8012@c Should we mention the bug/limitation regarding a 8013@c file being a regular file on one branch and a directory 8014@c on another? 8015@c FIXME: This needs an example, or several, here or 8016@c elsewhere, for it to make much sense. 8017@c Somewhere we need to discuss the aspects of death 8018@c support which don't involve branching, I guess. 8019@c Like the ability to re-create a release from a tag. 8020 8021@c --------------------------------------------------------------------- 8022@c <en>@node Removing files 8023@node Removendo arquivos 8024@c <en>@section Removing files 8025@section Removendo arquivos 8026@c <en>@cindex Removing files 8027@cindex Removendo arquivos 8028@c <en>@cindex Deleting files 8029@cindex Apagando arquivos 8030 8031@c FIXME: this node wants to be split into several 8032@c smaller nodes. Could make these children of 8033@c "Adding and removing", probably (death support could 8034@c be its own section, for example, as could the 8035@c various bits about undoing mistakes in adding and 8036@c removing). 8037@c <en>Directories change. New files are added, and old files 8038@c <en>disappear. Still, you want to be able to retrieve an 8039@c <en>exact copy of old releases. 8040Diret�rios mudam. Novos arquivos s�o adicionados, e 8041arquivos velhos somem. Ainda assim, voc� vai querer 8042poder recuperar uma c�pia exata de releases antigas. 8043 8044@c <en>Here is what you can do to remove a file, 8045@c <en>but remain able to retrieve old revisions: 8046Aqui est� o que voc� pode fazer para remover um 8047arquivo, mas continuar sendo capaz de recuperar 8048revis�es antigas dele: 8049 8050@itemize @bullet 8051@c FIXME: should probably be saying something about 8052@c having a working directory in the first place. 8053@item 8054@c <en>Make sure that you have not made any uncommitted 8055@c <en>modifications to the file. @xref{Viewing differences}, 8056@c <en>for one way to do that. You can also use the 8057@c <en>@code{status} or @code{update} command. If you remove 8058@c <en>the file without committing your changes, you will of 8059@c <en>course not be able to retrieve the file as it was 8060@c <en>immediately before you deleted it. 8061Certifique-se de n�o ter feito nenhuma altera��o que 8062falte fazer ???commit??? nele. @xref{Vendo as diferen�as}, 8063para uma forma de fazer isto. Voc� tamb�m pode usar o comando 8064@code{status} ou o @code{update}. Se voc� remove o 8065arquivo sem fazer ???commit??? nas suas mudan�as, 8066obviamente voc� n�o vai ser capaz de recuperar o 8067arquivo na forma como ele era imediatamente antes da remo��o. 8068 8069@item 8070@c <en>Remove the file from your working copy of the directory. 8071@c <en>You can for instance use @code{rm}. 8072Remova o arquivo da c�pia local do seu diret�rio. 8073Voc� pode usar o @code{rm}, por exemplo. 8074 8075@item 8076@c <en>Use @samp{cvs remove @var{filename}} to tell @sc{cvs} that 8077@c <en>you really want to delete the file. 8078Use @samp{cvs remove @var{filename}} para dizer ao 8079@sc{cvs} que voc� quer realmente apagar o arquivo. 8080 8081@item 8082@c <en>Use @samp{cvs commit @var{filename}} to actually 8083@c <en>perform the removal of the file from the repository. 8084Use @samp{cvs commit @var{filename}} para realizar a 8085remo��o de fato do arquivo do reposit�rio. 8086@end itemize 8087 8088@c FIXME: Somehow this should be linked in with a more 8089@c general discussion of death support. I don't know 8090@c whether we want to use the term "death support" or 8091@c not (we can perhaps get by without it), but we do 8092@c need to discuss the "dead" state in "cvs log" and 8093@c related subjects. The current discussion is 8094@c scattered around, and not xref'd to each other. 8095@c FIXME: I think this paragraph wants to be moved 8096@c later down, at least after the first example. 8097@c <en>When you commit the removal of the file, @sc{cvs} 8098@c <en>records the fact that the file no longer exists. It is 8099@c <en>possible for a file to exist on only some branches and 8100@c <en>not on others, or to re-add another file with the same 8101@c <en>name later. @sc{cvs} will correctly create or not create 8102@c <en>the file, based on the @samp{-r} and @samp{-D} options 8103@c <en>specified to @code{checkout} or @code{update}. 8104Quando voc� faz ???commit??? na remo��o do arquivo, o 8105@sc{cvs} registra o fato de que o arquivo n�o existe 8106mais. � poss�vel para um arquivo existir apenas em 8107alguns ramos e n�o em outros, ou re-adicionar outro 8108arquivo com o mesmo nome depois. O @sc{cvs} vai de 8109forma correta criar ou n�o criar o arquivo, baseado nas 8110op�es @samp{-r} e @samp{-D} especificadas no 8111@code{checkout} ou no @code{update}. 8112 8113@c FIXME: This style seems to clash with how we 8114@c document things in general. 8115@c <en>@cindex Remove (subcommand) 8116@cindex Remove (subcomando) 8117@c <en>@deffn Command {cvs remove} [options] files @dots{} 8118@deffn Comando {cvs remove} [options] files @dots{} 8119 8120@c <en>Schedule file(s) to be removed from the repository 8121@c <en>(files which have not already been removed from the 8122@c <en>working directory are not processed). This command 8123@c <en>does not actually remove the file from the repository 8124@c <en>until you commit the removal. For a full list of 8125@c <en>options, see @ref{Invoking CVS}. 8126Prepara arquivo(s) para ser removido do reporit�rio 8127(arquivos que ainda n�o foram removidos do diret�rio de 8128trabalho n�o s�o processados). Na verdade este comando 8129n�o remove o arquivo do reposit�rio at� que voc� fa�a 8130???commit??? no removido. Para uma lista completa de 8131op��es, veja em @ref{Chamando o CVS}. 8132@end deffn 8133 8134@c <en>Here is an example of removing several files: 8135Aqui est� um exemplo de remo��o de v�rios arquivos: 8136 8137@example 8138$ cd test 8139$ rm *.c 8140$ cvs remove 8141cvs remove: Removing . 8142cvs remove: scheduling a.c for removal 8143cvs remove: scheduling b.c for removal 8144cvs remove: use 'cvs commit' to remove these files permanently 8145$ cvs ci -m "Removed unneeded files" 8146cvs commit: Examining . 8147cvs commit: Committing . 8148@end example 8149 8150@c <en>As a convenience you can remove the file and @code{cvs 8151@c <en>remove} it in one step, by specifying the @samp{-f} 8152@c <en>option. For example, the above example could also be 8153@c <en>done like this: 8154Por conveni�ncia voc� pode remover o arquivo e fazer @code{cvs 8155remove} nele de uma s� vez, especificando a op��o 8156@samp{-f}. Por exemplo, o exemplo acima poderia ser 8157feito assim: 8158 8159@example 8160$ cd test 8161$ cvs remove -f *.c 8162cvs remove: scheduling a.c for removal 8163cvs remove: scheduling b.c for removal 8164cvs remove: use 'cvs commit' to remove these files permanently 8165$ cvs ci -m "Removed unneeded files" 8166cvs commit: Examining . 8167cvs commit: Committing . 8168@end example 8169 8170@c <en>If you execute @code{remove} for a file, and then 8171@c <en>change your mind before you commit, you can undo the 8172@c <en>@code{remove} with an @code{add} command. 8173Se voc� executa @code{remove} para um arquivo, e ent�o 8174muda de id�ia antes do ???commit???, voc� pode desfazer 8175o @code{remove} com um @code{add}. 8176@ignore 8177@c is this worth saying or not? Somehow it seems 8178@c confusing to me. 8179@c <en>Of course, 8180@c <en>since you have removed your copy of file in the working 8181@c <en>directory, @sc{cvs} does not necessarily bring back the 8182@c <en>contents of the file from right before you executed 8183@c <en>@code{remove}; instead it gets the file from the 8184@c <en>repository again. 8185Obviamente, uma vez que voc� removeu a sua c�pia local 8186do arquivo no diret�rio de trabalho, o @sc{cvs} n�o vai 8187trazer de volta necessariamente o conte�do do arquivo 8188exatamente como estava antes do @code{remove}; No lugar 8189disto ele vai buscar o arquivo no reposit�rio de novo. 8190@end ignore 8191 8192@c FIXME: what if you change your mind after you commit 8193@c it? (answer is also "cvs add" but we don't say that...). 8194@c We need some index entries for thinks like "undoing 8195@c removal" too. 8196 8197@example 8198$ ls 8199CVS ja.h oj.c 8200$ rm oj.c 8201$ cvs remove oj.c 8202cvs remove: scheduling oj.c for removal 8203cvs remove: use 'cvs commit' to remove this file permanently 8204$ cvs add oj.c 8205U oj.c 8206cvs add: oj.c, version 1.1.1.1, resurrected 8207@end example 8208 8209@c <en>If you realize your mistake before you run the 8210@c <en>@code{remove} command you can use @code{update} to 8211@c <en>resurrect the file: 8212Se voc� notar o erro antes de rodar o comando 8213@code{remove} voc� pode usar o @code{update} para 8214resuscitar o arquivo: 8215 8216@example 8217$ rm oj.c 8218$ cvs update oj.c 8219cvs update: warning: oj.c was lost 8220U oj.c 8221@end example 8222 8223@c <en>When you remove a file it is removed only on the branch 8224@c <en>which you are working on (@pxref{Branching and merging}). You can 8225@c <en>later merge the removals to another branch if you want 8226@c <en>(@pxref{Merging adds and removals}). 8227Quando voc� remove um arquivo ele � removido apenas do 8228ramo no qual voc� est� trabalhando (@pxref{Ramificando 8229e mesclando}). Voc� pode depois mesclar as remo��es em 8230outro ramo se quiser 8231(@pxref{Mesclando adicionados e removidos}). 8232 8233@c <en>@node Removing directories 8234@node Removendo diret�rios 8235@c <en>@section Removing directories 8236@section Removendo diret�rios 8237@c <en>@cindex Removing directories 8238@cindex Removendo diret�rios 8239@c <en>@cindex Directories, removing 8240@cindex Diret�rios, removendo 8241 8242@c <en>In concept removing directories is somewhat similar to 8243@c <en>removing files---you want the directory to not exist in 8244@c <en>your current working directories, but you also want to 8245@c <en>be able to retrieve old releases in which the directory 8246@c <en>existed. 8247Conceitualmente, remover diret�rios � num certo sentido 8248similar a remover arquivos---voc� quer que o diret�rio 8249n�o exista mais no seu diret�rio de trabalho atual, 8250mas voc� tamb�m quer ser capaz de recuperar releases 8251antigas nas quais o diret�rio existe. 8252 8253@c <en>The way that you remove a directory is to remove all 8254@c <en>the files in it. You don't remove the directory 8255@c <en>itself; there is no way to do that. 8256@c <en>Instead you specify the @samp{-P} option to 8257@c <en>@code{cvs update} or @code{cvs checkout}, 8258@c <en>which will cause @sc{cvs} to remove empty 8259@c <en>directories from working directories. 8260@c <en>(Note that @code{cvs export} always removes empty directories.) 8261@c <en>Probably the 8262@c <en>best way to do this is to always specify @samp{-P}; if 8263@c <en>you want an empty directory then put a dummy file (for 8264@c <en>example @file{.keepme}) in it to prevent @samp{-P} from 8265@c <en>removing it. 8266A forma de remover um diret�rio � removendo todos os 8267arquivos nele. Voc� n�o remove o diret�rio mesmo; n�o 8268h� jeito de fazer isto. Ao inv�s disto voc� especifica 8269a op��o @samp{-P} no @code{cvs update} ou no @code{cvs 8270checkout}, que vai fazer com que o @sc{cvs} remova 8271diret�rios vazios de seus diret�rios de 8272trabalho. (Observe que o @code{cvs export} sempre 8273remove diret�rios vazios.) Provavelmente, a melhor 8274maneira de fazer isto � sempre usar o @samp{-P}; se 8275voc� quiser manter um diret�rio vazio, ponha um arquivo 8276sem import�ncia nele (por exemplo @file{.keepme}) para 8277evitar que o @samp{-P} apague o diret�rio. 8278 8279@c I'd try to give a rationale for this, but I'm not 8280@c sure there is a particularly convincing one. What 8281@c we would _like_ is for CVS to do a better job of version 8282@c controlling whether directories exist, to eliminate the 8283@c need for -P and so that a file can be a directory in 8284@c one revision and a regular file in another. 8285@c <en>Note that @samp{-P} is implied by the @samp{-r} or @samp{-D} 8286@c <en>options of @code{checkout}. This way 8287@c <en>@sc{cvs} will be able to correctly create the directory 8288@c <en>or not depending on whether the particular version you 8289@c <en>are checking out contains any files in that directory. 8290Observe que o @samp{-P} est� impl�cito nas op��es 8291@samp{-r} ou @samp{-D} do @code{checkout}. Desta forma 8292o @sc{cvs} vai ser capaz de criar ou n�o criar corretamente o 8293diret�rio dependendo de ter ou n�o algum arquivo na 8294vers�o que voc� est� fazendo ???check out???. 8295 8296@c --------------------------------------------------------------------- 8297@c <en>@node Moving files 8298@node Movendo arquivos 8299@c <en>@section Moving and renaming files 8300@section Movendo e renomeando arquivos 8301@c <en>@cindex Moving files 8302@cindex Movendo arquivos 8303@c <en>@cindex Renaming files 8304@cindex Renomeando arquivos 8305@c <en>@cindex Files, moving 8306@cindex Arquivos, movendo 8307 8308@c <en>Moving files to a different directory or renaming them 8309@c <en>is not difficult, but some of the ways in which this 8310@c <en>works may be non-obvious. (Moving or renaming a 8311@c <en>directory is even harder. @xref{Moving directories}.). 8312Mover arquivos para um diret�rio diferente ou 8313renome�-los n�o � dif�cil, mas algumas das formas de 8314faze-lo podem n�o ser �bvias. (Mover ou renomear 8315diret�rios � ainda mais dif�cil. @xref{Movendo 8316diret�rios}.). 8317 8318@c <en>The examples below assume that the file @var{old} is renamed to 8319@c <en>@var{new}. 8320O exemplos abaixo assumem que o arquivo @var{antigo} foi 8321renomeado para @var{novo}. 8322 8323@menu 8324@c <en>* Outside:: The normal way to Rename 8325* Outside:: A forma normal de renomear 8326@c <en>* Inside:: A tricky, alternative way 8327* Inside:: Uma forma ???tricky???, alternativa 8328@c <en>* Rename by copying:: Another tricky, alternative way 8329* Renomeando na base da c�pia:: Outra forma ???tricky???, alternativa 8330@end menu 8331 8332@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8333@c <en>@node Outside 8334@node Outside 8335@c <en>@subsection The Normal way to Rename 8336@subsection A forma normal de renomear 8337 8338@c More rename issues. Not sure whether these are 8339@c worth documenting; I'm putting them here because 8340@c it seems to be as good a place as any to try to 8341@c set down the issues. 8342@c * "cvs annotate" will annotate either the new 8343@c file or the old file; it cannot annotate _each 8344@c line_ based on whether it was last changed in the 8345@c new or old file. Unlike "cvs log", where the 8346@c consequences of having to select either the new 8347@c or old name seem fairly benign, this may be a 8348@c real advantage to having CVS know about renames 8349@c other than as a deletion and an addition. 8350 8351@c <en>The normal way to move a file is to copy @var{old} to 8352@c <en>@var{new}, and then issue the normal @sc{cvs} commands 8353@c <en>to remove @var{old} from the repository, and add 8354@c <en>@var{new} to it. 8355A forma normal de mover um arquivo � copiar 8356@var{antigo} para @var{novo}, e ent�o aplicar os 8357comandos normais do @sc{cvs} para, no reposit�rio, 8358remover @var{antigo} e adicionar @var{novo}. 8359@c The following sentence is not true: one must cd into 8360@c the directory to run "cvs add". 8361@c (Both @var{old} and @var{new} could 8362@c contain relative paths, for example @file{foo/bar.c}). 8363 8364@example 8365$ mv @var{old} @var{new} 8366$ cvs remove @var{old} 8367$ cvs add @var{new} 8368$ cvs commit -m "Renamed @var{old} to @var{new}" @var{old} @var{new} 8369@end example 8370 8371@c <en>This is the simplest way to move a file, it is not 8372@c <en>error-prone, and it preserves the history of what was 8373@c <en>done. Note that to access the history of the file you 8374@c <en>must specify the old or the new name, depending on what 8375@c <en>portion of the history you are accessing. For example, 8376@c <en>@code{cvs log @var{old}} will give the log up until the 8377@c <en>time of the rename. 8378Esta � a forma mais simples de mover um arquivo, n�o � 8379anti-falhas, e vai preservar o hist�rico do que foi 8380feito. Observe que para acessar o hist�rico do arquivo 8381voc� vai precisar especificar o nome antigo ou o novo, 8382dependendo de que por��o do hist�rico voc� vai estar 8383acessando. Por exemplo, @code{cvs log @var{antigo}} 8384vai mostrar o registro (log) at� o momento onde o 8385arquivo foi renomeado. 8386 8387@c <en>When @var{new} is committed its revision numbers will 8388@c <en>start again, usually at 1.1, so if that bothers you, 8389@c <en>use the @samp{-r rev} option to commit. For more 8390@c <en>information see @ref{Assigning revisions}. 8391Quando @var{novo} � ???committed??? seus n�meros de 8392revis�o v�o recome�ar, normalmente em 1.1. Portanto, se 8393isto te incomoda, lembre de usar a op��o @samp{-r rev} 8394na hora do ???commit???. Para mais informa��es veja em 8395@ref{Atribuindo revis�es}. 8396 8397@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8398@c <en>@node Inside 8399@node Inside 8400@c <en>@subsection Moving the history file 8401@subsection Movendo o arquivo com o hist�rico 8402 8403@c <en>This method is more dangerous, since it involves moving 8404@c <en>files inside the repository. Read this entire section 8405@c <en>before trying it out! 8406Este m�todo � mais perigoso, j� que envolve 8407movimenta��o de arquivos no reposit�rio. Leia a se��o 8408toda antes de sair tentando! 8409 8410@example 8411$ cd $CVSROOT/@var{dir} 8412$ mv @var{old},v @var{new},v 8413@end example 8414 8415@noindent 8416@c <en>Advantages: 8417Vantagens: 8418 8419@itemize @bullet 8420@item 8421@c <en>The log of changes is maintained intact. 8422O registro (log) de altera��es permanece intacto. 8423 8424@item 8425@c <en>The revision numbers are not affected. 8426Os n�meros de revis�o n�o s�o alterados. 8427@end itemize 8428 8429@noindent 8430@c <en>Disadvantages: 8431Desvantagens: 8432 8433@itemize @bullet 8434@item 8435@c <en>Old releases cannot easily be fetched from the 8436@c <en>repository. (The file will show up as @var{new} even 8437@c <en>in revisions from the time before it was renamed). 8438Releases antigas n�o ser�o mais facilmente recuperadas 8439a partir do reposit�rio. (O arquivo vai aparecer como 8440@var{novo} mesmo em revis�es do tempo anterior a ter 8441sido renomeado). 8442 8443@item 8444@c <en>There is no log information of when the file was renamed. 8445N�o h� informa��o nos registros de quando o arquivo foi 8446renomeado. 8447 8448@item 8449@c <en>Nasty things might happen if someone accesses the history file 8450@c <en>while you are moving it. Make sure no one else runs any of the @sc{cvs} 8451@c <en>commands while you move it. 8452Coisas ???Nasty??? podem acontecer se algu�m acessar o 8453arquivo de hist�rico enquanto voc� estier movendo ele. 8454Certifique-se de que ningu�m mais rode qualquer dos 8455comandos do @sc{cvs} durante a movimenta��o. 8456@end itemize 8457 8458@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8459@c <en>@node Rename by copying 8460@node Renomeando na base da c�pia 8461@c <en>@subsection Copying the history file 8462@subsection Copiando o arquivo de hist�rico 8463 8464@c <en>This way also involves direct modifications to the 8465@c <en>repository. It is safe, but not without drawbacks. 8466Esta forma tamb�m envolve modifica��es diretas no 8467reposit�rio. � segura, mas tem seus incovenientes. 8468 8469@example 8470# @r{Copy the @sc{rcs} file inside the repository} 8471$ cd $CVSROOT/@var{dir} 8472$ cp @var{old},v @var{new},v 8473# @r{Remove the old file} 8474$ cd ~/@var{dir} 8475$ rm @var{old} 8476$ cvs remove @var{old} 8477$ cvs commit @var{old} 8478# @r{Remove all tags from @var{new}} 8479$ cvs update @var{new} 8480$ cvs log @var{new} # @r{Remember the non-branch tag names} 8481$ cvs tag -d @var{tag1} @var{new} 8482$ cvs tag -d @var{tag2} @var{new} 8483@dots{} 8484@end example 8485 8486@c <en>By removing the tags you will be able to check out old 8487@c <en>revisions. 8488Ao remover as etiquetas voc� vai ser capaz de ???check 8489out??? revis�es antigas. 8490 8491@noindent 8492@c <en>Advantages: 8493Vantagens: 8494 8495@itemize @bullet 8496@item 8497@c FIXME: Is this true about -D now that we have death 8498@c support? See 5B.3 in the FAQ. 8499@c <en>Checking out old revisions works correctly, as long as 8500@c <en>you use @samp{-r@var{tag}} and not @samp{-D@var{date}} 8501@c <en>to retrieve the revisions. 8502O ???check out??? de revis�es antigas funciona corretamente, 8503???as long as??? voc� usa @samp{-r@var{tag}} e n�o 8504@samp{-D@var{date}} para recuperar as revis�es. 8505 8506@item 8507@c <en>The log of changes is maintained intact. 8508O registro (log) de mudan�as � mantido intacto. 8509 8510@item 8511@c <en>The revision numbers are not affected. 8512Os n�meros de revis�o n�o s�o afetados. 8513@end itemize 8514 8515@noindent 8516@c <en>Disadvantages: 8517Desvantagens: 8518 8519@itemize @bullet 8520@item 8521@c <en>You cannot easily see the history of the file across the rename. 8522Voc� n�o pode ver de forma f�cil os hist�rico do 8523arquivo atrav�s das a��es de renomear. 8524 8525@ignore 8526@c Is this true? I don't see how the revision numbers 8527@c _could_ start over, when new,v is just old,v with 8528@c the tags deleted. 8529@c If there is some need to reinstate this text, 8530@c it is "usually 1.1", not "1.0" and it needs an 8531@c xref to Assigning revisions 8532@item 8533@c <en>Unless you use the @samp{-r rev} (@pxref{commit 8534@c <en>options}) flag when @var{new} is committed its revision 8535@c <en>numbers will start at 1.0 again. 8536A menos que voc� use a op��o @samp{-r rev} (@pxref{commit 8537options}) quando o @var{new} for ???committed??? seus 8538n�meros de revis�o v�o sempre recome�ar com 1.0. 8539@end ignore 8540@end itemize 8541 8542@c --------------------------------------------------------------------- 8543@c <en>@node Moving directories 8544@node Movendo diret�rios 8545@c <en>@section Moving and renaming directories 8546@section Movendo e renomeando diret�rios 8547@c <en>@cindex Moving directories 8548@cindex Movendo diret�rios 8549@c <en>@cindex Renaming directories 8550@cindex Renomeando diret�rios 8551@c <en>@cindex Directories, moving 8552@cindex Diret�rios, movendo 8553 8554@c <en>The normal way to rename or move a directory is to 8555@c <en>rename or move each file within it as described in 8556@c <en>@ref{Outside}. Then check out with the @samp{-P} 8557@c <en>option, as described in @ref{Removing directories}. 8558A forma normal de renomear ou mover um diret�rio � 8559renomear ou mover cada arquivo dentro dele como 8560descrito em @ref{Outside}. Ent�o fazer um ???check 8561out??? com a op��o @samp{-P}, como descrito em 8562@ref{Removendo diret�rios}. 8563 8564@c <en>If you really want to hack the repository to rename or 8565@c <en>delete a directory in the repository, you can do it 8566@c <en>like this: 8567Se voc� realmente quer ???to hack??? o reposit�rio para 8568renomear ou apagar um diret�rio no reposit�rio, voc� 8569pode faz�-lo da seguinte forma: 8570 8571@enumerate 8572@item 8573@c <en>Inform everyone who has a checked out copy of the directory that the 8574@c <en>directory will be renamed. They should commit all 8575@c <en>their changes, and remove their working copies, 8576@c <en>before you take the steps below. 8577Avise a todos que fizeram checkout do diret�rio que o 8578diret�rio vai ser renomeado. Eles v�o ter que fazer 8579???commit??? de todas as mudan�as, e remover suas 8580c�pias de trabalho antes que voc� fa�a os passos 8581seguintes. 8582 8583@item 8584@c <en>Rename the directory inside the repository. 8585Renomeie o diret�rio dentro do reposit�rio. 8586 8587@example 8588$ cd $CVSROOT/@var{parent-dir} 8589$ mv @var{old-dir} @var{new-dir} 8590@end example 8591 8592@item 8593@c <en>Fix the @sc{cvs} administrative files, if necessary (for 8594@c <en>instance if you renamed an entire module). 8595Conserte os arquivos administrativos do @sc{cvs}, se 8596necess�rio (por exemplo, se voc� est� renomeando um 8597m�dulo inteiro). 8598 8599@item 8600@c <en>Tell everyone that they can check out again and continue 8601@c <en>working. 8602Diga a todo mundo que eles podem fazer check out 8603novamente e continuar o trabalho. 8604 8605@end enumerate 8606 8607@c <en>If someone had a working copy the @sc{cvs} commands will 8608@c <en>cease to work for him, until he removes the directory 8609@c <en>that disappeared inside the repository. 8610Se algu�m manteve uma c�pia de trabalho, os comandos do 8611@sc{cvs} v�o parar de funcionar para esta pessoa at� 8612que ela remova o diret�rio que desapareceu do reposit�rio. 8613 8614@c <en>It is almost always better to move the files in the 8615@c <en>directory instead of moving the directory. If you move the 8616@c <en>directory you are unlikely to be able to retrieve old 8617@c <en>releases correctly, since they probably depend on the 8618@c <en>name of the directories. 8619Na maioria das vezes � melhor mover os arquivos do 8620diret�rio ao inv�s de mover o diret�rio. Se voc� mover 8621o diret�rio n�o h� garantias de que voc� seja capaz de 8622recuperar releases antigas corretamente, j� que elas 8623dependem provavelmente do nome dos diret�rios. 8624 8625@c --------------------------------------------------------------------- 8626@c <en>@node History browsing 8627@node Navega��o no Hist�rico 8628@c <en>@chapter History browsing 8629@chapter Navega��o no Hist�rico 8630@c <en>@cindex History browsing 8631@cindex Navega��o no Hist�rico 8632@c <en>@cindex Traceability 8633@cindex Rastreabilidade 8634@c <en>@cindex Isolation 8635@cindex Isolamento 8636 8637@ignore 8638@c This is too long for an introduction (goal is 8639@c one 20x80 character screen), and also mixes up a 8640@c variety of issues (parallel development, history, 8641@c maybe even touches on process control). 8642 8643@c -- @quote{To lose ones history is to lose ones soul.} 8644@c -- /// 8645@c -- ///Those who cannot remember the past are condemned to repeat it. 8646@c -- /// -- George Santayana 8647@c -- /// 8648 8649@c <en>@sc{cvs} tries to make it easy for a group of people to work 8650@c <en>together. This is done in two ways: 8651O @sc{cvs} tenta ajudar um grupo a trabalhar junto. 8652Isto � feito de duas formas: 8653 8654@itemize @bullet 8655@item 8656@c <en>Isolation---You have your own working copy of the 8657@c <en>source. You are not affected by modifications made by 8658@c <en>others until you decide to incorporate those changes 8659@c <en>(via the @code{update} command---@pxref{update}). 8660Isolamento---Voc� tem a sua pr�pria c�pia de trabalho 8661dos fontes. Voc� n�o � afetado por modifica��es feitas 8662por outros at� que voc� decida incorporar estas 8663modifica��es (atrav�s do comando 8664@code{update}---@pxref{update}). 8665 8666@item 8667@c <en>Traceability---When something has changed, you can 8668@c <en>always see @emph{exactly} what changed. 8669Rastreabilidade---Quando alguma coisa mudou, voc� pode 8670ver @emph{exatamente} o que mudou. 8671@end itemize 8672 8673@c <en>There are several features of @sc{cvs} that together lead 8674@c <en>to traceability: 8675Existem v�rias caracter�sticas do @sc{cvs} que juntas 8676possibilitam a rastreabilidade: 8677 8678@itemize @bullet 8679@item 8680@c <en>Each revision of a file has an accompanying log 8681@c <en>message. 8682Each revision of a file has an accompanying log 8683message. 8684 8685@item 8686@c <en>All commits are optionally logged to a central history 8687@c <en>database. 8688All commits are optionally logged to a central history 8689database. 8690 8691@item 8692@c <en>Logging information can be sent to a user-defined 8693@c <en>program (@pxref{loginfo}). 8694Logging information can be sent to a user-defined 8695program (@pxref{loginfo}). 8696@end itemize 8697 8698@c -- More text here. 8699 8700@c <en>This chapter should talk about the history file, the 8701@c <en>@code{log} command, the usefulness of ChangeLogs 8702@c <en>even when you run @sc{cvs}, and things like that. 8703This chapter should talk about the history file, the 8704@code{log} command, the usefulness of ChangeLogs 8705even when you run @sc{cvs}, and things like that. 8706 8707@end ignore 8708 8709@c kind of lame, in a lot of ways the above text inside 8710@c the @ignore motivates this chapter better 8711@c <en>Once you have used @sc{cvs} to store a version control 8712@c <en>history---what files have changed when, how, and by 8713@c <en>whom, there are a variety of mechanisms for looking 8714@c <en>through the history. 8715Uma vez usando o @sc{cvs} para guardar um hist�rico do 8716controle de vers�es---que arquivos foram mudandos, 8717quando, como e por quem, existe uma variedade de 8718mecanismos para procurar ao longo do hist�rico. 8719 8720@c FIXME: should also be talking about how you look at 8721@c old revisions (e.g. "cvs update -p -r 1.2 foo.c"). 8722@menu 8723@c <en>* log messages:: Log messages 8724* mensagens de registro:: Mensagens de registro (log) 8725@c <en>* history database:: The history database 8726* history database:: The history database 8727@c <en>* user-defined logging:: User-defined logging 8728* user-defined logging:: User-defined logging 8729@c <en>* annotate:: What revision modified each line of a file? 8730* annotate:: Que revis�o modificou cada linha de um arquivo? 8731@end menu 8732 8733@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8734@c <en>@node log messages 8735@node mensagens de registro 8736@c <en>@section Log messages 8737@section Mensagens de registro (log) 8738 8739@c FIXME: @xref to place where we talk about how to 8740@c specify message to commit. 8741@c <en>Whenever you commit a file you specify a log message. 8742Sempre que voc� ???commit??? um arquivo voc� especifica 8743uma mensagem de registro (log). 8744 8745@c FIXME: bring the information here, and get rid of or 8746@c greatly shrink the "log" node. 8747@c <en>To look through the log messages which have been 8748@c <en>specified for every revision which has been committed, 8749@c <en>use the @code{cvs log} command (@pxref{log}). 8750Para ver todas as mensagens de registro que foram 8751especificadas para cada revis�o que foi 8752???committed???, use o comando @code{cvs log} 8753(@pxref{log}). 8754 8755@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8756@c <en>@node history database 8757@node history database 8758@c <en>@section The history database 8759@section The history database 8760 8761@c FIXME: bring the information from the history file 8762@c and history nodes here. Rewrite it to be motivated 8763@c better (start out by clearly explaining what gets 8764@c logged in history, for example). 8765@c <en>You can use the history file (@pxref{history file}) to 8766@c <en>log various @sc{cvs} actions. To retrieve the 8767@c <en>information from the history file, use the @code{cvs 8768@c <en>history} command (@pxref{history}). 8769Voc� pode usar o arquivo history (@pxref{arquivo 8770history (hist�rico)}) para registrar v�rias a��es do @sc{cvs}. 8771Para recuperar a informa��o do arquivo history, use o 8772comando @code{cvs history} (@pxref{history}). 8773 8774@c <en>Note: you can control what is logged to this file by using the 8775@c <en>@samp{LogHistory} keyword in the @file{CVSROOT/config} file 8776@c <en>(@pxref{config}). 8777Observa��o: voc� pode controlar o que vai ser 8778registrado neste arquivo usando a palavra-chave 8779@samp{LogHistory} no arquivo @file{CVSROOT/config} 8780(@pxref{config}). 8781 8782@c 8783@c The history database has many problems: 8784@c * It is very unclear what field means what. This 8785@c could be improved greatly by better documentation, 8786@c but there are still non-orthogonalities (for 8787@c example, tag does not record the "repository" 8788@c field but most records do). 8789@c * Confusion about files, directories, and modules. 8790@c Some commands record one, some record others. 8791@c * File removal is not logged. There is an 'R' 8792@c record type documented, but CVS never uses it. 8793@c * Tags are only logged for the "cvs rtag" command, 8794@c not "cvs tag". The fix for this is not completely 8795@c clear (see above about modules vs. files). 8796@c * Are there other cases of operations that are not 8797@c logged? One would hope for all changes to the 8798@c repository to be logged somehow (particularly 8799@c operations like tagging, "cvs admin -k", and other 8800@c operations which do not record a history that one 8801@c can get with "cvs log"). Operations on the working 8802@c directory, like export, get, and release, are a 8803@c second category also covered by the current "cvs 8804@c history". 8805@c * The history file does not record the options given 8806@c to a command. The most serious manifestation of 8807@c this is perhaps that it doesn't record whether a command 8808@c was recursive. It is not clear to me whether one 8809@c wants to log at a level very close to the command 8810@c line, as a sort of way of logging each command 8811@c (more or less), or whether one wants 8812@c to log more at the level of what was changed (or 8813@c something in between), but either way the current 8814@c information has pretty big gaps. 8815@c * Further details about a tag--like whether it is a 8816@c branch tag or, if a non-branch tag, which branch it 8817@c is on. One can find out this information about the 8818@c tag as it exists _now_, but if the tag has been 8819@c moved, one doesn't know what it was like at the time 8820@c the history record was written. 8821@c * Whether operating on a particular tag, date, or 8822@c options was implicit (sticky) or explicit. 8823@c 8824@c Another item, only somewhat related to the above, is a 8825@c way to control what is logged in the history file. 8826@c This is probably the only good way to handle 8827@c different people having different ideas about 8828@c information/space tradeoffs. 8829@c 8830@c It isn't really clear that it makes sense to try to 8831@c patch up the history file format as it exists now to 8832@c include all that stuff. It might be better to 8833@c design a whole new CVSROOT/nhistory file and "cvs 8834@c nhistory" command, or some such, or in some other 8835@c way trying to come up with a clean break from the 8836@c past, which can address the above concerns. Another 8837@c open question is how/whether this relates to 8838@c taginfo/loginfo/etc. 8839 8840@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8841@c <en>@node user-defined logging 8842@node user-defined logging 8843@c <en>@section User-defined logging 8844@section User-defined logging 8845 8846@c FIXME: should probably also mention the fact the -l 8847@c global option can disable most of the mechanisms 8848@c discussed here (why? What is the -l global option for?). 8849@c 8850@c FIXME: probably should centralize this information 8851@c here, at least to some extent. Maybe by moving the 8852@c loginfo, etc., nodes here and replacing 8853@c the "user-defined logging" node with one node for 8854@c each method. 8855@c <en>You can customize @sc{cvs} to log various kinds of 8856@c <en>actions, in whatever manner you choose. These 8857@c <en>mechanisms operate by executing a script at various 8858@c <en>times. The script might append a message to a file 8859@c <en>listing the information and the programmer who created 8860@c <en>it, or send mail to a group of developers, or, perhaps, 8861@c <en>post a message to a particular newsgroup. To log 8862@c <en>commits, use the @file{loginfo} file (@pxref{loginfo}). 8863@c <en>To log tags, use the @file{taginfo} file (@pxref{taginfo}). 8864Voc� pode personalizar o @sc{cvs} para registrar v�rios 8865tipos de a��o, da forma que voc� escolher. Estes 8866mecanismos operam executando um script v�rias vezes. O 8867script deve anexar uma mensagem a um arquivo que lista 8868as informa��es e o programador que as criou, ou mandar 8869um e-mail para um grupo de desenvolvedores, ou, talvez, 8870mandar uma mensagem para um newsgroup em particular. 8871Para registrar os commits, usar o arquivo 8872@file{loginfo} (@pxref{loginfo}). Para registrar 8873etiquetamentos, use o comando @file{taginfo} 8874(@pxref{taginfo}). 8875@c FIXME: What is difference between doing it in the 8876@c modules file and using loginfo/taginfo? Why should 8877@c user use one or the other? 8878@c <en>To log commits, checkouts, exports, and tags, 8879@c <en>respectively, you can also use the @samp{-i}, 8880@c <en>@samp{-o}, @samp{-e}, and @samp{-t} options in the 8881@c <en>modules file. For a more flexible way of giving 8882@c <en>notifications to various users, which requires less in 8883@c <en>the way of keeping centralized scripts up to date, use 8884@c <en>the @code{cvs watch add} command (@pxref{Getting 8885@c <en>Notified}); this command is useful even if you are not 8886@c <en>using @code{cvs watch on}. 8887Para registrar ???commits???, ???checkouts???, 8888exporta��es, e etiquetagens, voc� pode 8889usar, respectivamente, as op��es @samp{-i}, @samp{-o}, 8890@samp{-e} e @samp{-t} no arquivo modules. Para uma 8891forma mais flex�vel de notificar v�rios usu�rios, ???which requires less in 8892the way of??? manter scripts centralizados atualizados, 8893use o comando @code{cvs watch add} (@pxref{Recebendo 8894Notifica��es}); este comando � �til mesmo se voc� n�o 8895estiver usando @code{cvs watch on}. 8896 8897@c <en>@node annotate 8898@node annotate 8899@c <en>@section Annotate command 8900@section O comando annotate 8901@c <en>@cindex annotate (subcommand) 8902@cindex annotate (subcomando) 8903 8904@c <en>@deffn Command {cvs annotate} [@code{-FflR}] [@code{-r rev}|@code{-D date}] files @dots{} 8905@deffn Comando {cvs annotate} [@code{-FflR}] [@code{-r revis�o}|@code{-D data}] arquivos @dots{} 8906 8907@c <en>For each file in @var{files}, print the head revision 8908@c <en>of the trunk, together with information on the last 8909@c <en>modification for each line. For example: 8910Para cada arquivo em @var{arquivos}, imprime a revis�o no topo 8911 do tronco, junto com informa��es a respeito 8912da �ltima modifica��o em cada linha. Por exemplo: 8913 8914@example 8915$ cvs annotate ssfile 8916Annotations for ssfile 8917*************** 89181.1 (mary 27-Mar-96): ssfile line 1 89191.2 (joe 28-Mar-96): ssfile line 2 8920@end example 8921 8922@c <en>The file @file{ssfile} currently contains two lines. 8923@c <en>The @code{ssfile line 1} line was checked in by 8924@c <en>@code{mary} on March 27. Then, on March 28, @code{joe} 8925@c <en>added a line @code{ssfile line 2}, without modifying 8926@c <en>the @code{ssfile line 1} line. This report doesn't 8927@c <en>tell you anything about lines which have been deleted 8928@c <en>or replaced; you need to use @code{cvs diff} for that 8929@c <en>(@pxref{diff}). 8930O arquivo @file{ssfile} atualmente cont�m duas 8931linhas. A @code{linha 1 de ssfile} foi submetida por 8932@code{mary} em March 27 (27 de mar�o). Ent�o, em March 893328 (28 de mar�o), @code{joe} adicionou a 8934@code{linha 2 de ssfile}, sem modificar a 8935@code{linha 1 de ssfile}. Este relat�rio n�o te diz nada a 8936respeito de linhas que foram deletadas ou substitu�das; 8937Voc� precisa usar o @code{cvs diff} para isto 8938(@pxref{diff}). 8939 8940@end deffn 8941 8942@c <en>The options to @code{cvs annotate} are listed in 8943@c <en>@ref{Invoking CVS}, and can be used to select the files 8944@c <en>and revisions to annotate. The options are described 8945@c <en>in more detail there and in @ref{Common options}. 8946As op��es para o @code{cvs annotate} s�o listadas em 8947@ref{Chamando o CVS} e podem ser usadas para selecionar 8948os arquivos e revis�es para o annotate. As op��es 8949s�o descritas com mais detalhes l� e em @ref{Op��es comuns}. 8950 8951@c FIXME: maybe an example using the options? Just 8952@c what it means to select a revision might be worth a 8953@c few words of explanation ("you want to see who 8954@c changed this line *before* 1.4"...). 8955 8956@c --------------------------------------------------------------------- 8957@c <en>@node Binary files 8958@node Arquivos bin�rios 8959@c <en>@chapter Handling binary files 8960@chapter Manipulando arquivos bin�rios 8961@c <en>@cindex Binary files 8962@cindex Arquivos bin�rios 8963 8964@c <en>The most common use for @sc{cvs} is to store text 8965@c <en>files. With text files, @sc{cvs} can merge revisions, 8966@c <en>display the differences between revisions in a 8967@c <en>human-visible fashion, and other such operations. 8968@c <en>However, if you are willing to give up a few of these 8969@c <en>abilities, @sc{cvs} can store binary files. For 8970@c <en>example, one might store a web site in @sc{cvs} 8971@c <en>including both text files and binary images. 8972O @sc{cvs} � usado normalmente para guardar arquivos 8973texto. Com arquivos texto o @sc{cvs} pode mesclar 8974revis�es, mostrar diferen�as entre revis�es de uma 8975forma leg�vel para humanos, e outras opera��es do 8976tipo. Entretanto, se voc� est� disposto a abrir m�o de 8977algumas destas habilidades, o @sc{cvs} pode guardar 8978arquivos bin�rios. Por exemplo, pode-se guardar um 8979site no @sc{cvs} incluindo tanto os arquivos texto 8980quanto as imagens em bin�rio. 8981 8982@menu 8983@c <en>* Binary why:: More details on issues with binary files 8984* Binary why:: Mais detalhes no que concerne a arquivos bin�rios 8985@c <en>* Binary howto:: How to store them 8986* Binary howto:: Como guard�-los 8987@end menu 8988 8989@c <en>@node Binary why 8990@node Binary why 8991@c <en>@section The issues with binary files 8992@section The issues with binary files 8993 8994@c <en>While the need to manage binary files may seem obvious 8995@c <en>if the files that you customarily work with are binary, 8996@c <en>putting them into version control does present some 8997@c <en>additional issues. 8998???While??? a necessidade de armazenar arquivos 8999bin�rios se mostra �bvia se os arquivos com os quais 9000voc� normalmente trabalha s�o bin�rios, bot�-los 9001dentro do controle de vers�es requer alguns cuidados 9002adicionais. 9003 9004@c <en>One basic function of version control is to show the 9005@c <en>differences between two revisions. For example, if 9006@c <en>someone else checked in a new version of a file, you 9007@c <en>may wish to look at what they changed and determine 9008@c <en>whether their changes are good. For text files, 9009@c <en>@sc{cvs} provides this functionality via the @code{cvs 9010@c <en>diff} command. For binary files, it may be possible to 9011@c <en>extract the two revisions and then compare them with a 9012@c <en>tool external to @sc{cvs} (for example, word processing 9013@c <en>software often has such a feature). If there is no 9014@c <en>such tool, one must track changes via other mechanisms, 9015@c <en>such as urging people to write good log messages, and 9016@c <en>hoping that the changes they actually made were the 9017@c <en>changes that they intended to make. 9018Uma habilidade b�sica de um controle de vers�es � mostrar 9019as diferen�as entre duas revis�es. Por exemplo, se 9020outra pessoa submete (check in) uma nova vers�o de um 9021arquivo, voc� pode querer ver o que foi mudado e 9022determinar quais destas mudan�as foram boas. Para 9023arquivos texto, o @sc{cvs} oferece esta funcionalidade 9024atrav�s do comando @code{cvs diff}. Para arquivos 9025bin�rios, existe uma chance de extrair as duas 9026revis�es e ent�o compar�-las com uma ferramenta externa 9027ao @sc{cvs} (por exemplo, alguns processadores de texto 9028t�m esta habilidade). Se n�o existe tal ferramenta, � 9029poss�vel rastrear mudan�as por outros meios, como por 9030exemplo convencendo as pessoas a escreverem boas 9031mensagens de registro (log), e torcendo para que as 9032mudan�as que eles realmente fizeram foram as que eles 9033tinham inten��o de fazer. 9034 9035@c <en>Another ability of a version control system is the 9036@c <en>ability to merge two revisions. For @sc{cvs} this 9037@c <en>happens in two contexts. The first is when users make 9038@c <en>changes in separate working directories 9039@c <en>(@pxref{Multiple developers}). The second is when one 9040@c <en>merges explicitly with the @samp{update -j} command 9041@c <en>(@pxref{Branching and merging}). 9042Outra habilidade de um sistema de controle de vers�es � 9043a capacidade de mesclar duas revis�es. No @sc{cvs} 9044isto acontece em dois contextos. O primeiro � quando 9045os usu�riso fazem mudan�as em diret�rios de trabalho 9046separados (@pxref{M�ltiplos desenvolvedores}). A 9047segunda � quando algu�m mescla explicitamente com o 9048comando @samp{update -j} (@pxref{Ramificando e mesclando}). 9049 9050@c <en>In the case of text 9051@c <en>files, @sc{cvs} can merge changes made independently, 9052@c <en>and signal a conflict if the changes conflict. With 9053@c <en>binary files, the best that @sc{cvs} can do is present 9054@c <en>the two different copies of the file, and leave it to 9055@c <en>the user to resolve the conflict. The user may choose 9056@c <en>one copy or the other, or may run an external merge 9057@c <en>tool which knows about that particular file format, if 9058@c <en>one exists. 9059@c <en>Note that having the user merge relies primarily on the 9060@c <en>user to not accidentally omit some changes, and thus is 9061@c <en>potentially error prone. 9062No caso de arquivos texto, o @sc{cvs} pode mesclar 9063mudan�as feitas independentemente, e avisar sobre um 9064conflito se as mudan�as conflitarem. Com arquivos 9065bin�rios, o melhor que o @sc{cvs} pode fazer � 9066fornecer as duas c�pias diferentes do arquivo, e deixar 9067a cargo do usu�rio a resolu��o do conflito. O usu�rio 9068pode escolher uma c�pia ou a outra, ou pode rodar uma 9069ferramenta externa de mesclagem que entenda aquele 9070formato de arquivo em particular, se � que tal 9071ferramenta exista. Observe que mesclagem feita pelo 9072usu�rio se baseia no fato de o usu�rio n�o omitir 9073acidentalmente algumas mudan�as, e portanto � sujeita a erros. 9074 9075@c <en>If this process is thought to be undesirable, the best 9076@c <en>choice may be to avoid merging. To avoid the merges 9077@c <en>that result from separate working directories, see the 9078@c <en>discussion of reserved checkouts (file locking) in 9079@c <en>@ref{Multiple developers}. To avoid the merges 9080@c <en>resulting from branches, restrict use of branches. 9081Se voc� acha que este processo � indesej�vel, a melhor 9082escolha � evitar mesclagem. Para evitar mesclagens 9083resultantes de diret�rios de trabalho separados, veja a 9084discuss�o a respeito de ???reserved checkouts??? (travas 9085de arquivo) em @ref{M�ltiplos desenvolvedores}. Para 9086ecitar mesclagens resultantes de ramifica��es, 9087restrinja o uso de ramos. 9088 9089@c <en>@node Binary howto 9090@node Binary howto 9091@c <en>@section How to store binary files 9092@section Como guardar arquivos bin�rios 9093 9094@c <en>There are two issues with using @sc{cvs} to store 9095@c <en>binary files. The first is that @sc{cvs} by default 9096@c <en>converts line endings between the canonical form in 9097@c <en>which they are stored in the repository (linefeed 9098@c <en>only), and the form appropriate to the operating system 9099@c <en>in use on the client (for example, carriage return 9100@c <en>followed by line feed for Windows NT). 9101Existem dois aspectos a considerar quando se usa o 9102@sc{cvs} para guardar arquivos bin�rios. O primeiro � 9103que o @sc{cvs}, por padr�o, converte quebras de linhas 9104entre a forma can�nica na qual elas s�o guardadas no 9105reposit�rio (apenas ???linefeed???), e a forma 9106apropriada para o sistema operacional no qual o cliente 9107� usado (por exemplo, carriage return (retorno do 9108carro) seguido por line feed (alimenta��o de linha) 9109para o Windows NT). 9110 9111@c <en>The second is that a binary file might happen to 9112@c <en>contain data which looks like a keyword (@pxref{Keyword 9113@c <en>substitution}), so keyword expansion must be turned 9114@c <en>off. 9115O segundo aspecto � que um arquivo bin�rio pode conter 9116dados que se pare�am com uma palavra-chave 9117(@pxref{Substitui��o de palavra-chave}). Logo, a 9118expans�o de palavra-chave deve ser desativada. 9119 9120@c FIXME: the third is that one can't do merges with 9121@c binary files. xref to Multiple Developers and the 9122@c reserved checkout issues. 9123 9124@c <en>The @samp{-kb} option available with some @sc{cvs} 9125@c <en>commands insures that neither line ending conversion 9126@c <en>nor keyword expansion will be done. 9127A op��o @samp{-kb} dispon�vel com alguns comandos do 9128@sc{cvs} garante que nem convers�o de termina��o de 9129linha nem expans�o de palavra-chave sejam usadas. 9130 9131@c <en>Here is an example of how you can create a new file 9132@c <en>using the @samp{-kb} flag: 9133Aqui est� um exemplo de como voc� pode criar um novo 9134arquivo usando a op��o @samp{-kb}: 9135 9136@example 9137$ echo '$@splitrcskeyword{}Id$' > kotest 9138$ cvs add -kb -m"A test file" kotest 9139$ cvs ci -m"First checkin; contains a keyword" kotest 9140@end example 9141 9142@c <en>If a file accidentally gets added without @samp{-kb}, 9143@c <en>one can use the @code{cvs admin} command to recover. 9144@c <en>For example: 9145Se um arquivo for acidentalmente adicionado sem o 9146@samp{-kb}, � poss�vel usar o comando @code{cvs admin} 9147para reverter. Por exemplo: 9148 9149@example 9150$ echo '$@splitrcskeyword{}Id$' > kotest 9151$ cvs add -m"A test file" kotest 9152$ cvs ci -m"First checkin; contains a keyword" kotest 9153$ cvs admin -kb kotest 9154$ cvs update -A kotest 9155# @r{For non-unix systems:} 9156# @r{Copy in a good copy of the file from outside CVS} 9157$ cvs commit -m "make it binary" kotest 9158@end example 9159 9160@c Trying to describe this for both unix and non-unix 9161@c in the same description is very confusing. Might 9162@c want to split the two, or just ditch the unix "shortcut" 9163@c (unixheads don't do much with binary files, anyway). 9164@c This used to say "(Try the above example, and do a 9165@c @code{cat kotest} after every command)". But that 9166@c only really makes sense for the unix case. 9167@c <en>When you check in the file @file{kotest} the file is 9168@c <en>not preserved as a binary file, because you did not 9169@c <en>check it in as a binary file. The @code{cvs 9170@c <en>admin -kb} command sets the default keyword 9171@c <en>substitution method for this file, but it does not 9172@c <en>alter the working copy of the file that you have. If you need to 9173@c <en>cope with line endings (that is, you are using 9174@c <en>@sc{cvs} on a non-unix system), then you need to 9175@c <en>check in a new copy of the file, as shown by the 9176@c <en>@code{cvs commit} command above. 9177@c <en>On unix, the @code{cvs update -A} command suffices. 9178Quando voc� submete o arquivo @file{kotest} o arquivo 9179n�o � mantido como um arquivo bin�rio, por que voc� n�o 9180o submeteu como arquivo bin�rio. O comando @code{cvs 9181admin -kb} ajusta o m�todo de substitui��o da 9182palavra-chave padr�o para este arquivo, mas n�o altera 9183a c�pia de trabalho que voc� tem. Se voc� tem que 9184lidar com termina��es de linha (ou seja, voc� est� usando 9185o @sc{cvs} em um sistema n�o-unix), ent�o voc� precisa 9186submeter uma nova c�pia do arquivo, como mostrado no comando 9187@code{cvs commit} acima. No unix, o comando @code{cvs 9188update -A} basta. 9189@c FIXME: should also describe what the *other users* 9190@c need to do, if they have checked out copies which 9191@c have been corrupted by lack of -kb. I think maybe 9192@c "cvs update -kb" or "cvs 9193@c update -A" would suffice, although the user who 9194@c reported this suggested removing the file, manually 9195@c removing it from CVS/Entries, and then "cvs update" 9196@c <en>(Note that you can use @code{cvs log} to determine the default keyword 9197@c <en>substitution method for a file and @code{cvs status} to determine 9198@c <en>the keyword substitution method for a working copy.) 9199(Note que voc� pode usar o @code{cvs log} para 9200determinar o m�tido de substitui��o de palavra-chave 9201padr�o para um arquivo e @code{cvs status} para 9202determinar o m�todo de substitui��o de palavra-chave 9203para uma c�pia de trabalho.) 9204 9205@c <en>However, in using @code{cvs admin -k} to change the 9206@c <en>keyword expansion, be aware that the keyword expansion 9207@c <en>mode is not version controlled. This means that, for 9208@c <en>example, that if you have a text file in old releases, 9209@c <en>and a binary file with the same name in new releases, 9210@c <en>@sc{cvs} provides no way to check out the file in text 9211@c <en>or binary mode depending on what version you are 9212@c <en>checking out. There is no good workaround for this 9213@c <en>problem. 9214Entretanto, ao usar @code{cvs admin -k} para mudar a 9215expans�o de palavra-chave, esteja atento para o fato de 9216que o modo de expans�o de palavra-chave n�o tem 9217controle de vers�o. Isto significa que, por exemplo, 9218se voc� tem um arquivo texto em vers�es antigas, e um 9219arquivo bin�rio com o mesmo nome em novos releases, 9220o @sc{cvs} n�o fornece uma forma de obter o arquivo em 9221formato texto, ou bin�rio, dependendo da vers�o que 9222voc� estpa pegando. N�o existe uma boa solu��o 9223alternativa para este problema. 9224 9225@c <en>You can also set a default for whether @code{cvs add} 9226@c <en>and @code{cvs import} treat a file as binary based on 9227@c <en>its name; for example you could say that files who 9228@c <en>names end in @samp{.exe} are binary. @xref{Wrappers}. 9229@c <en>There is currently no way to have @sc{cvs} detect 9230@c <en>whether a file is binary based on its contents. The 9231@c <en>main difficulty with designing such a feature is that 9232@c <en>it is not clear how to distinguish between binary and 9233@c <en>non-binary files, and the rules to apply would vary 9234@c <en>considerably with the operating system. 9235Voc� tamb�m pode ajustar um padr�o para quando o 9236@code{cvs add} e o @code{cvs import} tratarem um 9237arquivo como bin�rio de acordo como o seu nome; por 9238exemplo, voc� pode dizer que arquivos cujos nomes 9239terminem com @samp{.exe} s�o bin�rio. @xref{Wrappers}. 9240N�o existe atualmente uma forma de fazer o @sc{cvs} 9241detectar quando um arquivo � bin�rio baseado em seu 9242conte�do. A dificuldade principal em fazer isto � que 9243n�o � claro como se faz para distinguir entre arquivos 9244bin�rios e n�o-bin�rios, e as regras para serem 9245aplicadas variam consideravelmente com o sistema 9246operacional. 9247@c For example, it would be good on MS-DOS-family OSes 9248@c for anything containing ^Z to be binary. Having 9249@c characters with the 8th bit set imply binary is almost 9250@c surely a bad idea in the context of ISO-8859-* and 9251@c other such character sets. On VMS or the Mac, we 9252@c could use the OS's file typing. This is a 9253@c commonly-desired feature, and something of this sort 9254@c may make sense. But there are a lot of pitfalls here. 9255@c 9256@c Another, probably better, way to tell is to read the 9257@c file in text mode, write it to a temp file in text 9258@c mode, and then do a binary mode compare of the two 9259@c files. If they differ, it is a binary file. This 9260@c might have problems on VMS (or some other system 9261@c with several different text modes), but in general 9262@c should be relatively portable. The only other 9263@c downside I can think of is that it would be fairly 9264@c slow, but that is perhaps a small price to pay for 9265@c not having your files corrupted. Another issue is 9266@c what happens if you import a text file with bare 9267@c linefeeds on Windows. Such files will show up on 9268@c Windows sometimes (I think some native windows 9269@c programs even write them, on occasion). Perhaps it 9270@c is reasonable to treat such files as binary; after 9271@c all it is something of a presumption to assume that 9272@c the user would want the linefeeds converted to CRLF. 9273 9274@c --------------------------------------------------------------------- 9275@c <en>@node Multiple developers 9276@node M�ltiplos desenvolvedores 9277@c <en>@chapter Multiple developers 9278@chapter M�ltiplos desenvolvedores 9279@c <en>@cindex Multiple developers 9280@cindex M�ltiplos desenvolvedores 9281@c <en>@cindex Team of developers 9282@cindex Team of developers 9283@c <en>@cindex File locking 9284@cindex File locking 9285@c <en>@cindex Locking files 9286@cindex Locking files 9287@c <en>@cindex Working copy 9288@cindex Working copy 9289@c <en>@cindex Reserved checkouts 9290@cindex Reserved checkouts 9291@c <en>@cindex Unreserved checkouts 9292@cindex checkouts n�o-reservados 9293@c <en>@cindex RCS-style locking 9294@cindex RCS-style locking 9295 9296@c <en>When more than one person works on a software project 9297@c <en>things often get complicated. Often, two people try to 9298@c <en>edit the same file simultaneously. One solution, known 9299@c <en>as @dfn{file locking} or @dfn{reserved checkouts}, is 9300@c <en>to allow only one person to edit each file at a time. 9301@c <en>This is the only solution with some version control 9302@c <en>systems, including @sc{rcs} and @sc{sccs}. Currently 9303@c <en>the usual way to get reserved checkouts with @sc{cvs} 9304@c <en>is the @code{cvs admin -l} command (@pxref{admin 9305@c <en>options}). This is not as nicely integrated into 9306@c <en>@sc{cvs} as the watch features, described below, but it 9307@c <en>seems that most people with a need for reserved 9308@c <en>checkouts find it adequate. 9309Quando mais de uma pessoa trabalham em um projeto de 9310software freq�entemente surgem complica��es. �s vezes 9311duas pessoas tentam editar o mesmo arquivo 9312simultaneamente. Uma solu��o, conhecida como 9313@dfn{trava de arquivo} ou @dfn{???checkout??? 9314reservado}, � permitir, para cada arquivo, que apenas 9315uma pessoa por vez edite o arquivo. Esta � a �nica 9316solu��o em alguns sistemas de controle de vers�o, 9317incluindo @sc{rcs} e @sc{sccs}. Atualmente, a forma 9318normal de se ter ???checkouts??? reservados com o @sc{cvs} 9319� com o comando @code{cvs admin -l} (@pxref{admin 9320options}). Isto n�o � t�o integrado com o @sc{cvs} 9321quanto a habilidade de ???watch???, descrita abaixo, 9322mas vemos que a maioria das pessoas que necessitam de 9323???checkouts??? reservados acham isto adequado. 9324@c Or "find it better than worrying about implementing 9325@c nicely integrated reserved checkouts" or ...? 9326@c <en>It also may be possible to use the watches 9327@c <en>features described below, together with suitable 9328@c <en>procedures (not enforced by software), to avoid having 9329@c <en>two people edit at the same time. 9330Tamb�m � poss�vel usar a habilidade de trabalhar com 9331descrita a seguir, junto com alguns procedimentos 9332adequados (que o sotware n�o obriga), para evitar que 9333duas pessoas editem o mesmo arquivo ao mesmo tempo. 9334 9335@c Our unreserved checkout model might not 9336@c be quite the same as others. For example, I 9337@c think that some systems will tend to create a branch 9338@c in the case where CVS prints "up-to-date check failed". 9339@c It isn't clear to me whether we should try to 9340@c explore these subtleties; it could easily just 9341@c confuse people. 9342@c <en>The default model with @sc{cvs} is known as 9343@c <en>@dfn{unreserved checkouts}. In this model, developers 9344@c <en>can edit their own @dfn{working copy} of a file 9345@c <en>simultaneously. The first person that commits his 9346@c <en>changes has no automatic way of knowing that another 9347@c <en>has started to edit it. Others will get an error 9348@c <en>message when they try to commit the file. They must 9349@c <en>then use @sc{cvs} commands to bring their working copy 9350@c <en>up to date with the repository revision. This process 9351@c <en>is almost automatic. 9352O modelo padr�o no @sc{cvs} � conhecido como 9353@dfn{???checkouts??? n�o-reservados}. Neste modelo, os 9354desenvolvedores podem editar sua pr�pria @dfn{c�pia de 9355trabalho} de um arquivo simultaneamente. A primeira 9356pessoa que ???commits??? suas mudan�as n�o tem uma 9357forma autom�tica de saber que outra pessoa come�ou a 9358editar o mesmo arquivo. Os outros v�o receber uma 9359mensagem de erro quando tentarem ???commit??? o 9360arquivo. Eles ent�o ter�o que usar comandos do 9361@sc{cvs} para tornar sua c�pia local atualizada em 9362rela��o � revis�o no reposit�rio. Este processo � 9363quase autom�tico. 9364 9365@c FIXME? should probably use the word "watch" here, to 9366@c tie this into the text below and above. 9367@c <en>@sc{cvs} also supports mechanisms which facilitate 9368@c <en>various kinds of communication, without actually 9369@c <en>enforcing rules like reserved checkouts do. 9370O @sc{cvs} tamb�m d� suporte a mecanismos que facilitam 9371v�rias formas de comunica��o, sem regras realmente 9372obrigat�rias como acontece com os ???checkouts??? reservados. 9373 9374@c <en>The rest of this chapter describes how these various 9375@c <en>models work, and some of the issues involved in 9376@c <en>choosing between them. 9377O restante deste cap�tulo descreve como estes v�rios 9378modelos funcionam, e alguns dos aspectos envolvidos na 9379hora de escolher entre eles. 9380 9381@ignore 9382@c <en>Here is a draft reserved checkout design or discussion 9383@c <en>of the issues. This seems like as good a place as any 9384@c <en>for this. 9385Here is a draft reserved checkout design or discussion 9386of the issues. This seems like as good a place as any 9387for this. 9388 9389@c <en>Might want a cvs lock/cvs unlock--in which the names 9390@c <en>differ from edit/unedit because the network must be up 9391@c <en>for these to work. unedit gives an error if there is a 9392@c <en>reserved checkout in place (so that people don't 9393@c <en>accidentally leave locks around); unlock gives an error 9394@c <en>if one is not in place (this is more arguable; perhaps 9395@c <en>it should act like unedit in that case). 9396Might want a cvs lock/cvs unlock--in which the names 9397differ from edit/unedit because the network must be up 9398for these to work. unedit gives an error if there is a 9399reserved checkout in place (so that people don't 9400accidentally leave locks around); unlock gives an error 9401if one is not in place (this is more arguable; perhaps 9402it should act like unedit in that case). 9403 9404@c <en>On the other hand, might want it so that emacs, 9405@c <en>scripts, etc., can get ready to edit a file without 9406@c <en>having to know which model is in use. In that case we 9407@c <en>would have a "cvs watch lock" (or .cvsrc?) (that is, 9408@c <en>three settings, "on", "off", and "lock"). Having cvs 9409@c <en>watch lock set would cause a get to record in the CVS 9410@c <en>directory which model is in use, and cause "cvs edit" 9411@c <en>to change behaviors. We'd want a way to query which 9412@c <en>setting is in effect (this would be handy even if it is 9413@c <en>only "on" or "off" as presently). If lock is in 9414@c <en>effect, then commit would require a lock before 9415@c <en>allowing a checkin; chmod wouldn't suffice (might be 9416@c <en>debatable--see chmod comment below, in watches--but it 9417@c <en>is the way people expect RCS to work and I can't think 9418@c <en>of any significant downside. On the other hand, maybe 9419@c <en>it isn't worth bothering, because people who are used 9420@c <en>to RCS wouldn't think to use chmod anyway). 9421On the other hand, might want it so that emacs, 9422scripts, etc., can get ready to edit a file without 9423having to know which model is in use. In that case we 9424would have a "cvs watch lock" (or .cvsrc?) (that is, 9425three settings, "on", "off", and "lock"). Having cvs 9426watch lock set would cause a get to record in the CVS 9427directory which model is in use, and cause "cvs edit" 9428to change behaviors. We'd want a way to query which 9429setting is in effect (this would be handy even if it is 9430only "on" or "off" as presently). If lock is in 9431effect, then commit would require a lock before 9432allowing a checkin; chmod wouldn't suffice (might be 9433debatable--see chmod comment below, in watches--but it 9434is the way people expect RCS to work and I can't think 9435of any significant downside. On the other hand, maybe 9436it isn't worth bothering, because people who are used 9437to RCS wouldn't think to use chmod anyway). 9438 9439@c <en>Implementation: use file attributes or use RCS 9440@c <en>locking. The former avoids more dependence on RCS 9441@c <en>behaviors we will need to reimplement as we librarify 9442@c <en>RCS, and makes it easier to import/export RCS files (in 9443@c <en>that context, want to ignore the locker field). But 9444@c <en>note that RCS locks are per-branch, which is the 9445@c <en>correct behavior (this is also an issue for the "watch 9446@c <en>on" features; they should be per-branch too). 9447Implementation: use file attributes or use RCS 9448locking. The former avoids more dependence on RCS 9449behaviors we will need to reimplement as we librarify 9450RCS, and makes it easier to import/export RCS files (in 9451that context, want to ignore the locker field). But 9452note that RCS locks are per-branch, which is the 9453correct behavior (this is also an issue for the "watch 9454on" features; they should be per-branch too). 9455 9456@c <en>Here are a few more random notes about implementation 9457@c <en>details, assuming "cvs watch lock" and 9458Here are a few more random notes about implementation 9459details, assuming "cvs watch lock" and 9460 9461@c <en>CVS/Watched file? Or try to fit this into CVS/Entries somehow? 9462@c <en>Cases: (1) file is checked out (unreserved or with watch on) by old 9463@c <en>version of @sc{cvs}, now we do something with new one, (2) file is checked 9464@c <en>out by new version, now we do something with old one. 9465CVS/Watched file? Or try to fit this into CVS/Entries somehow? 9466Cases: (1) file is checked out (n�o-reservado or with watch on) by old 9467version of @sc{cvs}, now we do something with new one, (2) file is checked 9468out by new version, now we do something with old one. 9469 9470@c <en>Remote protocol would have a "Watched" analogous to "Mode". Of course 9471@c <en>it would apply to all Updated-like requests. How do we keep this 9472@c <en>setting up to date? I guess that there wants to be a Watched request, 9473@c <en>and the server would send a new one if it isn't up to date? (Ugh--hard 9474@c <en>to implement and slows down "cvs -q update"--is there an easier way?) 9475Remote protocol would have a "Watched" analogous to "Mode". Of course 9476it would apply to all Updated-like requests. How do we keep this 9477setting up to date? I guess that there wants to be a Watched request, 9478and the server would send a new one if it isn't up to date? (Ugh--hard 9479to implement and slows down "cvs -q update"--is there an easier way?) 9480 9481@c <en>"cvs edit"--checks CVS/Watched, and if watch lock, then sends 9482@c <en>"edit-lock" request. Which comes back with a Checked-in with 9483@c <en>appropriate Watched (off, on, lock, locked, or some such?), or error 9484@c <en>message if already locked. 9485"cvs edit"--checks CVS/Watched, and if watch lock, then sends 9486"edit-lock" request. Which comes back with a Checked-in with 9487appropriate Watched (off, on, lock, locked, or some such?), or error 9488message if already locked. 9489 9490@c <en>"cvs commit"--only will commit if off/on/locked. lock is not OK. 9491"cvs commit"--only will commit if off/on/locked. lock is not OK. 9492 9493@c <en>Doc: 9494@c <en>note that "cvs edit" must be connected to network if watch lock is in 9495@c <en>effect. 9496Doc: 9497note that "cvs edit" must be connected to network if watch lock is in 9498effect. 9499 9500@c <en>Talk about what to do if someone has locked a file and you want to 9501@c <en>edit that file. (breaking locks, or lack thereof). 9502Talk about what to do if someone has locked a file and you want to 9503edit that file. (breaking locks, or lack thereof). 9504 9505 9506@c <en>One other idea (which could work along with the 9507@c <en>existing "cvs admin -l" reserved checkouts, as well as 9508@c <en>the above): 9509One other idea (which could work along with the 9510existing "cvs admin -l" reserved checkouts, as well as 9511the above): 9512 9513@c <en>"cvs editors" could show who has the file locked, if 9514@c <en>someone does. 9515"cvs editors" could show who has the file locked, if 9516someone does. 9517 9518@end ignore 9519 9520@menu 9521@c <en>* File status:: A file can be in several states 9522* Estado de arquivo:: Um arquivo pode ter v�rios estados 9523@c <en>* Updating a file:: Bringing a file up-to-date 9524* Atualizando um arquivo:: Deixando um arquivo atualizado 9525@c <en>* Conflicts example:: An informative example 9526* Exemplo de conflitos:: Um exemplo informativo 9527@c <en>* Informing others:: To cooperate you must inform 9528* Informando os outros:: Para cooperar voc� deve informar 9529@c <en>* Concurrency:: Simultaneous repository access 9530* Concorr�ncia:: Acesso simult�neo ao reposit�rio 9531@c <en>* Watches:: Mechanisms to track who is editing files 9532* ???Watches???:: Mecanismos para rastrear quem est� editando arquivos 9533@c <en>* Choosing a model:: Reserved or unreserved checkouts? 9534* Escolhendo um modelo:: ???checkout??? reservado ou n�o-reservado? 9535@end menu 9536 9537@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9538@c <en>@node File status 9539@node Estado de arquivo 9540@c <en>@section File status 9541@section Estado de arquivo 9542@c <en>@cindex File status 9543@cindex Estado de arquivo 9544@c <en>@cindex Status of a file 9545@cindex Estado de um arquivo 9546 9547@c Shouldn't this start with an example or something, 9548@c introducing the unreserved checkout model? Before we 9549@c dive into listing states? 9550@c <en>Based on what operations you have performed on a 9551@c <en>checked out file, and what operations others have 9552@c <en>performed to that file in the repository, one can 9553@c <en>classify a file in a number of states. The states, as 9554@c <en>reported by the @code{status} command, are: 9555Baseado em quais opera��es voc� realizou num arquivo 9556???checked out???, e quais opera��es outros realizaram 9557neste arquivo no reposit�rio, podemos classificar o 9558arquivo em v�rios estados. Os estados, como s�o 9559mostrados pelo comando @code{status}, s�o: 9560 9561@c The order of items is chosen to group logically 9562@c similar outputs together. 9563@c People who want alphabetical can use the index... 9564@table @asis 9565@c <en>@cindex Up-to-date 9566@cindex Up-to-date (Atualizado) 9567@c <en>@item Up-to-date 9568@item Up-to-date (Atualizado) 9569@c <en>The file is identical with the latest revision in the 9570@c <en>repository for the branch in use. 9571O arquivo � identico � �ltima revis�o no reposit�rio, 9572para o ramo em quest�o. 9573@c FIXME: should we clarify "in use"? The answer is 9574@c sticky tags, and trying to distinguish branch sticky 9575@c tags from non-branch sticky tags seems rather awkward 9576@c here. 9577@c FIXME: What happens with non-branch sticky tags? Is 9578@c a stuck file "Up-to-date" or "Needs checkout" or what? 9579 9580@c <en>@item Locally Modified 9581@item Locally Modified (Modificado localmente) 9582@c <en>@cindex Locally Modified 9583@cindex Locally Modified (Modificado localmente) 9584@c <en>You have edited the file, and not yet committed your changes. 9585Voc� alterou o arquivo, e ainda n�o ???committed??? 9586suas mudan�as. 9587 9588@c <en>@item Locally Added 9589@item Locally Added (Adicionado localmente) 9590@c <en>@cindex Locally Added 9591@cindex Locally Added (Adicionado localmente) 9592@c <en>You have added the file with @code{add}, and not yet 9593@c <en>committed your changes. 9594Voc� adicionou o arquivo com @code{add}, e ainda n�o 9595???committed??? suas mudan�as. 9596@c There are many cases involving the file being 9597@c added/removed/modified in the working directory, and 9598@c added/removed/modified in the repository, which we 9599@c don't try to describe here. I'm not sure that "cvs 9600@c status" produces a non-confusing output in most of 9601@c those cases. 9602 9603@c <en>@item Locally Removed 9604@item Locally Removed (Removido localmente) 9605@c <en>@cindex Locally Removed 9606@cindex Locally Removed (Removido localmente) 9607@c <en>You have removed the file with @code{remove}, and not yet 9608@c <en>committed your changes. 9609Voc� removeu o arquivo com @code{remove}, e ainda n�o 9610???committed??? suas mudan�as. 9611 9612@c <en>@item Needs Checkout 9613@item Needs Checkout (Precisa de ???checkout???) 9614@c <en>@cindex Needs Checkout 9615@cindex Needs Checkout (Precisa de ???checkout???) 9616@c <en>Someone else has committed a newer revision to the 9617@c <en>repository. The name is slightly misleading; you will 9618@c <en>ordinarily use @code{update} rather than 9619@c <en>@code{checkout} to get that newer revision. 9620Algu�m ???committed??? uma revis�o nova no reposit�rio. 9621O nome est� um pouco confuso; voc� normalmente vai usar 9622@code{update} ao inv�s de @code{checkout} para obter a 9623nova revis�o. 9624 9625@c <en>@item Needs Patch 9626@item Needs Patch (Precisa de ???patch???) 9627@c <en>@cindex Needs Patch 9628@cindex Needs Patch (Precisa de ???patch???) 9629@c See also newb-123j0 in sanity.sh (although that case 9630@c should probably be changed rather than documented). 9631@c <en>Like Needs Checkout, but the @sc{cvs} server will send 9632@c <en>a patch rather than the entire file. Sending a patch or 9633@c <en>sending an entire file accomplishes the same thing. 9634Igual a 'Needs Checkout', mas o servidor do @sc{cvs} 9635vai mandar um ???patch??? ao inv�s de um arquivo 9636inteiro. Mandar um ???patch??? ou um arquivo inteiro 9637d� no mesmo. 9638 9639@c <en>@item Needs Merge 9640@item Needs Merge (Precisa mesclar) 9641@c <en>@cindex Needs Merge 9642@cindex Needs Merge (Precisa mesclar) 9643@c <en>Someone else has committed a newer revision to the repository, and you 9644@c <en>have also made modifications to the file. 9645Outra pessoa ???committed??? uma nova revis�o no 9646reposit�rio, e voc� fez modifica��es no arquivo. 9647 9648@c <en>@item Unresolved Conflict 9649@item Unresolved Conflict (Conflito n�o-solucionado) 9650@c <en>@cindex Unresolved Conflict 9651@cindex Unresolved Conflict (Conflito n�o-solucionado) 9652@c FIXCVS - This file status needs to be changed to some more informative 9653@c text that distinguishes it more clearly from each of the Locally Added, 9654@c File had conflicts on merge, and Unknown status types, but an exact and 9655@c succinct wording escapes me at the moment. 9656@c <en>A file with the same name as this new file has been added to the repository 9657@c <en>from a second workspace. This file will need to be moved out of the way 9658@c <en>to allow an @code{update} to complete. 9659Um arquivo com o mesmo nome deste arquivo novo foi 9660adicionado ao reposit�rio a partir de outra �rea de 9661trabalho. Este arquivo vai ter que ser movido para que 9662n�o atrapalhe um @code{update} de completar. 9663 9664@c <en>@item File had conflicts on merge 9665@item File had conflicts on merge (Arquivo teve conflitos na mescla) 9666@c <en>@cindex File had conflicts on merge 9667@cindex File had conflicts on merge (Arquivo teve conflitos na mescla) 9668@c is it worth saying that this message was "Unresolved 9669@c Conflict" in CVS 1.9 and earlier? I'm inclined to 9670@c think that is unnecessarily confusing to new users. 9671@c <en>This is like Locally Modified, except that a previous 9672@c <en>@code{update} command gave a conflict. If you have not 9673@c <en>already done so, you need to 9674@c <en>resolve the conflict as described in @ref{Conflicts example}. 9675Isto � parecido com 'Locally Modified', com a diferen�a que o comando 9676@code{update} anterior produziu um conflito. Se voc� 9677ainda n�o o fez, precisa resolver o conflito, como � 9678descrito em @ref{Exemplo de conflitos}. 9679 9680@c <en>@item Unknown 9681@item Unknown (Desconhecido) 9682@c <en>@cindex Unknown 9683@cindex Unknown (Desconhecido) 9684@c <en>@sc{cvs} doesn't know anything about this file. For 9685@c <en>example, you have created a new file and have not run 9686@c <en>@code{add}. 9687O @sc{cvs} n�o sabe nada a respeito deste arquivo. Por 9688exemplo, voc� criou um novo arquivo e n�o rodou um 9689@code{add}. 9690@c 9691@c "Entry Invalid" and "Classify Error" are also in the 9692@c status.c. The latter definitely indicates a CVS bug 9693@c (should it be worded more like "internal error" so 9694@c people submit bug reports if they see it?). The former 9695@c I'm not as sure; I haven't tracked down whether/when it 9696@c appears in "cvs status" output. 9697 9698@end table 9699 9700@c <en>To help clarify the file status, @code{status} also 9701@c <en>reports the @code{Working revision} which is the 9702@c <en>revision that the file in the working directory derives 9703@c <en>from, and the @code{Repository revision} which is the 9704@c <en>latest revision in the repository for the branch in 9705@c <en>use. 9706Para facilitar o entendimento do estado do arquivo, o 9707comando @code{status} tamb�m relata a @code{revis�o de 9708trabalho}, que � a revis�o da qual o arquivo no 9709diret�rio de trabalho deriva, e a @code{Revis�o de 9710reposit�rio} que � a mais recente revis�o no 9711reposit�rio, para o ramo em uso. 9712@c FIXME: should we clarify "in use"? The answer is 9713@c sticky tags, and trying to distinguish branch sticky 9714@c tags from non-branch sticky tags seems rather awkward 9715@c here. 9716@c FIXME: What happens with non-branch sticky tags? 9717@c What is the Repository Revision there? See the 9718@c comment at vn_rcs in cvs.h, which is kind of 9719@c confused--we really need to document better what this 9720@c field contains. 9721@c Q: Should we document "New file!" and other such 9722@c outputs or are they self-explanatory? 9723@c FIXME: what about the date to the right of "Working 9724@c revision"? It doesn't appear with client/server and 9725@c seems unnecessary (redundant with "ls -l") so 9726@c perhaps it should be removed for non-client/server too? 9727@c FIXME: Need some examples. 9728@c FIXME: Working revision can also be something like 9729@c "-1.3" for a locally removed file. Not at all 9730@c self-explanatory (and it is possible that CVS should 9731@c be changed rather than documenting this). 9732 9733@c Would be nice to have an @example showing output 9734@c from cvs status, with comments showing the xref 9735@c where each part of the output is described. This 9736@c might fit in nicely if it is desirable to split this 9737@c node in two; one to introduce "cvs status" and one 9738@c to list each of the states. 9739@c <en>The options to @code{status} are listed in 9740@c <en>@ref{Invoking CVS}. For information on its @code{Sticky tag} 9741@c <en>and @code{Sticky date} output, see @ref{Sticky tags}. 9742@c <en>For information on its @code{Sticky options} output, 9743@c <en>see the @samp{-k} option in @ref{update options}. 9744As op��es para o comando @code{status} s�o listadas em 9745@ref{Chamando o CVS}. Para informa��es sobre suas 9746sa�das @code{Sticky tag (Etiqueta adesiva)} e 9747@code{Sticky date (data adesiva)} veja em 9748@ref{Etiquetas adesivas}. Para informa��es na sa�da 9749@code{Sticky options (Op��es adesivas)}, veja a 9750op��o @samp{-k} em @ref{update options}. 9751 9752@c <en>You can think of the @code{status} and @code{update} 9753@c <en>commands as somewhat complementary. You use 9754@c <en>@code{update} to bring your files up to date, and you 9755@c <en>can use @code{status} to give you some idea of what an 9756@c <en>@code{update} would do (of course, the state of the 9757@c <en>repository might change before you actually run 9758@c <en>@code{update}). In fact, if you want a command to 9759@c <en>display file status in a more brief format than is 9760@c <en>displayed by the @code{status} command, you can invoke 9761Voc� pode pensar nos comandos @code{status} e 9762@code{update} como complementares. Voc� usa o 9763@code{update} para atualizar seus arquivos, e voc� pode 9764usar o @code{status} para ter id�ia do que um 9765@code{update} deve fazer (obviamente, o estado do 9766reposit�rio pode mudar depois que voc� rodar o 9767@code{update}). De fato, se voc� quiser um comando 9768para mostrar o estado de arquivos num formato mais 9769conciso do que o comando @code{status} mostra, voc� 9770pode invocar 9771 9772@c <en>@cindex update, to display file status 9773@cindex update, para mostrar o estado dos arquivos 9774@example 9775$ cvs -n -q update 9776@end example 9777 9778@c <en>The @samp{-n} option means to not actually do the 9779@c <en>update, but merely to display statuses; the @samp{-q} 9780@c <en>option avoids printing the name of each directory. For 9781@c <en>more information on the @code{update} command, and 9782@c <en>these options, see @ref{Invoking CVS}. 9783A op��o @samp{-n} significa fingir que faz a 9784atualiza��o, mas simplesmente mostrar o estado; a op��o 9785@samp{-q} suprime a exibi��o do nome de cada 9786diret�rio. Para mais informa��es sobre o comando 9787@code{update}, e op��es, veja em @ref{Chamando o CVS}. 9788 9789@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9790@c <en>@node Updating a file 9791@node Atualizando um arquivo 9792@c <en>@section Bringing a file up to date 9793@section Deixando um arquivo atualizado 9794@c <en>@cindex Bringing a file up to date 9795@cindex Deixando um arquivo atualizado 9796@c <en>@cindex Updating a file 9797@cindex Atualizando um arquivo 9798@c <en>@cindex Merging a file 9799@cindex Mesclando um arquivo 9800@c <en>@cindex Update, introduction 9801@cindex Update, introdu��o 9802 9803@c <en>When you want to update or merge a file, use the @code{update} 9804@c <en>command. For files that are not up to date this is roughly equivalent 9805@c <en>to a @code{checkout} command: the newest revision of the file is 9806@c <en>extracted from the repository and put in your working directory. 9807Quando voc� quiser atualizar ou mesclar um arquivo, use o 9808comando @code{update}. Para arquivos que n�o est�o 9809atualizados isto � mais ou menos equivalente ao comando 9810@code{checkout}: a revis�o mais nova do arquivo � 9811extra�da do reposit�rio e posta no diret�rio de trabalho. 9812 9813@c <en>Your modifications to a file are never lost when you 9814@c <en>use @code{update}. If no newer revision exists, 9815@c <en>running @code{update} has no effect. If you have 9816@c <en>edited the file, and a newer revision is available, 9817@c <en>@sc{cvs} will merge all changes into your working copy. 9818Suas modifica��es num arquivo nunca s�o perdidas quando 9819voc� usa @code{update}. Se n�o existe uma revis�o mais 9820nova, o @code{update} n�o faz nada. Se voc� 9821editou o arquivo, e uma nova revis�o est� dispon�vel, o 9822@sc{cvs} vai mesclar todas as altera��es na sua c�pia 9823de trabalho. 9824 9825@c <en>For instance, imagine that you checked out revision 1.4 and started 9826@c <en>editing it. In the meantime someone else committed revision 1.5, and 9827@c <en>shortly after that revision 1.6. If you run @code{update} on the file 9828@c <en>now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into 9829@c <en>your file. 9830Por exemplo, imagine que voc� ???checked out??? a 9831revis�o 1.4 e come�ou a edit�-la. Enquanto isto, outra 9832pessoa ???committed??? a revis�o 1.5, e logo depois a 9833revis�o 1.6. Se voc� rodar @code{update} no arquivo 9834agora, o @sc{cvs} vai incorporar todas as mudan�as 9835entre a revis�o 1.4 e 1.6 no seu arquivo. 9836 9837@c <en>@cindex Overlap 9838@cindex Sobreposi��o 9839@c <en>If any of the changes between 1.4 and 1.6 were made too 9840@c <en>close to any of the changes you have made, an 9841@c <en>@dfn{overlap} occurs. In such cases a warning is 9842@c <en>printed, and the resulting file includes both 9843@c <en>versions of the lines that overlap, delimited by 9844@c <en>special markers. 9845@c <en>@xref{update}, for a complete description of the 9846@c <en>@code{update} command. 9847Se quaisquer das mudan�as entre 1.4 e 1.6 ocorreram 9848suficientemente pr�ximas de quaisquer das suas 9849mudan�as, uma @dfn{sobreposi��o} ocorre. Nestes casos 9850um aviso � mostrado, e o arquivo resultante cont�m 9851ambas as vers�es das linhas que se sobrepuseram, 9852delimitadas por marcadores especiais. @xref{update}, 9853para uma descri��o completa do comando @code{update}. 9854 9855@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 9856@c <en>@node Conflicts example 9857@node Exemplo de conflitos 9858@c <en>@section Conflicts example 9859@section Exemplo de conflitos 9860@c <en>@cindex Merge, an example 9861@cindex Merge, an example 9862@c <en>@cindex Example of merge 9863@cindex Example of merge 9864@c <en>@cindex driver.c (merge example) 9865@cindex driver.c (merge example) 9866 9867@c <en>Suppose revision 1.4 of @file{driver.c} contains this: 9868Suponha que a revis�o 1.4 de @file{driver.c} cont�m isto: 9869 9870@example 9871#include <stdio.h> 9872 9873void main() 9874@{ 9875 parse(); 9876 if (nerr == 0) 9877 gencode(); 9878 else 9879 fprintf(stderr, "No code generated.\n"); 9880 exit(nerr == 0 ? 0 : 1); 9881@} 9882@end example 9883 9884@noindent 9885@c <en>Revision 1.6 of @file{driver.c} contains this: 9886A revis�o 1.6 de @file{driver.c} cont�m isto: 9887 9888@example 9889#include <stdio.h> 9890 9891int main(int argc, 9892 char **argv) 9893@{ 9894 parse(); 9895 if (argc != 1) 9896 @{ 9897 fprintf(stderr, "tc: No args expected.\n"); 9898 exit(1); 9899 @} 9900 if (nerr == 0) 9901 gencode(); 9902 else 9903 fprintf(stderr, "No code generated.\n"); 9904 exit(!!nerr); 9905@} 9906@end example 9907 9908@noindent 9909@c <en>Your working copy of @file{driver.c}, based on revision 9910@c <en>1.4, contains this before you run @samp{cvs update}: 9911@c <en>@c -- Really include "cvs"? 9912Sua c�pia de trabalho de @file{driver.c}, baseada na 9913revis�o 1.4, cont�m isto, antes de voc� rodar um @samp{cvs update}: 9914@c -- Really include "cvs"? 9915 9916@example 9917#include <stdlib.h> 9918#include <stdio.h> 9919 9920void main() 9921@{ 9922 init_scanner(); 9923 parse(); 9924 if (nerr == 0) 9925 gencode(); 9926 else 9927 fprintf(stderr, "No code generated.\n"); 9928 exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); 9929@} 9930@end example 9931 9932@noindent 9933@c <en>You run @samp{cvs update}: 9934@c <en>@c -- Really include "cvs"? 9935Ent�o voc� roda o @samp{cvs update}: 9936@c -- Really include "cvs"? 9937 9938@example 9939$ cvs update driver.c 9940RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v 9941retrieving revision 1.4 9942retrieving revision 1.6 9943Merging differences between 1.4 and 1.6 into driver.c 9944rcsmerge warning: overlaps during merge 9945cvs update: conflicts found in driver.c 9946C driver.c 9947@end example 9948 9949@noindent 9950@c <en>@cindex Conflicts (merge example) 9951@cindex Conflitos (exemplo de mesclagem) 9952@c <en>@sc{cvs} tells you that there were some conflicts. 9953@c <en>Your original working file is saved unmodified in 9954@c <en>@file{.#driver.c.1.4}. The new version of 9955@c <en>@file{driver.c} contains this: 9956O @sc{cvs} disse a voc� que existem conflitos. 9957Seu arquivo de trabalho original � guardado sem 9958modifica��es em @file{.#driver.c.1.4}. A nova vers�o 9959de @file{driver.c} cont�m isto: 9960 9961@example 9962#include <stdlib.h> 9963#include <stdio.h> 9964 9965int main(int argc, 9966 char **argv) 9967@{ 9968 init_scanner(); 9969 parse(); 9970 if (argc != 1) 9971 @{ 9972 fprintf(stderr, "tc: No args expected.\n"); 9973 exit(1); 9974 @} 9975 if (nerr == 0) 9976 gencode(); 9977 else 9978 fprintf(stderr, "No code generated.\n"); 9979@asis{}<<<<<<< driver.c 9980 exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); 9981@asis{}======= 9982 exit(!!nerr); 9983@asis{}>>>>>>> 1.6 9984@} 9985@end example 9986 9987@noindent 9988@c <en>@cindex Markers, conflict 9989@cindex Marcadores, conflito 9990@c <en>@cindex Conflict markers 9991@cindex Marcadores de conflito 9992@c <en>@cindex <<<<<<< 9993@cindex <<<<<<< 9994@c <en>@cindex >>>>>>> 9995@cindex >>>>>>> 9996@c <en>@cindex ======= 9997@cindex ======= 9998 9999@c <en>Note how all non-overlapping modifications are incorporated in your working 10000@c <en>copy, and that the overlapping section is clearly marked with 10001@c <en>@samp{<<<<<<<}, @samp{=======} and @samp{>>>>>>>}. 10002Observe como todas as modifica��es sem sobreposi��o 10003foram incorporadas na sua c�pia de trabalho, e que as 10004se��es com sobreposi��o s�o marcadas de forma clara com 10005@samp{<<<<<<<}, @samp{=======} e @samp{>>>>>>>}. 10006 10007@c <en>@cindex Resolving a conflict 10008@cindex Resolvendo um conflito 10009@c <en>@cindex Conflict resolution 10010@cindex Resolu��o de conflitos 10011@c <en>You resolve the conflict by editing the file, removing the markers and 10012@c <en>the erroneous line. Suppose you end up with this file: 10013@c <en>@c -- Add xref to the pcl-cvs manual when it talks 10014@c <en>@c -- about this. 10015Voc� resolve o conflito editando o arquivo, removendo os 10016marcadores e as linhas erradas. Suponha que voc� ficou 10017com este arquivo: 10018@c -- Add xref to the pcl-cvs manual when it talks 10019@c -- about this. 10020@example 10021#include <stdlib.h> 10022#include <stdio.h> 10023 10024int main(int argc, 10025 char **argv) 10026@{ 10027 init_scanner(); 10028 parse(); 10029 if (argc != 1) 10030 @{ 10031 fprintf(stderr, "tc: No args expected.\n"); 10032 exit(1); 10033 @} 10034 if (nerr == 0) 10035 gencode(); 10036 else 10037 fprintf(stderr, "No code generated.\n"); 10038 exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); 10039@} 10040@end example 10041 10042@noindent 10043@c <en>You can now go ahead and commit this as revision 1.7. 10044Voc� agora pode seguir em frente e ???commit??? ele 10045como a revis�o 1.7. 10046 10047@example 10048$ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c 10049Checking in driver.c; 10050/usr/local/cvsroot/yoyodyne/tc/driver.c,v <-- driver.c 10051new revision: 1.7; previous revision: 1.6 10052done 10053@end example 10054 10055@c <en>For your protection, @sc{cvs} will refuse to check in a 10056@c <en>file if a conflict occurred and you have not resolved 10057@c <en>the conflict. Currently to resolve a conflict, you 10058@c <en>must change the timestamp on the file. In previous 10059@c <en>versions of @sc{cvs}, you also needed to 10060@c <en>insure that the file contains no conflict markers. 10061@c <en>Because 10062@c <en>your file may legitimately contain conflict markers (that 10063@c <en>is, occurrences of @samp{>>>>>>> } at the start of a 10064@c <en>line that don't mark a conflict), the current 10065@c <en>version of @sc{cvs} will print a warning and proceed to 10066@c <en>check in the file. 10067Para sua seguran�a, o @sc{cvs} n�o vai aceitar o check 10068in de um arquivo se um conflito ocorreu e voc� n�o 10069resolveu o conflito. Atualmente, para resolver um 10070conflito, voc� deve mudar a data do arquivo. Em 10071vers�es anteriores do @sc{cvs}, voc� tamb�m precisava 10072ter certeza de que o arquivo n�o continha marcadores de 10073conflito. J� que seu arquivo pode conter marcadores de 10074conflito ???de forma leg�tima??? (isto �, a ocorr�ncia 10075de @samp{>>>>>>> } no come�o de uma linha que n�o marca 10076um conflito), a vers�o atual do @sc{cvs} vai mostrar um 10077aviso e continuar a fazer o ???check in??? do arquivo. 10078@c The old behavior was really icky; the only way out 10079@c was to start hacking on 10080@c the @code{CVS/Entries} file or other such workarounds. 10081@c 10082@c If the timestamp thing isn't considered nice enough, 10083@c maybe there should be a "cvs resolved" command 10084@c which clears the conflict indication. For a nice user 10085@c interface, this should be invoked by an interactive 10086@c merge tool like emerge rather than by the user 10087@c directly--such a tool can verify that the user has 10088@c really dealt with each conflict. 10089 10090@c <en>@cindex emerge 10091@cindex emerge 10092@c <en>If you use release 1.04 or later of pcl-cvs (a @sc{gnu} 10093@c <en>Emacs front-end for @sc{cvs}) you can use an Emacs 10094@c <en>package called emerge to help you resolve conflicts. 10095@c <en>See the documentation for pcl-cvs. 10096Se voc� usa a release 1.04 ou posterior do pcl-cvs (uma 10097interface amig�vel para o @sc{cvs} de dentro do 10098@sc{gnu} Emacs) voc� pode usar um pacote do Emacs 10099chamado emerge para te ajudar a resolver os 10100conflitos. Veja na documenta��o do pcl-cvs. 10101 10102@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10103@c <en>@node Informing others 10104@node Informando os outros 10105@c <en>@section Informing others about commits 10106@section Informando os outros sobre ???commits??? 10107@c <en>@cindex Informing others 10108@cindex Informando os outros 10109@c <en>@cindex Spreading information 10110@cindex Divulgando informa��o 10111@c <en>@cindex Mail, automatic mail on commit 10112@cindex e-mail, mensagens autom�ticas no ???commit??? 10113 10114@c <en>It is often useful to inform others when you commit a 10115@c <en>new revision of a file. The @samp{-i} option of the 10116@c <en>@file{modules} file, or the @file{loginfo} file, can be 10117@c <en>used to automate this process. @xref{modules}. 10118@c <en>@xref{loginfo}. You can use these features of @sc{cvs} 10119@c <en>to, for instance, instruct @sc{cvs} to mail a 10120@c <en>message to all developers, or post a message to a local 10121@c <en>newsgroup. 10122�s vezes � �til informar os outros quando voc� 10123???commit??? uma nova revis�o de um arquivo. A op��o 10124@samp{-i} do arquivo @file{modules}, ou do arquivo 10125@file{loginfo}, pode ser usada para automatizar este 10126processo. @xref{modules}. @xref{loginfo}. Voc� pode 10127usar estas funcionalidades do @sc{cvs} para, por 10128exemplo, instruir o @sc{cvs} a enviar uma mensagem a 10129todos os desenvolvedores, ou enviar uma mensagem para 10130um newsgroup local. 10131@c -- More text would be nice here. 10132 10133@c <en>@node Concurrency 10134@node Concorr�ncia 10135@c <en>@section Several developers simultaneously attempting to run CVS 10136@section V�rios desenvolvedores tentando rodar o CVS simult�neamente 10137 10138@c <en>@cindex Locks, cvs, introduction 10139@cindex Locks, cvs, introdu��o 10140@c For a discussion of *why* CVS creates locks, see 10141@c the comment at the start of src/lock.c 10142@c <en>If several developers try to run @sc{cvs} at the same 10143@c <en>time, one may get the following message: 10144Se v�rios desenvolvedores tentam rodar o @sc{cvs} no 10145mesmo momento, algu�m vai receber esta mensagem: 10146 10147@example 10148[11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo 10149@end example 10150 10151@c <en>@cindex #cvs.rfl, removing 10152@cindex #cvs.rfl, removendo 10153@c <en>@cindex #cvs.wfl, removing 10154@cindex #cvs.wfl, removendo 10155@c <en>@cindex #cvs.lock, removing 10156@cindex #cvs.lock, removendo 10157@c <en>@sc{cvs} will try again every 30 seconds, and either 10158@c <en>continue with the operation or print the message again, 10159@c <en>if it still needs to wait. If a lock seems to stick 10160@c <en>around for an undue amount of time, find the person 10161@c <en>holding the lock and ask them about the cvs command 10162@c <en>they are running. If they aren't running a cvs 10163@c <en>command, look in the repository directory mentioned in 10164@c <en>the message and remove files which they own whose names 10165@c <en>start with @file{#cvs.rfl}, 10166@c <en>@file{#cvs.wfl}, or @file{#cvs.lock}. 10167O @sc{cvs} vai tentar de novo a cada 30 segundos, e vai 10168ou continuar com a opera��o ou mostrar a mensagem de 10169novo, se ainda precisar esperar. Se uma trava (lock) 10170permanece por muito tempo, procure a pessoa que � dona 10171da trava e pergunte que comando do cvs ele est� 10172rodando. Se ele/ela n�o estiver rodando um comando do 10173cvs, procure no diret�rio do reposit�rio que est� 10174referenciado na mensagem e remova os arquivos cujos 10175nomes come�am com @file{#cvs.rfl}, 10176@file{#cvs.wfl}, or @file{#cvs.lock}. 10177 10178@c <en>Note that these locks are to protect @sc{cvs}'s 10179@c <en>internal data structures and have no relationship to 10180@c <en>the word @dfn{lock} in the sense used by 10181@c <en>@sc{rcs}---which refers to reserved checkouts 10182@c <en>(@pxref{Multiple developers}). 10183Observe que estas travas s�o feitas para proteger a 10184estrutura de dados interna do @sc{cvs} e n�o tem 10185rela��o com a palavra @dfn{lock (trava)} no sentido 10186usado pelo @sc{rcs}---que se refere a ???checkouts??? 10187reservados (@pxref{M�ltiplos desenvolvedores}). 10188 10189@c <en>Any number of people can be reading from a given 10190@c <en>repository at a time; only when someone is writing do 10191@c <en>the locks prevent other people from reading or writing. 10192Qualquer quantidade de pessoas pode ler de um 10193reposit�rio num determinado momento; apenas quando 10194algu�m est� gravando � que as travas evitam que outras 10195pessoas leiam ou gravem. 10196 10197@c <en>@cindex Atomic transactions, lack of 10198@cindex Transa��es at�micas, falta de 10199@c <en>@cindex Transactions, atomic, lack of 10200@cindex At�micas, transa��es, falta de 10201@c the following talks about what one might call commit/update 10202@c atomicity. 10203@c Probably also should say something about 10204@c commit/commit atomicity, that is, "An update will 10205@c not get partial versions of more than one commit". 10206@c CVS currently has this property and I guess we can 10207@c make it a documented feature. 10208@c For example one person commits 10209@c a/one.c and b/four.c and another commits a/two.c and 10210@c b/three.c. Then an update cannot get the new a/one.c 10211@c and a/two.c and the old b/four.c and b/three.c. 10212@c <en>One might hope for the following property: 10213Espera-se que a seguinte propriedade valha: 10214 10215@quotation 10216@c <en>If someone commits some changes in one cvs command, 10217@c <en>then an update by someone else will either get all the 10218@c <en>changes, or none of them. 10219Se algu�m ???commits??? algumas mudan�as com um comando 10220cvs, ent�o um ???update??? por outra pessoa vai obter 10221ou todas as mudan�as, ou nenhuma. 10222@end quotation 10223 10224@noindent 10225@c <en>but @sc{cvs} does @emph{not} have this property. For 10226@c <en>example, given the files 10227mas o @sc{cvs} @emph{n�o} tem esta propriedade. Por 10228exemplo, dados os arquivos 10229 10230@example 10231a/one.c 10232a/two.c 10233b/three.c 10234b/four.c 10235@end example 10236 10237@noindent 10238@c <en>if someone runs 10239se algu�m rodar 10240 10241@example 10242cvs ci a/two.c b/three.c 10243@end example 10244 10245@noindent 10246@c <en>and someone else runs @code{cvs update} at the same 10247@c <en>time, the person running @code{update} might get only 10248@c <en>the change to @file{b/three.c} and not the change to 10249@c <en>@file{a/two.c}. 10250e outra pessoa rodar @code{cvs update} no mesmo 10251momento, a pessoa rodando @code{update} pode receber 10252apenas as altera��es feitas em @file{b/three.c} e n�o 10253receber as feitas em @file{a/two.c}. 10254 10255@c <en>@node Watches 10256@node ???Watches??? 10257@c <en>@section Mechanisms to track who is editing files 10258@section Mechanisms to track who is editing files 10259@c <en>@cindex Watches 10260@cindex ???Watches??? 10261 10262@c <en>For many groups, use of @sc{cvs} in its default mode is 10263@c <en>perfectly satisfactory. Users may sometimes go to 10264@c <en>check in a modification only to find that another 10265@c <en>modification has intervened, but they deal with it and 10266@c <en>proceed with their check in. Other groups prefer to be 10267@c <en>able to know who is editing what files, so that if two 10268@c <en>people try to edit the same file they can choose to 10269@c <en>talk about who is doing what when rather than be 10270@c <en>surprised at check in time. The features in this 10271@c <en>section allow such coordination, while retaining the 10272@c <en>ability of two developers to edit the same file at the 10273@c <en>same time. 10274Para muitos grupos, o uso do @sc{cvs} em sua forma 10275padr�o � perfeitamente satisfat�rio. Os usu�rios v�o 10276algumas vezes ???check in??? uma modifica��o e 10277descobrir que outras interven��es foram feitas, mas 10278eles tratam isto e seguem em frente com o ???check 10279in???. Outros grupos preferem ser capazes de saber 10280quem est� editando quais arquivos, de forma que se duas 10281pessoas tentam editar o mesmo arquivo elas podem 10282conversar sobre quem vai editar o que ao inv�s de serem 10283surpreendidos na hora do ???check in???. As 10284funcionalidades nesta se��o permitem tal n�vel de 10285coordena��o, sem abrir m�o da possibilidade de que dois 10286desenvolvedores editem o mesmo arquivo ao mesmo tempo. 10287 10288@c Some people might ask why CVS does not enforce the 10289@c rule on chmod, by requiring a cvs edit before a cvs 10290@c commit. The main reason is that it could always be 10291@c circumvented--one could edit the file, and 10292@c then when ready to check it in, do the cvs edit and put 10293@c in the new contents and do the cvs commit. One 10294@c implementation note: if we _do_ want to have cvs commit 10295@c require a cvs edit, we should store the state on 10296@c whether the cvs edit has occurred in the working 10297@c directory, rather than having the server try to keep 10298@c track of what working directories exist. 10299@c FIXME: should the above discussion be part of the 10300@c manual proper, somewhere, not just in a comment? 10301@c <en>For maximum benefit developers should use @code{cvs 10302@c <en>edit} (not @code{chmod}) to make files read-write to 10303@c <en>edit them, and @code{cvs release} (not @code{rm}) to 10304@c <en>discard a working directory which is no longer in use, 10305@c <en>but @sc{cvs} is not able to enforce this behavior. 10306Para um m�ximo apreveitamento, os desenvolvedores devem 10307usar @code{cvs edit} (e n�o @code{chmod}) para tornar 10308os arquivos com permiss�o de leitura e escrita para 10309edit�-los, e @code{cvs release} (n�o @code{rm}) para 10310descartar um diret�rio de trabalho que n�o est� mais em 10311uso, mas o @sc{cvs} n�o � capaz de obrigar tal 10312comportamento. 10313 10314@c I'm a little dissatisfied with this presentation, 10315@c because "watch on"/"edit"/"editors" are one set of 10316@c functionality, and "watch add"/"watchers" is another 10317@c which is somewhat orthogonal even though they interact in 10318@c various ways. But I think it might be 10319@c confusing to describe them separately (e.g. "watch 10320@c add" with loginfo). I don't know. 10321 10322@menu 10323@c <en>* Setting a watch:: Telling CVS to watch certain files 10324* Ajustando um ???watch???:: Dizendo ao CVS para ???watch??? certos arquivos 10325@c <en>* Getting Notified:: Telling CVS to notify you 10326* Recebendo Notifica��es:: Dizendo ao CVS para te notificar 10327@c <en>* Editing files:: How to edit a file which is being watched 10328* Editando arquivos:: Como editar um arquivo que est� sendo ???watched??? 10329@c <en>* Watch information:: Information about who is watching and editing 10330* Informa��es de ???Watch???:: Informa��es a respeito de quem 10331 est� ???watching??? e quem est� editando 10332@c <en>* Watches Compatibility:: Watches interact poorly with CVS 1.6 or earlier 10333* Compatibilidade de ???Watches???:: ???Watches??? interagem fracamente 10334 com CVS 1.6 ou anteriores 10335@end menu 10336 10337@c <en>@node Setting a watch 10338@node Ajustando um ???watch??? 10339@c <en>@subsection Telling CVS to watch certain files 10340@subsection Dizendo ao CVS para ???watch??? certos arquivos 10341 10342@c <en>To enable the watch features, you first specify that 10343@c <en>certain files are to be watched. 10344Para habilitar a funcionalidade de ???watch???, voc� 10345deve primeiro especificar que certos arquivos devem ser 10346???watched???. 10347 10348@c <en>@cindex watch on (subcommand) 10349@cindex watch on (subcomando) 10350@c <en>@deffn Command {cvs watch on} [@code{-lR}] [@var{files}]@dots{} 10351@deffn Comando {cvs watch on} [@code{-lR}] [@var{arquivos}]@dots{} 10352 10353@c <en>@cindex Read-only files, and watches 10354@cindex Arquivos somente leitura, e ???watches??? 10355@c <en>Specify that developers should run @code{cvs edit} 10356@c <en>before editing @var{files}. @sc{cvs} will create working 10357@c <en>copies of @var{files} read-only, to remind developers 10358@c <en>to run the @code{cvs edit} command before working on 10359@c <en>them. 10360Especifique que os desenvolvedores devem rodar o 10361@code{cvs edit} antes de editar arquivos 10362@var{arquivos}. O @sc{cvs} vai criar c�pias de 10363trabalho dos @var{arquivos} como somente-leitura, para 10364lembrar os desenvolvedores de rodarem o comando 10365@code{cvs edit} antes de trabalhar neles. 10366 10367@c <en>If @var{files} includes the name of a directory, @sc{cvs} 10368@c <en>arranges to watch all files added to the corresponding 10369@c <en>repository directory, and sets a default for files 10370@c <en>added in the future; this allows the user to set 10371@c <en>notification policies on a per-directory basis. The 10372@c <en>contents of the directory are processed recursively, 10373@c <en>unless the @code{-l} option is given. 10374@c <en>The @code{-R} option can be used to force recursion if the @code{-l} 10375@c <en>option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}). 10376Se @var{arquivos} inclui o nome de uma diret�rio, o 10377@sc{cvs} faz ???watch??? em todos os arquivos 10378adicionados ao diret�rio correspondente do reposit�rio, 10379e ajusta um padr�o para arquivos adicionados no futuro; 10380isto permite que o usu�rio ajuste as pol�ticas de 10381notifica��o baseada em diret�rios. O conte�do do 10382diret�rio � processado recursivamente, a menos que a 10383op��o @code{-l} seja dada. A op��o @code{-R} pode ser 10384usada para for�ar recurs�o se a op��o @code{-l} est� 10385ativada em @file{~/.cvsrc} (@pxref{~/.cvsrc}). 10386 10387@c <en>If @var{files} is omitted, it defaults to the current directory. 10388Se @var{arquivos} � omitido, o padr�o � o diret�rio atual. 10389 10390@c <en>@cindex watch off (subcommand) 10391@cindex watch off (subcomando) 10392@end deffn 10393 10394@c <en>@deffn Command {cvs watch off} [@code{-lR}] [@var{files}]@dots{} 10395@deffn Comando {cvs watch off} [@code{-lR}] [@var{arquivos}]@dots{} 10396 10397@c <en>Do not create @var{files} read-only on checkout; thus, 10398@c <en>developers will not be reminded to use @code{cvs edit} 10399@c <en>and @code{cvs unedit}. 10400N�o cria @var{arquivos} somente-leitura no 10401???checkout???; portanto, os desenvolvedores n�o ser�o 10402lembrados de usar @code{cvs edit} e @code{cvs unedit}. 10403@ignore 10404@sc{cvs} will check out @var{files} 10405read-write as usual, unless other permissions override 10406due to the @code{PreservePermissions} option being 10407enabled in the @file{config} administrative file 10408(@pxref{Special Files}, @pxref{config}) 10409@end ignore 10410 10411@c <en>The @var{files} and options are processed as for @code{cvs 10412@c <en>watch on}. 10413Os @var{arquivos} e op��es s�o processados como no 10414@code{cvs watch on}. 10415 10416@end deffn 10417 10418@c <en>@node Getting Notified 10419@node Recebendo Notifica��es 10420@c <en>@subsection Telling CVS to notify you 10421@subsection Dizendo ao CVS para te notificar 10422 10423@c <en>You can tell @sc{cvs} that you want to receive 10424@c <en>notifications about various actions taken on a file. 10425@c <en>You can do this without using @code{cvs watch on} for 10426@c <en>the file, but generally you will want to use @code{cvs 10427@c <en>watch on}, to remind developers to use the @code{cvs edit} 10428@c <en>command. 10429Voc� pode dizer ao @sc{cvs} que voc� quer receber 10430notifica��es sobre v�rias a��es tomadas em um 10431arquivo. Voc� pode fazer isto sem usar o @code{cvs 10432watch on} para o arquivo, mas geralmente voc� vai 10433querer usar @code{cvs watch on}, para lembrar os 10434desenvolvedores de usar o comando @code{cvs edit}. 10435 10436@c <en>@cindex watch add (subcommand) 10437@cindex watch add (subcomando) 10438@c <en>@deffn Command {cvs watch add} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{} 10439@deffn Comando {cvs watch add} [@code{-lR}] [@code{-a} @var{a��o}]@dots{} [@var{arquivos}]@dots{} 10440 10441@c <en>Add the current user to the list of people to receive notification of 10442@c <en>work done on @var{files}. 10443Adiciona o usu�rio atual � lista de pessoas que recebem 10444notifica��es sobre o trabalho feito em @var{arquivos}. 10445 10446@c <en>The @code{-a} option specifies what kinds of events @sc{cvs} should notify 10447@c <en>the user about. @var{action} is one of the following: 10448A op��o @code{-a} especifica quais tipos de eventos o 10449@sc{cvs} deve notificar o usu�rio. @var{a��o} � uma 10450das seguintes: 10451 10452@table @code 10453 10454@c <en>@item edit 10455@item edit 10456@c <en>Another user has applied the @code{cvs edit} command (described 10457@c <en>below) to a watched file. 10458Outro usu�rio executou o comando @code{cvs edit} 10459(descrito abaixo) para um arquivo ???watched???. 10460 10461@c <en>@item commit 10462@item commit 10463@c <en>Another user has committed changes to one of the named @var{files}. 10464Outro usu�rio fez ???commit??? em mudan�as em um dos @var{arquivos}. 10465 10466@c <en>@item unedit 10467@item unedit 10468@c <en>Another user has abandoned editing a file (other than by committing changes). 10469@c <en>They can do this in several ways, by: 10470Outro usu�rio abandonou a edi��o de um arquivo (sem ser 10471por ???committing??? mudan�as). Eles podem fazer isto 10472de v�rias maneiras: 10473 10474@itemize @bullet 10475 10476@item 10477@c <en>applying the @code{cvs unedit} command (described below) to the file 10478rodando o comando @code{cvs unedit} (descrito abaixo) 10479no arquivo 10480 10481@item 10482@c <en>applying the @code{cvs release} command (@pxref{release}) to the file's parent directory 10483@c <en>(or recursively to a directory more than one level up) 10484rodando o comando @code{cvs release} (@pxref{release}) 10485no diret�rio pai do arquivo 10486(ou num diret�rio mais acima recursivamente) 10487 10488@item 10489@c <en>deleting the file and allowing @code{cvs update} to recreate it 10490apagando o arquivo e permitindo que o @code{cvs update} o recrie 10491 10492@end itemize 10493 10494@c <en>@item all 10495@item all 10496@c <en>All of the above. 10497Todos acima. 10498 10499@c <en>@item none 10500@item none 10501@c <en>None of the above. (This is useful with @code{cvs edit}, 10502@c <en>described below.) 10503Nenhum dos acima. (Isto � �til com o @code{cvs edit}, 10504descrito abaixo.) 10505 10506@end table 10507 10508@c <en>The @code{-a} option may appear more than once, or not at all. If 10509@c <en>omitted, the action defaults to @code{all}. 10510A op��o @code{-a} pode aparecer mais de uma vez, ou 10511nenhuma vez. Se n�o aparecer, a a��o padr�o � @code{all}. 10512 10513@c <en>The @var{files} and options are processed as for 10514@c <en>@code{cvs watch on}. 10515Os @var{arquivos} e op��es s�o processados como no 10516@code{cvs watch on}. 10517 10518@end deffn 10519 10520 10521@c <en>@cindex watch remove (subcommand) 10522@cindex watch remove (subcomando) 10523@c <en>@deffn Command {cvs watch remove} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{} 10524@deffn Comando {cvs watch remove} [@code{-lR}] [@code{-a} @var{a��o}]@dots{} [@var{arquivos}]@dots{} 10525 10526@c <en>Remove a notification request established using @code{cvs watch add}; 10527@c <en>the arguments are the same. If the @code{-a} option is present, only 10528@c <en>watches for the specified actions are removed. 10529Remove um pedido de notifica��o posto por um @code{cvs 10530watch add}; Os argumentos s�o os mesmos. Se a op��o 10531@code{-a} est� presente, apenas os ???watches??? para as 10532a��es especificadas s�o removidos. 10533 10534@end deffn 10535 10536@c <en>@cindex notify (admin file) 10537@cindex notify (arquivo administrativo) 10538@c <en>When the conditions exist for notification, @sc{cvs} 10539@c <en>calls the @file{notify} administrative file. Edit 10540@c <en>@file{notify} as one edits the other administrative 10541@c <en>files (@pxref{Intro administrative files}). This 10542@c <en>file follows the usual conventions for administrative 10543@c <en>files (@pxref{syntax}), where each line is a regular 10544@c <en>expression followed by a command to execute. The 10545@c <en>command should contain a single occurrence of @samp{%s} 10546@c <en>which will be replaced by the user to notify; the rest 10547@c <en>of the information regarding the notification will be 10548@c <en>supplied to the command on standard input. The 10549@c <en>standard thing to put in the @code{notify} file is the 10550@c <en>single line: 10551Quando as condi��es existem para a notifica��o, o 10552@sc{cvs} chama o arquivo administrativo @file{notify}. 10553Edite o @file{notify} da mesma forma que se edita os 10554outros arquivos administrativos (@pxref{Intro aos 10555arquivos administrativos}). Este arquivo segue as 10556conven��es usuais para arquivos administrativos 10557(@pxref{syntax}), onde cada linha � uma express�o 10558regular seguida de um comando para executar. O comando 10559pode conter uma �nica ocorr�ncia de @samp{%s} que � 10560substitu�da pelo usu�rio a ser notificado; o resto da 10561informa��o a respeito da notifica��o vai ser fornecida 10562ao comando na entrada padr�o. O padr�o para botar no 10563arquivo @code{notify} � esta �nica linha: 10564 10565@example 10566ALL mail %s -s "CVS notification" 10567@end example 10568 10569@noindent 10570@c <en>This causes users to be notified by electronic mail. 10571Isto faz com que os usu�rios sejam avisados por correio 10572eletr�nico. 10573@c FIXME: should it be this hard to set up this 10574@c behavior (and the result when one fails to do so, 10575@c silent failure to notify, so non-obvious)? Should 10576@c CVS give a warning if no line in notify matches (and 10577@c document the use of "DEFAULT :" for the case where 10578@c skipping the notification is indeed desired)? 10579 10580@c <en>@cindex users (admin file) 10581@cindex users (arquivo administrativo) 10582@c <en>Note that if you set this up in the straightforward 10583@c <en>way, users receive notifications on the server machine. 10584@c <en>One could of course write a @file{notify} script which 10585@c <en>directed notifications elsewhere, but to make this 10586@c <en>easy, @sc{cvs} allows you to associate a notification 10587@c <en>address for each user. To do so create a file 10588@c <en>@file{users} in @file{CVSROOT} with a line for each 10589@c <en>user in the format @var{user}:@var{value}. Then 10590@c <en>instead of passing the name of the user to be notified 10591@c <en>to @file{notify}, @sc{cvs} will pass the @var{value} 10592@c <en>(normally an email address on some other machine). 10593Observe que se voc� ajusta isto na forma que est�, os 10594usu�rios v�o receber as notifica��es na m�quina 10595servidora. Algu�m pode escrever um script 10596@file{notify} que direcione notifica��es para outro 10597lugar, mas para tornar isto f�cil, o @sc{cvs} permite 10598associar um endere�o de notifica��o para cada usu�rio. 10599Para isto crie um arquivo @file{users} em 10600@file{CVSROOT} com uma linha para cada usu�rio no 10601formato @var{usu�rio}:@var{valor}. Ent�o, ao inv�s de 10602passar o nome do usu�rio a ser notificado para 10603@file{notify}, o @sc{cvs} vai passar @var{valor} 10604(normalmente um endere�o de email em alguma outra m�quina). 10605 10606@c <en>@sc{cvs} does not notify you for your own changes. 10607@c <en>Currently this check is done based on whether the user 10608@c <en>name of the person taking the action which triggers 10609@c <en>notification matches the user name of the person 10610@c <en>getting notification. In fact, in general, the watches 10611@c <en>features only track one edit by each user. It probably 10612@c <en>would be more useful if watches tracked each working 10613@c <en>directory separately, so this behavior might be worth 10614@c <en>changing. 10615O @sc{cvs} n�o notifica voc� de suas pr�prias 10616mudan�as. Atualmente esta checagem � feita baseada 10617comparando o nome de usu�rio da pessoa que executou a 10618a��o que disparou a notifica��o com o nome de usu�rio 10619da pessoa sendo notificada. De fato, em geral, as 10620funcionalidades de ???watches??? ???only track one 10621edit??? para cada usu�rio. Seria provavelmente mais 10622�til se ???watches??? ???tracked??? cada diret�rio de 10623trabalho separadamente, logo este comportamento ???might be worth 10624changing???. 10625@c "behavior might be worth changing" is an effort to 10626@c point to future directions while also not promising 10627@c that "they" (as in "why don't they fix CVS to....") 10628@c will do this. 10629@c one implementation issue is identifying whether a 10630@c working directory is same or different. Comparing 10631@c pathnames/hostnames is hopeless, but having the server 10632@c supply a serial number which the client stores in the 10633@c CVS directory as a magic cookie should work. 10634 10635@c <en>@node Editing files 10636@node Editando arquivos 10637@c <en>@subsection How to edit a file which is being watched 10638@subsection Como editar um arquivo que est� sendo ???watched??? 10639 10640@c <en>@cindex Checkout, as term for getting ready to edit 10641@cindex Checkout, as term for getting ready to edit 10642@c <en>Since a file which is being watched is checked out 10643@c <en>read-only, you cannot simply edit it. To make it 10644@c <en>read-write, and inform others that you are planning to 10645@c <en>edit it, use the @code{cvs edit} command. Some systems 10646@c <en>call this a @dfn{checkout}, but @sc{cvs} uses that term 10647@c <en>for obtaining a copy of the sources (@pxref{Getting the 10648@c <en>source}), an operation which those systems call a 10649@c <en>@dfn{get} or a @dfn{fetch}. 10650J� que um arquivo que est� sendo ???watched??? � 10651???checked out??? somente-leitura, voc� n�o pode 10652simplesmente edit�-lo. Para torn�-lo leitura-escrita, 10653e informaar outros que voc� est� planejando edit�-lo, 10654use o comando @code{cvs edit}. Alguns sistemas chamam 10655isto de @dfn{checkout}, mas o @sc{cvs} usa este termo 10656para obter uma c�pia dos fontes (@pxref{Obtendo os 10657fontes}), uma opera��o que estes sistemas chamam de 10658@dfn{get} ou @dfn{fetch}. 10659@c Issue to think about: should we transition CVS 10660@c towards the "get" terminology? "cvs get" is already a 10661@c synonym for "cvs checkout" and that section of the 10662@c manual refers to "Getting the source". If this is 10663@c done, needs to be done gingerly (for example, we should 10664@c still accept "checkout" in .cvsrc files indefinitely 10665@c even if the CVS's messages are changed from "cvs checkout: " 10666@c to "cvs get: "). 10667@c There is a concern about whether "get" is not as 10668@c good for novices because it is a more general term 10669@c than "checkout" (and thus arguably harder to assign 10670@c a technical meaning for). 10671 10672@c <en>@cindex edit (subcommand) 10673@cindex edit (subcomando) 10674@c <en>@deffn Command {cvs edit} [@code{-lR}] [@code{-a} @var{action}]@dots{} [@var{files}]@dots{} 10675@deffn Comando {cvs edit} [@code{-lR}] [@code{-a} @var{a��o}]@dots{} [@var{arquivos}]@dots{} 10676 10677@c <en>Prepare to edit the working files @var{files}. @sc{cvs} makes the 10678@c <en>@var{files} read-write, and notifies users who have requested 10679@c <en>@code{edit} notification for any of @var{files}. 10680Prepara para serem editados os @var{files} do diret�rio 10681de trabalho. O @sc{cvs} faz os @var{arquivos} 10682leitura-escrita, e notifica os usu�rios que pediram 10683notifica��o de @code{edit} para quaisquer dos @var{arquivos}. 10684 10685@c <en>The @code{cvs edit} command accepts the same options as the 10686@c <en>@code{cvs watch add} command, and establishes a temporary watch for the 10687@c <en>user on @var{files}; @sc{cvs} will remove the watch when @var{files} are 10688@c <en>@code{unedit}ed or @code{commit}ted. If the user does not wish to 10689@c <en>receive notifications, she should specify @code{-a none}. 10690O comando @code{cvs edit} acita as mesmas op��es que o 10691comando @code{cvs watch add}, e estabelece um 10692???watch??? tempor�rio para o usu�rio nos 10693@var{arquivos}; @sc{cvs} vai remover o ???watch??? quando @var{arquivos} forem 10694@code{unedit}ados ou @code{commit}ados (argh!!!, 10695''commitados'' � horr�vel). Se o usu�rio n�o deseja 10696receber notifica��es, deve especificar @code{-a none}. 10697 10698@c <en>The @var{files} and the options are processed as for the @code{cvs 10699@c <en>watch} commands. 10700Os @var{arquivos} e as op��es s�o processadas como nos comandos @code{cvs 10701watch}. 10702 10703@ignore 10704@strong{Caution: If the @code{PreservePermissions} 10705option is enabled in the repository (@pxref{config}), 10706@sc{cvs} will not change the permissions on any of the 10707@var{files}. The reason for this change is to ensure 10708that using @samp{cvs edit} does not interfere with the 10709ability to store file permissions in the @sc{cvs} 10710repository.} 10711@end ignore 10712 10713@end deffn 10714 10715@c <en>Normally when you are done with a set of changes, you 10716@c <en>use the @code{cvs commit} command, which checks in your 10717@c <en>changes and returns the watched files to their usual 10718@c <en>read-only state. But if you instead decide to abandon 10719@c <en>your changes, or not to make any changes, you can use 10720@c <en>the @code{cvs unedit} command. 10721Normalmente quando voc� termina com um conjunto de 10722mudan�as, voc� usa o comando @code{cvs commit}, que 10723???checks in??? suas mudan�as e retorna os arquivos 10724???watched??? a seus estados usuais de somente-leitura. 10725Mas se voc� ao inv�s disto decide abandonar suas 10726mudan�as, ou n�o fazer nenhuma mudan�a, voc� pode usar 10727o comando @code{cvs unedit}. 10728 10729@c <en>@cindex unedit (subcommand) 10730@cindex unedit (subcomando) 10731@c <en>@cindex Abandoning work 10732@cindex Abandonando o trabalho 10733@c <en>@cindex Reverting to repository version 10734@cindex Revertendo para a vers�o do reposit�rio 10735@c <en>@deffn Command {cvs unedit} [@code{-lR}] [@var{files}]@dots{} 10736@deffn Comando {cvs unedit} [@code{-lR}] [@var{arquivos}]@dots{} 10737 10738@c <en>Abandon work on the working files @var{files}, and revert them to the 10739@c <en>repository versions on which they are based. @sc{cvs} makes those 10740@c <en>@var{files} read-only for which users have requested notification using 10741@c <en>@code{cvs watch on}. @sc{cvs} notifies users who have requested @code{unedit} 10742@c <en>notification for any of @var{files}. 10743Abandona o trabalho nos @var{arquivos} no diret�rio de 10744tabalho, e reverte eles �s vers�es do reposit�rio nas 10745quais eles foram baseados. O @sc{cvs} faz estes 10746@var{arquivos} somente-leitura ???for which users have 10747requested notification??? usando @code{cvs watch on}. 10748@sc{cvs} notifica os usu�rios que pediram notifica��es 10749do tipo @code{unedit} para quaisquer dos @var{arquivos}. 10750 10751@c <en>The @var{files} and options are processed as for the 10752@c <en>@code{cvs watch} commands. 10753Os @var{arquivos} e op��es s�o processados como nos comandos 10754@code{cvs watch}. 10755 10756@c <en>If watches are not in use, the @code{unedit} command 10757@c <en>probably does not work, and the way to revert to the 10758@c <en>repository version is with the command @code{cvs update -C file} 10759@c <en>(@pxref{update}). 10760@c <en>The meaning is 10761@c <en>not precisely the same; the latter may also 10762@c <en>bring in some changes which have been made in the 10763@c <en>repository since the last time you updated. 10764Se ???watches??? n�o est�o em uso, o comando 10765@code{unedit} provavelmente n�o vai fazer nada, e a 10766forma de reverter � vers�o do reposit�rio � com o 10767comando @code{cvs update -C arquivo} (@pxref{update}). 10768O significado n�o � exatamente o mesmo; a �ltima forma 10769pode tamb�m trazer algumas mudan�as que foram feitas no 10770reposit�rio desde a �ltima vez que voc� atualizou (fez 10771update). 10772@c It would be a useful enhancement to CVS to make 10773@c unedit work in the non-watch case as well. 10774@end deffn 10775 10776@c <en>When using client/server @sc{cvs}, you can use the 10777@c <en>@code{cvs edit} and @code{cvs unedit} commands even if 10778@c <en>@sc{cvs} is unable to successfully communicate with the 10779@c <en>server; the notifications will be sent upon the next 10780@c <en>successful @sc{cvs} command. 10781Quando usando o @sc{cvs} como cliente/servidor, voc� 10782pode usar os comandos @code{cvs edit} e @code{cvs 10783unedit} mesmo se o @sc{cvs} � incapaz de estabelecer 10784comunica��o com o servidor; as notifica��es v�o ser 10785mandadas junto com o pr�ximo comando bem sucedido do 10786@sc{cvs}. 10787 10788@c <en>@node Watch information 10789@node Informa��es de ???Watch??? 10790@c <en>@subsection Information about who is watching and editing 10791@subsection Informa��es sobre quem est� ???watching??? e editando 10792 10793@c <en>@cindex watchers (subcommand) 10794@cindex watchers (subcomando) 10795@c <en>@deffn Command {cvs watchers} [@code{-lR}] [@var{files}]@dots{} 10796@deffn Comando {cvs watchers} [@code{-lR}] [@var{arquivos}]@dots{} 10797 10798@c <en>List the users currently watching changes to @var{files}. The report 10799@c <en>includes the files being watched, and the mail address of each watcher. 10800Lista os usu�rios que est�o atualmente ???watching??? 10801mudan�as em @var{arquivos}. O relat�rio inclui os 10802arquivos sendo ???watched???, e o endere�o de e-mail de 10803cada ???watcher???. 10804 10805@c <en>The @var{files} and options are processed as for the 10806@c <en>@code{cvs watch} commands. 10807Os @var{arquivos} e op��es s�o processados como nos comandos 10808@code{cvs watch}. 10809 10810@end deffn 10811 10812 10813@c <en>@cindex editors (subcommand) 10814@cindex editors (subcommand) 10815@c <en>@deffn Command {cvs editors} [@code{-lR}] [@var{files}]@dots{} 10816@deffn Command {cvs editors} [@code{-lR}] [@var{files}]@dots{} 10817 10818@c <en>List the users currently working on @var{files}. The report 10819@c <en>includes the mail address of each user, the time when the user began 10820@c <en>working with the file, and the host and path of the working directory 10821@c <en>containing the file. 10822Lista os usu�rios atualmente trabalhando em 10823@var{arquivos}. O relat�rio inclui o endere�o de 10824e-mail de cada usu�rio, o momento no qual o usu�rio 10825come�ou a trabalhar com o arquivo, e a m�quina e 10826caminho do diret�rio de trabalho contendo o arquivo. 10827 10828@c <en>The @var{files} and options are processed as for the 10829@c <en>@code{cvs watch} commands. 10830Os @var{arquivos} e op��es s�o processados como nos comandos 10831@code{cvs watch}. 10832 10833@end deffn 10834 10835@c <en>@node Watches Compatibility 10836@node Compatibilidade de ???Watches??? 10837@c <en>@subsection Using watches with old versions of CVS 10838@subsection Using watches with old versions of CVS 10839 10840@c <en>@cindex CVS 1.6, and watches 10841@cindex CVS 1.6, and watches 10842@c <en>If you use the watch features on a repository, it 10843@c <en>creates @file{CVS} directories in the repository and 10844@c <en>stores the information about watches in that directory. 10845@c <en>If you attempt to use @sc{cvs} 1.6 or earlier with the 10846@c <en>repository, you get an error message such as the 10847@c <en>following (all on one line): 10848If you use the watch features on a repository, it 10849creates @file{CVS} directories in the repository and 10850stores the information about watches in that directory. 10851If you attempt to use @sc{cvs} 1.6 or earlier with the 10852repository, you get an error message such as the 10853following (all on one line): 10854 10855@example 10856cvs update: cannot open CVS/Entries for reading: 10857No such file or directory 10858@end example 10859 10860@noindent 10861@c <en>and your operation will likely be aborted. To use the 10862@c <en>watch features, you must upgrade all copies of @sc{cvs} 10863@c <en>which use that repository in local or server mode. If 10864@c <en>you cannot upgrade, use the @code{watch off} and 10865@c <en>@code{watch remove} commands to remove all watches, and 10866@c <en>that will restore the repository to a state which 10867@c <en>@sc{cvs} 1.6 can cope with. 10868and your operation will likely be aborted. To use the 10869watch features, you must upgrade all copies of @sc{cvs} 10870which use that repository in local or server mode. If 10871you cannot upgrade, use the @code{watch off} and 10872@code{watch remove} commands to remove all watches, and 10873that will restore the repository to a state which 10874@sc{cvs} 1.6 can cope with. 10875 10876@c <en>@node Choosing a model 10877@node Escolhendo um modelo 10878@c <en>@section Choosing between reserved or unreserved checkouts 10879@section Escolhendo entre ???checkouts??? reservados ou n�o-reservados 10880@c <en>@cindex Choosing, reserved or unreserved checkouts 10881@cindex Escolhendo, ???checkouts??? reservados ou n�o-reservados 10882 10883@c <en>Reserved and unreserved checkouts each have pros and 10884@c <en>cons. Let it be said that a lot of this is a matter of 10885@c <en>opinion or what works given different groups' working 10886@c <en>styles, but here is a brief description of some of the 10887@c <en>issues. There are many ways to organize a team of 10888@c <en>developers. @sc{cvs} does not try to enforce a certain 10889@c <en>organization. It is a tool that can be used in several 10890@c <en>ways. 10891???Checkouts??? reservados e n�o-reservados t�em cada 10892um pr�s e contras. Digamos que muito disto � 10893uma quest�o de opini�o ou que funciona dependendo dos 10894diferentes estilos de trabalho em grupo, mas aqui est� 10895uma breve descri��o de alguns dos aspectos. Existem 10896muitas formas de organizar um time de desenvolvedores. 10897O @sc{cvs} n�o tenta induzir uma determinada forma de se 10898organizar. Ele � uma ferramenta que pode ser usada de 10899v�rias maneiras. 10900 10901@c <en>Reserved checkouts can be very counter-productive. If 10902@c <en>two persons want to edit different parts of a file, 10903@c <en>there may be no reason to prevent either of them from 10904@c <en>doing so. Also, it is common for someone to take out a 10905@c <en>lock on a file, because they are planning to edit it, 10906@c <en>but then forget to release the lock. 10907Checkout reservado pode ser bastante improdutivo. Se 10908duas pessoas quiserem editar diferentes partes de um 10909mesmo arquivo, n�o h� motivos para proibir nenhuma 10910delas. Al�m disto, � normal algu�m travar um arquivo 10911por que planeja edit�-lo, mas ent�o esquecer de destravar. 10912 10913@c "many groups"? specifics? cites to papers on this? 10914@c some way to weasel-word it a bit more so we don't 10915@c need facts :-)? 10916@c <en>People, especially people who are familiar with 10917@c <en>reserved checkouts, often wonder how often conflicts 10918@c <en>occur if unreserved checkouts are used, and how 10919@c <en>difficult they are to resolve. The experience with 10920@c <en>many groups is that they occur rarely and usually are 10921@c <en>relatively straightforward to resolve. 10922As pessoas, especialmente aquelas acostumadas com 10923???checkouts??? reservados, freq�entemente pensam sobre 10924a freq�encia com que conlitos acontecem quando 10925???checkouts??? n�o-reservados est�o em uso, e o qu�o 10926dif�ceis eles s�o de resolver. A experi�ncia de muitos 10927grupos � que os conflitos ocorrem raramente e em geral 10928s�o relativamente f�ceis de resolver. 10929 10930@c <en>The rarity of serious conflicts may be surprising, until one realizes 10931@c <en>that they occur only when two developers disagree on the proper design 10932@c <en>for a given section of code; such a disagreement suggests that the 10933@c <en>team has not been communicating properly in the first place. In order 10934@c <en>to collaborate under @emph{any} source management regimen, developers 10935@c <en>must agree on the general design of the system; given this agreement, 10936@c <en>overlapping changes are usually straightforward to merge. 10937A dificuldade para encontrar conflitos s�rios pode ser 10938surpreendente, at� se perceber que eles ocorrem apenas 10939quando dois desenvolvedores discordam mesmo � no 10940projeto de uma dada se��o do c�digo; tal desacordo 10941indica a princ�pio que a equipe n�o est� se comunicando 10942direito. Para colaborar em @emph{qualquer} regime de 10943gerenciamento de c�digo, os desenvolvedores devem 10944concordar com o projeto geral do sistema; com este 10945acordo, mudan�as sobrepostas s�o em geral simples de 10946mesclar. 10947 10948@c <en>In some cases unreserved checkouts are clearly 10949@c <en>inappropriate. If no merge tool exists for the kind of 10950@c <en>file you are managing (for example word processor files 10951@c <en>or files edited by Computer Aided Design programs), and 10952@c <en>it is not desirable to change to a program which uses a 10953@c <en>mergeable data format, then resolving conflicts is 10954@c <en>going to be unpleasant enough that you generally will 10955@c <en>be better off to simply avoid the conflicts instead, by 10956@c <en>using reserved checkouts. 10957Em alguns casos, ???checkouts??? n�o-reservados s�o 10958claramente inapropriados. Se n�o existe uma ferramenta 10959de mescla para o tipo de arquivo que voc� est� lidando 10960(por exemplo, arquivos de processadores de texto ou 10961arquivos editados por programas de ???Computer Aided 10962Design???), e n�o � desej�vel mudar para um programa 10963que usa um formato de dados que se possa mesclar, ent�o 10964resolver conflitos se torna t�o desagrad�vel que voc� 10965vai estar melhor simplesmente evitando-os, com o uso de 10966???checkouts??? n�o-reservados. 10967 10968@c <en>The watches features described above in @ref{Watches} 10969@c <en>can be considered to be an intermediate model between 10970@c <en>reserved checkouts and unreserved checkouts. When you 10971@c <en>go to edit a file, it is possible to find out who else 10972@c <en>is editing it. And rather than having the system 10973@c <en>simply forbid both people editing the file, it can tell 10974@c <en>you what the situation is and let you figure out 10975@c <en>whether it is a problem in that particular case or not. 10976@c <en>Therefore, for some groups it can be considered the 10977@c <en>best of both the reserved checkout and unreserved 10978@c <en>checkout worlds. 10979As funcionalidade de ???watches??? descritas acima em 10980@ref{???Watches???} podem ser consideradas um modelo 10981intermedi�rio entre ???checkouts??? reservados e 10982???checkouts??? n�o-reservados. Quando voc� vai editar 10983um arquivo, � poss�vel descobrir quem o est� editando. 10984E ao inv�s de simplesmente o sistema proibir os dois de 10985trabalhar, ele pode dizer como est� a situa��o e deixar 10986voc� decidir se isto � ou n�o � um problema neste caso 10987espec�fico. Portanto, para alguns grupos esta � o 10988melhor dos dois mundos de ???checkouts??? reservados e 10989???checkouts??? n�o-reservados. 10990 10991@c --------------------------------------------------------------------- 10992@c <en>@node Revision management 10993@node Gerenciamento de revis�es 10994@c <en>@chapter Revision management 10995@chapter Gerenciamento de revis�es 10996@c <en>@cindex Revision management 10997@cindex Gerenciamento de revis�es 10998 10999@c -- This chapter could be expanded a lot. 11000@c -- Experiences are very welcome! 11001 11002@c <en>If you have read this far, you probably have a pretty 11003@c <en>good grasp on what @sc{cvs} can do for you. This 11004@c <en>chapter talks a little about things that you still have 11005@c <en>to decide. 11006Se voc� leu at� este ponto, voc� provavelmente tem uma 11007boa no��o do que o @sc{cvs} pode fazer por voc�. Este 11008cap�tulo fala um pouco sobre coisas que ainda cabe a 11009voc� decidir. 11010 11011@c <en>If you are doing development on your own using @sc{cvs} 11012@c <en>you could probably skip this chapter. The questions 11013@c <en>this chapter takes up become more important when more 11014@c <en>than one person is working in a repository. 11015Se voc� est� desenvolvendo sozinho com o @sc{cvs}, voc� 11016provavelmente pode pular este cap�tulo. As quest�es 11017que este cap�tulo levanta s�o mais importante quando 11018mais de uma pessoa est� trabalhando num mesmo reposit�rio. 11019 11020@menu 11021@c <en>* When to commit:: Some discussion on the subject 11022* Quando ???commit???:: Alguma discuss�o sobre o assunto 11023@end menu 11024 11025@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11026@c <en>@node When to commit 11027@node Quando ???commit??? 11028@c <en>@section When to commit? 11029@section Quando ???commit??? ? 11030@c <en>@cindex When to commit 11031@cindex Quando ???commit??? 11032@c <en>@cindex Committing, when to 11033@cindex ???Committing???, quando 11034@c <en>@cindex Policy 11035@cindex Pol�tica 11036 11037@c <en>Your group should decide which policy to use regarding 11038@c <en>commits. Several policies are possible, and as your 11039@c <en>experience with @sc{cvs} grows you will probably find 11040@c <en>out what works for you. 11041Seu grupo deve decidir qual vai ser a pol�tica a 11042respeito de ???commits???. V�rias pol�ticas s�o 11043poss�veis, e � medida que sua experi�ncia com o 11044@sc{cvs} crescer, voc� provavelmente vai encontrar a 11045que funciona com voc�. 11046 11047@c <en>If you commit files too quickly you might commit files 11048@c <en>that do not even compile. If your partner updates his 11049@c <en>working sources to include your buggy file, he will be 11050@c <en>unable to compile the code. On the other hand, other 11051@c <en>persons will not be able to benefit from the 11052@c <en>improvements you make to the code if you commit very 11053@c <en>seldom, and conflicts will probably be more common. 11054Se voc� ???commit??? arquivos muito rapidamente 11055provavelmente voc� vai ???commit??? arquivos que nem 11056mesmo compilam. Se seu parceiro atualiza as c�pias de 11057trabalho dele e inclui seu arquivo bichado, ele n�o vai 11058conseguir compilar o c�digo. Por outro lado, as outras 11059pessoas n�o v�o poder se beneficiar das melhorias que 11060voc� fizer no c�digo se voc� ???commit??? muito 11061raramente, e os conflitos provavelmente v�o aumentar. 11062 11063@c <en>It is common to only commit files after making sure 11064@c <en>that they can be compiled. Some sites require that the 11065@c <en>files pass a test suite. Policies like this can be 11066@c <en>enforced using the commitinfo file 11067@c <en>(@pxref{commitinfo}), but you should think twice before 11068@c <en>you enforce such a convention. By making the 11069@c <en>development environment too controlled it might become 11070@c <en>too regimented and thus counter-productive to the real 11071@c <en>goal, which is to get software written. 11072� comum apenas ???commit??? arquivos depois de se 11073certificar que eles podem ser compilados. Alguns 11074lugares exigem que os arquivos passem num conjunto de 11075testes. Pol�ticas deste tipo podem ser impostas usando 11076o arquivo commitinfo (@pxref{commitinfo}), mas voc� 11077deve pensar duas vezes antes de impor tal conven��o. 11078Tornando o ambiente de desenvolvimento muito controlado 11079ele se torna muito r�gido e contraprodutivo para o 11080objetivo real, que � ter o software escrito. 11081 11082@c --------------------------------------------------------------------- 11083@c <en>@node Keyword substitution 11084@node Substitui��o de palavra-chave 11085@c <en>@chapter Keyword substitution 11086@chapter Substitui��o de palavra-chave 11087@c <en>@cindex Keyword substitution 11088@cindex Substitui��o de palavra-chave 11089@c <en>@cindex Keyword expansion 11090@cindex Expans�o de palavra-chave 11091@c <en>@cindex Identifying files 11092@cindex Identificando arquivos 11093 11094@comment Be careful when editing this chapter. 11095@comment Remember that this file is kept under 11096@comment version control, so we must not accidentally 11097@comment include a valid keyword in the running text. 11098 11099@c <en>As long as you edit source files inside a working 11100@c <en>directory you can always find out the state of 11101@c <en>your files via @samp{cvs status} and @samp{cvs log}. 11102@c <en>But as soon as you export the files from your 11103@c <en>development environment it becomes harder to identify 11104@c <en>which revisions they are. 11105� medida em que voc� edita arquivos fonte dentro de um 11106diret�rio de trabalho voc� pode sempre obter o estado 11107de seus arquivos via @samp{cvs status} e @samp{cvs 11108log}. Mas assim que voc� exporta os arquivos de seu 11109ambiente de desenvolvimento se torna mais dif�cil dizer 11110de quais revis�es eles s�o. 11111 11112@c <en>@sc{cvs} can use a mechanism known as @dfn{keyword 11113@c <en>substitution} (or @dfn{keyword expansion}) to help 11114@c <en>identifying the files. Embedded strings of the form 11115@c <en>@code{$@var{keyword}$} and 11116@c <en>@code{$@var{keyword}:@dots{}$} in a file are replaced 11117@c <en>with strings of the form 11118@c <en>@code{$@var{keyword}:@var{value}$} whenever you obtain 11119@c <en>a new revision of the file. 11120O @sc{cvs} pode usar um mecanismo chamado de 11121@dfn{substitui��o de palavra-chave} (ou @dfn{expans�o 11122de palavra-chave}) para ajudar na identifica��o de 11123arquivos. Strings embutidas na forma @code{$@var{keyword}$} e 11124@code{$@var{keyword}:@dots{}$} em um arquivo s�o 11125substitu�das por strings da forma 11126@code{$@var{keyword}:@var{value}$} sempre que voc� obt�m 11127uma nova revis�o do arquivo. 11128 11129@menu 11130@c <en>* Keyword list:: Keywords 11131* Lista de palavras-chave:: Palavras-chave 11132@c <en>* Using keywords:: Using keywords 11133* Usando palavras-chave:: Usando Palavras-chave 11134@c <en>* Avoiding substitution:: Avoiding substitution 11135* Evitando substitui��es:: Evitando substitui��es 11136@c <en>* Substitution modes:: Substitution modes 11137* Modos de substitui��o:: Modos de substitui��o 11138@c <en>* Configuring keyword expansion:: Configuring keyword expansion 11139* Configurando a expans�o do teclado:: Configurando a expans�o do teclado 11140@c <en>* Log keyword:: Problems with the $@splitrcskeyword{}Log$ keyword. 11141* Log keyword:: Problemas com a palavra-chave $@splitrcskeyword{}Log$. 11142@end menu 11143 11144@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11145@c <en>@node Keyword list 11146@node Lista de palavras-chave 11147@c <en>@section Keyword List 11148@section Lista de Palavras-chave 11149@c <en>@cindex Keyword List 11150@cindex Lista de Palavras-chave 11151 11152@c FIXME: need some kind of example here I think, 11153@c perhaps in a 11154@c "Keyword intro" node. The intro in the "Keyword 11155@c substitution" node itself seems OK, but to launch 11156@c into a list of the keywords somehow seems too abrupt. 11157 11158@c <en>This is a list of the keywords: 11159Esta � uma lista de palavras-chave: 11160 11161@table @code 11162@c <en>@cindex Author keyword 11163@cindex Palavra-chave Author (autor) 11164@c <en>@item $@splitrcskeyword{Author}$ 11165@item $@splitrcskeyword{Author}$ 11166@c <en>The login name of the user who checked in the revision. 11167O login do usu�rio que ???checked in??? a revis�o. 11168 11169@c <en>@cindex CVSHeader keyword 11170@cindex Palavra-chave CVSHeader (cabe�alho CVS) 11171@c <en>@item $@splitrcskeyword{CVSHeader} 11172@item $@splitrcskeyword{CVSHeader} 11173@c <en>A standard header (similar to $@splitrcskeyword{Header}$, but with 11174@c <en>the CVS root stripped off). It contains the relative 11175@c <en>pathname of the @sc{rcs} file to the CVS root, the 11176@c <en>revision number, the date (UTC), the author, the state, 11177@c <en>and the locker (if locked). Files will normally never 11178@c <en>be locked when you use @sc{cvs}. 11179Um cabe�alho padr�o (similar ao 11180$@splitrcskeyword{Header}$, mas com a ra�z do CVS 11181retirada). Ele cont�m o caminho do arquivo 11182@sc{rcs} relativo � ra�z do CVS, o n�mero da revis�o, a 11183data (UTC), o autor, o estado, e o ???locker??? (se 11184estiver travado). Arquivos normalmente nunca s�o 11185travados quando voc� usa @sc{cvs}. 11186 11187@c <en>Note that this keyword has only been recently 11188@c <en>introduced to @sc{cvs} and may cause problems with 11189@c <en>existing installations if $@splitrcskeyword{CVSHeader}$ is already 11190@c <en>in the files for a different purpose. This keyword may 11191@c <en>be excluded using the @code{KeywordExpansion=eCVSHeader} 11192@c <en>in the @file{CVSROOT/config} file. 11193@c <en>See @ref{Configuring keyword expansion} for more details. 11194Observe que esta palavra-chave foi adicionada apenas 11195recentemente no @sc{cvs} e pode causar problemas com 11196instala��es existentes se $@splitrcskeyword{CVSHeader}$ 11197j� est� nos arquivos por um motivo diferente. Esta 11198palavra-chave deve ser exclu�da usando o 11199@code{KeywordExpansion=eCVSHeader} no arquivo 11200@file{CVSROOT/config}. Veja em @ref{Configurando a 11201expans�o do teclado} para maiores detalhes. 11202 11203@c <en>@cindex Date keyword 11204@cindex Palavra-chave Date (data) 11205@c <en>@item $@splitrcskeyword{Date}$ 11206@item $@splitrcskeyword{Date}$ 11207@c <en>The date and time (UTC) the revision was checked in. 11208A data e hora (UTC) na qual a revis�o foi ???checked in???. 11209 11210@c <en>@cindex Header keyword 11211@cindex Palavra-chave Header (cabe�alho) 11212@c <en>@item $@splitrcskeyword{Header}$ 11213@item $@splitrcskeyword{Header}$ 11214@c <en>A standard header containing the full pathname of the 11215@c <en>@sc{rcs} file, the revision number, the date (UTC), the 11216@c <en>author, the state, and the locker (if locked). Files 11217@c <en>will normally never be locked when you use @sc{cvs}. 11218Um cabe�alho padr�o contendo o caminho completo do arquivo 11219@sc{rcs}, o n�mero da revis�o, a data (UTC), o autor, o 11220estado, e o ???locker??? (se estiver travado). 11221Arquivos normalmente nunca s�o travados quando voc� usa 11222@sc{cvs}. 11223 11224@c <en>@cindex Id keyword 11225@cindex Palavra-chave Id 11226@c <en>@item $@splitrcskeyword{Id}$ 11227@item $@splitrcskeyword{Id}$ 11228@c <en>Same as @code{$@splitrcskeyword{Header}$}, except that the @sc{rcs} 11229@c <en>filename is without a path. 11230Similar ao @code{$@splitrcskeyword{Header}$}, exceto 11231que o nome do arquivo @sc{rcs} n�o tem o caminho. 11232 11233@c <en>@cindex Name keyword 11234@cindex Palavra-chave Name (nome) 11235@c <en>@item $@splitrcskeyword{Name}$ 11236@item $@splitrcskeyword{Name}$ 11237@c <en>Tag name used to check out this file. The keyword is 11238@c <en>expanded only if one checks out with an explicit tag 11239@c <en>name. For example, when running the command @code{cvs 11240@c <en>co -r first}, the keyword expands to @samp{Name: first}. 11241Nome da etiqueta (tag) usada para ???check out??? este 11242arquivo. A palavra-chave � expandida apenas se foi 11243???check out??? com um nome de etiqueta expl�cito. Por 11244exemplo, quando rodou o comando @code{cvs co -r 11245inicio}, a palavra-chave expande para @samp{Name: inicio}. 11246 11247@c <en>@cindex Locker keyword 11248@cindex Palavra-chave Locker (???locker???) 11249@c <en>@item $@splitrcskeyword{Locker}$ 11250@item $@splitrcskeyword{Locker}$ 11251@c <en>The login name of the user who locked the revision 11252@c <en>(empty if not locked, which is the normal case unless 11253@c <en>@code{cvs admin -l} is in use). 11254O login do usu�rio que travou a revis�o (vazio se n�o 11255estiver travado, que � o normal a menos que @code{cvs 11256admin -l} esteja em uso). 11257 11258@c <en>@cindex Log keyword 11259@cindex Palvra-chave Log (registro) 11260@c <en>@cindex MaxCommentLeaderLength 11261@cindex MaxCommentLeaderLength 11262@c <en>@cindex UseArchiveCommentLeader 11263@cindex UseArchiveCommentLeader 11264@c <en>@cindex Log keyword, configuring substitution behavior 11265@cindex Palavra-chave Log, configurando o comportamento na substitui��o 11266@c <en>@item $@splitrcskeyword{Log}$ 11267@item $@splitrcskeyword{Log}$ 11268@c <en>The log message supplied during commit, preceded by a 11269@c <en>header containing the @sc{rcs} filename, the revision 11270@c <en>number, the author, and the date (UTC). Existing log 11271@c <en>messages are @emph{not} replaced. Instead, the new log 11272@c <en>message is inserted after @code{$@splitrcskeyword{Log:@dots{}}$}. 11273@c <en>Each new line is prefixed with the same string which 11274@c <en>precedes the @code{$Log} keyword. For example, if the 11275@c <en>file contains: 11276A mensagem de log (registro) fornecida durante o 11277???commit???, precedida por um cabe�alho contendo o 11278nome do arquivo @sc{rcs}, o n�mero de revis�o, o autor, 11279e a data (UTC). Mensagens de log (registro) @emph{n�o} 11280s�o substitu�das. Ao inv�s disto, A nova mensagem de 11281log (registro) � inserida depois do 11282@code{$@splitrcskeyword{Log:@dots{}}$}. Cada nova linha 11283� prefixada com a mesma string que precede a 11284palavra-chave @code{$Log}. Por exemplo, se o arquivo cont�m: 11285 11286@example 11287 /* Here is what people have been up to: 11288 * 11289 * $@splitrcskeyword{}Log: frob.c,v $ 11290 * Revision 1.1 1997/01/03 14:23:51 joe 11291 * Add the superfrobnicate option 11292 * 11293 */ 11294@end example 11295 11296@noindent 11297@c <en>then additional lines which are added when expanding 11298@c <en>the @code{$Log} keyword will be preceded by @samp{ * }. 11299@c <en>Unlike previous versions of @sc{cvs} and @sc{rcs}, the 11300@c <en>@dfn{comment leader} from the @sc{rcs} file is not used. 11301@c <en>The @code{$Log} keyword is useful for 11302@c <en>accumulating a complete change log in a source file, 11303@c <en>but for several reasons it can be problematic. 11304@c <en>@xref{Log keyword}. 11305Ent�o, linhas adicionais que s�o adicionadas quando a 11306palavra-chave @code{$Log} � expandida v�o ser 11307precedidas por @samp{ * }. Ao contr�rio de vers�es 11308pr�vias do @sc{cvs} e do @sc{rcs}, o @dfn{comment 11309leader} do arquivo @sc{rcs} n�o � usado. A 11310palavra-chave @code{$Log} � �til para acumular um 11311???change log??? completo num fonte, mas pode ser 11312problem�tica por v�rias raz�es. Veja em @ref{Log keyword}. 11313 11314@c <en>@cindex RCSfile keyword 11315@cindex Palavra-chave RCSfile (arquivo RCS) 11316@c <en>@item $@splitrcskeyword{RCSfile}$ 11317@item $@splitrcskeyword{RCSfile}$ 11318@c <en>The name of the RCS file without a path. 11319O nome do arquivo RCS sem o caminho. 11320 11321@c <en>@cindex Revision keyword 11322@cindex Palavra-chave Revision (revis�o) 11323@c <en>@item $@splitrcskeyword{Revision}$ 11324@item $@splitrcskeyword{Revision}$ 11325@c <en>The revision number assigned to the revision. 11326O n�mero de revis�o atribu�do � revis�o. 11327 11328@c <en>@cindex Source keyword 11329@cindex Palavra-chave Source (fonte) 11330@c <en>@item $@splitrcskeyword{Source}$ 11331@item $@splitrcskeyword{Source}$ 11332@c <en>The full pathname of the RCS file. 11333O caminho completo do arquivo RCS. 11334 11335@c <en>@cindex State keyword 11336@cindex Palavra-chave State (estado) 11337@c <en>@item $@splitrcskeyword{State}$ 11338@item $@splitrcskeyword{State}$ 11339@c <en>The state assigned to the revision. States can be 11340@c <en>assigned with @code{cvs admin -s}---see @ref{admin options}. 11341O estado atribu�do � revis�o. Estados podem ser 11342atribu�dos com @code{cvs admin -s}---veja em @ref{admin options}. 11343 11344@c <en>@cindex Local keyword 11345@cindex Palavra-chave Local 11346@c <en>@item Local keyword 11347@item Palavra-chave Local 11348@c <en>The @code{LocalKeyword} option in the @file{CVSROOT/config} file 11349@c <en>may be used to specify a local keyword which is to be 11350@c <en>used as an alias for one of the keywords: $@splitrcskeyword{}Id$, 11351@c <en>$@splitrcskeyword{}Header$, or $@splitrcskeyword{}CVSHeader$. For 11352@c <en>example, if the @file{CVSROOT/config} file contains 11353@c <en>a line with @code{LocalKeyword=MYBSD=CVSHeader}, then a 11354@c <en>file with the local keyword $@splitrcskeyword{}MYBSD$ will be 11355@c <en>expanded as if it were a $@splitrcskeyword{}CVSHeader$ keyword. If 11356@c <en>the src/frob.c file contained this keyword, it might 11357@c <en>look something like this: 11358A op��o @code{LocalKeyword} no arquivo 11359@file{CVSROOT/config} pode ser usada para especificar 11360uma palavra-chave que n�o � usada como um alias para 11361uma das seguintes palavras-chave: $@splitrcskeyword{}Id$, 11362$@splitrcskeyword{}Header$, ou $@splitrcskeyword{}CVSHeader$. Por 11363exemplo, se o arquivo @file{CVSROOT/config} cont�m uma 11364linha com @code{LocalKeyword=MYBSD=CVSHeader}, ent�o um 11365arquivo com a palavra-chave local 11366$@splitrcskeyword{}MYBSD$ vai ser expandido como se ele 11367fosse uma palavra-chave 11368$@splitrcskeyword{}CVSHeader$. Se o arquivo src/frob.c 11369contiver esta palavra-chave, ele pode parecer com algo assim: 11370 11371@example 11372 /* 11373 * $@splitrcskeyword{}MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 11374 */ 11375@end example 11376 11377@c <en>Many repositories make use of a such a ``local 11378@c <en>keyword'' feature. An old patch to @sc{cvs} provided 11379@c <en>the @code{LocalKeyword} feature using a @code{tag=} 11380@c <en>option and called this the ``custom tag'' or ``local 11381@c <en>tag'' feature. It was used in conjunction with the 11382@c <en>what they called the @code{tagexpand=} option. In 11383@c <en>@sc{cvs} this other option is known as the 11384@c <en>@code{KeywordExpand} option. 11385@c <en>See @ref{Configuring keyword expansion} for more 11386@c <en>details. 11387Muitos reposit�rios fazem uso de tal ``palavra-chave 11388local''. Uma ???patch??? antiga ao @sc{cvs} fornecia a 11389funcionalidade @code{LocalKeyword} usando uma op��o 11390@code{tag=} e chamava esta funcionalidade de ``custom tag'' ou ``local 11391tag''. ela foi usada em conjunto com o que chamavam de 11392op��o @code{tagexpand=}. No @sc{cvs} esta outra op��o � 11393conhecida como a op��o @code{KeywordExpand}. Veja em 11394@ref{Configurando a expans�o do teclado} para maiores 11395detalhes. 11396 11397@c <en>Examples from popular projects include: 11398@c <en>$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$, 11399@c <en>$@splitrcskeyword{OpenBSD}$, $@splitrcskeyword{XFree86}$, 11400@c <en>$@splitrcskeyword{Xorg}$. 11401Exemplos de projetos populares incluem: 11402$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$, 11403$@splitrcskeyword{OpenBSD}$, $@splitrcskeyword{XFree86}$, 11404$@splitrcskeyword{Xorg}$. 11405 11406@c <en>The advantage of this is that you can include your 11407@c <en>local version information in a file using this local 11408@c <en>keyword without disrupting the upstream version 11409@c <en>information (which may be a different local keyword or 11410@c <en>a standard keyword). Allowing bug reports and the like 11411@c <en>to more properly identify the source of the original 11412@c <en>bug to the third-party and reducing the number of 11413@c <en>conflicts that arise during an import of a new version. 11414A vantagem disto � que voc� pode incluir sua informa��o 11415de vers�o local num arquivo usando esta palavra-chave 11416local sem romper com a informa��o da vers�o principal 11417(que pode ser uma palavra-chave local diferente ou uma 11418palavra-chave padr�o). Permitir relat�rio de bug (bug 11419report) e coisas do g�nero para identificar mais 11420adequadamente a origem do bug original para o terceiro 11421e reduzir o n�mero de conflitos que surgem durante uma 11422importa��o de uma nova vers�o. 11423 11424@c <en>All keyword expansion except the local keyword may be 11425@c <en>disabled using the @code{KeywordExpand} option in 11426@c <en>the @file{CVSROOT/config} file---see 11427@c <en>@ref{Configuring keyword expansion} for more details. 11428Toda expans�o de palavra-chave com exce��o da 11429palavra-chave local deve ser disabilitada usando a 11430op��o @code{KeywordExpand} no arquivo 11431@file{CVSROOT/config}---veja em @ref{Configurando a 11432expans�o do teclado} para mais detalhes. 11433 11434@end table 11435 11436@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11437@c <en>@node Using keywords 11438@node Usando palavras-chave 11439@c <en>@section Using keywords 11440@section Usando palavras-chave 11441 11442@c <en>To include a keyword string you simply include the 11443@c <en>relevant text string, such as @code{$@splitrcskeyword{Id}$}, inside the 11444@c <en>file, and commit the file. @sc{cvs} will automatically (Or, 11445@c <en>more accurately, as part of the update run that 11446@c <en>automatically happens after a commit.) 11447@c <en>expand the string as part of the commit operation. 11448Para incluir uma string de palavra-chave voc� deve 11449simplesmente incluir o a string de texto relevante, 11450como @code{$@splitrcskeyword{Id}$}, dentro do arquivo, 11451e ???commit??? o arquivo. O @sc{cvs} vai automaticamente (Ou, 11452mais precisamente, como parte da execu��o do 11453???update??? que acontece automaticamente depois do 11454???commit???.) expandir a string como parte da opera��o 11455de commit. 11456 11457@c <en>It is common to embed the @code{$@splitrcskeyword{}Id$} string in 11458@c <en>the source files so that it gets passed through to 11459@c <en>generated files. For example, if you are managing 11460@c <en>computer program source code, you might include a 11461@c <en>variable which is initialized to contain that string. 11462@c <en>Or some C compilers may provide a @code{#pragma ident} 11463@c <en>directive. Or a document management system might 11464@c <en>provide a way to pass a string through to generated 11465@c <en>files. 11466� normal imergir a string @code{$@splitrcskeyword{}Id$} 11467nos arquivos fonte de forma que ela seja ignorada nos 11468arquivos gerados. Por exemplo, se voc� est� 11469gerenciando c�digo fonte de programas de computador, 11470voc� deve incluir uma vari�vel que � inicializada para 11471conter aquela string. Ou alguns compiladores C podem 11472fornecer uma diretiva @code{#pragma ident}. Ou um 11473sistema de ger�ncia de documentos pode fornecer um 11474jeito de entregar a string diretamente ao arquivos 11475gerados. 11476 11477@c Would be nice to give an example, but doing this in 11478@c portable C is not possible and the problem with 11479@c picking any one language (VMS HELP files, Ada, 11480@c troff, whatever) is that people use CVS for all 11481@c kinds of files. 11482 11483@c <en>@cindex Ident (shell command) 11484@cindex Ident (shell command) 11485@c <en>The @code{ident} command (which is part of the @sc{rcs} 11486@c <en>package) can be used to extract keywords and their 11487@c <en>values from a file. This can be handy for text files, 11488@c <en>but it is even more useful for extracting keywords from 11489@c <en>binary files. 11490O comando @code{ident} (que � parte do pacote @sc{rcs}) 11491pode ser usado para extrair palavras-chave e seus 11492valores de um arquivo. Isto pode ser �til para 11493arquivos texto, mas � mais �til para extra��o de 11494palavras-chave de arquivos bin�rios. 11495 11496@example 11497$ ident samp.c 11498samp.c: 11499 $@splitrcskeyword{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $ 11500$ gcc samp.c 11501$ ident a.out 11502a.out: 11503 $@splitrcskeyword{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $ 11504@end example 11505 11506@c <en>@cindex What (shell command) 11507@cindex What (shell command) 11508@c <en>S@sc{ccs} is another popular revision control system. 11509@c <en>It has a command, @code{what}, which is very similar to 11510@c <en>@code{ident} and used for the same purpose. Many sites 11511@c <en>without @sc{rcs} have @sc{sccs}. Since @code{what} 11512@c <en>looks for the character sequence @code{@@(#)} it is 11513@c <en>easy to include keywords that are detected by either 11514@c <en>command. Simply prefix the keyword with the 11515@c <en>magic @sc{sccs} phrase, like this: 11516S@sc{ccs} � outro sistema de controle de revis�es 11517popular. Ele tem um comando, @code{what} (o que, em 11518portugu�s), que � bastante similar ao @code{ident} e 11519usado para o mesmo prop�sito. Muitos ???sites??? sem 11520@sc{rcs} tem @sc{sccs}. Uma vez que o @code{what} 11521procura pela seq��ncia de caracteres @code{@@(#)} � 11522f�cil incluir palavras-chave que s�o detectadas por 11523qualquer comando. Simplesmente bote um prefixo na 11524palavra-chave com a frase m�gica @sc{sccs}, como esta: 11525 11526@example 11527static char *id="@@(#) $@splitrcskeyword{}Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $"; 11528@end example 11529 11530@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11531@c <en>@node Avoiding substitution 11532@node Evitando substitui��es 11533@c <en>@section Avoiding substitution 11534@section Evitando substitui��es 11535 11536@c <en>Keyword substitution has its disadvantages. Sometimes 11537@c <en>you might want the literal text string 11538@c <en>@samp{$@splitrcskeyword{}Author$} to appear inside a file without 11539@c <en>@sc{cvs} interpreting it as a keyword and expanding it 11540@c <en>into something like @samp{$@splitrcskeyword{}Author: ceder $}. 11541Substitui��o de palavra-chave tem suas desvantagens. 11542Algumas vezes voc� pode querer que a string de texto 11543literal @samp{$@splitrcskeyword{}Author$} apare�a 11544dentro de um arquivo sem que o @sc{cvs} a interprete 11545como uma palavra-chave e a expanda em algo como 11546@samp{$@splitrcskeyword{}Author: ceder $}. 11547 11548@c <en>There is unfortunately no way to selectively turn off 11549@c <en>keyword substitution. You can use @samp{-ko} 11550@c <en>(@pxref{Substitution modes}) to turn off keyword 11551@c <en>substitution entirely. 11552Infelizmente n�o h� como desligar a substitui��o de 11553palavra-chave de forma seletiva. Voc� pode usar @samp{-ko} 11554(@pxref{Modos de substitui��o}) para desligar a 11555substitui��o de palavra-chave completamente. 11556 11557@c <en>In many cases you can avoid using keywords in 11558@c <en>the source, even though they appear in the final 11559@c <en>product. For example, the source for this manual 11560@c <en>contains @samp{$@@asis@{@}Author$} whenever the text 11561@c <en>@samp{$@splitrcskeyword{}Author$} should appear. In @code{nroff} 11562@c <en>and @code{troff} you can embed the null-character 11563@c <en>@code{\&} inside the keyword for a similar effect. 11564Em muitos casos voc� pode evitar o uso de palavra-chave 11565nos fontes, mesmo que elas apare�am no produto final. 11566Por exemplo, o c�digo-fonte deste manual cont�m 11567@samp{$@@asis@{@}Author$} sempre que o texto 11568@samp{$@splitrcskeyword{}Author$} deva aparecer. Em 11569@code{nroff} e @code{troff} voc� pode imergir o 11570caractere nulo @code{\&} dentro de uma palavra-chave 11571para obter um efeito similar. 11572 11573@c <en>It is also possible to specify an explicit list of 11574@c <en>keywords to include or exclude using the 11575@c <en>@code{KeywordExpand} option in the 11576@c <en>@file{CVSROOT/config} file--see @ref{Configuring keyword expansion} 11577@c <en>for more details. This feature is intended primarily 11578@c <en>for use with the @code{LocalKeyword} option--see 11579@c <en>@ref{Keyword list}. 11580Tamb�m � poss�vel especificar explicitamente uma lista 11581de palavras-chave para incluir ou excluir usando a 11582op��o @code{KeywordExpand} no arquivo 11583@file{CVSROOT/config}--veja em @ref{Configurando a 11584expans�o do teclado} para maiores detalhes. Esta 11585funcionalidade foi pensada para ser usada a princ�pio 11586com a op��o @code{LocalKeyword}--veja @ref{Lista de 11587palavras-chave}. 11588 11589@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11590@c <en>@node Substitution modes 11591@node Modos de substitui��o 11592@c <en>@section Substitution modes 11593@section Modos de substitui��o 11594@c <en>@cindex Keyword substitution, changing modes 11595@cindex Substitui��o de palavra-chave, mudando os modos 11596@c <en>@cindex -k (keyword substitution) 11597@cindex -k (substitui��o de palavra-chave) 11598@c <en>@cindex Kflag 11599@cindex Kflag 11600 11601@c FIXME: This could be made more coherent, by expanding it 11602@c with more examples or something. 11603@c <en>Each file has a stored default substitution mode, and 11604@c <en>each working directory copy of a file also has a 11605@c <en>substitution mode. The former is set by the @samp{-k} 11606@c <en>option to @code{cvs add} and @code{cvs admin}; the 11607@c <en>latter is set by the @samp{-k} or @samp{-A} options to @code{cvs 11608@c <en>checkout} or @code{cvs update}. @code{cvs diff} also 11609@c <en>has a @samp{-k} option. For some examples, 11610@c <en>see @ref{Binary files}, and @ref{Merging and keywords}. 11611Cada arquivo tem um modo de substitui��o padr�o 11612armazenado, e cada c�pia de um arquivo num diret�rio de 11613trabalho tamb�m tem um modo de substitui��o. O 11614primeiro � ajustado pela op��o @samp{-k} no @code{cvs 11615add} e no @code{cvs admin}; o �ltimo � ajustado pelas 11616op��es @samp{-k} ou @samp{-A} do @code{cvs checkout} ou 11617do @code{cvs update}. O @code{cvs diff} tamb�m tem uma 11618op��o @samp{-k}. Para alguns exemplos, veja em 11619@ref{Arquivos bin�rios}, e @ref{Mesclagem e 11620palavras-chave}. 11621@c The fact that -A is overloaded to mean both reset 11622@c sticky options and reset sticky tags/dates is 11623@c somewhat questionable. Perhaps there should be 11624@c separate options to reset sticky options (e.g. -k 11625@c A") and tags/dates (someone suggested -r HEAD could 11626@c do this instead of setting a sticky tag of "HEAD" 11627@c as in the status quo but I haven't thought much 11628@c about that idea. Of course -r .reset or something 11629@c could be coined if this needs to be a new option). 11630@c On the other hand, having -A mean "get things back 11631@c into the state after a fresh checkout" has a certain 11632@c appeal, and maybe there is no sufficient reason for 11633@c creeping featurism in this area. 11634 11635@c <en>The modes available are: 11636Os modos dispon�veis s�o: 11637 11638@table @samp 11639@c <en>@item -kkv 11640@item -kkv 11641@c <en>Generate keyword strings using the default form, e.g. 11642@c <en>@code{$@splitrcskeyword{}Revision: 5.7 $} for the @code{Revision} 11643@c <en>keyword. 11644Gera strings de palavras-chave usando a forma padr�o, e.g. 11645@code{$@splitrcskeyword{}Revision: 5.7 $} para a 11646palavra-chave @code{Revision}. 11647 11648@c <en>@item -kkvl 11649@item -kkvl 11650@c <en>Like @samp{-kkv}, except that a locker's name is always 11651@c <en>inserted if the given revision is currently locked. 11652@c <en>The locker's name is only relevant if @code{cvs admin 11653@c <en>-l} is in use. 11654Parecido com o @samp{-kkv}, exceto que um nome de 11655???locker??? � sempre inserido se a revis�o dada 11656estiver atualmente ???locked???. O nome do ???locker??? 11657� relevante apenas se @code{cvs admin -l} estiver em uso. 11658 11659@c <en>@item -kk 11660@item -kk 11661@c <en>Generate only keyword names in keyword strings; omit 11662@c <en>their values. For example, for the @code{Revision} 11663@c <en>keyword, generate the string @code{$@splitrcskeyword{}Revision$} 11664@c <en>instead of @code{$@splitrcskeyword{}Revision: 5.7 $}. This option 11665@c <en>is useful to ignore differences due to keyword 11666@c <en>substitution when comparing different revisions of a 11667@c <en>file (@pxref{Merging and keywords}). 11668Gera nomes de palavras-chave apenas nas strings da palavras-chave; omite 11669seus valores. Por exemplo, para a palavra-chave @code{Revision} 11670, gera a string @code{$@splitrcskeyword{}Revision$} 11671ao inv�s de @code{$@splitrcskeyword{}Revision: 5.7 $}. 11672Esta op��o � �til para ignorar diferen�as devido a 11673substitui��o de palavras-chave quando comparando 11674revis�es diferentes de um mesmo arquivo 11675(@pxref{Mesclagem e palavras-chave}). 11676 11677@c <en>@item -ko 11678@item -ko 11679@c <en>Generate the old keyword string, present in the working 11680@c <en>file just before it was checked in. For example, for 11681@c <en>the @code{Revision} keyword, generate the string 11682@c <en>@code{$@splitrcskeyword{}Revision: 1.1 $} instead of 11683@c <en>@code{$@splitrcskeyword{}Revision: 5.7 $} if that is how the 11684@c <en>string appeared when the file was checked in. 11685Gera a antiga string da palavra-chave, presente no 11686arquivo de trabalho antes dele ter sido ???checked 11687in???. Por exemplo, para a palavra-chave 11688@code{Revision}, gera a string 11689@code{$@splitrcskeyword{}Revision: 1.1 $} ao inv�s de 11690@code{$@splitrcskeyword{}Revision: 5.7 $} se era assim 11691que a string aparecia quando o arquivo foi ???checked 11692in???. 11693 11694@c <en>@item -kb 11695@item -kb 11696@c <en>Like @samp{-ko}, but also inhibit conversion of line 11697@c <en>endings between the canonical form in which they are 11698@c <en>stored in the repository (linefeed only), and the form 11699@c <en>appropriate to the operating system in use on the 11700@c <en>client. For systems, like unix, which use linefeed 11701@c <en>only to terminate lines, this is very similar to 11702@c <en>@samp{-ko}. For more information on binary files, see 11703@c <en>@ref{Binary files}. In @sc{cvs} version 1.12.2 and later 11704@c <en>@samp{-kb}, as set by @code{cvs add}, @code{cvs admin}, or 11705@c <en>@code{cvs import} may not be overridden by a @samp{-k} option 11706@c <en>specified on the command line. 11707Como o @samp{-ko}, mas tamb�m inibindo convers�o de 11708fim-de-linhas entre a forma can�nica nas qual os 11709arquivo s�o arquivados no reposit�rio (apenas 11710linefeed), e a forma apropriada para o sistema 11711operacional em uso no cliente. Para sistemas, como o 11712unix, que usam apenas o linefeed para terminar linhas, 11713isto � bastante similar ao @samp{-ko}. Para mais 11714informa��es sobre arquivos bin�rios, veja em 11715@ref{Arquivos bin�rios}. No @sc{cvs} vers�o 1.12.2 ou 11716mais novas @samp{-kb}, ajustado por @code{cvs add}, @code{cvs admin}, ou 11717@code{cvs import} n�o vai ser sobreescrito pela op��o 11718@samp{-k} especificada na linha de comando. 11719 11720@c <en>@item -kv 11721@item -kv 11722@c <en>Generate only keyword values for keyword strings. For 11723@c <en>example, for the @code{Revision} keyword, generate the string 11724@c <en>@code{5.7} instead of @code{$@splitrcskeyword{}Revision: 5.7 $}. 11725@c <en>This can help generate files in programming languages 11726@c <en>where it is hard to strip keyword delimiters like 11727@c <en>@code{$@splitrcskeyword{}Revision: $} from a string. However, 11728@c <en>further keyword substitution cannot be performed once 11729@c <en>the keyword names are removed, so this option should be 11730@c <en>used with care. 11731Gera apenas os valores das palavras-chaves para strings 11732de palavras-chave. Por exemplo, para a palavra-chave 11733@code{Revision}, gera a string @code{5.7} ao inv�s de 11734@code{$@splitrcskeyword{}Revision: 5.7 $}. Isto pode 11735ajudar a gerar arquivos em linguagens de programa��o 11736onde � dif�cil ???strip??? delimitadores de 11737palavras-chave, como o 11738@code{$@splitrcskeyword{}Revision: $} para uma string. 11739Entretanto, outras substitui��es de palavras-chave n�o 11740poderam ser feitas, uma vez que os nomes de 11741palavras-chave foram removidos. Logo, esta op��o deve 11742ser usada com cuidado. 11743 11744@c <en>One often would like to use @samp{-kv} with @code{cvs 11745@c <en>export}---@pxref{export}. But be aware that doesn't 11746@c <en>handle an export containing binary files correctly. 11747� comum querer usar o @samp{-kv} com @code{cvs 11748export}---@pxref{export}. Mas lembre-se que isto n�o 11749trata um export contendo bin�rios direito. 11750 11751@end table 11752 11753@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11754@c <en>@node Configuring keyword expansion 11755@node Configurando a expans�o do teclado 11756@c <en>@section Configuring Keyword Expansion 11757@section Configurando a Expans�o do Teclado 11758@c <en>@cindex Configuring keyword expansion 11759@cindex Configurando a Expans�o do Teclado 11760 11761@c <en>In a repository that includes third-party software on 11762@c <en>vendor branches, it is sometimes helpful to configure 11763@c <en>CVS to use a local keyword instead of the standard 11764@c <en>$@splitrcskeyword{Id}$ or $@splitrcskeyword{Header}$ keywords. Examples from 11765@c <en>real projects includ, $@splitrcskeyword{Xorg}$, $@splitrcskeyword{XFree86}$, 11766@c <en>$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$, 11767@c <en>$@splitrcskeyword{OpenBSD}$, and even $@splitrcskeyword{dotat}$. 11768@c <en>The advantage of this is that 11769@c <en>you can include your local version information in a 11770@c <en>file using this local keyword (sometimes called a 11771@c <en>``custom tag'' or a ``local tag'') without disrupting 11772@c <en>the upstream version information (which may be a 11773@c <en>different local keyword or a standard keyword). In 11774@c <en>these cases, it is typically desirable to disable the 11775@c <en>expansion of all keywords except the configured local 11776@c <en>keyword. 11777Num reposit�rio que inclua software de terceiros em 11778ramos de fornecedor, �s vezes � �til configurar o CVS 11779para usar uma palavra-chave local ao inv�s das 11780palavras-chave padr�o $@splitrcskeyword{Id}$ ou 11781$@splitrcskeyword{Header}$. Exemplos de projetos reais incluem, $@splitrcskeyword{Xorg}$, $@splitrcskeyword{XFree86}$, 11782$@splitrcskeyword{FreeBSD}$, $@splitrcskeyword{NetBSD}$, 11783$@splitrcskeyword{OpenBSD}$, e ainda 11784$@splitrcskeyword{dotat}$. A vantagem disto � que voc� 11785pode incluir sua ???local version information??? num 11786arquivo usando esta palavra-chave local (algumas vezes 11787chamada de ``custom tag'' ou ``local tag'') sem romper 11788com a ???upstream version information??? (que pode ser 11789uma palavra-chave local diferente ou uma palavra-chave 11790padr�o). Nestes casos, � normalmente desej�vel 11791desabilitar a expans�o de todas as palavras-chave 11792exceto a palavra-chave local configurada. 11793 11794@c <en>The @code{KeywordExpansion} option in the 11795@c <en>@file{CVSROOT/config} file is intended to allow for the 11796@c <en>either the explicit exclusion of a keyword or list of 11797@c <en>keywords, or for the explicit inclusion of a keyword or 11798@c <en>a list of keywords. This list may include the 11799@c <en>@code{LocalKeyword} that has been configured. 11800The @code{KeywordExpansion} option in the 11801@file{CVSROOT/config} file is intended to allow for the 11802either the explicit exclusion of a keyword or list of 11803keywords, or for the explicit inclusion of a keyword or 11804a list of keywords. This list may include the 11805@code{LocalKeyword} that has been configured. 11806 11807@c <en>The @code{KeywordExpansion} option is followed by 11808@c <en>@code{=} and the next character may either be @code{i} 11809@c <en>to start an inclusion list or @code{e} to start an 11810@c <en>exclusion list. If the following lines were added to 11811@c <en>the @file{CVSROOT/config} file: 11812The @code{KeywordExpansion} option is followed by 11813@code{=} and the next character may either be @code{i} 11814to start an inclusion list or @code{e} to start an 11815exclusion list. If the following lines were added to 11816the @file{CVSROOT/config} file: 11817 11818@example 11819 # Add a "MyBSD" keyword and restrict keyword 11820 # expansion 11821 LocalKeyword=MyBSD=CVSHeader 11822 KeywordExpand=iMyBSD 11823@end example 11824 11825@c <en>then only the $@splitrcskeyword{MyBSD}$ keyword would be expanded. 11826@c <en>A list may be used. The this example: 11827then only the $@splitrcskeyword{MyBSD}$ keyword would be expanded. 11828A list may be used. The this example: 11829 11830@example 11831 # Add a "MyBSD" keyword and restrict keyword 11832 # expansion to the MyBSD, Name and Date keywords. 11833 LocalKeyword=MyBSD=CVSHeader 11834 KeywordExpand=iMyBSD,Name,Date 11835@end example 11836 11837@c <en>would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and 11838@c <en>$@splitrcskeyword{Date}$ to be expanded. 11839@c <en>would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and 11840@c <en>$@splitrcskeyword{Date}$ to be expanded. 11841would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and 11842$@splitrcskeyword{Date}$ to be expanded. 11843would allow $@splitrcskeyword{MyBSD}$, $@splitrcskeyword{Name}$, and 11844$@splitrcskeyword{Date}$ to be expanded. 11845 11846@c <en>It is also possible to configure an exclusion list 11847@c <en>using the following: 11848@c <en>It is also possible to configure an exclusion list 11849@c <en>using the following: 11850It is also possible to configure an exclusion list 11851using the following: 11852It is also possible to configure an exclusion list 11853using the following: 11854 11855@example 11856 # Do not expand the non-RCS keyword CVSHeader 11857 KeywordExpand=eCVSHeader 11858@end example 11859 11860@c <en>This allows @sc{cvs} to ignore the recently introduced 11861@c <en>$@splitrcskeyword{CVSHeader}$ keyword and retain all of the 11862@c <en>others. The exclusion entry could also contain the 11863@c <en>standard RCS keyword list, but this could be confusing 11864@c <en>to users that expect RCS keywords to be expanded, so 11865@c <en>ycare should be taken to properly set user expectations 11866@c <en>for a repository that is configured in that manner. 11867This allows @sc{cvs} to ignore the recently introduced 11868$@splitrcskeyword{CVSHeader}$ keyword and retain all of the 11869others. The exclusion entry could also contain the 11870standard RCS keyword list, but this could be confusing 11871to users that expect RCS keywords to be expanded, so 11872ycare should be taken to properly set user expectations 11873for a repository that is configured in that manner. 11874 11875@c <en>If there is a desire to not have any RCS keywords 11876@c <en>expanded and not use the @code{-ko} flags everywhere, 11877@c <en>an administrator may disable all keyword expansion 11878@c <en>using the @file{CVSROOT/config} line: 11879If there is a desire to not have any RCS keywords 11880expanded and not use the @code{-ko} flags everywhere, 11881an administrator may disable all keyword expansion 11882using the @file{CVSROOT/config} line: 11883 11884@example 11885 # Do not expand any RCS keywords 11886 KeywordExpand=i 11887@end example 11888 11889@c <en>this could be confusing to users that expect RCS 11890@c <en>keywords like $@splitrcskeyword{Id}$ to be expanded properly, 11891@c <en>so care should be taken to properly set user 11892@c <en>expectations for a repository so configured. 11893this could be confusing to users that expect RCS 11894keywords like $@splitrcskeyword{Id}$ to be expanded properly, 11895so care should be taken to properly set user 11896expectations for a repository so configured. 11897 11898@c <en>It should be noted that a patch to provide both the 11899@c <en>@code{KeywordExpand} and @code{LocalKeyword} features 11900@c <en>has been around a long time. However, that patch 11901@c <en>implemented these features using @code{tag=} and 11902@c <en>@code{tagexpand=} keywords and those keywords are NOT 11903@c <en>recognized. 11904It should be noted that a patch to provide both the 11905@code{KeywordExpand} and @code{LocalKeyword} features 11906has been around a long time. However, that patch 11907implemented these features using @code{tag=} and 11908@code{tagexpand=} keywords and those keywords are NOT 11909recognized. 11910 11911@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 11912@c <en>@node Log keyword 11913@node Log keyword 11914@c <en>@section Problems with the $@splitrcskeyword{}Log$ keyword. 11915@section Problems with the $@splitrcskeyword{}Log$ keyword. 11916 11917@c <en>The @code{$@splitrcskeyword{}Log$} keyword is somewhat 11918@c <en>controversial. As long as you are working on your 11919@c <en>development system the information is easily accessible 11920@c <en>even if you do not use the @code{$@splitrcskeyword{}Log$} 11921@c <en>keyword---just do a @code{cvs log}. Once you export 11922@c <en>the file the history information might be useless 11923@c <en>anyhow. 11924The @code{$@splitrcskeyword{}Log$} keyword is somewhat 11925controversial. As long as you are working on your 11926development system the information is easily accessible 11927even if you do not use the @code{$@splitrcskeyword{}Log$} 11928keyword---just do a @code{cvs log}. Once you export 11929the file the history information might be useless 11930anyhow. 11931 11932@c <en>A more serious concern is that @sc{cvs} is not good at 11933@c <en>handling @code{$@splitrcskeyword{}Log$} entries when a branch is 11934@c <en>merged onto the main trunk. Conflicts often result 11935@c <en>from the merging operation. 11936A more serious concern is that @sc{cvs} is not good at 11937handling @code{$@splitrcskeyword{}Log$} entries when a branch is 11938merged onto the main trunk. Conflicts often result 11939from the merging operation. 11940@c Might want to check whether the CVS implementation 11941@c of RCS_merge has this problem the same way rcsmerge 11942@c does. I would assume so.... 11943 11944@c <en>People also tend to "fix" the log entries in the file 11945@c <en>(correcting spelling mistakes and maybe even factual 11946@c <en>errors). If that is done the information from 11947@c <en>@code{cvs log} will not be consistent with the 11948@c <en>information inside the file. This may or may not be a 11949@c <en>problem in real life. 11950People also tend to "fix" the log entries in the file 11951(correcting spelling mistakes and maybe even factual 11952errors). If that is done the information from 11953@code{cvs log} will not be consistent with the 11954information inside the file. This may or may not be a 11955problem in real life. 11956 11957@c <en>It has been suggested that the @code{$@splitrcskeyword{}Log$} 11958@c <en>keyword should be inserted @emph{last} in the file, and 11959@c <en>not in the files header, if it is to be used at all. 11960@c <en>That way the long list of change messages will not 11961@c <en>interfere with everyday source file browsing. 11962It has been suggested that the @code{$@splitrcskeyword{}Log$} 11963keyword should be inserted @emph{last} in the file, and 11964not in the files header, if it is to be used at all. 11965That way the long list of change messages will not 11966interfere with everyday source file browsing. 11967 11968@c --------------------------------------------------------------------- 11969@c <en>@node Tracking sources 11970@node Acompanhando fontes 11971@c <en>@chapter Tracking third-party sources 11972@chapter Tracking third-party sources 11973@c <en>@cindex Third-party sources 11974@cindex Fontes de terceiros 11975@c <en>@cindex Tracking sources 11976@cindex Tracking sources 11977 11978@c FIXME: Need discussion of added and removed files. 11979@c FIXME: This doesn't really adequately introduce the 11980@c concepts of "vendor" and "you". They don't *have* 11981@c to be separate organizations or separate people. 11982@c We want a description which is somewhat more based on 11983@c the technical issues of which sources go where, but 11984@c also with enough examples of how this relates to 11985@c relationships like customer-supplier, developer-QA, 11986@c maintainer-contributor, or whatever, to make it 11987@c seem concrete. 11988@c <en>If you modify a program to better fit your site, you 11989@c <en>probably want to include your modifications when the next 11990@c <en>release of the program arrives. @sc{cvs} can help you with 11991@c <en>this task. 11992Se voc� modificar um programa para se adequar melhor ao 11993seu ambiente, voc� provavelmente vai querer incluir 11994suas modifica��es quando a nova release do do programa 11995chegar. O @sc{cvs} pode te ajudar nesta tarefa. 11996 11997@c <en>@cindex Vendor 11998@cindex Vendor 11999@cindex Vendor (fornecedor) 12000@c <en>@cindex Vendor branch 12001@cindex Vendor branch (ramo do forncedor) 12002@cindex Ramo do fornecedor 12003@c <en>@cindex Branch, vendor- 12004@cindex Branch, vendor- 12005@c <en>In the terminology used in @sc{cvs}, the supplier of the 12006@c <en>program is called a @dfn{vendor}. The unmodified 12007@c <en>distribution from the vendor is checked in on its own 12008@c <en>branch, the @dfn{vendor branch}. @sc{cvs} reserves branch 12009@c <en>1.1.1 for this use. 12010Na terminologia usada no @sc{cvs}, quem fornece um 12011programa � chamado de @dfn{vendor} (fornecedor, em 12012portugu�s). A distribui��o n�o modificada do 12013fornecedor � ???checked in??? no seu pr�prio ramo, o 12014@dfn{vendor branch} (ramo do fornecedor). O @sc{cvs} 12015reserva o ramo 1.1.1 para isto. 12016 12017@c <en>When you modify the source and commit it, your revision 12018@c <en>will end up on the main trunk. When a new release is 12019@c <en>made by the vendor, you commit it on the vendor branch 12020@c <en>and copy the modifications onto the main trunk. 12021Quando voc� modifica a fonte e a ???commit???, sua 12022revis�o vai terminar na ???main trunk???. Quando uma 12023nova release � feita pelo fornecedor, voc� ???commit??? 12024ela no ramo do fornecedor e copia as modifica��es no 12025???main trunk???. 12026 12027@c <en>Use the @code{import} command to create and update 12028@c <en>the vendor branch. When you import a new file, 12029@c <en>the vendor branch is made the `head' revision, so 12030@c <en>anyone that checks out a copy of the file gets that 12031@c <en>revision. When a local modification is committed it is 12032@c <en>placed on the main trunk, and made the `head' 12033@c <en>revision. 12034Use o comando @code{import} para criar e atualizar o 12035ramo do fornecedor. Quando voc� importa um novo 12036arquivo, o ramo do fornecedor se torna a revis�o 12037`head', logo qualquer um que ???checks out??? uma c�pia 12038do arquivo pega esta revis�o. Quando uma modifica��o 12039local � ???committed???, ela � posta no ???main 12040trunk???, e se torna a revis�o `head'. 12041 12042@menu 12043@c <en>* First import:: Importing for the first time 12044* Primeira importa��o:: Importando pela primeira vez 12045@c <en>* Update imports:: Updating with the import command 12046* Importa��es de atualiza��o:: Atualizando com o comando import 12047@c <en>* Reverting local changes:: Reverting to the latest vendor release 12048* Reverting local changes:: Reverting to the latest vendor release 12049@c <en>* Binary files in imports:: Binary files require special handling 12050* Arquivos bin�rios em importa��es:: Arquivos bin�rios requerem tratamento especial 12051@c <en>* Keywords in imports:: Keyword substitution might be undesirable 12052* Palavras-chave em importa��es:: Substitui��o de palavras-chave pode ser indesej�vel 12053@c <en>* Multiple vendor branches:: What if you get sources from several places? 12054* Ramos de fornecedor m�ltiplos:: E se voc� obt�m fontes de v�rios lugares? 12055@end menu 12056 12057@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12058@c <en>@node First import 12059@node Primeira importa��o 12060@c <en>@section Importing for the first time 12061@section Importing for the first time 12062@c <en>@cindex Importing modules 12063@cindex Importing modules 12064 12065@c Should mention naming conventions for vendor tags, 12066@c release tags, and perhaps directory names. 12067@c <en>Use the @code{import} command to check in the sources 12068@c <en>for the first time. When you use the @code{import} 12069@c <en>command to track third-party sources, the @dfn{vendor 12070@c <en>tag} and @dfn{release tags} are useful. The 12071@c <en>@dfn{vendor tag} is a symbolic name for the branch 12072@c <en>(which is always 1.1.1, unless you use the @samp{-b 12073@c <en>@var{branch}} flag---see @ref{Multiple vendor branches}.). The 12074@c <en>@dfn{release tags} are symbolic names for a particular 12075@c <en>release, such as @samp{FSF_0_04}. 12076Use the @code{import} command to check in the sources 12077for the first time. When you use the @code{import} 12078command to track third-party sources, the @dfn{vendor 12079tag} and @dfn{release tags} are useful. The 12080@dfn{vendor tag} is a symbolic name for the branch 12081(which is always 1.1.1, unless you use the @samp{-b 12082@var{branch}} flag---see @ref{Ramos de fornecedor m�ltiplos}.). The 12083@dfn{release tags} are symbolic names for a particular 12084release, such as @samp{FSF_0_04}. 12085 12086@c I'm not completely sure this belongs here. But 12087@c we need to say it _somewhere_ reasonably obvious; it 12088@c is a common misconception among people first learning CVS 12089@c <en>Note that @code{import} does @emph{not} change the 12090@c <en>directory in which you invoke it. In particular, it 12091@c <en>does not set up that directory as a @sc{cvs} working 12092@c <en>directory; if you want to work with the sources import 12093@c <en>them first and then check them out into a different 12094@c <en>directory (@pxref{Getting the source}). 12095Note that @code{import} does @emph{not} change the 12096directory in which you invoke it. In particular, it 12097does not set up that directory as a @sc{cvs} working 12098directory; if you want to work with the sources import 12099them first and then check them out into a different 12100directory (@pxref{Obtendo os fontes}). 12101 12102@c <en>@cindex wdiff (import example) 12103@cindex wdiff (import example) 12104@c <en>Suppose you have the sources to a program called 12105@c <en>@code{wdiff} in a directory @file{wdiff-0.04}, 12106@c <en>and are going to make private modifications that you 12107@c <en>want to be able to use even when new releases are made 12108@c <en>in the future. You start by importing the source to 12109@c <en>your repository: 12110Suppose you have the sources to a program called 12111@code{wdiff} in a directory @file{wdiff-0.04}, 12112and are going to make private modifications that you 12113want to be able to use even when new releases are made 12114in the future. You start by importing the source to 12115your repository: 12116 12117@example 12118$ cd wdiff-0.04 12119$ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04 12120@end example 12121 12122@c <en>The vendor tag is named @samp{FSF_DIST} in the above 12123@c <en>example, and the only release tag assigned is 12124@c <en>@samp{WDIFF_0_04}. 12125The vendor tag is named @samp{FSF_DIST} in the above 12126example, and the only release tag assigned is 12127@samp{WDIFF_0_04}. 12128@c FIXME: Need to say where fsf/wdiff comes from. 12129 12130@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12131@c <en>@node Update imports 12132@node Importa��es de atualiza��o 12133@c <en>@section Updating with the import command 12134@section Updating with the import command 12135 12136@c <en>When a new release of the source arrives, you import it into the 12137@c <en>repository with the same @code{import} command that you used to set up 12138@c <en>the repository in the first place. The only difference is that you 12139@c <en>specify a different release tag this time: 12140When a new release of the source arrives, you import it into the 12141repository with the same @code{import} command that you used to set up 12142the repository in the first place. The only difference is that you 12143specify a different release tag this time: 12144 12145@example 12146$ tar xfz wdiff-0.05.tar.gz 12147$ cd wdiff-0.05 12148$ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05 12149@end example 12150 12151@c <en>For files that have not been modified locally, the newly created 12152@c <en>revision becomes the head revision. If you have made local 12153@c <en>changes, @code{import} will warn you that you must merge the changes 12154@c <en>into the main trunk, and tell you to use @samp{checkout -j} to do so: 12155For files that have not been modified locally, the newly created 12156revision becomes the head revision. If you have made local 12157changes, @code{import} will warn you that you must merge the changes 12158into the main trunk, and tell you to use @samp{checkout -j} to do so: 12159 12160@c FIXME: why "wdiff" here and "fsf/wdiff" in the 12161@c "import"? I think the assumption is that one has 12162@c "wdiff fsf/wdiff" or some such in modules, but it 12163@c would be better to not use modules in this example. 12164@example 12165$ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff 12166@end example 12167 12168@noindent 12169@c <en>The above command will check out the latest revision of 12170@c <en>@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST} 12171@c <en>since yesterday into the working copy. If any conflicts arise during 12172@c <en>the merge they should be resolved in the normal way (@pxref{Conflicts 12173@c <en>example}). Then, the modified files may be committed. 12174The above command will check out the latest revision of 12175@samp{wdiff}, merging the changes made on the vendor branch @samp{FSF_DIST} 12176since yesterday into the working copy. If any conflicts arise during 12177the merge they should be resolved in the normal way 12178(@pxref{Exemplo de conflitos}). Then, the modified files may be committed. 12179 12180@c <en>However, it is much better to use the two release tags rather than using 12181@c <en>a date on the branch as suggested above: 12182However, it is much better to use the two release tags rather than using 12183a date on the branch as suggested above: 12184 12185@example 12186$ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff 12187@end example 12188 12189@noindent 12190@c <en>The reason this is better is that 12191@c <en>using a date, as suggested above, assumes that you do 12192@c <en>not import more than one release of a product per day. 12193@c <en>More importantly, using the release tags allows @sc{cvs} to detect files 12194@c <en>that were removed between the two vendor releases and mark them for 12195@c <en>removal. Since @code{import} has no way to detect removed files, you 12196@c <en>should do a merge like this even if @code{import} doesn't tell you to. 12197The reason this is better is that 12198using a date, as suggested above, assumes that you do 12199not import more than one release of a product per day. 12200More importantly, using the release tags allows @sc{cvs} to detect files 12201that were removed between the two vendor releases and mark them for 12202removal. Since @code{import} has no way to detect removed files, you 12203should do a merge like this even if @code{import} doesn't tell you to. 12204 12205@c <en>@node Reverting local changes 12206@node Reverting local changes 12207@c <en>@section Reverting to the latest vendor release 12208@section Reverting to the latest vendor release 12209 12210@c <en>You can also revert local changes completely and return 12211@c <en>to the latest vendor release by changing the `head' 12212@c <en>revision back to the vendor branch on all files. For 12213@c <en>example, if you have a checked-out copy of the sources 12214@c <en>in @file{~/work.d/wdiff}, and you want to revert to the 12215@c <en>vendor's version for all the files in that directory, 12216@c <en>you would type: 12217You can also revert local changes completely and return 12218to the latest vendor release by changing the `head' 12219revision back to the vendor branch on all files. For 12220example, if you have a checked-out copy of the sources 12221in @file{~/work.d/wdiff}, and you want to revert to the 12222vendor's version for all the files in that directory, 12223you would type: 12224 12225@example 12226$ cd ~/work.d/wdiff 12227$ cvs admin -bFSF_DIST . 12228@end example 12229 12230@noindent 12231@c <en>You must specify the @samp{-bFSF_DIST} without any space 12232@c <en>after the @samp{-b}. @xref{admin options}. 12233You must specify the @samp{-bFSF_DIST} without any space 12234after the @samp{-b}. @xref{admin options}. 12235 12236@c <en>@node Binary files in imports 12237@node Arquivos bin�rios em importa��es 12238@c <en>@section How to handle binary files with cvs import 12239@section How to handle binary files with cvs import 12240 12241@c <en>Use the @samp{-k} wrapper option to tell import which 12242@c <en>files are binary. @xref{Wrappers}. 12243Use the @samp{-k} wrapper option to tell import which 12244files are binary. @xref{Wrappers}. 12245 12246@c <en>@node Keywords in imports 12247@node Palavras-chave em importa��es 12248@c <en>@section How to handle keyword substitution with cvs import 12249@section Como lidar com substitui��o de palavras-chave com o cvs import 12250 12251@c <en>The sources which you are importing may contain 12252@c <en>keywords (@pxref{Keyword substitution}). For example, 12253@c <en>the vendor may use @sc{cvs} or some other system 12254@c <en>which uses similar keyword expansion syntax. If you 12255@c <en>just import the files in the default fashion, then 12256@c <en>the keyword expansions supplied by the vendor will 12257@c <en>be replaced by keyword expansions supplied by your 12258@c <en>own copy of @sc{cvs}. It may be more convenient to 12259@c <en>maintain the expansions supplied by the vendor, so 12260@c <en>that this information can supply information about 12261@c <en>the sources that you imported from the vendor. 12262The sources which you are importing may contain 12263keywords (@pxref{Substitui��o de palavra-chave}). For example, 12264the vendor may use @sc{cvs} or some other system 12265which uses similar keyword expansion syntax. If you 12266just import the files in the default fashion, then 12267the keyword expansions supplied by the vendor will 12268be replaced by keyword expansions supplied by your 12269own copy of @sc{cvs}. It may be more convenient to 12270maintain the expansions supplied by the vendor, so 12271that this information can supply information about 12272the sources that you imported from the vendor. 12273 12274@c <en>To maintain the keyword expansions supplied by the 12275@c <en>vendor, supply the @samp{-ko} option to @code{cvs 12276@c <en>import} the first time you import the file. 12277@c <en>This will turn off keyword expansion 12278@c <en>for that file entirely, so if you want to be more 12279@c <en>selective you'll have to think about what you want 12280@c <en>and use the @samp{-k} option to @code{cvs update} or 12281@c <en>@code{cvs admin} as appropriate. 12282To maintain the keyword expansions supplied by the 12283vendor, supply the @samp{-ko} option to @code{cvs 12284import} the first time you import the file. 12285This will turn off keyword expansion 12286for that file entirely, so if you want to be more 12287selective you'll have to think about what you want 12288and use the @samp{-k} option to @code{cvs update} or 12289@code{cvs admin} as appropriate. 12290@c Supplying -ko to import if the file already existed 12291@c has no effect. Not clear to me whether it should 12292@c or not. 12293 12294@c <en>@node Multiple vendor branches 12295@node Ramos de fornecedor m�ltiplos 12296@c <en>@section Multiple vendor branches 12297@section Ramos de fornecedor m�ltiplos 12298 12299@c <en>All the examples so far assume that there is only one 12300@c <en>vendor from which you are getting sources. In some 12301@c <en>situations you might get sources from a variety of 12302@c <en>places. For example, suppose that you are dealing with 12303@c <en>a project where many different people and teams are 12304@c <en>modifying the software. There are a variety of ways to 12305@c <en>handle this, but in some cases you have a bunch of 12306@c <en>source trees lying around and what you want to do more 12307@c <en>than anything else is just to all put them in @sc{cvs} so 12308@c <en>that you at least have them in one place. 12309All the examples so far assume that there is only one 12310vendor from which you are getting sources. In some 12311situations you might get sources from a variety of 12312places. For example, suppose that you are dealing with 12313a project where many different people and teams are 12314modifying the software. There are a variety of ways to 12315handle this, but in some cases you have a bunch of 12316source trees lying around and what you want to do more 12317than anything else is just to all put them in @sc{cvs} so 12318that you at least have them in one place. 12319 12320@c <en>For handling situations in which there may be more than 12321@c <en>one vendor, you may specify the @samp{-b} option to 12322@c <en>@code{cvs import}. It takes as an argument the vendor 12323@c <en>branch to import to. The default is @samp{-b 1.1.1}. 12324For handling situations in which there may be more than 12325one vendor, you may specify the @samp{-b} option to 12326@code{cvs import}. It takes as an argument the vendor 12327branch to import to. The default is @samp{-b 1.1.1}. 12328 12329@c <en>For example, suppose that there are two teams, the red 12330@c <en>team and the blue team, that are sending you sources. 12331@c <en>You want to import the red team's efforts to branch 12332@c <en>1.1.1 and use the vendor tag RED. You want to import 12333@c <en>the blue team's efforts to branch 1.1.3 and use the 12334@c <en>vendor tag BLUE. So the commands you might use are: 12335For example, suppose that there are two teams, the red 12336team and the blue team, that are sending you sources. 12337You want to import the red team's efforts to branch 123381.1.1 and use the vendor tag RED. You want to import 12339the blue team's efforts to branch 1.1.3 and use the 12340vendor tag BLUE. So the commands you might use are: 12341 12342@example 12343$ cvs import dir RED RED_1-0 12344$ cvs import -b 1.1.3 dir BLUE BLUE_1-5 12345@end example 12346 12347Note that if your vendor tag does not match your 12348@samp{-b} option, @sc{cvs} will not detect this case! For 12349example, 12350 12351@example 12352$ cvs import -b 1.1.3 dir RED RED_1-0 12353@end example 12354 12355@noindent 12356@c <en>Be careful; this kind of mismatch is sure to sow 12357@c <en>confusion or worse. I can't think of a useful purpose 12358@c <en>for the ability to specify a mismatch here, but if you 12359@c <en>discover such a use, don't. @sc{cvs} is likely to make this 12360@c <en>an error in some future release. 12361Be careful; this kind of mismatch is sure to sow 12362confusion or worse. I can't think of a useful purpose 12363for the ability to specify a mismatch here, but if you 12364discover such a use, don't. @sc{cvs} is likely to make this 12365an error in some future release. 12366 12367@c Probably should say more about the semantics of 12368@c multiple branches. What about the default branch? 12369@c What about joining (perhaps not as useful with 12370@c multiple branches, or perhaps it is. Either way 12371@c should be mentioned). 12372 12373@c I'm not sure about the best location for this. In 12374@c one sense, it might belong right after we've introduced 12375@c CVS's basic version control model, because people need 12376@c to figure out builds right away. The current location 12377@c is based on the theory that it kind of akin to the 12378@c "Revision management" section. 12379@c <en>@node Builds 12380@node Builds 12381@c <en>@chapter How your build system interacts with CVS 12382@chapter How your build system interacts with CVS 12383@c <en>@cindex Builds 12384@cindex Builds 12385@c <en>@cindex make 12386@cindex make 12387 12388@c <en>As mentioned in the introduction, @sc{cvs} does not 12389@c <en>contain software for building your software from source 12390@c <en>code. This section describes how various aspects of 12391@c <en>your build system might interact with @sc{cvs}. 12392As mentioned in the introduction, @sc{cvs} does not 12393contain software for building your software from source 12394code. This section describes how various aspects of 12395your build system might interact with @sc{cvs}. 12396 12397@c Is there a way to discuss this without reference to 12398@c tools other than CVS? I'm not sure there is; I 12399@c wouldn't think that people who learn CVS first would 12400@c even have this concern. 12401@c <en>One common question, especially from people who are 12402@c <en>accustomed to @sc{rcs}, is how to make their build get 12403@c <en>an up to date copy of the sources. The answer to this 12404@c <en>with @sc{cvs} is two-fold. First of all, since 12405@c <en>@sc{cvs} itself can recurse through directories, there 12406@c <en>is no need to modify your @file{Makefile} (or whatever 12407@c <en>configuration file your build tool uses) to make sure 12408@c <en>each file is up to date. Instead, just use two 12409@c <en>commands, first @code{cvs -q update} and then 12410@c <en>@code{make} or whatever the command is to invoke your 12411@c <en>build tool. Secondly, you do not necessarily 12412@c <en>@emph{want} to get a copy of a change someone else made 12413@c <en>until you have finished your own work. One suggested 12414@c <en>approach is to first update your sources, then 12415@c <en>implement, build and 12416@c <en>test the change you were thinking of, and then commit 12417@c <en>your sources (updating first if necessary). By 12418@c <en>periodically (in between changes, using the approach 12419@c <en>xjust described) updating your entire tree, you ensure 12420@c <en>that your sources are sufficiently up to date. 12421One common question, especially from people who are 12422accustomed to @sc{rcs}, is how to make their build get 12423an up to date copy of the sources. The answer to this 12424with @sc{cvs} is two-fold. First of all, since 12425@sc{cvs} itself can recurse through directories, there 12426is no need to modify your @file{Makefile} (or whatever 12427configuration file your build tool uses) to make sure 12428each file is up to date. Instead, just use two 12429commands, first @code{cvs -q update} and then 12430@code{make} or whatever the command is to invoke your 12431build tool. Secondly, you do not necessarily 12432@emph{want} to get a copy of a change someone else made 12433until you have finished your own work. One suggested 12434approach is to first update your sources, then 12435implement, build and 12436test the change you were thinking of, and then commit 12437your sources (updating first if necessary). By 12438periodically (in between changes, using the approach 12439just described) updating your entire tree, you ensure 12440that your sources are sufficiently up to date. 12441 12442@c <en>@cindex Bill of materials 12443@cindex Bill of materials 12444@c <en>One common need is to record which versions of which 12445@c <en>source files went into a particular build. This kind 12446@c <en>of functionality is sometimes called @dfn{bill of 12447@c <en>materials} or something similar. The best way to do 12448@c <en>this with @sc{cvs} is to use the @code{tag} command to 12449@c <en>record which versions went into a given build 12450@c <en>(@pxref{Tags}). 12451One common need is to record which versions of which 12452source files went into a particular build. This kind 12453of functionality is sometimes called @dfn{bill of 12454materials} or something similar. The best way to do 12455this with @sc{cvs} is to use the @code{tag} command to 12456record which versions went into a given build 12457(@pxref{Etiquetas}). 12458 12459@c <en>Using @sc{cvs} in the most straightforward manner 12460@c <en>possible, each developer will have a copy of the entire 12461@c <en>source tree which is used in a particular build. If 12462@c <en>the source tree is small, or if developers are 12463@c <en>geographically dispersed, this is the preferred 12464@c <en>solution. In fact one approach for larger projects is 12465@c <en>to break a project down into smaller 12466Using @sc{cvs} in the most straightforward manner 12467possible, each developer will have a copy of the entire 12468source tree which is used in a particular build. If 12469the source tree is small, or if developers are 12470geographically dispersed, this is the preferred 12471solution. In fact one approach for larger projects is 12472to break a project down into smaller 12473@c I say subsystem instead of module because they may or 12474@c may not use the modules file. 12475@c <en>separately-compiled subsystems, and arrange a way of 12476@c <en>releasing them internally so that each developer need 12477@c <en>check out only those subsystems which they are 12478@c <en>actively working on. 12479separately-compiled subsystems, and arrange a way of 12480releasing them internally so that each developer need 12481check out only those subsystems which they are 12482actively working on. 12483 12484@c <en>Another approach is to set up a structure which allows 12485@c <en>developers to have their own copies of some files, and 12486@c <en>for other files to access source files from a central 12487@c <en>location. Many people have come up with some such a 12488Another approach is to set up a structure which allows 12489developers to have their own copies of some files, and 12490for other files to access source files from a central 12491location. Many people have come up with some such a 12492@c two such people are paul@sander.cupertino.ca.us (for 12493@c a previous employer) 12494@c and gtornblo@senet.abb.se (spicm and related tools), 12495@c but as far as I know 12496@c no one has nicely packaged or released such a system (or 12497@c instructions for constructing one). 12498@c <en>system using features such as the symbolic link feature 12499@c <en>found in many operating systems, or the @code{VPATH} 12500@c <en>feature found in many versions of @code{make}. One build 12501@c <en>tool which is designed to help with this kind of thing 12502@c <en>is Odin (see 12503@c <en>@code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}). 12504system using features such as the symbolic link feature 12505found in many operating systems, or the @code{VPATH} 12506feature found in many versions of @code{make}. One build 12507tool which is designed to help with this kind of thing 12508is Odin (see 12509@code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}). 12510@c Should we be saying more about Odin? Or how you use 12511@c it with CVS? Also, the Prime Time Freeware for Unix 12512@c disk (see http://www.ptf.com/) has Odin (with a nice 12513@c paragraph summarizing it on the web), so that might be a 12514@c semi-"official" place to point people. 12515@c 12516@c Of course, many non-CVS systems have this kind of 12517@c functionality, for example OSF's ODE 12518@c (http://www.osf.org/ode/) or mk 12519@c (http://www.grin.net/~pzi/mk-3.18.4.docs/mk_toc.html 12520@c He has changed providers in the past; a search engine search 12521@c for "Peter Ziobrzynski" probably won't get too many 12522@c spurious hits :-). A more stable URL might be 12523@c ftp://ftp.uu.net/pub/cmvc/mk). But I'm not sure 12524@c there is any point in mentioning them here unless they 12525@c can work with CVS. 12526 12527@c --------------------------------------------------------------------- 12528@c <en>@node Special Files 12529@node Arquivos especiais 12530@c <en>@chapter Special Files 12531@chapter Arquivos especiais 12532 12533@c <en>@cindex Special files 12534@cindex Arquivos especiais 12535@c <en>@cindex Device nodes 12536@cindex Device nodes 12537@c <en>@cindex Ownership, saving in CVS 12538@cindex Ownership, saving in CVS 12539@c <en>@cindex Permissions, saving in CVS 12540@cindex Permissions, saving in CVS 12541@c <en>@cindex Hard links 12542@cindex Hard links 12543@c <en>@cindex Symbolic links 12544@cindex Symbolic links 12545 12546@c <en>In normal circumstances, @sc{cvs} works only with regular 12547@c <en>files. Every file in a project is assumed to be 12548@c <en>persistent; it must be possible to open, read and close 12549@c <en>them; and so on. @sc{cvs} also ignores file permissions and 12550@c <en>ownerships, leaving such issues to be resolved by the 12551@c <en>developer at installation time. In other words, it is 12552@c <en>not possible to "check in" a device into a repository; 12553@c <en>if the device file cannot be opened, @sc{cvs} will refuse to 12554@c <en>handle it. Files also lose their ownerships and 12555@c <en>permissions during repository transactions. 12556In normal circumstances, @sc{cvs} works only with regular 12557files. Every file in a project is assumed to be 12558persistent; it must be possible to open, read and close 12559them; and so on. @sc{cvs} also ignores file permissions and 12560ownerships, leaving such issues to be resolved by the 12561developer at installation time. In other words, it is 12562not possible to "check in" a device into a repository; 12563if the device file cannot be opened, @sc{cvs} will refuse to 12564handle it. Files also lose their ownerships and 12565permissions during repository transactions. 12566 12567@ignore 12568If the configuration variable @code{PreservePermissions} 12569(@pxref{config}) is set in the repository, @sc{cvs} will 12570save the following file characteristics in the 12571repository: 12572 12573@itemize @bullet 12574@item user and group ownership 12575@item permissions 12576@item major and minor device numbers 12577@item symbolic links 12578@item hard link structure 12579@end itemize 12580 12581Using the @code{PreservePermissions} option affects the 12582behavior of @sc{cvs} in several ways. First, some of the 12583new operations supported by @sc{cvs} are not accessible to 12584all users. In particular, file ownership and special 12585file characteristics may only be changed by the 12586superuser. When the @code{PreservePermissions} 12587configuration variable is set, therefore, users will 12588have to be `root' in order to perform @sc{cvs} operations. 12589 12590When @code{PreservePermissions} is in use, some @sc{cvs} 12591operations (such as @samp{cvs status}) will not 12592recognize a file's hard link structure, and so will 12593emit spurious warnings about mismatching hard links. 12594The reason is that @sc{cvs}'s internal structure does not 12595make it easy for these operations to collect all the 12596necessary data about hard links, so they check for file 12597conflicts with inaccurate data. 12598 12599A more subtle difference is that @sc{cvs} considers a file 12600to have changed only if its contents have changed 12601(specifically, if the modification time of the working 12602file does not match that of the repository's file). 12603Therefore, if only the permissions, ownership or hard 12604linkage have changed, or if a device's major or minor 12605numbers have changed, @sc{cvs} will not notice. In order to 12606commit such a change to the repository, you must force 12607the commit with @samp{cvs commit -f}. This also means 12608that if a file's permissions have changed and the 12609repository file is newer than the working copy, 12610performing @samp{cvs update} will silently change the 12611permissions on the working copy. 12612 12613Changing hard links in a @sc{cvs} repository is particularly 12614delicate. Suppose that file @file{foo} is linked to 12615file @file{old}, but is later relinked to file 12616@file{new}. You can wind up in the unusual situation 12617where, although @file{foo}, @file{old} and @file{new} 12618have all had their underlying link patterns changed, 12619only @file{foo} and @file{new} have been modified, so 12620@file{old} is not considered a candidate for checking 12621in. It can be very easy to produce inconsistent 12622results this way. Therefore, we recommend that when it 12623is important to save hard links in a repository, the 12624prudent course of action is to @code{touch} any file 12625whose linkage or status has changed since the last 12626checkin. Indeed, it may be wise to @code{touch *} 12627before each commit in a directory with complex hard 12628link structures. 12629 12630It is worth noting that only regular files may 12631be merged, for reasons that hopefully are obvious. If 12632@samp{cvs update} or @samp{cvs checkout -j} attempts to 12633merge a symbolic link with a regular file, or two 12634device files for different kinds of devices, @sc{cvs} will 12635report a conflict and refuse to perform the merge. At 12636the same time, @samp{cvs diff} will not report any 12637differences between these files, since no meaningful 12638textual comparisons can be made on files which contain 12639no text. 12640 12641The @code{PreservePermissions} features do not work 12642with client/server @sc{cvs}. Another limitation is 12643that hard links must be to other files within the same 12644directory; hard links across directories are not 12645supported. 12646@end ignore 12647 12648@c --------------------------------------------------------------------- 12649@c <en>@node Comandos do CVS 12650@node Comandos do CVS 12651@c <en>@appendix Guia dos comandos do CVS 12652@appendix Guia dos comandos do CVS 12653 12654@c <en>This appendix describes the overall structure of 12655@c <en>@sc{cvs} commands, and describes some commands in 12656@c <en>detail (others are described elsewhere; for a quick 12657@c <en>reference to @sc{cvs} commands, @pxref{Invoking CVS}). 12658Este ap�ndice descreve a estrutura geral dos comandos 12659do @sc{cvs}, e descreve alguns comandos em detalhe 12660(outros s�o descritos em outra parte; para 12661uma refer�ncia r�pida dos comandos do @sc{cvs}, 12662@pxref{Chamando o CVS}). 12663@c The idea is that we want to move the commands which 12664@c are described here into the main body of the manual, 12665@c in the process reorganizing the manual to be 12666@c organized around what the user wants to do, not 12667@c organized around CVS commands. 12668@c 12669@c Note that many users do expect a manual which is 12670@c organized by command. At least some users do. 12671@c One good addition to the "organized by command" 12672@c section (if any) would be "see also" links. 12673@c The awk manual might be a good example; it has a 12674@c reference manual which is more verbose than Invoking 12675@c CVS but probably somewhat less verbose than CVS 12676@c Commands. 12677 12678@menu 12679@c <en>* Structure:: Overall structure of CVS commands 12680* Estrutura:: Estrutura geral dos comandos do CVS 12681@c <en>* Exit status:: Indicating CVS's success or failure 12682* Estados de sa�da:: Indicando o sucesso ou falha do CVS 12683@c <en>* ~/.cvsrc:: Default options with the ~/.cvsrc file 12684* ~/.cvsrc:: Op��es padr�o com o arquivo ~/.cvsrc 12685@c <en>* Global options:: Options you give to the left of cvs_command 12686* Op��es globais:: Op��es que voc� bota a esquerda do comando_do_cvs 12687@c <en>* Common options:: Options you give to the right of cvs_command 12688* Op��es comuns:: Op��es que voc� bota a direita do comando_do_cvs 12689@c <en>* admin:: Administration 12690* admin:: Administra��o 12691@c <en>* checkout:: Checkout sources for editing 12692* checkout:: ???Checkout??? fontes para edi��o 12693@c <en>* commit:: Check files into the repository 12694* commit:: Colocar arquivos no reposit�rio 12695@c <en>* diff:: Show differences between revisions 12696* diff:: Mostrar diferen�as entre revis�es 12697@c <en>* export:: Export sources from CVS, similar to checkout 12698* export:: Exportar fontes para fora do CVS, similar ao ???checkout??? 12699@c <en>* history:: Show status of files and users 12700* history:: Mostrar estado de arquivos e usu�rios 12701@c <en>* import:: Import sources into CVS, using vendor branches 12702* import:: Importar fontes para dentro do CVS, usando ramos de fornecedor 12703@c <en>* log:: Show log messages for files 12704* log:: Mostrar mensagens de log para arquivos 12705@c <en>* rdiff:: 'patch' format diffs between releases 12706* rdiff:: 'patch' format diffs between releases 12707@c <en>* release:: Indicate that a directory is no longer in use 12708* release:: Avisar que um diretorio n�o est� mais em uso 12709@c <en>* update:: Bring work tree in sync with repository 12710* update:: Deixar �rvore de trabalho em sincronia com o reposit�rio 12711@end menu 12712 12713@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12714@c <en>@node Structure 12715@node Estrutura 12716@c <en>@appendixsec Overall structure of CVS commands 12717@appendixsec Estrutura geral dos comandos do CVS 12718@c <en>@cindex Structure 12719@cindex Estrutura 12720@c <en>@cindex CVS command structure 12721@cindex Estrutura do comando CVS 12722@c <en>@cindex Command structure 12723@cindex Estrutura do comando 12724@c <en>@cindex Format of CVS commands 12725@cindex Formato dos comandos do CVS 12726 12727@c <en>The overall format of all @sc{cvs} commands is: 12728O formato geral de todos os comandos do @sc{cvs} �: 12729 12730@example 12731cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ] 12732@end example 12733 12734@table @code 12735@c <en>@item cvs 12736@item cvs 12737@c <en>The name of the @sc{cvs} program. 12738O nome do programa @sc{cvs}. 12739 12740@c <en>@item cvs_options 12741@item cvs_options 12742@c <en>Some options that affect all sub-commands of @sc{cvs}. These are 12743@c <en>described below. 12744Algumas op��es que afetam todos os sub-comandos do 12745@sc{cvs}. Estes est�o descritos abaixo. 12746 12747@c <en>@item cvs_command 12748@item cvs_command 12749@c <en>One of several different sub-commands. Some of the commands have 12750@c <en>aliases that can be used instead; those aliases are noted in the 12751@c <en>reference manual for that command. There are only two situations 12752@c <en>where you may omit @samp{cvs_command}: @samp{cvs -H} elicits a 12753@c <en>list of available commands, and @samp{cvs -v} displays version 12754@c <en>information on @sc{cvs} itself. 12755Um dos v�rios sub-comandos. Alguns dos comandos t�m 12756???aliases??? substitu�-los; estes ???aliases??? s�o 12757listados no manual de refer�ncia do comando. Existem 12758apenas duas situa��es onde voc� pode omitir o 12759@samp{cvs_command}: @samp{cvs -H} retorna uma lista de 12760comandos dispon�veis, e @samp{cvs -v} mostra 12761informa��es sobre a vers�o do pr�prio @sc{cvs}. 12762 12763@c <en>@item command_options 12764@item command_options 12765@c <en>Options that are specific for the command. 12766Op��es que s�o espec�ficas para o comando. 12767 12768@c <en>@item command_args 12769@item command_args 12770@c <en>Arguments to the commands. 12771Argumentos para os comandos. 12772@end table 12773 12774@c <en>There is unfortunately some confusion between 12775@c <en>@code{cvs_options} and @code{command_options}. 12776@c <en>@samp{-l}, when given as a @code{cvs_option}, only 12777@c <en>affects some of the commands. When it is given as a 12778@c <en>@code{command_option} is has a different meaning, and 12779@c <en>is accepted by more commands. In other words, do not 12780@c <en>take the above categorization too seriously. Look at 12781@c <en>the documentation instead. 12782Infelizmente, existe alguma confus�o entre 12783@code{cvs_options} e @code{command_options}. @samp{-l}, 12784quando passado como @code{cvs_option}, afeta apenas 12785alguns dos comandos. Quando � passado como um 12786@code{command_option} tem um significado diferente, e � 12787aceito por mais comandos. Em outras palavras, n�o leve 12788a categoriza��o acima t�o a s�rio. Olhe a 12789documenta��o, ao inv�s disto. 12790 12791@c <en>@node Exit status 12792@node Estados de sa�da 12793@c <en>@appendixsec CVS's exit status 12794@appendixsec estado de sa�da do CVS 12795@c <en>@cindex Exit status, of CVS 12796@cindex Estados de sa�da do CVS 12797 12798@c <en>@sc{cvs} can indicate to the calling environment whether it 12799@c <en>succeeded or failed by setting its @dfn{exit status}. 12800@c <en>The exact way of testing the exit status will vary from 12801@c <en>one operating system to another. For example in a unix 12802@c <en>shell script the @samp{$?} variable will be 0 if the 12803@c <en>last command returned a successful exit status, or 12804@c <en>greater than 0 if the exit status indicated failure. 12805O @sc{cvs} pode indicar para o ambiente que o chamou se 12806ele foi bem-sucedido ou falhou ao ajustar seu 12807@dfn{estado de sa�da}. A forma exata de testar o 12808estado de sa�da varia de um sistema operacional para 12809outro. Por exemplo, num shell script do unix a 12810vari�vel @samp{$?} ser� 0 se o �ltimo comando retornar 12811um estado de sa�da bem-sucedido, ou maior que 0 se o 12812estado de sa�da indicar uma falha. 12813 12814@c <en>If @sc{cvs} is successful, it returns a successful status; 12815@c <en>if there is an error, it prints an error message and 12816@c <en>returns a failure status. The one exception to this is 12817@c <en>the @code{cvs diff} command. It will return a 12818@c <en>successful status if it found no differences, or a 12819@c <en>failure status if there were differences or if there 12820@c <en>was an error. Because this behavior provides no good 12821@c <en>way to detect errors, in the future it is possible that 12822@c <en>@code{cvs diff} will be changed to behave like the 12823@c <en>other @sc{cvs} commands. 12824Se o @sc{cvs} � bem-sucedido, retorna um estado de sucesso; 12825se existe um erro, mostra uma mensagem de erro e 12826retorna um estado de falha. A �nica exce��o para isto 12827� o comando @code{cvs diff}. Ele retornar� um estado 12828de sucesso se n�o encontrar diferen�as, ou um estado de 12829sucesso se existirem diferen�as ou acontecer um erro. 12830J� que este comportamento n�o fornece uma boa maneira 12831de detectar erros, � poss�vel que no futuro o @code{cvs 12832diff} seja mudado para se comportar como os outros 12833comandos do @sc{cvs}. 12834@c It might seem like checking whether cvs -q diff 12835@c produces empty or non-empty output can tell whether 12836@c there were differences or not. But it seems like 12837@c there are cases with output but no differences 12838@c (testsuite basica-8b). It is not clear to me how 12839@c useful it is for a script to be able to check 12840@c whether there were differences. 12841@c FIXCVS? In previous versions of CVS, cvs diff 12842@c returned 0 for no differences, 1 for differences, or 12843@c 2 for errors. Is this behavior worth trying to 12844@c bring back (but what does it mean for VMS?)? 12845 12846@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12847@c <en>@node ~/.cvsrc 12848@node ~/.cvsrc 12849@c <en>@appendixsec Default options and the ~/.cvsrc file 12850@appendixsec Op��es padr�o e o arquivo ~/.cvsrc 12851@c <en>@cindex .cvsrc file 12852@cindex Arquivo .cvsrc 12853@c <en>@cindex Option defaults 12854@cindex Padr�o, op��es 12855 12856@c <en>There are some @code{command_options} that are used so 12857@c <en>often that you might have set up an alias or some other 12858@c <en>means to make sure you always specify that option. One 12859@c <en>example (the one that drove the implementation of the 12860@c <en>@file{.cvsrc} support, actually) is that many people find the 12861@c <en>default output of the @samp{diff} command to be very 12862@c <en>hard to read, and that either context diffs or unidiffs 12863@c <en>are much easier to understand. 12864Existem algumas @code{op��es_de_comando} que s�o t�o 12865usadas que voc� vai querer preparar um atalho ou 12866alguma outra forma de ter certeza que tais op��es 12867sempre v�o ser especificadas. Um exemplo (o que 12868motivou a implementa��o do suporte ao arquivo 12869@file{.cvsrc}, na verdade) � que muitas pessoas acham a 12870sa�da do comando @samp{diff} muito dif�cil de ler, e 12871que tanto diffs de contexto quanto unidiffs s�o muito 12872mais f�ceis de entender. 12873 12874@c <en>The @file{~/.cvsrc} file is a way that you can add 12875@c <en>default options to @code{cvs_commands} within cvs, 12876@c <en>instead of relying on aliases or other shell scripts. 12877O arquivo @file{~/.cvsrc} � uma forma de voc� adicionar 12878op��es padr�o aos @code{comandos_cvs} dentro do cvs, ao 12879inv�s de usar alias (apelidos) ou outros scripts de shell. 12880 12881@c <en>The format of the @file{~/.cvsrc} file is simple. The 12882@c <en>file is searched for a line that begins with the same 12883@c <en>name as the @code{cvs_command} being executed. If a 12884@c <en>match is found, then the remainder of the line is split 12885@c <en>up (at whitespace characters) into separate options and 12886@c <en>added to the command arguments @emph{before} any 12887@c <en>options from the command line. 12888O formato do arquivo @file{~/.cvsrc} � simples. O 12889arquivo � varrido por uma linha que comece com o mesmo 12890nome do @code{comando_cvs} sendo executado. Se 12891encontra, ent�o o restante da linha � dividido (pelos 12892espa�os) em op��es distintas e adicionadas aos 12893argumentos do comando @emph{antes} de quaisquer op��es 12894da linha de comando. 12895 12896@c <en>If a command has two names (e.g., @code{checkout} and 12897@c <en>@code{co}), the official name, not necessarily the one 12898@c <en>used on the command line, will be used to match against 12899@c <en>the file. So if this is the contents of the user's 12900@c <en>@file{~/.cvsrc} file: 12901Se um comando tem dois nomes (e.g., @code{checkout} e 12902@code{co}), o nome oficial, que n�o � necessariamente o 12903usado na linha de comando, vai ser usado para fazer a 12904busca no arquivo. Logo, se este � o conte�do do 12905arquivo @file{~/.cvsrc} do usu�rio: 12906 12907@example 12908log -N 12909diff -uN 12910rdiff -u 12911update -Pd 12912checkout -P 12913release -d 12914@end example 12915 12916@noindent 12917@c <en>the command @samp{cvs checkout foo} would have the 12918@c <en>@samp{-P} option added to the arguments, as well as 12919@c <en>@samp{cvs co foo}. 12920o comando @samp{cvs checkout foo} vai ter a op��o 12921@samp{-P} adicionada a seus argumentos, assim como 12922@samp{cvs co foo}. 12923 12924@c <en>With the example file above, the output from @samp{cvs 12925@c <en>diff foobar} will be in unidiff format. @samp{cvs diff 12926@c <en>-c foobar} will provide context diffs, as usual. 12927@c <en>Getting "old" format diffs would be slightly more 12928@c <en>complicated, because @code{diff} doesn't have an option 12929@c <en>to specify use of the "old" format, so you would need 12930@c <en>@samp{cvs -f diff foobar}. 12931Com o arquivo de exemplo acima, a sa�da de @samp{cvs 12932diff foobar} vai ser no formato unidiff. @samp{cvs 12933diff -c foobar} vai dar diffs de contexto, que � o normal. 12934Obter o diff no formato "velho" vai ser um pouco mais 12935complicado, j� que o @code{diff} n�o tem uma op��o para 12936especificar o uso do formato "velho", logo voc� vai ter 12937que usar @samp{cvs -f diff foobar}. 12938 12939@c <en>In place of the command name you can use @code{cvs} to 12940@c <en>specify global options (@pxref{Global options}). For 12941@c <en>example the following line in @file{.cvsrc} 12942Ao inv�s de no nome do comando voc� pode usar o 12943@code{cvs} especificando op��es globais (@pxref{Op��es globais}). Por 12944exemplo a seguinte linha em @file{.cvsrc} 12945 12946@example 12947cvs -z6 12948@end example 12949 12950@noindent 12951@c <en>causes @sc{cvs} to use compression level 6. 12952faz com que o @sc{cvs} use compress�o de n�vel 6. 12953 12954@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12955@c <en>@node Global options 12956@node Op��es globais 12957@c <en>@appendixsec Global options 12958@appendixsec Op��es globais 12959@c <en>@cindex Options, global 12960@cindex Options, global 12961@c <en>@cindex Global options 12962@cindex Op��es globais 12963@c <en>@cindex Left-hand options 12964@cindex Left-hand options 12965 12966The available @samp{cvs_options} (that are given to the 12967left of @samp{cvs_command}) are: 12968 12969@table @code 12970@c <en>@item --allow-root=@var{rootdir} 12971@item --allow-root=@var{rootdir} 12972@c <en>Specify legal @sc{cvsroot} directory. See 12973@c <en>@ref{Password authentication server}. 12974Specify legal @sc{cvsroot} directory. See 12975@ref{Servidor de autentica��o por senha}. 12976 12977@c <en>@cindex Authentication, stream 12978@cindex Authentication, stream 12979@c <en>@cindex Stream authentication 12980@cindex Stream authentication 12981@c <en>@item -a 12982@item -a 12983@c <en>Authenticate all communication between the client and 12984@c <en>the server. Only has an effect on the @sc{cvs} client. 12985@c <en>As of this writing, this is only implemented when using 12986@c <en>a GSSAPI connection (@pxref{GSSAPI authenticated}). 12987@c <en>Authentication prevents certain sorts of attacks 12988@c <en>involving hijacking the active @sc{tcp} connection. 12989@c <en>Enabling authentication does not enable encryption. 12990Authenticate all communication between the client and 12991the server. Only has an effect on the @sc{cvs} client. 12992As of this writing, this is only implemented when using 12993a GSSAPI connection (@pxref{Autentica��o GSSAPI}). 12994Authentication prevents certain sorts of attacks 12995involving hijacking the active @sc{tcp} connection. 12996Enabling authentication does not enable encryption. 12997 12998@cindex RCSBIN, overriding 12999@cindex Overriding RCSBIN 13000@item -b @var{bindir} 13001In @sc{cvs} 1.9.18 and older, this specified that 13002@sc{rcs} programs are in the @var{bindir} directory. 13003Current versions of @sc{cvs} do not run @sc{rcs} 13004programs; for compatibility this option is accepted, 13005but it does nothing. 13006 13007@cindex TMPDIR, overriding 13008@cindex Overriding TMPDIR 13009@item -T @var{tempdir} 13010Use @var{tempdir} as the directory where temporary files are 13011located. Overrides the setting of the @code{$TMPDIR} environment 13012variable and any precompiled directory. This parameter should be 13013specified as an absolute pathname. 13014(When running client/server, @samp{-T} affects only the local process; 13015specifying @samp{-T} for the client has no effect on the server and 13016vice versa.) 13017 13018@cindex CVSROOT, overriding 13019@cindex Overriding CVSROOT 13020@item -d @var{cvs_root_directory} 13021Use @var{cvs_root_directory} as the root directory 13022pathname of the repository. Overrides the setting of 13023the @code{$CVSROOT} environment variable. @xref{Reposit�rio}. 13024 13025@c <en>@cindex EDITOR, overriding 13026@cindex EDITOR, overriding 13027@c <en>@cindex Overriding EDITOR 13028@cindex Overriding EDITOR 13029@c <en>@item -e @var{editor} 13030@item -e @var{editor} 13031@c <en>Use @var{editor} to enter revision log information. Overrides the 13032@c <en>setting of the @code{$CVSEDITOR} and @code{$EDITOR} 13033@c <en>environment variables. For more information, see 13034@c <en>@ref{Committing your changes}. 13035Use @var{editor} to enter revision log information. Overrides the 13036setting of the @code{$CVSEDITOR} and @code{$EDITOR} 13037environment variables. For more information, see 13038@ref{Efetivando suas altera��es}. 13039 13040@item -f 13041Do not read the @file{~/.cvsrc} file. This 13042option is most often used because of the 13043non-orthogonality of the @sc{cvs} option set. For 13044example, the @samp{cvs log} option @samp{-N} (turn off 13045display of tag names) does not have a corresponding 13046option to turn the display on. So if you have 13047@samp{-N} in the @file{~/.cvsrc} entry for @samp{log}, 13048you may need to use @samp{-f} to show the tag names. 13049 13050@item -H 13051@itemx --help 13052Display usage information about the specified @samp{cvs_command} 13053(but do not actually execute the command). If you don't specify 13054a command name, @samp{cvs -H} displays overall help for 13055@sc{cvs}, including a list of other help options. 13056@c It seems to me it is better to document it this way 13057@c rather than trying to update this documentation 13058@c every time that we add a --help-foo option. But 13059@c perhaps that is confusing... 13060 13061@item -l 13062Do not log the @samp{cvs_command} in the command history (but execute it 13063anyway). @xref{history}, for information on command history. 13064 13065@cindex Read-only repository mode 13066@item -R 13067Turns on read-only repository mode. This allows one to check out from a 13068read-only repository, such as within an anoncvs server, or from a CDROM 13069repository. 13070 13071Same effect as if the @code{CVSREADONLYFS} environment 13072variable is set. Using @samp{-R} can also considerably 13073speed up checkout's over NFS. 13074 13075@cindex Read-only mode 13076@item -n 13077Do not change any files. Attempt to execute the 13078@samp{cvs_command}, but only to issue reports; do not remove, 13079update, or merge any existing files, or create any new files. 13080 13081Note that @sc{cvs} will not necessarily produce exactly 13082the same output as without @samp{-n}. In some cases 13083the output will be the same, but in other cases 13084@sc{cvs} will skip some of the processing that would 13085have been required to produce the exact same output. 13086 13087@item -Q 13088Cause the command to be really quiet; the command will only 13089generate output for serious problems. 13090 13091@item -q 13092Cause the command to be somewhat quiet; informational messages, 13093such as reports of recursion through subdirectories, are 13094suppressed. 13095 13096@c <en>@cindex Read-only files, and -r 13097@cindex Read-only files, and -r 13098@c <en>@item -r 13099@item -r 13100@c <en>Make new working files read-only. Same effect 13101@c <en>as if the @code{$CVSREAD} environment variable is set 13102@c <en>(@pxref{Environment variables}). The default is to 13103@c <en>make working files writable, unless watches are on 13104@c <en>(@pxref{Watches}). 13105Make new working files read-only. Same effect 13106as if the @code{$CVSREAD} environment variable is set 13107(@pxref{Vari�veis de ambiente}). The default is to 13108make working files writable, unless watches are on 13109(@pxref{???Watches???}). 13110 13111@item -s @var{variable}=@var{value} 13112Set a user variable (@pxref{Variables}). 13113 13114@cindex Trace 13115@item -t 13116Trace program execution; display messages showing the steps of 13117@sc{cvs} activity. Particularly useful with @samp{-n} to explore the 13118potential impact of an unfamiliar command. 13119 13120@item -v 13121@item --version 13122Display version and copyright information for @sc{cvs}. 13123 13124@cindex CVSREAD, overriding 13125@cindex Overriding CVSREAD 13126@item -w 13127Make new working files read-write. Overrides the 13128setting of the @code{$CVSREAD} environment variable. 13129Files are created read-write by default, unless @code{$CVSREAD} is 13130set or @samp{-r} is given. 13131@c Note that -w only overrides -r and CVSREAD; it has 13132@c no effect on files which are readonly because of 13133@c "cvs watch on". My guess is that is the way it 13134@c should be (or should "cvs -w get" on a watched file 13135@c be the same as a get and a cvs edit?), but I'm not 13136@c completely sure whether to document it this way. 13137 13138@item -x 13139@c <en>@cindex Encryption 13140@cindex Encryption 13141@c <en>Encrypt all communication between the client and the 13142@c <en>server. Only has an effect on the @sc{cvs} client. As 13143@c <en>of this writing, this is only implemented when using a 13144@c <en>GSSAPI connection (@pxref{GSSAPI authenticated}) or a 13145@c <en>Kerberos connection (@pxref{Kerberos authenticated}). 13146@c <en>Enabling encryption implies that message traffic is 13147@c <en>also authenticated. Encryption support is not 13148@c <en>available by default; it must be enabled using a 13149@c <en>special configure option, @file{--enable-encryption}, 13150@c <en>when you build @sc{cvs}. 13151Encrypt all communication between the client and the 13152server. Only has an effect on the @sc{cvs} client. As 13153of this writing, this is only implemented when using a 13154GSSAPI connection (@pxref{Autentica��o GSSAPI}) or a 13155Kerberos connection (@pxref{Autentica��o kerberos}). 13156Enabling encryption implies that message traffic is 13157also authenticated. Encryption support is not 13158available by default; it must be enabled using a 13159special configure option, @file{--enable-encryption}, 13160when you build @sc{cvs}. 13161 13162@item -z @var{gzip-level} 13163@cindex Compression 13164@cindex Gzip 13165Set the compression level. 13166Valid levels are 1 (high speed, low compression) to 131679 (low speed, high compression), or 0 to disable 13168compression (the default). 13169Only has an effect on the @sc{cvs} client. 13170 13171@end table 13172 13173@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13174@c <en>@node Common options 13175@node Op��es comuns 13176@c <en>@appendixsec Common command options 13177@appendixsec Common command options 13178@c <en>@cindex Common options 13179@cindex Op��es comuns 13180@c <en>@cindex Right-hand options 13181@cindex Right-hand options 13182 13183This section describes the @samp{command_options} that 13184are available across several @sc{cvs} commands. These 13185options are always given to the right of 13186@samp{cvs_command}. Not all 13187commands support all of these options; each option is 13188only supported for commands where it makes sense. 13189However, when a command has one of these options you 13190can almost always count on the same behavior of the 13191option as in other commands. (Other command options, 13192which are listed with the individual commands, may have 13193different behavior from one @sc{cvs} command to the other). 13194 13195@strong{Note: the @samp{history} command is an exception; it supports 13196many options that conflict even with these standard options.} 13197 13198@table @code 13199@cindex Dates 13200@cindex Time 13201@cindex Specifying dates 13202@item -D @var{date_spec} 13203Use the most recent revision no later than @var{date_spec}. 13204@var{date_spec} is a single argument, a date description 13205specifying a date in the past. 13206 13207@c <en>The specification is @dfn{sticky} when you use it to make a 13208@c <en>private copy of a source file; that is, when you get a working 13209@c <en>file using @samp{-D}, @sc{cvs} records the date you specified, so that 13210@c <en>further updates in the same directory will use the same date 13211@c <en>(for more information on sticky tags/dates, @pxref{Sticky tags}). 13212The specification is @dfn{sticky} when you use it to make a 13213private copy of a source file; that is, when you get a working 13214file using @samp{-D}, @sc{cvs} records the date you specified, so that 13215further updates in the same directory will use the same date 13216(for more information on sticky tags/dates, @pxref{Etiquetas adesivas}). 13217 13218@samp{-D} is available with the @code{annotate}, @code{checkout}, 13219@code{diff}, @code{export}, @code{history}, 13220@code{rdiff}, @code{rtag}, @code{tag}, and @code{update} commands. 13221(The @code{history} command uses this option in a 13222slightly different way; @pxref{history options}). 13223 13224@c What other formats should we accept? I don't want 13225@c to start accepting a whole mess of non-standard 13226@c new formats (there are a lot which are in wide use in 13227@c one context or another), but practicality does 13228@c dictate some level of flexibility. 13229@c * POSIX.2 (e.g. touch, ls output, date) and other 13230@c POSIX and/or de facto unix standards (e.g. at). The 13231@c practice here is too inconsistent to be of any use. 13232@c * VMS dates. This is not a formal standard, but 13233@c there is a published specification (see SYS$ASCTIM 13234@c and SYS$BINTIM in the _VMS System Services Reference 13235@c Manual_), it is implemented consistently in VMS 13236@c utilities, and VMS users will expect CVS running on 13237@c VMS to support this format (and if we're going to do 13238@c that, better to make CVS support it on all 13239@c platforms. Maybe). 13240@c 13241@c NOTE: The tar manual has some documentation for 13242@c getdate.y (just for our info; we don't want to 13243@c attempt to document all the formats accepted by 13244@c getdate.y). 13245@c 13246@c One more note: In output, CVS should consistently 13247@c use one date format, and that format should be one that 13248@c it accepts in input as well. The former isn't 13249@c really true (see survey below), and I'm not 13250@c sure that either of those formats is accepted in 13251@c input. 13252@c 13253@c cvs log 13254@c current 1996/01/02 13:45:31 13255@c Internet 02 Jan 1996 13:45:31 UT 13256@c ISO 1996-01-02 13:45:31 13257@c cvs ann 13258@c current 02-Jan-96 13259@c Internet-like 02 Jan 96 13260@c ISO 96-01-02 13261@c cvs status 13262@c current Tue Jun 11 02:54:53 1996 13263@c Internet [Tue,] 11 Jun 1996 02:54:53 13264@c ISO 1996-06-11 02:54:53 13265@c note: date possibly should be omitted entirely for 13266@c other reasons. 13267@c cvs editors 13268@c current Tue Jun 11 02:54:53 1996 GMT 13269@c cvs history 13270@c current 06/11 02:54 +0000 13271@c any others? 13272@c There is a good chance the proper solution has to 13273@c involve at least some level of letting the user 13274@c decide which format (with the default being the 13275@c formats CVS has always used; changing these might be 13276@c _very_ disruptive since scripts may very well be 13277@c parsing them). 13278@c 13279@c Another random bit of prior art concerning dates is 13280@c the strptime function which takes templates such as 13281@c "%m/%d/%y", and apparent a variant of getdate() 13282@c which also honors them. See 13283@c X/Open CAE Specification, System Interfaces and 13284@c Headers Issue 4, Version 2 (September 1994), in the 13285@c entry for getdate() on page 231 13286 13287@cindex Timezone, in input 13288@cindex Zone, time, in input 13289A wide variety of date formats are supported by 13290@sc{cvs}. The most standard ones are ISO8601 (from the 13291International Standards Organization) and the Internet 13292e-mail standard (specified in RFC822 as amended by 13293RFC1123). 13294 13295@c Probably should be doing more to spell out just what 13296@c the rules are, rather than just giving examples. 13297@c But I want to keep this simple too. 13298@c So I don't know.... 13299@c A few specific issues: (1) Maybe should reassure 13300@c people that years after 2000 13301@c work (they are in the testsuite, so they do indeed 13302@c work). (2) What do two digit years 13303@c mean? Where do we accept them? (3) Local times can 13304@c be ambiguous or nonexistent if they fall during the 13305@c hour when daylight savings time goes into or out of 13306@c effect. Pretty obscure, so I'm not at all sure we 13307@c should be documenting the behavior in that case. 13308ISO8601 dates have many variants but a few examples 13309are: 13310 13311@example 133121972-09-24 133131972-09-24 20:05 13314@end example 13315@c I doubt we really accept all ISO8601 format dates 13316@c (for example, decimal hours like 1972-09-24 20,2) 13317@c I'm not sure we should, many of them are pretty 13318@c bizarre and it has lots of gratuitous multiple ways 13319@c to specify the same thing. 13320 13321There are a lot more ISO8601 date formats, and @sc{cvs} 13322accepts many of them, but you probably don't want to 13323hear the @emph{whole} long story :-). 13324 13325@c Citing a URL here is kind of problematic given how 13326@c much they change and people who have old versions of 13327@c this manual, but in case we want to reinstate an 13328@c ISO8601 URL, a few are: 13329@c http://www.saqqara.demon.co.uk/datefmt.htm 13330@c http://www.cl.cam.ac.uk/~mgk25/iso-time.html 13331@c Citing some other ISO8601 source is probably even 13332@c worse :-). 13333 13334In addition to the dates allowed in Internet e-mail 13335itself, @sc{cvs} also allows some of the fields to be 13336omitted. For example: 13337@c FIXME: Need to figure out better, and document, 13338@c what we want to allow the user to omit. 13339@c NOTE: "omit" does not imply "reorder". 13340@c FIXME: Need to cite a web page describing how to get 13341@c RFC's. 13342 13343@example 1334424 Sep 1972 20:05 1334524 Sep 13346@end example 13347 13348The date is interpreted as being in the 13349local timezone, unless a specific timezone is 13350specified. 13351 13352These two date formats are preferred. However, 13353@sc{cvs} currently accepts a wide variety of other date 13354formats. They are intentionally not documented here in 13355any detail, and future versions of @sc{cvs} might not 13356accept all of them. 13357@c We should document and testsuite "now" and 13358@c "yesterday". "now" is mentioned in the FAQ and 13359@c "yesterday" is mentioned in this document (and the 13360@c message from "cvs import" suggesting a merge 13361@c command). What else? Probably some/all of the "3 13362@c weeks ago" family. 13363@c 13364@c Maybe at 13365@c some point have CVS start give warnings on "unofficial" 13366@c formats (many of which might be typos or user 13367@c misunderstandings, and/or formats people never/rarely 13368@c use to specify dates)? 13369 13370One such format is 13371@code{@var{month}/@var{day}/@var{year}}. This may 13372confuse people who are accustomed to having the month 13373and day in the other order; @samp{1/4/96} is January 4, 13374not April 1. 13375 13376Remember to quote the argument to the @samp{-D} 13377flag so that your shell doesn't interpret spaces as 13378argument separators. A command using the @samp{-D} 13379flag can look like this: 13380 13381@example 13382$ cvs diff -D "1 hour ago" cvs.texinfo 13383@end example 13384 13385@cindex Forcing a tag match 13386@item -f 13387When you specify a particular date or tag to @sc{cvs} commands, they 13388normally ignore files that do not contain the tag (or did not 13389exist prior to the date) that you specified. Use the @samp{-f} option 13390if you want files retrieved even when there is no match for the 13391tag or date. (The most recent revision of the file 13392will be used). 13393 13394Note that even with @samp{-f}, a tag that you specify 13395must exist (that is, in some file, not necessary in 13396every file). This is so that @sc{cvs} will continue to 13397give an error if you mistype a tag name. 13398 13399@need 800 13400@samp{-f} is available with these commands: 13401@code{annotate}, @code{checkout}, @code{export}, 13402@code{rdiff}, @code{rtag}, and @code{update}. 13403 13404@c <en>@strong{WARNING: The @code{commit} and @code{remove} 13405@c <en>commands also have a 13406@c <en>@samp{-f} option, but it has a different behavior for 13407@c <en>those commands. See @ref{commit options}, and 13408@c <en>@ref{Removing files}.} 13409@strong{WARNING: The @code{commit} and @code{remove} 13410commands also have a 13411@samp{-f} option, but it has a different behavior for 13412those commands. See @ref{commit options}, and 13413@ref{Removendo arquivos}.} 13414 13415@c <en>@item -k @var{kflag} 13416@item -k @var{kflag} 13417@c <en>Override the default processing of RCS keywords other than 13418@c <en>@samp{-kb}. @xref{Keyword substitution}, for the meaning of 13419@c <en>@var{kflag}. Used with the @code{checkout} and @code{update} 13420@c <en>commands, your @var{kflag} specification is 13421@c <en>@dfn{sticky}; that is, when you use this option 13422@c <en>with a @code{checkout} or @code{update} command, 13423@c <en>@sc{cvs} associates your selected @var{kflag} with any files 13424@c <en>it operates on, and continues to use that @var{kflag} with future 13425@c <en>commands on the same files until you specify otherwise. 13426Override the default processing of RCS keywords other than 13427@samp{-kb}. @xref{Substitui��o de palavra-chave}, for the meaning of 13428@var{kflag}. Used with the @code{checkout} and @code{update} 13429commands, your @var{kflag} specification is 13430@dfn{sticky}; that is, when you use this option 13431with a @code{checkout} or @code{update} command, 13432@sc{cvs} associates your selected @var{kflag} with any files 13433it operates on, and continues to use that @var{kflag} with future 13434commands on the same files until you specify otherwise. 13435 13436@c <en>The @samp{-k} option is available with the @code{add}, 13437@c <en>@code{checkout}, @code{diff}, @code{export}, @code{import} and 13438@c <en>@code{update} commands. 13439The @samp{-k} option is available with the @code{add}, 13440@code{checkout}, @code{diff}, @code{export}, @code{import} and 13441@code{update} commands. 13442 13443@c <en>@strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag 13444@c <en>overrode the @samp{-kb} indication for a binary file. This could 13445@c <en>sometimes corrupt binary files. @xref{Merging and keywords}, for 13446@c <en>more.} 13447@strong{WARNING: Prior to CVS version 1.12.2, the @samp{-k} flag 13448overrode the @samp{-kb} indication for a binary file. This could 13449sometimes corrupt binary files. @xref{Mesclagem e palavras-chave}, for 13450more.} 13451 13452@c <en>@item -l 13453@item -l 13454@c <en>Local; run only in current working directory, rather than 13455@c <en>recursing through subdirectories. 13456Local; run only in current working directory, rather than 13457recursing through subdirectories. 13458 13459@c <en>Available with the following commands: @code{annotate}, @code{checkout}, 13460@c <en>@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export}, 13461@c <en>@code{log}, @code{rdiff}, @code{remove}, @code{rtag}, 13462@c <en>@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch}, 13463@c <en>and @code{watchers}. 13464Available with the following commands: @code{annotate}, @code{checkout}, 13465@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export}, 13466@code{log}, @code{rdiff}, @code{remove}, @code{rtag}, 13467@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch}, 13468and @code{watchers}. 13469 13470@c <en>@cindex Editor, avoiding invocation of 13471@cindex Editor, avoiding invocation of 13472@c <en>@cindex Avoiding editor invocation 13473@cindex Avoiding editor invocation 13474@c <en>@item -m @var{message} 13475@item -m @var{message} 13476@c <en>Use @var{message} as log information, instead of 13477@c <en>invoking an editor. 13478Use @var{message} as log information, instead of 13479invoking an editor. 13480 13481@c <en>Available with the following commands: @code{add}, 13482@c <en>@code{commit} and @code{import}. 13483Available with the following commands: @code{add}, 13484@code{commit} and @code{import}. 13485 13486@c <en>@item -n 13487@item -n 13488@c <en>Do not run any tag program. (A program can be 13489@c <en>specified to run in the modules 13490@c <en>database (@pxref{modules}); this option bypasses it). 13491Do not run any tag program. (A program can be 13492specified to run in the modules 13493database (@pxref{modules}); this option bypasses it). 13494 13495@c <en>@strong{Note: this is not the same as the @samp{cvs -n} 13496@c <en>program option, which you can specify to the left of a cvs command!} 13497@strong{Note: this is not the same as the @samp{cvs -n} 13498program option, which you can specify to the left of a cvs command!} 13499 13500Available with the @code{checkout}, @code{commit}, @code{export}, 13501and @code{rtag} commands. 13502 13503@item -P 13504@c <en>Prune empty directories. See @ref{Removing directories}. 13505Prune empty directories. See @ref{Removendo diret�rios}. 13506 13507@item -p 13508Pipe the files retrieved from the repository to standard output, 13509rather than writing them in the current directory. Available 13510with the @code{checkout} and @code{update} commands. 13511 13512@item -R 13513Process directories recursively. This is on by default. 13514 13515Available with the following commands: @code{annotate}, @code{checkout}, 13516@code{commit}, @code{diff}, @code{edit}, @code{editors}, @code{export}, 13517@code{rdiff}, @code{remove}, @code{rtag}, 13518@code{status}, @code{tag}, @code{unedit}, @code{update}, @code{watch}, 13519and @code{watchers}. 13520 13521@item -r @var{tag} 13522@cindex HEAD, special tag 13523@cindex BASE, special tag 13524Use the revision specified by the @var{tag} argument instead of the 13525default @dfn{head} revision. As well as arbitrary tags defined 13526with the @code{tag} or @code{rtag} command, two special tags are 13527always available: @samp{HEAD} refers to the most recent version 13528available in the repository, and @samp{BASE} refers to the 13529revision you last checked out into the current working directory. 13530 13531@c FIXME: What does HEAD really mean? I believe that 13532@c the current answer is the head of the default branch 13533@c for all cvs commands except diff. For diff, it 13534@c seems to be (a) the head of the trunk (or the default 13535@c branch?) if there is no sticky tag, (b) the head of the 13536@c branch for the sticky tag, if there is a sticky tag. 13537@c (b) is ugly as it differs 13538@c from what HEAD means for other commands, but people 13539@c and/or scripts are quite possibly used to it. 13540@c See "head" tests in sanity.sh. 13541@c Probably the best fix is to introduce two new 13542@c special tags, ".thead" for the head of the trunk, 13543@c and ".bhead" for the head of the current branch. 13544@c Then deprecate HEAD. This has the advantage of 13545@c not surprising people with a change to HEAD, and a 13546@c side benefit of also phasing out the poorly-named 13547@c HEAD (see discussion of reserved tag names in node 13548@c "Tags"). Of course, .thead and .bhead should be 13549@c carefully implemented (with the implementation the 13550@c same for "diff" as for everyone else), test cases 13551@c written (similar to the ones in "head"), new tests 13552@c cases written for things like default branches, &c. 13553 13554@c <en>The tag specification is sticky when you use this 13555@c <en>@c option 13556@c <en>with @code{checkout} or @code{update} to make your own 13557@c <en>copy of a file: @sc{cvs} remembers the tag and continues to use it on 13558@c <en>future update commands, until you specify otherwise (for more information 13559@c <en>on sticky tags/dates, @pxref{Sticky tags}). 13560The tag specification is sticky when you use this 13561@c option 13562with @code{checkout} or @code{update} to make your own 13563copy of a file: @sc{cvs} remembers the tag and continues to use it on 13564future update commands, until you specify otherwise (for more information 13565on sticky tags/dates, @pxref{Etiquetas adesivas}). 13566 13567@c <en>The tag can be either a symbolic or numeric tag, as 13568@c <en>described in @ref{Tags}, or the name of a branch, as 13569@c <en>described in @ref{Branching and merging}. 13570The tag can be either a symbolic or numeric tag, as 13571described in @ref{Etiquetas}, or the name of a branch, as 13572described in @ref{Ramificando e mesclando}. 13573 13574Specifying the @samp{-q} global option along with the 13575@samp{-r} command option is often useful, to suppress 13576the warning messages when the @sc{rcs} file 13577does not contain the specified tag. 13578 13579@strong{Note: this is not the same as the overall @samp{cvs -r} option, 13580which you can specify to the left of a @sc{cvs} command!} 13581 13582@samp{-r} is available with the @code{annotate}, @code{checkout}, 13583@code{commit}, @code{diff}, @code{history}, @code{export}, @code{rdiff}, 13584@code{rtag}, and @code{update} commands. 13585 13586@item -W 13587Specify file names that should be filtered. You can 13588use this option repeatedly. The spec can be a file 13589name pattern of the same type that you can specify in 13590the @file{.cvswrappers} file. 13591Available with the following commands: @code{import}, 13592and @code{update}. 13593 13594@end table 13595 13596@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 13597@node admin 13598@appendixsec admin---Administration 13599@cindex Admin (subcommand) 13600 13601@itemize @bullet 13602@item 13603Requires: repository, working directory. 13604@item 13605Changes: repository. 13606@item 13607Synonym: rcs 13608@end itemize 13609 13610This is the @sc{cvs} interface to assorted 13611administrative facilities. Some of them have 13612questionable usefulness for @sc{cvs} but exist for 13613historical purposes. Some of the questionable options 13614are likely to disappear in the future. This command 13615@emph{does} work recursively, so extreme care should be 13616used. 13617 13618@cindex cvsadmin 13619@cindex UserAdminOptions, in CVSROOT/config 13620On unix, if there is a group named @code{cvsadmin}, 13621only members of that group can run @code{cvs admin} 13622commands, except for those specified using the 13623@code{UserAdminOptions} configuration option in the 13624@file{CVSROOT/config} file. Options specified using 13625@code{UserAdminOptions} can be run by any user. See 13626@ref{config} for more on @code{UserAdminOptions}. 13627 13628The @code{cvsadmin} group should exist on the server, 13629or any system running the non-client/server @sc{cvs}. 13630To disallow @code{cvs admin} for all users, create a 13631group with no users in it. On NT, the @code{cvsadmin} 13632feature does not exist and all users 13633can run @code{cvs admin}. 13634 13635@menu 13636* admin options:: admin options 13637@end menu 13638 13639@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13640@node admin options 13641@appendixsubsec admin options 13642 13643Some of these options have questionable usefulness for 13644@sc{cvs} but exist for historical purposes. Some even 13645make it impossible to use @sc{cvs} until you undo the 13646effect! 13647 13648@table @code 13649@item -A@var{oldfile} 13650Might not work together with @sc{cvs}. Append the 13651access list of @var{oldfile} to the access list of the 13652@sc{rcs} file. 13653 13654@item -a@var{logins} 13655Might not work together with @sc{cvs}. Append the 13656login names appearing in the comma-separated list 13657@var{logins} to the access list of the @sc{rcs} file. 13658 13659@c <en>@item -b[@var{rev}] 13660@item -b[@var{rev}] 13661@c <en>Set the default branch to @var{rev}. In @sc{cvs}, you 13662@c <en>normally do not manipulate default branches; sticky 13663@c <en>tags (@pxref{Sticky tags}) are a better way to decide 13664@c <en>which branch you want to work on. There is one reason 13665@c <en>to run @code{cvs admin -b}: to revert to the vendor's 13666@c <en>version when using vendor branches (@pxref{Reverting 13667@c <en>local changes}). 13668@c <en>There can be no space between @samp{-b} and its argument. 13669Set the default branch to @var{rev}. In @sc{cvs}, you 13670normally do not manipulate default branches; sticky 13671tags (@pxref{Etiquetas adesivas}) are a better way to decide 13672which branch you want to work on. There is one reason 13673to run @code{cvs admin -b}: to revert to the vendor's 13674version when using vendor branches (@pxref{Reverting 13675local changes}). 13676There can be no space between @samp{-b} and its argument. 13677@c Hmm, we don't document the usage where rev is 13678@c omitted. Maybe that usage can/should be deprecated 13679@c (and replaced with -bHEAD or something?) (so we can toss 13680@c the optional argument). Note that -bHEAD does not 13681@c work, as of 17 Sep 1997, but probably will once "cvs 13682@c admin" is internal to CVS. 13683 13684@c <en>@cindex Comment leader 13685@cindex Comment leader 13686@c <en>@item -c@var{string} 13687@item -c@var{string} 13688@c <en>Sets the comment leader to @var{string}. The comment 13689@c <en>leader is not used by current versions of @sc{cvs} or 13690@c <en>@sc{rcs} 5.7. Therefore, you can almost surely not 13691@c <en>worry about it. @xref{Keyword substitution}. 13692Sets the comment leader to @var{string}. The comment 13693leader is not used by current versions of @sc{cvs} or 13694@sc{rcs} 5.7. Therefore, you can almost surely not 13695worry about it. @xref{Substitui��o de palavra-chave}. 13696 13697@item -e[@var{logins}] 13698Might not work together with @sc{cvs}. Erase the login 13699names appearing in the comma-separated list 13700@var{logins} from the access list of the RCS file. If 13701@var{logins} is omitted, erase the entire access list. 13702There can be no space between @samp{-e} and its argument. 13703 13704@item -I 13705Run interactively, even if the standard input is not a 13706terminal. This option does not work with the 13707client/server @sc{cvs} and is likely to disappear in 13708a future release of @sc{cvs}. 13709 13710@item -i 13711@c <en>Useless with @sc{cvs}. This creates and initializes a 13712@c <en>new @sc{rcs} file, without depositing a revision. With 13713@c <en>@sc{cvs}, add files with the @code{cvs add} command 13714@c <en>(@pxref{Adding files}). 13715Useless with @sc{cvs}. This creates and initializes a 13716new @sc{rcs} file, without depositing a revision. With 13717@sc{cvs}, add files with the @code{cvs add} command 13718(@pxref{Adicionando arquivos}). 13719 13720@c <en>@item -k@var{subst} 13721@item -k@var{subst} 13722@c <en>Set the default keyword 13723@c <en>substitution to @var{subst}. @xref{Keyword 13724@c <en>substitution}. Giving an explicit @samp{-k} option to 13725@c <en>@code{cvs update}, @code{cvs export}, or @code{cvs 13726@c <en>checkout} overrides this default. 13727Set the default keyword 13728substitution to @var{subst}. 13729@xref{Substitui��o de palavra-chave}. Giving an explicit @samp{-k} option to 13730@code{cvs update}, @code{cvs export}, or @code{cvs 13731checkout} overrides this default. 13732 13733@item -l[@var{rev}] 13734Lock the revision with number @var{rev}. If a branch 13735is given, lock the latest revision on that branch. If 13736@var{rev} is omitted, lock the latest revision on the 13737default branch. There can be no space between 13738@samp{-l} and its argument. 13739 13740This can be used in conjunction with the 13741@file{rcslock.pl} script in the @file{contrib} 13742directory of the @sc{cvs} source distribution to 13743provide reserved checkouts (where only one user can be 13744editing a given file at a time). See the comments in 13745that file for details (and see the @file{README} file 13746in that directory for disclaimers about the unsupported 13747nature of contrib). According to comments in that 13748file, locking must set to strict (which is the default). 13749 13750@item -L 13751Set locking to strict. Strict locking means that the 13752owner of an RCS file is not exempt from locking for 13753checkin. For use with @sc{cvs}, strict locking must be 13754set; see the discussion under the @samp{-l} option above. 13755 13756@cindex Changing a log message 13757@cindex Replacing a log message 13758@cindex Correcting a log message 13759@cindex Fixing a log message 13760@cindex Log message, correcting 13761@item -m@var{rev}:@var{msg} 13762Replace the log message of revision @var{rev} with 13763@var{msg}. 13764 13765@c The rcs -M option, to suppress sending mail, has never been 13766@c documented as a cvs admin option. 13767 13768@c <en>@item -N@var{name}[:[@var{rev}]] 13769@item -N@var{name}[:[@var{rev}]] 13770@c <en>Act like @samp{-n}, except override any previous 13771@c <en>assignment of @var{name}. For use with magic branches, 13772@c <en>see @ref{Magic branch numbers}. 13773Act like @samp{-n}, except override any previous 13774assignment of @var{name}. For use with magic branches, 13775see @ref{N�meros de ramos m�gicos}. 13776 13777@item -n@var{name}[:[@var{rev}]] 13778Associate the symbolic name @var{name} with the branch 13779or revision @var{rev}. It is normally better to use 13780@samp{cvs tag} or @samp{cvs rtag} instead. Delete the 13781symbolic name if both @samp{:} and @var{rev} are 13782omitted; otherwise, print an error message if 13783@var{name} is already associated with another number. 13784If @var{rev} is symbolic, it is expanded before 13785association. A @var{rev} consisting of a branch number 13786followed by a @samp{.} stands for the current latest 13787revision in the branch. A @samp{:} with an empty 13788@var{rev} stands for the current latest revision on the 13789default branch, normally the trunk. For example, 13790@samp{cvs admin -n@var{name}:} associates @var{name} with the 13791current latest revision of all the RCS files; 13792this contrasts with @samp{cvs admin -n@var{name}:$} which 13793associates @var{name} with the revision numbers 13794extracted from keyword strings in the corresponding 13795working files. 13796 13797@cindex Deleting revisions 13798@cindex Outdating revisions 13799@cindex Saving space 13800@item -o@var{range} 13801Deletes (@dfn{outdates}) the revisions given by 13802@var{range}. 13803 13804Note that this command can be quite dangerous unless 13805you know @emph{exactly} what you are doing (for example 13806see the warnings below about how the 13807@var{rev1}:@var{rev2} syntax is confusing). 13808 13809If you are short on disc this option might help you. 13810But think twice before using it---there is no way short 13811of restoring the latest backup to undo this command! 13812If you delete different revisions than you planned, 13813either due to carelessness or (heaven forbid) a @sc{cvs} 13814bug, there is no opportunity to correct the error 13815before the revisions are deleted. It probably would be 13816a good idea to experiment on a copy of the repository 13817first. 13818 13819Specify @var{range} in one of the following ways: 13820 13821@table @code 13822@item @var{rev1}::@var{rev2} 13823Collapse all revisions between rev1 and rev2, so that 13824@sc{cvs} only stores the differences associated with going 13825from rev1 to rev2, not intermediate steps. For 13826example, after @samp{-o 1.3::1.5} one can retrieve 13827revision 1.3, revision 1.5, or the differences to get 13828from 1.3 to 1.5, but not the revision 1.4, or the 13829differences between 1.3 and 1.4. Other examples: 13830@samp{-o 1.3::1.4} and @samp{-o 1.3::1.3} have no 13831effect, because there are no intermediate revisions to 13832remove. 13833 13834@item ::@var{rev} 13835Collapse revisions between the beginning of the branch 13836containing @var{rev} and @var{rev} itself. The 13837branchpoint and @var{rev} are left intact. For 13838example, @samp{-o ::1.3.2.6} deletes revision 1.3.2.1, 13839revision 1.3.2.5, and everything in between, but leaves 138401.3 and 1.3.2.6 intact. 13841 13842@item @var{rev}:: 13843Collapse revisions between @var{rev} and the end of the 13844branch containing @var{rev}. Revision @var{rev} is 13845left intact but the head revision is deleted. 13846 13847@item @var{rev} 13848Delete the revision @var{rev}. For example, @samp{-o 138491.3} is equivalent to @samp{-o 1.2::1.4}. 13850 13851@c <en>@item @var{rev1}:@var{rev2} 13852@item @var{rev1}:@var{rev2} 13853@c <en>Delete the revisions from @var{rev1} to @var{rev2}, 13854@c <en>inclusive, on the same branch. One will not be able to 13855@c <en>retrieve @var{rev1} or @var{rev2} or any of the 13856@c <en>revisions in between. For example, the command 13857@c <en>@samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful. 13858@c <en>It means to delete revisions up to, and including, the 13859@c <en>tag R_1_02. But beware! If there are files that have not 13860@c <en>changed between R_1_02 and R_1_03 the file will have 13861@c <en>@emph{the same} numerical revision number assigned to 13862@c <en>the tags R_1_02 and R_1_03. So not only will it be 13863@c <en>impossible to retrieve R_1_02; R_1_03 will also have to 13864@c <en>be restored from the tapes! In most cases you want to 13865@c <en>specify @var{rev1}::@var{rev2} instead. 13866Delete the revisions from @var{rev1} to @var{rev2}, 13867inclusive, on the same branch. One will not be able to 13868retrieve @var{rev1} or @var{rev2} or any of the 13869revisions in between. For example, the command 13870@samp{cvs admin -oR_1_01:R_1_02 .} is rarely useful. 13871It means to delete revisions up to, and including, the 13872tag R_1_02. But beware! If there are files that have not 13873changed between R_1_02 and R_1_03 the file will have 13874@emph{the same} numerical revision number assigned to 13875the tags R_1_02 and R_1_03. So not only will it be 13876impossible to retrieve R_1_02; R_1_03 will also have to 13877be restored from the tapes! In most cases you want to 13878specify @var{rev1}::@var{rev2} instead. 13879 13880@c <en>@item :@var{rev} 13881@item :@var{rev} 13882@c <en>Delete revisions from the beginning of the 13883@c <en>branch containing @var{rev} up to and including 13884@c <en>@var{rev}. 13885Delete revisions from the beginning of the 13886branch containing @var{rev} up to and including 13887@var{rev}. 13888 13889@c <en>@item @var{rev}: 13890@item @var{rev}: 13891@c <en>Delete revisions from revision @var{rev}, including 13892@c <en>@var{rev} itself, to the end of the branch containing 13893@c <en>@var{rev}. 13894Delete revisions from revision @var{rev}, including 13895@var{rev} itself, to the end of the branch containing 13896@var{rev}. 13897@end table 13898 13899@c <en>None of the revisions to be deleted may have 13900@c <en>branches or locks. 13901None of the revisions to be deleted may have 13902branches or locks. 13903 13904@c <en>If any of the revisions to be deleted have symbolic 13905@c <en>names, and one specifies one of the @samp{::} syntaxes, 13906@c <en>then @sc{cvs} will give an error and not delete any 13907@c <en>revisions. If you really want to delete both the 13908@c <en>symbolic names and the revisions, first delete the 13909@c <en>symbolic names with @code{cvs tag -d}, then run 13910@c <en>@code{cvs admin -o}. If one specifies the 13911@c <en>non-@samp{::} syntaxes, then @sc{cvs} will delete the 13912@c <en>revisions but leave the symbolic names pointing to 13913@c <en>nonexistent revisions. This behavior is preserved for 13914@c <en>compatibility with previous versions of @sc{cvs}, but 13915@c <en>because it isn't very useful, in the future it may 13916@c <en>change to be like the @samp{::} case. 13917If any of the revisions to be deleted have symbolic 13918names, and one specifies one of the @samp{::} syntaxes, 13919then @sc{cvs} will give an error and not delete any 13920revisions. If you really want to delete both the 13921symbolic names and the revisions, first delete the 13922symbolic names with @code{cvs tag -d}, then run 13923@code{cvs admin -o}. If one specifies the 13924non-@samp{::} syntaxes, then @sc{cvs} will delete the 13925revisions but leave the symbolic names pointing to 13926nonexistent revisions. This behavior is preserved for 13927compatibility with previous versions of @sc{cvs}, but 13928because it isn't very useful, in the future it may 13929change to be like the @samp{::} case. 13930 13931@c <en>Due to the way @sc{cvs} handles branches @var{rev} 13932@c <en>cannot be specified symbolically if it is a branch. 13933@c <en>@xref{Magic branch numbers}, for an explanation. 13934Due to the way @sc{cvs} handles branches @var{rev} 13935cannot be specified symbolically if it is a branch. 13936@xref{N�meros de ramos m�gicos}, for an explanation. 13937@c FIXME: is this still true? I suspect not. 13938 13939@c <en>Make sure that no-one has checked out a copy of the 13940@c <en>revision you outdate. Strange things will happen if he 13941@c <en>starts to edit it and tries to check it back in. For 13942@c <en>this reason, this option is not a good way to take back 13943@c <en>a bogus commit; commit a new revision undoing the bogus 13944@c <en>change instead (@pxref{Merging two revisions}). 13945Make sure that no-one has checked out a copy of the 13946revision you outdate. Strange things will happen if he 13947starts to edit it and tries to check it back in. For 13948this reason, this option is not a good way to take back 13949a bogus commit; commit a new revision undoing the bogus 13950change instead (@pxref{Mesclando duas revis�es}). 13951 13952@item -q 13953@c <en>Run quietly; do not print diagnostics. 13954Run quietly; do not print diagnostics. 13955 13956@c <en>@item -s@var{state}[:@var{rev}] 13957@item -s@var{state}[:@var{rev}] 13958@c <en>Useful with @sc{cvs}. Set the state attribute of the 13959@c <en>revision @var{rev} to @var{state}. If @var{rev} is a 13960@c <en>branch number, assume the latest revision on that 13961@c <en>branch. If @var{rev} is omitted, assume the latest 13962@c <en>revision on the default branch. Any identifier is 13963@c <en>acceptable for @var{state}. A useful set of states is 13964@c <en>@samp{Exp} (for experimental), @samp{Stab} (for 13965@c <en>stable), and @samp{Rel} (for released). By default, 13966@c <en>the state of a new revision is set to @samp{Exp} when 13967@c <en>it is created. The state is visible in the output from 13968@c <en>@var{cvs log} (@pxref{log}), and in the 13969@c <en>@samp{$@splitrcskeyword{}Log$} and @samp{$@splitrcskeyword{}State$} keywords 13970@c <en>(@pxref{Keyword substitution}). Note that @sc{cvs} 13971@c <en>uses the @code{dead} state for its own purposes; to 13972@c <en>take a file to or from the @code{dead} state use 13973@c <en>commands like @code{cvs remove} and @code{cvs add}, not 13974@c <en>@code{cvs admin -s}. 13975Useful with @sc{cvs}. Set the state attribute of the 13976revision @var{rev} to @var{state}. If @var{rev} is a 13977branch number, assume the latest revision on that 13978branch. If @var{rev} is omitted, assume the latest 13979revision on the default branch. Any identifier is 13980acceptable for @var{state}. A useful set of states is 13981@samp{Exp} (for experimental), @samp{Stab} (for 13982stable), and @samp{Rel} (for released). By default, 13983the state of a new revision is set to @samp{Exp} when 13984it is created. The state is visible in the output from 13985@var{cvs log} (@pxref{log}), and in the 13986@samp{$@splitrcskeyword{}Log$} and @samp{$@splitrcskeyword{}State$} keywords 13987(@pxref{Substitui��o de palavra-chave}). Note that @sc{cvs} 13988uses the @code{dead} state for its own purposes; to 13989take a file to or from the @code{dead} state use 13990commands like @code{cvs remove} and @code{cvs add}, not 13991@code{cvs admin -s}. 13992 13993@item -t[@var{file}] 13994Useful with @sc{cvs}. Write descriptive text from the 13995contents of the named @var{file} into the RCS file, 13996deleting the existing text. The @var{file} pathname 13997may not begin with @samp{-}. The descriptive text can be seen in the 13998output from @samp{cvs log} (@pxref{log}). 13999There can be no space between @samp{-t} and its argument. 14000 14001If @var{file} is omitted, 14002obtain the text from standard input, terminated by 14003end-of-file or by a line containing @samp{.} by itself. 14004Prompt for the text if interaction is possible; see 14005@samp{-I}. 14006 14007@item -t-@var{string} 14008Similar to @samp{-t@var{file}}. Write descriptive text 14009from the @var{string} into the @sc{rcs} file, deleting 14010the existing text. 14011There can be no space between @samp{-t} and its argument. 14012 14013@c The rcs -T option, do not update last-mod time for 14014@c minor changes, has never been documented as a 14015@c cvs admin option. 14016 14017@item -U 14018Set locking to non-strict. Non-strict locking means 14019that the owner of a file need not lock a revision for 14020checkin. For use with @sc{cvs}, strict locking must be 14021set; see the discussion under the @samp{-l} option 14022above. 14023 14024@c <en>@item -u[@var{rev}] 14025@item -u[@var{rev}] 14026@c <en>See the option @samp{-l} above, for a discussion of 14027@c <en>using this option with @sc{cvs}. Unlock the revision 14028@c <en>with number @var{rev}. If a branch is given, unlock 14029@c <en>the latest revision on that branch. If @var{rev} is 14030@c <en>omitted, remove the latest lock held by the caller. 14031@c <en>Normally, only the locker of a revision may unlock it; 14032@c <en>somebody else unlocking a revision breaks the lock. 14033@c <en>This causes the original locker to be sent a @code{commit} 14034@c <en>notification (@pxref{Getting Notified}). 14035@c <en>There can be no space between @samp{-u} and its argument. 14036See the option @samp{-l} above, for a discussion of 14037using this option with @sc{cvs}. Unlock the revision 14038with number @var{rev}. If a branch is given, unlock 14039the latest revision on that branch. If @var{rev} is 14040omitted, remove the latest lock held by the caller. 14041Normally, only the locker of a revision may unlock it; 14042somebody else unlocking a revision breaks the lock. 14043This causes the original locker to be sent a @code{commit} 14044notification (@pxref{Recebendo Notifica��es}). 14045There can be no space between @samp{-u} and its argument. 14046 14047@item -V@var{n} 14048In previous versions of @sc{cvs}, this option meant to 14049write an @sc{rcs} file which would be acceptable to 14050@sc{rcs} version @var{n}, but it is now obsolete and 14051specifying it will produce an error. 14052@c Note that -V without an argument has never been 14053@c documented as a cvs admin option. 14054 14055@item -x@var{suffixes} 14056In previous versions of @sc{cvs}, this was documented 14057as a way of specifying the names of the @sc{rcs} 14058files. However, @sc{cvs} has always required that the 14059@sc{rcs} files used by @sc{cvs} end in @samp{,v}, so 14060this option has never done anything useful. 14061 14062@c The rcs -z option, to specify the timezone, has 14063@c never been documented as a cvs admin option. 14064@end table 14065 14066 14067@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14068@node checkout 14069@appendixsec checkout---Check out sources for editing 14070@cindex checkout (subcommand) 14071@cindex co (subcommand) 14072 14073@itemize @bullet 14074@item 14075Synopsis: checkout [options] modules@dots{} 14076@item 14077Requires: repository. 14078@item 14079Changes: working directory. 14080@item 14081Synonyms: co, get 14082@end itemize 14083 14084Create or update a working directory containing copies of the 14085source files specified by @var{modules}. You must execute 14086@code{checkout} before using most of the other @sc{cvs} 14087commands, since most of them operate on your working 14088directory. 14089 14090The @var{modules} are either 14091symbolic names for some 14092collection of source directories and files, or paths to 14093directories or files in the repository. The symbolic 14094names are defined in the @samp{modules} file. 14095@xref{modules}. 14096@c Needs an example, particularly of the non-"modules" 14097@c case but probably of both. 14098 14099@c FIXME: this seems like a very odd place to introduce 14100@c people to how CVS works. The bit about unreserved 14101@c checkouts is also misleading as it depends on how 14102@c things are set up. 14103Depending on the modules you specify, @code{checkout} may 14104recursively create directories and populate them with 14105the appropriate source files. You can then edit these 14106source files at any time (regardless of whether other 14107software developers are editing their own copies of the 14108sources); update them to include new changes applied by 14109others to the source repository; or commit your work as 14110a permanent change to the source repository. 14111 14112Note that @code{checkout} is used to create 14113directories. The top-level directory created is always 14114added to the directory where @code{checkout} is 14115invoked, and usually has the same name as the specified 14116module. In the case of a module alias, the created 14117sub-directory may have a different name, but you can be 14118sure that it will be a sub-directory, and that 14119@code{checkout} will show the relative path leading to 14120each file as it is extracted into your private work 14121area (unless you specify the @samp{-Q} global option). 14122 14123@c <en>The files created by @code{checkout} are created 14124@c <en>read-write, unless the @samp{-r} option to @sc{cvs} 14125@c <en>(@pxref{Global options}) is specified, the 14126@c <en>@code{CVSREAD} environment variable is specified 14127@c <en>(@pxref{Environment variables}), or a watch is in 14128@c <en>effect for that file (@pxref{Watches}). 14129The files created by @code{checkout} are created 14130read-write, unless the @samp{-r} option to @sc{cvs} 14131(@pxref{Op��es globais}) is specified, the 14132@code{CVSREAD} environment variable is specified 14133(@pxref{Vari�veis de ambiente}), or a watch is in 14134effect for that file (@pxref{???Watches???}). 14135 14136Note that running @code{checkout} on a directory that was already 14137built by a prior @code{checkout} is also permitted. 14138This is similar to specifying the @samp{-d} option 14139to the @code{update} command in the sense that new 14140directories that have been created in the repository 14141will appear in your work area. 14142However, @code{checkout} takes a module name whereas 14143@code{update} takes a directory name. Also 14144to use @code{checkout} this way it must be run from the 14145top level directory (where you originally ran 14146@code{checkout} from), so before you run 14147@code{checkout} to update an existing directory, don't 14148forget to change your directory to the top level 14149directory. 14150 14151For the output produced by the @code{checkout} command 14152see @ref{update output}. 14153 14154@menu 14155* checkout options:: checkout options 14156* checkout examples:: checkout examples 14157@end menu 14158 14159@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14160@node checkout options 14161@appendixsubsec checkout options 14162 14163@c <en>These standard options are supported by @code{checkout} 14164@c <en>(@pxref{Common options}, for a complete description of 14165@c <en>them): 14166These standard options are supported by @code{checkout} 14167(@pxref{Op��es comuns}, for a complete description of 14168them): 14169 14170@table @code 14171@c <en>@item -D @var{date} 14172@item -D @var{date} 14173@c <en>Use the most recent revision no later than @var{date}. 14174@c <en>This option is sticky, and implies @samp{-P}. See 14175@c <en>@ref{Sticky tags}, for more information on sticky tags/dates. 14176@c <en>Use the most recent revision no later than @var{date}. 14177@c <en>This option is sticky, and implies @samp{-P}. See 14178@c <en>@ref{Sticky tags}, for more information on sticky tags/dates. 14179Use the most recent revision no later than @var{date}. 14180This option is sticky, and implies @samp{-P}. See 14181@ref{Etiquetas adesivas}, for more information on sticky tags/dates. 14182Use the most recent revision no later than @var{date}. 14183This option is sticky, and implies @samp{-P}. See 14184@ref{Etiquetas adesivas}, for more information on sticky tags/dates. 14185 14186@item -f 14187Only useful with the @samp{-D @var{date}} or @samp{-r 14188@var{tag}} flags. If no matching revision is found, 14189retrieve the most recent revision (instead of ignoring 14190the file). 14191 14192@c <en>@item -k @var{kflag} 14193@item -k @var{kflag} 14194@c <en>Process keywords according to @var{kflag}. See 14195@c <en>@ref{Keyword substitution}. 14196@c <en>This option is sticky; future updates of 14197@c <en>this file in this working directory will use the same 14198@c <en>@var{kflag}. The @code{status} command can be viewed 14199@c <en>to see the sticky options. See @ref{Invoking CVS}, for 14200@c <en>more information on the @code{status} command. 14201Process keywords according to @var{kflag}. See 14202@ref{Substitui��o de palavra-chave}. 14203This option is sticky; future updates of 14204this file in this working directory will use the same 14205@var{kflag}. The @code{status} command can be viewed 14206to see the sticky options. See @ref{Chamando o CVS}, for 14207more information on the @code{status} command. 14208 14209@item -l 14210Local; run only in current working directory. 14211 14212@item -n 14213Do not run any checkout program (as specified 14214with the @samp{-o} option in the modules file; 14215@pxref{modules}). 14216 14217@item -P 14218@c <en>Prune empty directories. See @ref{Moving directories}. 14219Prune empty directories. See @ref{Movendo diret�rios}. 14220 14221@item -p 14222Pipe files to the standard output. 14223 14224@item -R 14225Checkout directories recursively. This option is on by default. 14226 14227@c <en>@item -r @var{tag} 14228@item -r @var{tag} 14229@c <en>Use revision @var{tag}. This option is sticky, and implies @samp{-P}. 14230@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates. 14231Use revision @var{tag}. This option is sticky, and implies @samp{-P}. 14232See @ref{Etiquetas adesivas}, for more information on sticky tags/dates. 14233@end table 14234 14235In addition to those, you can use these special command 14236options with @code{checkout}: 14237 14238@table @code 14239@c <en>@item -A 14240@item -A 14241@c <en>Reset any sticky tags, dates, or @samp{-k} options. 14242@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates. 14243Reset any sticky tags, dates, or @samp{-k} options. 14244See @ref{Etiquetas adesivas}, for more information on sticky tags/dates. 14245 14246@item -c 14247Copy the module file, sorted, to the standard output, 14248instead of creating or modifying any files or 14249directories in your working directory. 14250 14251@item -d @var{dir} 14252Create a directory called @var{dir} for the working 14253files, instead of using the module name. In general, 14254using this flag is equivalent to using @samp{mkdir 14255@var{dir}; cd @var{dir}} followed by the checkout 14256command without the @samp{-d} flag. 14257 14258There is an important exception, however. It is very 14259convenient when checking out a single item to have the 14260output appear in a directory that doesn't contain empty 14261intermediate directories. In this case @emph{only}, 14262@sc{cvs} tries to ``shorten'' pathnames to avoid those empty 14263directories. 14264 14265For example, given a module @samp{foo} that contains 14266the file @samp{bar.c}, the command @samp{cvs co -d dir 14267foo} will create directory @samp{dir} and place 14268@samp{bar.c} inside. Similarly, given a module 14269@samp{bar} which has subdirectory @samp{baz} wherein 14270there is a file @samp{quux.c}, the command @samp{cvs co 14271-d dir bar/baz} will create directory @samp{dir} and 14272place @samp{quux.c} inside. 14273 14274Using the @samp{-N} flag will defeat this behavior. 14275Given the same module definitions above, @samp{cvs co 14276-N -d dir foo} will create directories @samp{dir/foo} 14277and place @samp{bar.c} inside, while @samp{cvs co -N -d 14278dir bar/baz} will create directories @samp{dir/bar/baz} 14279and place @samp{quux.c} inside. 14280 14281@item -j @var{tag} 14282With two @samp{-j} options, merge changes from the 14283revision specified with the first @samp{-j} option to 14284the revision specified with the second @samp{j} option, 14285into the working directory. 14286 14287With one @samp{-j} option, merge changes from the 14288ancestor revision to the revision specified with the 14289@samp{-j} option, into the working directory. The 14290ancestor revision is the common ancestor of the 14291revision which the working directory is based on, and 14292the revision specified in the @samp{-j} option. 14293 14294In addition, each -j option can contain an optional 14295date specification which, when used with branches, can 14296limit the chosen revision to one within a specific 14297date. An optional date is specified by adding a colon 14298(:) to the tag: 14299@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}. 14300 14301@c <en>@xref{Branching and merging}. 14302@xref{Ramificando e mesclando}. 14303 14304@item -N 14305Only useful together with @samp{-d @var{dir}}. With 14306this option, @sc{cvs} will not ``shorten'' module paths 14307in your working directory when you check out a single 14308module. See the @samp{-d} flag for examples and a 14309discussion. 14310 14311@item -s 14312Like @samp{-c}, but include the status of all modules, 14313and sort it by the status string. @xref{modules}, for 14314info about the @samp{-s} option that is used inside the 14315modules file to set the module status. 14316@end table 14317 14318@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14319@node checkout examples 14320@appendixsubsec checkout examples 14321 14322Get a copy of the module @samp{tc}: 14323 14324@example 14325$ cvs checkout tc 14326@end example 14327 14328Get a copy of the module @samp{tc} as it looked one day 14329ago: 14330 14331@example 14332$ cvs checkout -D yesterday tc 14333@end example 14334 14335@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14336@node commit 14337@appendixsec commit---Check files into the repository 14338@cindex commit (subcommand) 14339 14340@itemize @bullet 14341@item 14342Synopsis: commit [-lnRf] [-m 'log_message' | 14343-F file] [-r revision] [files@dots{}] 14344@item 14345Requires: working directory, repository. 14346@item 14347Changes: repository. 14348@item 14349Synonym: ci 14350@end itemize 14351 14352Use @code{commit} when you want to incorporate changes 14353from your working source files into the source 14354repository. 14355 14356If you don't specify particular files to commit, all of 14357the files in your working current directory are 14358examined. @code{commit} is careful to change in the 14359repository only those files that you have really 14360changed. By default (or if you explicitly specify the 14361@samp{-R} option), files in subdirectories are also 14362examined and committed if they have changed; you can 14363use the @samp{-l} option to limit @code{commit} to the 14364current directory only. 14365 14366@code{commit} verifies that the selected files are up 14367to date with the current revisions in the source 14368repository; it will notify you, and exit without 14369committing, if any of the specified files must be made 14370current first with @code{update} (@pxref{update}). 14371@code{commit} does not call the @code{update} command 14372for you, but rather leaves that for you to do when the 14373time is right. 14374 14375When all is well, an editor is invoked to allow you to 14376enter a log message that will be written to one or more 14377logging programs (@pxref{modules}, and @pxref{loginfo}) 14378and placed in the @sc{rcs} file inside the 14379repository. This log message can be retrieved with the 14380@code{log} command; see @ref{log}. You can specify the 14381log message on the command line with the @samp{-m 14382@var{message}} option, and thus avoid the editor invocation, 14383or use the @samp{-F @var{file}} option to specify 14384that the argument file contains the log message. 14385 14386@menu 14387* commit options:: commit options 14388* commit examples:: commit examples 14389@end menu 14390 14391@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14392@node commit options 14393@appendixsubsec commit options 14394 14395@c <en>These standard options are supported by @code{commit} 14396@c <en>(@pxref{Common options}, for a complete description of 14397@c <en>them): 14398These standard options are supported by @code{commit} 14399(@pxref{Op��es comuns}, for a complete description of 14400them): 14401 14402@table @code 14403@item -l 14404Local; run only in current working directory. 14405 14406@item -R 14407Commit directories recursively. This is on by default. 14408 14409@c <en>@item -r @var{revision} 14410@item -r @var{revision} 14411@c <en>Commit to @var{revision}. @var{revision} must be 14412@c <en>either a branch, or a revision on the main trunk that 14413@c <en>is higher than any existing revision number 14414@c <en>(@pxref{Assigning revisions}). You 14415@c <en>cannot commit to a specific revision on a branch. 14416Commit to @var{revision}. @var{revision} must be 14417either a branch, or a revision on the main trunk that 14418is higher than any existing revision number 14419(@pxref{Atribuindo revis�es}). You 14420cannot commit to a specific revision on a branch. 14421@c FIXME: Need xref for branch case. 14422@end table 14423 14424@code{commit} also supports these options: 14425 14426@table @code 14427@item -F @var{file} 14428Read the log message from @var{file}, instead 14429of invoking an editor. 14430 14431@c <en>@item -f 14432@item -f 14433@c <en>Note that this is not the standard behavior of 14434@c <en>the @samp{-f} option as defined in @ref{Common options}. 14435Note that this is not the standard behavior of 14436the @samp{-f} option as defined in @ref{Op��es comuns}. 14437 14438Force @sc{cvs} to commit a new revision even if you haven't 14439made any changes to the file. If the current revision 14440of @var{file} is 1.7, then the following two commands 14441are equivalent: 14442 14443@example 14444$ cvs commit -f @var{file} 14445$ cvs commit -r 1.8 @var{file} 14446@end example 14447 14448@c This is odd, but it's how CVS has worked for some 14449@c time. 14450The @samp{-f} option disables recursion (i.e., it 14451implies @samp{-l}). To force @sc{cvs} to commit a new 14452revision for all files in all subdirectories, you must 14453use @samp{-f -R}. 14454 14455@item -m @var{message} 14456Use @var{message} as the log message, instead of 14457invoking an editor. 14458@end table 14459 14460@need 2000 14461@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14462@node commit examples 14463@appendixsubsec commit examples 14464 14465@c FIXME: this material wants to be somewhere 14466@c in "Branching and merging". 14467 14468@appendixsubsubsec Committing to a branch 14469 14470@c <en>You can commit to a branch revision (one that has an 14471@c <en>even number of dots) with the @samp{-r} option. To 14472@c <en>create a branch revision, use the @samp{-b} option 14473@c <en>of the @code{rtag} or @code{tag} commands 14474@c <en>(@pxref{Branching and merging}). Then, either @code{checkout} or 14475@c <en>@code{update} can be used to base your sources on the 14476@c <en>newly created branch. From that point on, all 14477@c <en>@code{commit} changes made within these working sources 14478@c <en>will be automatically added to a branch revision, 14479@c <en>thereby not disturbing main-line development in any 14480@c <en>way. For example, if you had to create a patch to the 14481@c <en>1.2 version of the product, even though the 2.0 version 14482@c <en>is already under development, you might do: 14483You can commit to a branch revision (one that has an 14484even number of dots) with the @samp{-r} option. To 14485create a branch revision, use the @samp{-b} option 14486of the @code{rtag} or @code{tag} commands 14487(@pxref{Ramificando e mesclando}). Then, either @code{checkout} or 14488@code{update} can be used to base your sources on the 14489newly created branch. From that point on, all 14490@code{commit} changes made within these working sources 14491will be automatically added to a branch revision, 14492thereby not disturbing main-line development in any 14493way. For example, if you had to create a patch to the 144941.2 version of the product, even though the 2.0 version 14495is already under development, you might do: 14496 14497@example 14498$ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module 14499$ cvs checkout -r FCS1_2_Patch product_module 14500$ cd product_module 14501[[ hack away ]] 14502$ cvs commit 14503@end example 14504 14505@noindent 14506This works automatically since the @samp{-r} option is 14507sticky. 14508 14509@appendixsubsubsec Creating the branch after editing 14510 14511Say you have been working on some extremely 14512experimental software, based on whatever revision you 14513happened to checkout last week. If others in your 14514group would like to work on this software with you, but 14515without disturbing main-line development, you could 14516commit your change to a new branch. Others can then 14517checkout your experimental stuff and utilize the full 14518benefit of @sc{cvs} conflict resolution. The scenario might 14519look like: 14520 14521@c FIXME: Should we be recommending tagging the branchpoint? 14522@example 14523[[ hacked sources are present ]] 14524$ cvs tag -b EXPR1 14525$ cvs update -r EXPR1 14526$ cvs commit 14527@end example 14528 14529The @code{update} command will make the @samp{-r 14530EXPR1} option sticky on all files. Note that your 14531changes to the files will never be removed by the 14532@code{update} command. The @code{commit} will 14533automatically commit to the correct branch, because the 14534@samp{-r} is sticky. You could also do like this: 14535 14536@c FIXME: Should we be recommending tagging the branchpoint? 14537@example 14538[[ hacked sources are present ]] 14539$ cvs tag -b EXPR1 14540$ cvs commit -r EXPR1 14541@end example 14542 14543@noindent 14544but then, only those files that were changed by you 14545will have the @samp{-r EXPR1} sticky flag. If you hack 14546away, and commit without specifying the @samp{-r EXPR1} 14547flag, some files may accidentally end up on the main 14548trunk. 14549 14550To work with you on the experimental change, others 14551would simply do 14552 14553@example 14554$ cvs checkout -r EXPR1 whatever_module 14555@end example 14556 14557@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 14558@node diff 14559@appendixsec diff---Show differences between revisions 14560@cindex diff (subcommand) 14561 14562@itemize @bullet 14563@item 14564Synopsis: diff [-lR] [-k kflag] [format_options] [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files@dots{}] 14565@item 14566Requires: working directory, repository. 14567@item 14568Changes: nothing. 14569@end itemize 14570 14571The @code{diff} command is used to compare different 14572revisions of files. The default action is to compare 14573your working files with the revisions they were based 14574on, and report any differences that are found. 14575 14576If any file names are given, only those files are 14577compared. If any directories are given, all files 14578under them will be compared. 14579 14580@c <en>The exit status for diff is different than for other 14581@c <en>@sc{cvs} commands; for details @ref{Exit status}. 14582The exit status for diff is different than for other 14583@sc{cvs} commands; for details @ref{Estados de sa�da}. 14584 14585@menu 14586* diff options:: diff options 14587* diff examples:: diff examples 14588@end menu 14589 14590@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14591@node diff options 14592@appendixsubsec diff options 14593 14594@c <en>These standard options are supported by @code{diff} 14595@c <en>(@pxref{Common options}, for a complete description of 14596@c <en>them): 14597These standard options are supported by @code{diff} 14598(@pxref{Op��es comuns}, for a complete description of 14599them): 14600 14601@table @code 14602@item -D @var{date} 14603Use the most recent revision no later than @var{date}. 14604See @samp{-r} for how this affects the comparison. 14605 14606@c <en>@item -k @var{kflag} 14607@item -k @var{kflag} 14608@c <en>Process keywords according to @var{kflag}. See 14609@c <en>@ref{Keyword substitution}. 14610Process keywords according to @var{kflag}. See 14611@ref{Substitui��o de palavra-chave}. 14612 14613@item -l 14614Local; run only in current working directory. 14615 14616@item -R 14617Examine directories recursively. This option is on by 14618default. 14619 14620@item -r @var{tag} 14621Compare with revision @var{tag}. Zero, one or two 14622@samp{-r} options can be present. With no @samp{-r} 14623option, the working file will be compared with the 14624revision it was based on. With one @samp{-r}, that 14625revision will be compared to your current working file. 14626With two @samp{-r} options those two revisions will be 14627compared (and your working file will not affect the 14628outcome in any way). 14629@c We should be a lot more explicit, with examples, 14630@c about the difference between "cvs diff" and "cvs 14631@c diff -r HEAD". This often confuses new users. 14632 14633One or both @samp{-r} options can be replaced by a 14634@samp{-D @var{date}} option, described above. 14635@end table 14636 14637@c Conceptually, this is a disaster. There are 3 14638@c zillion diff formats that we support via the diff 14639@c library. It is not obvious to me that we should 14640@c document them all. Maybe just the most common ones 14641@c like -c and -u, and think about phasing out the 14642@c obscure ones. 14643@c FIXCVS: also should be a way to specify an external 14644@c diff program (which can be different for different 14645@c file types) and pass through 14646@c arbitrary options, so that the user can do 14647@c "--pass=-Z --pass=foo" or something even if CVS 14648@c doesn't know about the "-Z foo" option to diff. 14649@c This would fit nicely with deprecating/eliminating 14650@c the obscure options of the diff library, because it 14651@c would let people specify an external GNU diff if 14652@c they are into that sort of thing. 14653The following options specify the format of the 14654output. They have the same meaning as in GNU diff. 14655Most options have two equivalent names, one of which is a single letter 14656preceded by @samp{-}, and the other of which is a long name preceded by 14657@samp{--}. 14658 14659@table @samp 14660@item -@var{lines} 14661Show @var{lines} (an integer) lines of context. This option does not 14662specify an output format by itself; it has no effect unless it is 14663combined with @samp{-c} or @samp{-u}. This option is obsolete. For proper 14664operation, @code{patch} typically needs at least two lines of context. 14665 14666@item -a 14667Treat all files as text and compare them line-by-line, even if they 14668do not seem to be text. 14669 14670@item -b 14671Ignore trailing white space and consider all other sequences of one or 14672more white space characters to be equivalent. 14673 14674@item -B 14675Ignore changes that just insert or delete blank lines. 14676 14677@item --binary 14678Read and write data in binary mode. 14679 14680@item --brief 14681Report only whether the files differ, not the details of the 14682differences. 14683 14684@item -c 14685Use the context output format. 14686 14687@item -C @var{lines} 14688@itemx --context@r{[}=@var{lines}@r{]} 14689Use the context output format, showing @var{lines} (an integer) lines of 14690context, or three if @var{lines} is not given. 14691For proper operation, @code{patch} typically needs at least two lines of 14692context. 14693 14694@item --changed-group-format=@var{format} 14695Use @var{format} to output a line group containing differing lines from 14696both files in if-then-else format. @xref{Line group formats}. 14697 14698@item -d 14699Change the algorithm to perhaps find a smaller set of changes. This makes 14700@code{diff} slower (sometimes much slower). 14701 14702@item -e 14703@itemx --ed 14704Make output that is a valid @code{ed} script. 14705 14706@item --expand-tabs 14707Expand tabs to spaces in the output, to preserve the alignment of tabs 14708in the input files. 14709 14710@item -f 14711Make output that looks vaguely like an @code{ed} script but has changes 14712in the order they appear in the file. 14713 14714@item -F @var{regexp} 14715In context and unified format, for each hunk of differences, show some 14716of the last preceding line that matches @var{regexp}. 14717 14718@item --forward-ed 14719Make output that looks vaguely like an @code{ed} script but has changes 14720in the order they appear in the file. 14721 14722@item -H 14723Use heuristics to speed handling of large files that have numerous 14724scattered small changes. 14725 14726@item --horizon-lines=@var{lines} 14727Do not discard the last @var{lines} lines of the common prefix 14728and the first @var{lines} lines of the common suffix. 14729 14730@item -i 14731Ignore changes in case; consider upper- and lower-case letters 14732equivalent. 14733 14734@item -I @var{regexp} 14735Ignore changes that just insert or delete lines that match @var{regexp}. 14736 14737@item --ifdef=@var{name} 14738Make merged if-then-else output using @var{name}. 14739 14740@item --ignore-all-space 14741Ignore white space when comparing lines. 14742 14743@item --ignore-blank-lines 14744Ignore changes that just insert or delete blank lines. 14745 14746@item --ignore-case 14747Ignore changes in case; consider upper- and lower-case to be the same. 14748 14749@item --ignore-matching-lines=@var{regexp} 14750Ignore changes that just insert or delete lines that match @var{regexp}. 14751 14752@item --ignore-space-change 14753Ignore trailing white space and consider all other sequences of one or 14754more white space characters to be equivalent. 14755 14756@item --initial-tab 14757Output a tab rather than a space before the text of a line in normal or 14758context format. This causes the alignment of tabs in the line to look 14759normal. 14760 14761@item -L @var{label} 14762Use @var{label} instead of the file name in the context format 14763and unified format headers. 14764 14765@item --label=@var{label} 14766Use @var{label} instead of the file name in the context format 14767and unified format headers. 14768 14769@item --left-column 14770Print only the left column of two common lines in side by side format. 14771 14772@item --line-format=@var{format} 14773Use @var{format} to output all input lines in if-then-else format. 14774@xref{Line formats}. 14775 14776@item --minimal 14777Change the algorithm to perhaps find a smaller set of changes. This 14778makes @code{diff} slower (sometimes much slower). 14779 14780@item -n 14781Output RCS-format diffs; like @samp{-f} except that each command 14782specifies the number of lines affected. 14783 14784@item -N 14785@itemx --new-file 14786In directory comparison, if a file is found in only one directory, 14787treat it as present but empty in the other directory. 14788 14789@item --new-group-format=@var{format} 14790Use @var{format} to output a group of lines taken from just the second 14791file in if-then-else format. @xref{Line group formats}. 14792 14793@item --new-line-format=@var{format} 14794Use @var{format} to output a line taken from just the second file in 14795if-then-else format. @xref{Line formats}. 14796 14797@item --old-group-format=@var{format} 14798Use @var{format} to output a group of lines taken from just the first 14799file in if-then-else format. @xref{Line group formats}. 14800 14801@item --old-line-format=@var{format} 14802Use @var{format} to output a line taken from just the first file in 14803if-then-else format. @xref{Line formats}. 14804 14805@item -p 14806Show which C function each change is in. 14807 14808@item --rcs 14809Output RCS-format diffs; like @samp{-f} except that each command 14810specifies the number of lines affected. 14811 14812@item --report-identical-files 14813@itemx -s 14814Report when two files are the same. 14815 14816@item --show-c-function 14817Show which C function each change is in. 14818 14819@item --show-function-line=@var{regexp} 14820In context and unified format, for each hunk of differences, show some 14821of the last preceding line that matches @var{regexp}. 14822 14823@item --side-by-side 14824Use the side by side output format. 14825 14826@item --speed-large-files 14827Use heuristics to speed handling of large files that have numerous 14828scattered small changes. 14829 14830@item --suppress-common-lines 14831Do not print common lines in side by side format. 14832 14833@item -t 14834Expand tabs to spaces in the output, to preserve the alignment of tabs 14835in the input files. 14836 14837@item -T 14838Output a tab rather than a space before the text of a line in normal or 14839context format. This causes the alignment of tabs in the line to look 14840normal. 14841 14842@item --text 14843Treat all files as text and compare them line-by-line, even if they 14844do not appear to be text. 14845 14846@item -u 14847Use the unified output format. 14848 14849@item --unchanged-group-format=@var{format} 14850Use @var{format} to output a group of common lines taken from both files 14851in if-then-else format. @xref{Line group formats}. 14852 14853@item --unchanged-line-format=@var{format} 14854Use @var{format} to output a line common to both files in if-then-else 14855format. @xref{Line formats}. 14856 14857@item -U @var{lines} 14858@itemx --unified@r{[}=@var{lines}@r{]} 14859Use the unified output format, showing @var{lines} (an integer) lines of 14860context, or three if @var{lines} is not given. 14861For proper operation, @code{patch} typically needs at least two lines of 14862context. 14863 14864@item -w 14865Ignore white space when comparing lines. 14866 14867@item -W @var{columns} 14868@itemx --width=@var{columns} 14869Use an output width of @var{columns} in side by side format. 14870 14871@item -y 14872Use the side by side output format. 14873@end table 14874 14875@menu 14876* Line group formats:: Line group formats 14877* Line formats:: Line formats 14878@end menu 14879 14880@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14881@node Line group formats 14882@appendixsubsubsec Line group formats 14883 14884Line group formats let you specify formats suitable for many 14885applications that allow if-then-else input, including programming 14886languages and text formatting languages. A line group format specifies 14887the output format for a contiguous group of similar lines. 14888 14889For example, the following command compares the TeX file @file{myfile} 14890with the original version from the repository, 14891and outputs a merged file in which old regions are 14892surrounded by @samp{\begin@{em@}}-@samp{\end@{em@}} lines, and new 14893regions are surrounded by @samp{\begin@{bf@}}-@samp{\end@{bf@}} lines. 14894 14895@example 14896cvs diff \ 14897 --old-group-format='\begin@{em@} 14898%<\end@{em@} 14899' \ 14900 --new-group-format='\begin@{bf@} 14901%>\end@{bf@} 14902' \ 14903 myfile 14904@end example 14905 14906The following command is equivalent to the above example, but it is a 14907little more verbose, because it spells out the default line group formats. 14908 14909@example 14910cvs diff \ 14911 --old-group-format='\begin@{em@} 14912%<\end@{em@} 14913' \ 14914 --new-group-format='\begin@{bf@} 14915%>\end@{bf@} 14916' \ 14917 --unchanged-group-format='%=' \ 14918 --changed-group-format='\begin@{em@} 14919%<\end@{em@} 14920\begin@{bf@} 14921%>\end@{bf@} 14922' \ 14923 myfile 14924@end example 14925 14926Here is a more advanced example, which outputs a diff listing with 14927headers containing line numbers in a ``plain English'' style. 14928 14929@example 14930cvs diff \ 14931 --unchanged-group-format='' \ 14932 --old-group-format='-------- %dn line%(n=1?:s) deleted at %df: 14933%<' \ 14934 --new-group-format='-------- %dN line%(N=1?:s) added after %de: 14935%>' \ 14936 --changed-group-format='-------- %dn line%(n=1?:s) changed at %df: 14937%<-------- to: 14938%>' \ 14939 myfile 14940@end example 14941 14942To specify a line group format, use one of the options 14943listed below. You can specify up to four line group formats, one for 14944each kind of line group. You should quote @var{format}, because it 14945typically contains shell metacharacters. 14946 14947@table @samp 14948@item --old-group-format=@var{format} 14949These line groups are hunks containing only lines from the first file. 14950The default old group format is the same as the changed group format if 14951it is specified; otherwise it is a format that outputs the line group as-is. 14952 14953@item --new-group-format=@var{format} 14954These line groups are hunks containing only lines from the second 14955file. The default new group format is same as the changed group 14956format if it is specified; otherwise it is a format that outputs the 14957line group as-is. 14958 14959@item --changed-group-format=@var{format} 14960These line groups are hunks containing lines from both files. The 14961default changed group format is the concatenation of the old and new 14962group formats. 14963 14964@item --unchanged-group-format=@var{format} 14965These line groups contain lines common to both files. The default 14966unchanged group format is a format that outputs the line group as-is. 14967@end table 14968 14969In a line group format, ordinary characters represent themselves; 14970conversion specifications start with @samp{%} and have one of the 14971following forms. 14972 14973@table @samp 14974@item %< 14975stands for the lines from the first file, including the trailing newline. 14976Each line is formatted according to the old line format (@pxref{Line formats}). 14977 14978@item %> 14979stands for the lines from the second file, including the trailing newline. 14980Each line is formatted according to the new line format. 14981 14982@item %= 14983stands for the lines common to both files, including the trailing newline. 14984Each line is formatted according to the unchanged line format. 14985 14986@item %% 14987stands for @samp{%}. 14988 14989@item %c'@var{C}' 14990where @var{C} is a single character, stands for @var{C}. 14991@var{C} may not be a backslash or an apostrophe. 14992For example, @samp{%c':'} stands for a colon, even inside 14993the then-part of an if-then-else format, which a colon would 14994normally terminate. 14995 14996@item %c'\@var{O}' 14997where @var{O} is a string of 1, 2, or 3 octal digits, 14998stands for the character with octal code @var{O}. 14999For example, @samp{%c'\0'} stands for a null character. 15000 15001@item @var{F}@var{n} 15002where @var{F} is a @code{printf} conversion specification and @var{n} is one 15003of the following letters, stands for @var{n}'s value formatted with @var{F}. 15004 15005@table @samp 15006@item e 15007The line number of the line just before the group in the old file. 15008 15009@item f 15010The line number of the first line in the group in the old file; 15011equals @var{e} + 1. 15012 15013@item l 15014The line number of the last line in the group in the old file. 15015 15016@item m 15017The line number of the line just after the group in the old file; 15018equals @var{l} + 1. 15019 15020@item n 15021The number of lines in the group in the old file; equals @var{l} - @var{f} + 1. 15022 15023@item E, F, L, M, N 15024Likewise, for lines in the new file. 15025 15026@end table 15027 15028The @code{printf} conversion specification can be @samp{%d}, 15029@samp{%o}, @samp{%x}, or @samp{%X}, specifying decimal, octal, 15030lower case hexadecimal, or upper case hexadecimal output 15031respectively. After the @samp{%} the following options can appear in 15032sequence: a @samp{-} specifying left-justification; an integer 15033specifying the minimum field width; and a period followed by an 15034optional integer specifying the minimum number of digits. 15035For example, @samp{%5dN} prints the number of new lines in the group 15036in a field of width 5 characters, using the @code{printf} format @code{"%5d"}. 15037 15038@item (@var{A}=@var{B}?@var{T}:@var{E}) 15039If @var{A} equals @var{B} then @var{T} else @var{E}. 15040@var{A} and @var{B} are each either a decimal constant 15041or a single letter interpreted as above. 15042This format spec is equivalent to @var{T} if 15043@var{A}'s value equals @var{B}'s; otherwise it is equivalent to @var{E}. 15044 15045For example, @samp{%(N=0?no:%dN) line%(N=1?:s)} is equivalent to 15046@samp{no lines} if @var{N} (the number of lines in the group in the 15047new file) is 0, to @samp{1 line} if @var{N} is 1, and to @samp{%dN lines} 15048otherwise. 15049@end table 15050 15051@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15052@node Line formats 15053@appendixsubsubsec Line formats 15054 15055Line formats control how each line taken from an input file is 15056output as part of a line group in if-then-else format. 15057 15058For example, the following command outputs text with a one-column 15059change indicator to the left of the text. The first column of output 15060is @samp{-} for deleted lines, @samp{|} for added lines, and a space 15061for unchanged lines. The formats contain newline characters where 15062newlines are desired on output. 15063 15064@example 15065cvs diff \ 15066 --old-line-format='-%l 15067' \ 15068 --new-line-format='|%l 15069' \ 15070 --unchanged-line-format=' %l 15071' \ 15072 myfile 15073@end example 15074 15075To specify a line format, use one of the following options. You should 15076quote @var{format}, since it often contains shell metacharacters. 15077 15078@table @samp 15079@item --old-line-format=@var{format} 15080formats lines just from the first file. 15081 15082@item --new-line-format=@var{format} 15083formats lines just from the second file. 15084 15085@item --unchanged-line-format=@var{format} 15086formats lines common to both files. 15087 15088@item --line-format=@var{format} 15089formats all lines; in effect, it sets all three above options simultaneously. 15090@end table 15091 15092In a line format, ordinary characters represent themselves; 15093conversion specifications start with @samp{%} and have one of the 15094following forms. 15095 15096@table @samp 15097@item %l 15098stands for the contents of the line, not counting its trailing 15099newline (if any). This format ignores whether the line is incomplete. 15100 15101@item %L 15102stands for the contents of the line, including its trailing newline 15103(if any). If a line is incomplete, this format preserves its 15104incompleteness. 15105 15106@item %% 15107stands for @samp{%}. 15108 15109@item %c'@var{C}' 15110where @var{C} is a single character, stands for @var{C}. 15111@var{C} may not be a backslash or an apostrophe. 15112For example, @samp{%c':'} stands for a colon. 15113 15114@item %c'\@var{O}' 15115where @var{O} is a string of 1, 2, or 3 octal digits, 15116stands for the character with octal code @var{O}. 15117For example, @samp{%c'\0'} stands for a null character. 15118 15119@item @var{F}n 15120where @var{F} is a @code{printf} conversion specification, 15121stands for the line number formatted with @var{F}. 15122For example, @samp{%.5dn} prints the line number using the 15123@code{printf} format @code{"%.5d"}. @xref{Line group formats}, for 15124more about printf conversion specifications. 15125 15126@end table 15127 15128The default line format is @samp{%l} followed by a newline character. 15129 15130If the input contains tab characters and it is important that they line 15131up on output, you should ensure that @samp{%l} or @samp{%L} in a line 15132format is just after a tab stop (e.g.@: by preceding @samp{%l} or 15133@samp{%L} with a tab character), or you should use the @samp{-t} or 15134@samp{--expand-tabs} option. 15135 15136Taken together, the line and line group formats let you specify many 15137different formats. For example, the following command uses a format 15138similar to @code{diff}'s normal format. You can tailor this command 15139to get fine control over @code{diff}'s output. 15140 15141@example 15142cvs diff \ 15143 --old-line-format='< %l 15144' \ 15145 --new-line-format='> %l 15146' \ 15147 --old-group-format='%df%(f=l?:,%dl)d%dE 15148%<' \ 15149 --new-group-format='%dea%dF%(F=L?:,%dL) 15150%>' \ 15151 --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL) 15152%<--- 15153%>' \ 15154 --unchanged-group-format='' \ 15155 myfile 15156@end example 15157 15158@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15159@node diff examples 15160@appendixsubsec diff examples 15161 15162The following line produces a Unidiff (@samp{-u} flag) 15163between revision 1.14 and 1.19 of 15164@file{backend.c}. Due to the @samp{-kk} flag no 15165keywords are substituted, so differences that only depend 15166on keyword substitution are ignored. 15167 15168@example 15169$ cvs diff -kk -u -r 1.14 -r 1.19 backend.c 15170@end example 15171 15172Suppose the experimental branch EXPR1 was based on a 15173set of files tagged RELEASE_1_0. To see what has 15174happened on that branch, the following can be used: 15175 15176@example 15177$ cvs diff -r RELEASE_1_0 -r EXPR1 15178@end example 15179 15180A command like this can be used to produce a context 15181diff between two releases: 15182 15183@example 15184$ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs 15185@end example 15186 15187If you are maintaining ChangeLogs, a command like the following 15188just before you commit your changes may help you write 15189the ChangeLog entry. All local modifications that have 15190not yet been committed will be printed. 15191 15192@example 15193$ cvs diff -u | less 15194@end example 15195 15196@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15197@node export 15198@appendixsec export---Export sources from CVS, similar to checkout 15199@cindex export (subcommand) 15200 15201@itemize @bullet 15202@item 15203Synopsis: export [-flNnR] [-r rev|-D date] [-k subst] [-d dir] module@dots{} 15204@item 15205Requires: repository. 15206@item 15207Changes: current directory. 15208@end itemize 15209 15210This command is a variant of @code{checkout}; use it 15211when you want a copy of the source for module without 15212the @sc{cvs} administrative directories. For example, you 15213might use @code{export} to prepare source for shipment 15214off-site. This command requires that you specify a 15215date or tag (with @samp{-D} or @samp{-r}), so that you 15216can count on reproducing the source you ship to others 15217(and thus it always prunes empty directories). 15218 15219One often would like to use @samp{-kv} with @code{cvs 15220export}. This causes any keywords to be 15221expanded such that an import done at some other site 15222will not lose the keyword revision information. But be 15223aware that doesn't handle an export containing binary 15224files correctly. Also be aware that after having used 15225@samp{-kv}, one can no longer use the @code{ident} 15226command (which is part of the @sc{rcs} suite---see 15227ident(1)) which looks for keyword strings. If 15228you want to be able to use @code{ident} you must not 15229use @samp{-kv}. 15230 15231@menu 15232* export options:: export options 15233@end menu 15234 15235@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15236@node export options 15237@appendixsubsec export options 15238 15239@c <en>These standard options are supported by @code{export} 15240@c <en>(@pxref{Common options}, for a complete description of 15241@c <en>them): 15242These standard options are supported by @code{export} 15243(@pxref{Op��es comuns}, for a complete description of 15244them): 15245 15246@table @code 15247@item -D @var{date} 15248Use the most recent revision no later than @var{date}. 15249 15250@item -f 15251If no matching revision is found, retrieve the most 15252recent revision (instead of ignoring the file). 15253 15254@item -l 15255Local; run only in current working directory. 15256 15257@item -n 15258Do not run any checkout program. 15259 15260@item -R 15261Export directories recursively. This is on by default. 15262 15263@item -r @var{tag} 15264Use revision @var{tag}. 15265@end table 15266 15267In addition, these options (that are common to 15268@code{checkout} and @code{export}) are also supported: 15269 15270@table @code 15271@item -d @var{dir} 15272Create a directory called @var{dir} for the working 15273files, instead of using the module name. 15274@xref{checkout options}, for complete details on how 15275@sc{cvs} handles this flag. 15276 15277@c <en>@item -k @var{subst} 15278@item -k @var{subst} 15279@c <en>Set keyword expansion mode (@pxref{Substitution modes}). 15280Set keyword expansion mode (@pxref{Modos de substitui��o}). 15281 15282@item -N 15283Only useful together with @samp{-d @var{dir}}. 15284@xref{checkout options}, for complete details on how 15285@sc{cvs} handles this flag. 15286@end table 15287 15288@ignore 15289@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15290@c @node export examples 15291@appendixsubsec export examples 15292 15293Contributed examples are gratefully accepted. 15294@c -- Examples here!! 15295@end ignore 15296 15297@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15298@node history 15299@appendixsec history---Show status of files and users 15300@cindex history (subcommand) 15301 15302@itemize @bullet 15303@item 15304Synopsis: history [-report] [-flags] [-options args] [files@dots{}] 15305@item 15306Requires: the file @file{$CVSROOT/CVSROOT/history} 15307@item 15308Changes: nothing. 15309@end itemize 15310 15311@sc{cvs} can keep a history file that tracks each use of the 15312@code{checkout}, @code{commit}, @code{rtag}, 15313@code{update}, and @code{release} commands. You can 15314use @code{history} to display this information in 15315various formats. 15316 15317Logging must be enabled by creating the file 15318@file{$CVSROOT/CVSROOT/history}. 15319 15320@c <en>@strong{Note: @code{history} uses @samp{-f}, @samp{-l}, 15321@c <en>@samp{-n}, and @samp{-p} in ways that conflict with the 15322@c <en>normal use inside @sc{cvs} (@pxref{Common options}).} 15323@strong{Note: @code{history} uses @samp{-f}, @samp{-l}, 15324@samp{-n}, and @samp{-p} in ways that conflict with the 15325normal use inside @sc{cvs} (@pxref{Op��es comuns}).} 15326 15327@menu 15328* history options:: history options 15329@end menu 15330 15331@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15332@node history options 15333@appendixsubsec history options 15334 15335Several options (shown above as @samp{-report}) control what 15336kind of report is generated: 15337 15338@table @code 15339@item -c 15340Report on each time commit was used (i.e., each time 15341the repository was modified). 15342 15343@item -e 15344Everything (all record types). Equivalent to 15345specifying @samp{-x} with all record types. Of course, 15346@samp{-e} will also include record types which are 15347added in a future version of @sc{cvs}; if you are 15348writing a script which can only handle certain record 15349types, you'll want to specify @samp{-x}. 15350 15351@item -m @var{module} 15352Report on a particular module. (You can meaningfully 15353use @samp{-m} more than once on the command line.) 15354 15355@item -o 15356Report on checked-out modules. This is the default report type. 15357 15358@item -T 15359Report on all tags. 15360 15361@item -x @var{type} 15362Extract a particular set of record types @var{type} from the @sc{cvs} 15363history. The types are indicated by single letters, 15364which you may specify in combination. 15365 15366Certain commands have a single record type: 15367 15368@table @code 15369@item F 15370release 15371@item O 15372checkout 15373@item E 15374export 15375@item T 15376rtag 15377@end table 15378 15379@noindent 15380One of five record types may result from an update: 15381 15382@table @code 15383@item C 15384A merge was necessary but collisions were 15385detected (requiring manual merging). 15386@item G 15387A merge was necessary and it succeeded. 15388@item U 15389A working file was copied from the repository. 15390@item P 15391A working file was patched to match the repository. 15392@item W 15393The working copy of a file was deleted during 15394update (because it was gone from the repository). 15395@end table 15396 15397@noindent 15398One of three record types results from commit: 15399 15400@table @code 15401@item A 15402A file was added for the first time. 15403@item M 15404A file was modified. 15405@item R 15406A file was removed. 15407@end table 15408@end table 15409 15410The options shown as @samp{-flags} constrain or expand 15411the report without requiring option arguments: 15412 15413@table @code 15414@item -a 15415Show data for all users (the default is to show data 15416only for the user executing @code{history}). 15417 15418@item -l 15419Show last modification only. 15420 15421@item -w 15422Show only the records for modifications done from the 15423same working directory where @code{history} is 15424executing. 15425@end table 15426 15427The options shown as @samp{-options @var{args}} constrain the report 15428based on an argument: 15429 15430@table @code 15431@item -b @var{str} 15432Show data back to a record containing the string 15433@var{str} in either the module name, the file name, or 15434the repository path. 15435 15436@item -D @var{date} 15437Show data since @var{date}. This is slightly different 15438from the normal use of @samp{-D @var{date}}, which 15439selects the newest revision older than @var{date}. 15440 15441@item -f @var{file} 15442Show data for a particular file 15443(you can specify several @samp{-f} options on the same command line). 15444This is equivalent to specifying the file on the command line. 15445 15446@item -n @var{module} 15447Show data for a particular module 15448(you can specify several @samp{-n} options on the same command line). 15449 15450@item -p @var{repository} 15451Show data for a particular source repository (you 15452can specify several @samp{-p} options on the same command 15453line). 15454 15455@item -r @var{rev} 15456Show records referring to revisions since the revision 15457or tag named @var{rev} appears in individual @sc{rcs} 15458files. Each @sc{rcs} file is searched for the revision or 15459tag. 15460 15461@item -t @var{tag} 15462Show records since tag @var{tag} was last added to the 15463history file. This differs from the @samp{-r} flag 15464above in that it reads only the history file, not the 15465@sc{rcs} files, and is much faster. 15466 15467@item -u @var{name} 15468Show records for user @var{name}. 15469 15470@item -z @var{timezone} 15471Show times in the selected records using the specified 15472time zone instead of UTC. 15473@end table 15474 15475@ignore 15476@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15477@c @node history examples 15478@appendixsubsec history examples 15479 15480Contributed examples will gratefully be accepted. 15481@c -- Examples here! 15482@end ignore 15483 15484@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15485@node import 15486@appendixsec import---Import sources into CVS, using vendor branches 15487@cindex import (subcommand) 15488 15489@c FIXME: This node is way too long for one which has subnodes. 15490 15491@itemize @bullet 15492@item 15493Synopsis: import [-options] repository vendortag releasetag@dots{} 15494@item 15495Requires: Repository, source distribution directory. 15496@item 15497Changes: repository. 15498@end itemize 15499 15500Use @code{import} to incorporate an entire source 15501distribution from an outside source (e.g., a source 15502vendor) into your source repository directory. You can 15503use this command both for initial creation of a 15504repository, and for wholesale updates to the module 15505from the outside source. @xref{Acompanhando fontes}, for 15506a discussion on this subject. 15507 15508The @var{repository} argument gives a directory name 15509(or a path to a directory) under the @sc{cvs} root directory 15510for repositories; if the directory did not exist, 15511import creates it. 15512 15513When you use import for updates to source that has been 15514modified in your source repository (since a prior 15515import), it will notify you of any files that conflict 15516in the two branches of development; use @samp{checkout 15517-j} to reconcile the differences, as import instructs 15518you to do. 15519 15520If @sc{cvs} decides a file should be ignored 15521(@pxref{cvsignore}), it does not import it and prints 15522@samp{I } followed by the filename (@pxref{import output}, for a 15523complete description of the output). 15524 15525If the file @file{$CVSROOT/CVSROOT/cvswrappers} exists, 15526any file whose names match the specifications in that 15527file will be treated as packages and the appropriate 15528filtering will be performed on the file/directory 15529before being imported. @xref{Wrappers}. 15530 15531The outside source is saved in a first-level 15532branch, by default 1.1.1. Updates are leaves of this 15533branch; for example, files from the first imported 15534collection of source will be revision 1.1.1.1, then 15535files from the first imported update will be revision 155361.1.1.2, and so on. 15537 15538At least three arguments are required. 15539@var{repository} is needed to identify the collection 15540of source. @var{vendortag} is a tag for the entire 15541branch (e.g., for 1.1.1). You must also specify at 15542least one @var{releasetag} to identify the files at 15543the leaves created each time you execute @code{import}. 15544 15545@c I'm not completely sure this belongs here. But 15546@c we need to say it _somewhere_ reasonably obvious; it 15547@c is a common misconception among people first learning CVS 15548@c <en>Note that @code{import} does @emph{not} change the 15549@c <en>directory in which you invoke it. In particular, it 15550@c <en>does not set up that directory as a @sc{cvs} working 15551@c <en>directory; if you want to work with the sources import 15552@c <en>them first and then check them out into a different 15553@c <en>directory (@pxref{Getting the source}). 15554Note that @code{import} does @emph{not} change the 15555directory in which you invoke it. In particular, it 15556does not set up that directory as a @sc{cvs} working 15557directory; if you want to work with the sources import 15558them first and then check them out into a different 15559directory (@pxref{Obtendo os fontes}). 15560 15561@menu 15562* import options:: import options 15563* import output:: import output 15564* import examples:: import examples 15565@end menu 15566 15567@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15568@node import options 15569@appendixsubsec import options 15570 15571@c <en>This standard option is supported by @code{import} 15572@c <en>(@pxref{Common options}, for a complete description): 15573This standard option is supported by @code{import} 15574(@pxref{Op��es comuns}, for a complete description): 15575 15576@table @code 15577@item -m @var{message} 15578Use @var{message} as log information, instead of 15579invoking an editor. 15580@end table 15581 15582There are the following additional special options. 15583 15584@table @code 15585@c <en>@item -b @var{branch} 15586@item -b @var{branch} 15587@c <en>See @ref{Multiple vendor branches}. 15588See @ref{Ramos de fornecedor m�ltiplos}. 15589 15590@c <en>@item -k @var{subst} 15591@item -k @var{subst} 15592@c <en>Indicate the keyword expansion mode desired. This 15593@c <en>setting will apply to all files created during the 15594@c <en>import, but not to any files that previously existed in 15595@c <en>the repository. See @ref{Substitution modes}, for a 15596@c <en>list of valid @samp{-k} settings. 15597Indicate the keyword expansion mode desired. This 15598setting will apply to all files created during the 15599import, but not to any files that previously existed in 15600the repository. See @ref{Modos de substitui��o}, for a 15601list of valid @samp{-k} settings. 15602 15603@item -I @var{name} 15604Specify file names that should be ignored during 15605import. You can use this option repeatedly. To avoid 15606ignoring any files at all (even those ignored by 15607default), specify `-I !'. 15608 15609@var{name} can be a file name pattern of the same type 15610that you can specify in the @file{.cvsignore} file. 15611@xref{cvsignore}. 15612@c -- Is this really true? 15613 15614@item -W @var{spec} 15615Specify file names that should be filtered during 15616import. You can use this option repeatedly. 15617 15618@var{spec} can be a file name pattern of the same type 15619that you can specify in the @file{.cvswrappers} 15620file. @xref{Wrappers}. 15621@end table 15622 15623@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15624@node import output 15625@appendixsubsec import output 15626 15627@c <en>@code{import} keeps you informed of its progress by printing a line 15628@c <en>for each file, preceded by one character indicating the status of the file: 15629O @code{import} mant�m voc� informado de seu progresso 15630escrevendo uma linha para cada arquivo, iniciando com 15631um caractere que indica o status do arquivo: 15632 15633@table @code 15634@c <en>@item U @var{file} 15635@item U @var{arquivo} 15636@c <en>The file already exists in the repository and has not been locally 15637@c <en>modified; a new revision has been created (if necessary). 15638O arquivo j� existe no reposit�rio n�o foi modificado 15639localmente; uma nova revis�o foi criada (se necess�rio). 15640 15641@c <en>@item N @var{file} 15642@item N @var{arquivo} 15643@c <en>The file is a new file which has been added to the repository. 15644O arquivo � um arquivo novo que foi adicionado ao reposit�rio. 15645 15646@c <en>@item C @var{file} 15647@item C @var{arquivo} 15648@c <en>The file already exists in the repository but has been locally modified; 15649@c <en>you will have to merge the changes. 15650O arquivo j� existe no reposit�rio mas foi modificado 15651localmente; Voc� vai ter que mesclar as mudan�as. 15652 15653@c <en>@item I @var{file} 15654@item I @var{arquivo} 15655@c <en>The file is being ignored (@pxref{cvsignore}). 15656O arquivo foi ignorado (@pxref{cvsignore}). 15657 15658@c <en>@cindex Symbolic link, importing 15659@cindex Liga��es simb�licas, importando 15660@c <en>@cindex Link, symbolic, importing 15661@cindex Simb�lica, liga��o, importando 15662@c FIXME: also (somewhere else) probably 15663@c should be documenting what happens if you "cvs add" 15664@c a symbolic link. Also maybe what happens if 15665@c you manually create symbolic links within the 15666@c repository (? - not sure why we'd want to suggest 15667@c doing that). 15668@c <en>@item L @var{file} 15669@item L @var{arquivo} 15670@c <en>The file is a symbolic link; @code{cvs import} ignores symbolic links. 15671@c <en>People periodically suggest that this behavior should 15672@c <en>be changed, but if there is a consensus on what it 15673@c <en>should be changed to, it is not apparent. 15674@c <en>(Various options in the @file{modules} file can be used 15675@c <en>to recreate symbolic links on checkout, update, etc.; 15676@c <en>@pxref{modules}.) 15677O arquivo � uma liga��o simb�lica; O @code{cvs import} 15678ignora liga��es simb�licas. De vez em quando alguem 15679sugere que este comportamento seja mudado, mas se h� um 15680consenso quanto a que mudan�a fazer, n�o � 15681claro. (V�rias op��es no arquivo @file{modules} podem 15682ser usadas para recriar liga��es simb�licas no checkout, update, etc.; 15683@pxref{modules}.) 15684@end table 15685 15686@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15687@node import examples 15688@appendixsubsec import examples 15689 15690@c <en>See @ref{Tracking sources}, and @ref{From files}. 15691See @ref{Acompanhando fontes}, and @ref{De arquivos}. 15692 15693@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15694@node log 15695@appendixsec log---Print out log information for files 15696@cindex log (subcommand) 15697 15698@itemize @bullet 15699@item 15700Synopsis: log [options] [files@dots{}] 15701@item 15702Requires: repository, working directory. 15703@item 15704Changes: nothing. 15705@end itemize 15706 15707Display log information for files. @code{log} used to 15708call the @sc{rcs} utility @code{rlog}. Although this 15709is no longer true in the current sources, this history 15710determines the format of the output and the options, 15711which are not quite in the style of the other @sc{cvs} 15712commands. 15713 15714@cindex Timezone, in output 15715@cindex Zone, time, in output 15716@c Kind of a funny place to document the timezone used 15717@c in output from commands other than @code{log}. 15718@c There is also more we need to say about this, 15719@c including what happens in a client/server environment. 15720The output includes the location of the @sc{rcs} file, 15721the @dfn{head} revision (the latest revision on the 15722trunk), all symbolic names (tags) and some other 15723things. For each revision, the revision number, the 15724author, the number of lines added/deleted and the log 15725message are printed. All times are displayed in 15726Coordinated Universal Time (UTC). (Other parts of 15727@sc{cvs} print times in the local timezone). 15728@c FIXCVS: need a better way to control the timezone 15729@c used in output. Previous/current versions of CVS did/do 15730@c sometimes support -z in RCSINIT, and/or an 15731@c undocumented (except by reference to 'rlog') -z option 15732@c to cvs log, but this has not been a consistent, 15733@c documented feature. Perhaps a new global option, 15734@c where LT means the client's timezone, which the 15735@c client then communicates to the server, is the 15736@c right solution. 15737 15738@c <en>@strong{Note: @code{log} uses @samp{-R} in a way that conflicts 15739@c <en>with the normal use inside @sc{cvs} (@pxref{Common options}).} 15740@strong{Note: @code{log} uses @samp{-R} in a way that conflicts 15741with the normal use inside @sc{cvs} (@pxref{Op��es comuns}).} 15742 15743@menu 15744* log options:: log options 15745* log examples:: log examples 15746@end menu 15747 15748@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15749@node log options 15750@appendixsubsec log options 15751 15752By default, @code{log} prints all information that is 15753available. All other options restrict the output. 15754 15755@table @code 15756@item -b 15757Print information about the revisions on the default 15758branch, normally the highest branch on the trunk. 15759 15760@c <en>@item -d @var{dates} 15761@item -d @var{dates} 15762@c <en>Print information about revisions with a checkin 15763@c <en>date/time in the range given by the 15764@c <en>semicolon-separated list of dates. The date formats 15765@c <en>accepted are those accepted by the @samp{-D} option to 15766@c <en>many other @sc{cvs} commands (@pxref{Common options}). 15767@c <en>Dates can be combined into ranges as follows: 15768Print information about revisions with a checkin 15769date/time in the range given by the 15770semicolon-separated list of dates. The date formats 15771accepted are those accepted by the @samp{-D} option to 15772many other @sc{cvs} commands (@pxref{Op��es comuns}). 15773Dates can be combined into ranges as follows: 15774 15775@c Should we be thinking about accepting ISO8601 15776@c ranges? For example "1972-09-10/1972-09-12". 15777@table @code 15778@item @var{d1}<@var{d2} 15779@itemx @var{d2}>@var{d1} 15780Select the revisions that were deposited between 15781@var{d1} and @var{d2}. 15782 15783@item <@var{d} 15784@itemx @var{d}> 15785Select all revisions dated @var{d} or earlier. 15786 15787@item @var{d}< 15788@itemx >@var{d} 15789Select all revisions dated @var{d} or later. 15790 15791@item @var{d} 15792Select the single, latest revision dated @var{d} or 15793earlier. 15794@end table 15795 15796The @samp{>} or @samp{<} characters may be followed by 15797@samp{=} to indicate an inclusive range rather than an 15798exclusive one. 15799 15800Note that the separator is a semicolon (;). 15801 15802@item -h 15803Print only the name of the @sc{rcs} file, name 15804of the file in the working directory, head, 15805default branch, access list, locks, symbolic names, and 15806suffix. 15807 15808@item -l 15809Local; run only in current working directory. (Default 15810is to run recursively). 15811 15812@item -N 15813Do not print the list of tags for this file. This 15814option can be very useful when your site uses a lot of 15815tags, so rather than "more"'ing over 3 pages of tag 15816information, the log information is presented without 15817tags at all. 15818 15819@item -R 15820Print only the name of the @sc{rcs} file. 15821 15822@c Note that using a bare revision (in addition to not 15823@c being explicitly documented here) is potentially 15824@c confusing; it shows the log message to get from the 15825@c previous revision to that revision. "-r1.3 -r1.6" 15826@c (equivalent to "-r1.3,1.6") is even worse; it 15827@c prints the messages to get from 1.2 to 1.3 and 1.5 15828@c to 1.6. By analogy with "cvs diff", users might 15829@c expect that it is more like specifying a range. 15830@c It is not 100% clear to me how much of this should 15831@c be documented (for example, multiple -r options 15832@c perhaps could/should be deprecated given the false 15833@c analogy with "cvs diff"). 15834@c In general, this section should be rewritten to talk 15835@c about messages to get from revision rev1 to rev2, 15836@c rather than messages for revision rev2 (that is, the 15837@c messages are associated with a change not a static 15838@c revision and failing to make this distinction causes 15839@c much confusion). 15840@item -r@var{revisions} 15841Print information about revisions given in the 15842comma-separated list @var{revisions} of revisions and 15843ranges. The following table explains the available 15844range formats: 15845 15846@table @code 15847@item @var{rev1}:@var{rev2} 15848Revisions @var{rev1} to @var{rev2} (which must be on 15849the same branch). 15850 15851@item @var{rev1}::@var{rev2} 15852The same, but excluding @var{rev1}. 15853 15854@item :@var{rev} 15855@itemx ::@var{rev} 15856Revisions from the beginning of the branch up to 15857and including @var{rev}. 15858 15859@item @var{rev}: 15860Revisions starting with @var{rev} to the end of the 15861branch containing @var{rev}. 15862 15863@item @var{rev}:: 15864Revisions starting just after @var{rev} to the end of the 15865branch containing @var{rev}. 15866 15867@item @var{branch} 15868An argument that is a branch means all revisions on 15869that branch. 15870 15871@item @var{branch1}:@var{branch2} 15872@itemx @var{branch1}::@var{branch2} 15873A range of branches means all revisions 15874on the branches in that range. 15875 15876@item @var{branch}. 15877The latest revision in @var{branch}. 15878@end table 15879 15880A bare @samp{-r} with no revisions means the latest 15881revision on the default branch, normally the trunk. 15882There can be no space between the @samp{-r} option and 15883its argument. 15884 15885@item -S 15886Suppress the header if no revisions are selected. 15887 15888@item -s @var{states} 15889Print information about revisions whose state 15890attributes match one of the states given in the 15891comma-separated list @var{states}. 15892 15893@item -t 15894Print the same as @samp{-h}, plus the descriptive text. 15895 15896@item -w@var{logins} 15897Print information about revisions checked in by users 15898with login names appearing in the comma-separated list 15899@var{logins}. If @var{logins} is omitted, the user's 15900login is assumed. There can be no space between the 15901@samp{-w} option and its argument. 15902@end table 15903 15904@code{log} prints the intersection of the revisions 15905selected with the options @samp{-d}, @samp{-s}, and 15906@samp{-w}, intersected with the union of the revisions 15907selected by @samp{-b} and @samp{-r}. 15908 15909@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15910@node log examples 15911@appendixsubsec log examples 15912 15913Contributed examples are gratefully accepted. 15914 15915@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 15916@node rdiff 15917@appendixsec rdiff---'patch' format diffs between releases 15918@cindex rdiff (subcommand) 15919 15920@itemize @bullet 15921@item 15922rdiff [-flags] [-V vn] [-r t|-D d [-r t2|-D d2]] modules@dots{} 15923@item 15924Requires: repository. 15925@item 15926Changes: nothing. 15927@item 15928Synonym: patch 15929@end itemize 15930 15931Builds a Larry Wall format patch(1) file between two 15932releases, that can be fed directly into the @code{patch} 15933program to bring an old release up-to-date with the new 15934release. (This is one of the few @sc{cvs} commands that 15935operates directly from the repository, and doesn't 15936require a prior checkout.) The diff output is sent to 15937the standard output device. 15938 15939You can specify (using the standard @samp{-r} and 15940@samp{-D} options) any combination of one or two 15941revisions or dates. If only one revision or date is 15942specified, the patch file reflects differences between 15943that revision or date and the current head revisions in 15944the @sc{rcs} file. 15945 15946Note that if the software release affected is contained 15947in more than one directory, then it may be necessary to 15948specify the @samp{-p} option to the @code{patch} command when 15949patching the old sources, so that @code{patch} is able to find 15950the files that are located in other directories. 15951 15952@menu 15953* rdiff options:: rdiff options 15954* rdiff examples:: rdiff examples 15955@end menu 15956 15957@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15958@node rdiff options 15959@appendixsubsec rdiff options 15960 15961@c <en>These standard options are supported by @code{rdiff} 15962@c <en>(@pxref{Common options}, for a complete description of 15963@c <en>them): 15964These standard options are supported by @code{rdiff} 15965(@pxref{Op��es comuns}, for a complete description of 15966them): 15967 15968@table @code 15969@item -D @var{date} 15970Use the most recent revision no later than @var{date}. 15971 15972@item -f 15973If no matching revision is found, retrieve the most 15974recent revision (instead of ignoring the file). 15975 15976@item -l 15977Local; don't descend subdirectories. 15978 15979@item -R 15980Examine directories recursively. This option is on by default. 15981 15982@item -r @var{tag} 15983Use revision @var{tag}. 15984@end table 15985 15986In addition to the above, these options are available: 15987 15988@table @code 15989@item -c 15990Use the context diff format. This is the default format. 15991 15992@item -s 15993Create a summary change report instead of a patch. The 15994summary includes information about files that were 15995changed or added between the releases. It is sent to 15996the standard output device. This is useful for finding 15997out, for example, which files have changed between two 15998dates or revisions. 15999 16000@item -t 16001A diff of the top two revisions is sent to the standard 16002output device. This is most useful for seeing what the 16003last change to a file was. 16004 16005@item -u 16006Use the unidiff format for the context diffs. 16007Remember that old versions 16008of the @code{patch} program can't handle the unidiff 16009format, so if you plan to post this patch to the net 16010you should probably not use @samp{-u}. 16011 16012@item -V @var{vn} 16013Expand keywords according to the rules current in 16014@sc{rcs} version @var{vn} (the expansion format changed with 16015@sc{rcs} version 5). Note that this option is no 16016longer accepted. @sc{cvs} will always expand keywords the 16017way that @sc{rcs} version 5 does. 16018@end table 16019 16020@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16021@node rdiff examples 16022@appendixsubsec rdiff examples 16023 16024Suppose you receive mail from @t{foo@@example.net} asking for an 16025update from release 1.2 to 1.4 of the tc compiler. You 16026have no such patches on hand, but with @sc{cvs} that can 16027easily be fixed with a command such as this: 16028 16029@example 16030$ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \ 16031$$ Mail -s 'The patches you asked for' foo@@example.net 16032@end example 16033 16034Suppose you have made release 1.3, and forked a branch 16035called @samp{R_1_3fix} for bugfixes. @samp{R_1_3_1} 16036corresponds to release 1.3.1, which was made some time 16037ago. Now, you want to see how much development has been 16038done on the branch. This command can be used: 16039 16040@example 16041$ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name 16042cvs rdiff: Diffing module-name 16043File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6 16044File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4 16045File bar.h,v changed from revision 1.29.2.1 to 1.2 16046@end example 16047 16048@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16049@node release 16050@appendixsec release---Indicate that a Module is no longer in use 16051@cindex release (subcommand) 16052 16053@itemize @bullet 16054@item 16055release [-d] directories@dots{} 16056@item 16057Requires: Working directory. 16058@item 16059Changes: Working directory, history log. 16060@end itemize 16061 16062@c <en>This command is meant to safely cancel the effect of 16063@c <en>@samp{cvs checkout}. Since @sc{cvs} doesn't lock files, it 16064@c <en>isn't strictly necessary to use this command. You can 16065@c <en>always simply delete your working directory, if you 16066@c <en>like; but you risk losing changes you may have 16067@c <en>forgotten, and you leave no trace in the @sc{cvs} history 16068@c <en>file (@pxref{history file}) that you've abandoned your 16069@c <en>checkout. 16070This command is meant to safely cancel the effect of 16071@samp{cvs checkout}. Since @sc{cvs} doesn't lock files, it 16072isn't strictly necessary to use this command. You can 16073always simply delete your working directory, if you 16074like; but you risk losing changes you may have 16075forgotten, and you leave no trace in the @sc{cvs} history 16076file (@pxref{arquivo history (hist�rico)}) that you've abandoned your 16077checkout. 16078 16079Use @samp{cvs release} to avoid these problems. This 16080command checks that no uncommitted changes are 16081present; that you are executing it from immediately 16082above a @sc{cvs} working directory; and that the repository 16083recorded for your files is the same as the repository 16084defined in the module database. 16085 16086If all these conditions are true, @samp{cvs release} 16087leaves a record of its execution (attesting to your 16088intentionally abandoning your checkout) in the @sc{cvs} 16089history log. 16090 16091@menu 16092* release options:: release options 16093* release output:: release output 16094* release examples:: release examples 16095@end menu 16096 16097@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16098@node release options 16099@appendixsubsec release options 16100 16101The @code{release} command supports one command option: 16102 16103@table @code 16104@item -d 16105Delete your working copy of the file if the release 16106succeeds. If this flag is not given your files will 16107remain in your working directory. 16108 16109@c <en>@strong{WARNING: The @code{release} command deletes 16110@c <en>all directories and files recursively. This 16111@c <en>has the very serious side-effect that any directory 16112@c <en>that you have created inside your checked-out sources, 16113@c <en>and not added to the repository (using the @code{add} 16114@c <en>command; @pxref{Adding files}) will be silently deleted---even 16115@c <en>if it is non-empty!} 16116@strong{WARNING: The @code{release} command deletes 16117all directories and files recursively. This 16118has the very serious side-effect that any directory 16119that you have created inside your checked-out sources, 16120and not added to the repository (using the @code{add} 16121command; @pxref{Adicionando arquivos}) will be silently deleted---even 16122if it is non-empty!} 16123@end table 16124 16125@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16126@node release output 16127@appendixsubsec release output 16128 16129Before @code{release} releases your sources it will 16130print a one-line message for any file that is not 16131up-to-date. 16132 16133@table @code 16134@item U @var{file} 16135@itemx P @var{file} 16136There exists a newer revision of this file in the 16137repository, and you have not modified your local copy 16138of the file (@samp{U} and @samp{P} mean the same thing). 16139 16140@item A @var{file} 16141The file has been added to your private copy of the 16142sources, but has not yet been committed to the 16143repository. If you delete your copy of the sources 16144this file will be lost. 16145 16146@item R @var{file} 16147The file has been removed from your private copy of the 16148sources, but has not yet been removed from the 16149repository, since you have not yet committed the 16150removal. @xref{commit}. 16151 16152@item M @var{file} 16153The file is modified in your working directory. There 16154might also be a newer revision inside the repository. 16155 16156@item ? @var{file} 16157@var{file} is in your working directory, but does not 16158correspond to anything in the source repository, and is 16159not in the list of files for @sc{cvs} to ignore (see the 16160description of the @samp{-I} option, and 16161@pxref{cvsignore}). If you remove your working 16162sources, this file will be lost. 16163@end table 16164 16165@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16166@node release examples 16167@appendixsubsec release examples 16168 16169Release the @file{tc} directory, and delete your local working copy 16170of the files. 16171 16172@example 16173$ cd .. # @r{You must stand immediately above the} 16174 # @r{sources when you issue @samp{cvs release}.} 16175$ cvs release -d tc 16176You have [0] altered files in this repository. 16177Are you sure you want to release (and delete) directory `tc': y 16178$ 16179@end example 16180 16181@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16182@node update 16183@appendixsec update---Bring work tree in sync with repository 16184@cindex update (subcommand) 16185 16186@itemize @bullet 16187@item 16188update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag|-D date] [-W spec] files@dots{} 16189@item 16190Requires: repository, working directory. 16191@item 16192Changes: working directory. 16193@end itemize 16194 16195After you've run checkout to create your private copy 16196of source from the common repository, other developers 16197will continue changing the central source. From time 16198to time, when it is convenient in your development 16199process, you can use the @code{update} command from 16200within your working directory to reconcile your work 16201with any revisions applied to the source repository 16202since your last checkout or update. Without the @code{-C} 16203option, @code{update} will also merge any differences 16204between the local copy of files and their base revisions 16205into any destination revisions specified with @code{-r}, 16206@code{-D}, or @code{-A}. 16207 16208@menu 16209* update options:: update options 16210* update output:: update output 16211@end menu 16212 16213@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16214@node update options 16215@appendixsubsec update options 16216 16217@c <en>These standard options are available with @code{update} 16218@c <en>(@pxref{Common options}, for a complete description of 16219@c <en>them): 16220These standard options are available with @code{update} 16221(@pxref{Op��es comuns}, for a complete description of 16222them): 16223 16224@table @code 16225@c <en>@item -D date 16226@item -D date 16227@c <en>Use the most recent revision no later than @var{date}. 16228@c <en>This option is sticky, and implies @samp{-P}. 16229@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates. 16230Use the most recent revision no later than @var{date}. 16231This option is sticky, and implies @samp{-P}. 16232See @ref{Etiquetas adesivas}, for more information on sticky tags/dates. 16233 16234@item -f 16235Only useful with the @samp{-D @var{date}} or @samp{-r 16236@var{tag}} flags. If no matching revision is found, 16237retrieve the most recent revision (instead of ignoring 16238the file). 16239 16240@c <en>@item -k @var{kflag} 16241@item -k @var{kflag} 16242@c <en>Process keywords according to @var{kflag}. See 16243@c <en>@ref{Keyword substitution}. 16244@c <en>This option is sticky; future updates of 16245@c <en>this file in this working directory will use the same 16246@c <en>@var{kflag}. The @code{status} command can be viewed 16247@c <en>to see the sticky options. See @ref{Invoking CVS}, for 16248@c <en>more information on the @code{status} command. 16249Process keywords according to @var{kflag}. See 16250@ref{Substitui��o de palavra-chave}. 16251This option is sticky; future updates of 16252this file in this working directory will use the same 16253@var{kflag}. The @code{status} command can be viewed 16254to see the sticky options. See @ref{Chamando o CVS}, for 16255more information on the @code{status} command. 16256 16257@c <en>@item -l 16258@item -l 16259@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 16260Local; run only in current working directory. @xref{Comportamento recursivo}. 16261 16262@c <en>@item -P 16263@item -P 16264@c <en>Prune empty directories. See @ref{Moving directories}. 16265Prune empty directories. See @ref{Movendo diret�rios}. 16266 16267@c <en>@item -p 16268@item -p 16269@c <en>Pipe files to the standard output. 16270Pipe files to the standard output. 16271 16272@c <en>@item -R 16273@item -R 16274@c <en>Update directories recursively (default). @xref{Recursive 16275@c <en>behavior}. 16276Update directories recursively (default). 16277@xref{Comportamento recursivo}. 16278 16279@c <en>@item -r rev 16280@item -r rev 16281@c <en>Retrieve revision/tag @var{rev}. This option is sticky, 16282@c <en>and implies @samp{-P}. 16283@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates. 16284Retrieve revision/tag @var{rev}. This option is sticky, 16285and implies @samp{-P}. 16286See @ref{Etiquetas adesivas}, for more information on sticky tags/dates. 16287@end table 16288 16289@need 800 16290These special options are also available with 16291@code{update}. 16292 16293@table @code 16294@c <en>@item -A 16295@item -A 16296@c <en>Reset any sticky tags, dates, or @samp{-k} options. 16297@c <en>See @ref{Sticky tags}, for more information on sticky tags/dates. 16298Reset any sticky tags, dates, or @samp{-k} options. 16299See @ref{Etiquetas adesivas}, for more information on sticky tags/dates. 16300 16301@item -C 16302Overwrite locally modified files with clean copies from 16303the repository (the modified file is saved in 16304@file{.#@var{file}.@var{revision}}, however). 16305 16306@item -d 16307Create any directories that exist in the repository if 16308they're missing from the working directory. Normally, 16309@code{update} acts only on directories and files that 16310were already enrolled in your working directory. 16311 16312This is useful for updating directories that were 16313created in the repository since the initial checkout; 16314but it has an unfortunate side effect. If you 16315deliberately avoided certain directories in the 16316repository when you created your working directory 16317(either through use of a module name or by listing 16318explicitly the files and directories you wanted on the 16319command line), then updating with @samp{-d} will create 16320those directories, which may not be what you want. 16321 16322@item -I @var{name} 16323Ignore files whose names match @var{name} (in your 16324working directory) during the update. You can specify 16325@samp{-I} more than once on the command line to specify 16326several files to ignore. Use @samp{-I !} to avoid 16327ignoring any files at all. @xref{cvsignore}, for other 16328ways to make @sc{cvs} ignore some files. 16329 16330@item -W@var{spec} 16331Specify file names that should be filtered during 16332update. You can use this option repeatedly. 16333 16334@var{spec} can be a file name pattern of the same type 16335that you can specify in the @file{.cvswrappers} 16336file. @xref{Wrappers}. 16337 16338@item -j@var{revision} 16339With two @samp{-j} options, merge changes from the 16340revision specified with the first @samp{-j} option to 16341the revision specified with the second @samp{j} option, 16342into the working directory. 16343 16344With one @samp{-j} option, merge changes from the 16345ancestor revision to the revision specified with the 16346@samp{-j} option, into the working directory. The 16347ancestor revision is the common ancestor of the 16348revision which the working directory is based on, and 16349the revision specified in the @samp{-j} option. 16350 16351@c <en>Note that using a single @samp{-j @var{tagname}} option rather than 16352@c <en>@samp{-j @var{branchname}} to merge changes from a branch will 16353@c <en>often not remove files which were removed on the branch. 16354@c <en>@xref{Merging adds and removals}, for more. 16355Note that using a single @samp{-j @var{tagname}} option rather than 16356@samp{-j @var{branchname}} to merge changes from a branch will 16357often not remove files which were removed on the branch. 16358@xref{Mesclando adicionados e removidos}, for more. 16359 16360In addition, each @samp{-j} option can contain an optional 16361date specification which, when used with branches, can 16362limit the chosen revision to one within a specific 16363date. An optional date is specified by adding a colon 16364(:) to the tag: 16365@samp{-j@var{Symbolic_Tag}:@var{Date_Specifier}}. 16366 16367@c <en>@xref{Branching and merging}. 16368@xref{Ramificando e mesclando}. 16369 16370@end table 16371 16372@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16373@c <en>@node update output 16374@node update output 16375@c <en>@appendixsubsec update output 16376@appendixsubsec update output 16377 16378@c <en>@code{update} and @code{checkout} keep you informed of 16379@c <en>their progress by printing a line for each file, preceded 16380@c <en>by one character indicating the status of the file: 16381O @code{update} e o @code{checkout} mant�m voc� 16382informado de seu progresso escrevendo uma linha para 16383cada arquivo, iniciando com um caractere que indica o 16384status do arquivo: 16385 16386@table @code 16387@c <en>@item U @var{file} 16388@item U @var{arquivo} 16389@c <en>The file was brought up to date with respect to the 16390@c <en>repository. This is done for any file that exists in 16391@c <en>the repository but not in your source, and for files 16392@c <en>that you haven't changed but are not the most recent 16393@c <en>versions available in the repository. 16394O arquivo foi atualizado com base no reposit�rio. Isto 16395� feito para qualquer arquivo que exista no 16396reposit�rio mas n�o esteja nos seus fontes (no seu 16397diret�rio da trabalho) e para arquivos que voc� n�o 16398mudou mas n�o est�o na vers�o mais recente que est� 16399dispon�vel no reposit�rio. 16400 16401@c <en>@item P @var{file} 16402@item P @var{arquivo} 16403@c <en>Like @samp{U}, but the @sc{cvs} server sends a patch instead of an entire 16404@c <en>file. This accomplishes the same thing as @samp{U} using less bandwidth. 16405 16406Como o @samp{U}, mas o servidor @sc{cvs} manda um patch 16407(remendo) ao inv�s de mandar um arquivo inteiro. Tem o 16408mesmo resultado que @samp{U} usando menos largura de banda. 16409 16410@c <en>@item A @var{file} 16411@item A @var{arquivo} 16412@c <en>The file has been added to your private copy of the 16413@c <en>sources, and will be added to the source repository 16414@c <en>when you run @code{commit} on the file. This is a 16415@c <en>reminder to you that the file needs to be committed. 16416O arquivo foi adicionado a sua c�pia local dos fontes, 16417e vai ser adicionado ao reposit�rio quando voc� rodar o 16418@code{commit} no arquivo. Funciona como um lembrete de 16419que o arquivo precisa ser ???commitado???. 16420 16421@c <en>@item R @var{file} 16422@item R @var{arquivo} 16423@c <en>The file has been removed from your private copy of the 16424@c <en>sources, and will be removed from the source repository 16425@c <en>when you run @code{commit} on the file. This is a 16426@c <en>reminder to you that the file needs to be committed. 16427O arquivo foi removido de sua c�pia local dos fontes, e 16428ser� removido do reposit�rio quando voc� executar um 16429@code{commit} no arquivo. Funciona como um lembrete de 16430que o arquivo precisa ser ???commitado???. 16431 16432@c <en>@item M @var{file} 16433@item M @var{arquivo} 16434@c <en>The file is modified in your working directory. 16435O arquivo est� modificado no seu diret�rio de trabalho. 16436 16437@c <en>@samp{M} can indicate one of two states for a file 16438@c <en>you're working on: either there were no modifications 16439@c <en>to the same file in the repository, so that your file 16440@c <en>remains as you last saw it; or there were modifications 16441@c <en>in the repository as well as in your copy, but they 16442@c <en>were merged successfully, without conflict, in your 16443@c <en>working directory. 16444O @samp{M} pode indicar um dos dois estados para um 16445arquivo no qual voc� esteja trabalhando: ou n�o existem 16446modifica��es do arquivo equivalente no reposit�rio, de forma 16447que seu arquivo continua da forma como voc� o deixou; 16448ou existem modifica��es no reposit�rio assim como na 16449sua c�pia, mas elas foram mescladas com sucesso, sem 16450conflito, no seu diret�rio de trabalho. 16451 16452@c <en>@sc{cvs} will print some messages if it merges your work, 16453@c <en>and a backup copy of your working file (as it looked 16454@c <en>before you ran @code{update}) will be made. The exact 16455@c <en>name of that file is printed while @code{update} runs. 16456O @sc{cvs} vai escrever algumas mensagens se ele 16457mesclar seu trabalho, e colocar� uma c�pia de seguran�a no seu 16458diret�rio de trabalho (na forma que estava antes de 16459executar o @code{update}). O nome exato do arquivo 16460ser� escrito quando o @code{update} rodar. 16461 16462@c <en>@item C @var{file} 16463@item C @var{arquivo} 16464@c <en>@cindex .# files 16465@cindex arquivos .# 16466@c <en>@cindex __ files (VMS) 16467@cindex __ arquivos (VMS) 16468@c <en>A conflict was detected while trying to merge your 16469@c <en>changes to @var{file} with changes from the source 16470@c <en>repository. @var{file} (the copy in your working 16471@c <en>directory) is now the result of attempting to merge 16472@c <en>the two revisions; an unmodified copy of your file 16473@c <en>is also in your working directory, with the name 16474@c <en>@file{.#@var{file}.@var{revision}} where @var{revision} 16475@c <en>is the revision that your modified file started 16476@c <en>from. Resolve the conflict as described in 16477@c <en>@ref{Conflicts example}. 16478Um conflito foi detectado quando se tentava mesclar 16479suas mudan�as no @var{arquivo} com as mudan�as no 16480reposit�rio. O @var{arquivo} (a c�pia no seu diret�rio 16481de trabalho) � agora o resultado da tentativa de 16482mesclar as duas revis�es; uma c�pia inalterada do 16483arquivo tamb�m est� no diret�rio de trabalho, com o 16484nome de @file{.#@var{arquivo}.@var{revis�o}} onde 16485@var{revis�o} � a revis�o de onde o seu arquivo 16486modificado saiu. Resolva o conflito como � mostrado em 16487@ref{Exemplo de conflitos}. 16488@c "some systems" as in out-of-the-box OSes? Not as 16489@c far as I know. We need to advise sysadmins as well 16490@c as users how to set up this kind of purge, if that is 16491@c what they want. 16492@c We also might want to think about cleaner solutions, 16493@c like having CVS remove the .# file once the conflict 16494@c has been resolved or something like that. 16495@c <en>(Note that some systems automatically purge 16496@c <en>files that begin with @file{.#} if they have not been 16497@c <en>accessed for a few days. If you intend to keep a copy 16498@c <en>of your original file, it is a very good idea to rename 16499@c <en>it.) Under @sc{vms}, the file name starts with 16500@c <en>@file{__} rather than @file{.#}. 16501(Note que alguns sistemas eliminam automaticamente 16502arquivos que come�am com @file{.#} se eles n�o s�o 16503acessados por alguns dias. Se voc� pretende manter uma 16504c�pia do arquivo original, � um �tima id�ia 16505renome�-lo.) No @sc{vms}, o nome do arquivo come�a com 16506@file{__} ao inv�s de @file{.#}. 16507 16508@c <en>@item ? @var{file} 16509@item ? @var{arquivo} 16510@c <en>@var{file} is in your working directory, but does not 16511@c <en>correspond to anything in the source repository, and is 16512@c <en>not in the list of files for @sc{cvs} to ignore (see the 16513@c <en>description of the @samp{-I} option, and 16514@c <en>@pxref{cvsignore}). 16515O @var{arquivo} is in your working directory, but does not 16516correspond to anything in the source repository, and is 16517not in the list of files for @sc{cvs} to ignore (see the 16518description of the @samp{-I} option, and 16519@pxref{cvsignore}). 16520@end table 16521 16522@c <en>@node Invoking CVS 16523@node Chamando o CVS 16524@c <en>@appendix Quick reference to CVS commands 16525@appendix Quick reference to CVS commands 16526@c <en>@cindex Command reference 16527@cindex Command reference 16528@c <en>@cindex Reference, commands 16529@cindex Reference, commands 16530@c <en>@cindex Invoking CVS 16531@cindex Chamando o CVS 16532 16533@c <en>This appendix describes how to invoke @sc{cvs}, with 16534@c <en>references to where each command or feature is 16535@c <en>described in detail. For other references run the 16536@c <en>@code{cvs --help} command, or see @ref{Index}. 16537This appendix describes how to invoke @sc{cvs}, with 16538references to where each command or feature is 16539described in detail. For other references run the 16540@code{cvs --help} command, or see @ref{Indice}. 16541 16542@c <en>A @sc{cvs} command looks like: 16543A @sc{cvs} command looks like: 16544 16545@example 16546cvs [ @var{global_options} ] @var{command} [ @var{command_options} ] [ @var{command_args} ] 16547@end example 16548 16549Global options: 16550 16551@table @code 16552@c <en>@item --allow-root=@var{rootdir} 16553@item --allow-root=@var{rootdir} 16554@c <en>Specify legal @sc{cvsroot} directory (server only) (not 16555@c <en>in @sc{cvs} 1.9 and older). See @ref{Password 16556@c <en>authentication server}. 16557Specify legal @sc{cvsroot} directory (server only) (not 16558in @sc{cvs} 1.9 and older). See 16559@ref{Servidor de autentica��o por senha}. 16560 16561@c <en>@item -a 16562@item -a 16563@c <en>Authenticate all communication (client only) (not in @sc{cvs} 16564@c <en>1.9 and older). See @ref{Global options}. 16565Authenticate all communication (client only) (not in @sc{cvs} 165661.9 and older). See @ref{Op��es globais}. 16567 16568@c <en>@item -b 16569@item -b 16570@c <en>Specify RCS location (@sc{cvs} 1.9 and older). See 16571@c <en>@ref{Global options}. 16572Specify RCS location (@sc{cvs} 1.9 and older). See 16573@ref{Op��es globais}. 16574 16575@c <en>@item -d @var{root} 16576@item -d @var{root} 16577@c <en>Specify the @sc{cvsroot}. See @ref{Repository}. 16578Specify the @sc{cvsroot}. See @ref{Reposit�rio}. 16579 16580@c <en>@item -e @var{editor} 16581@item -e @var{editor} 16582@c <en>Edit messages with @var{editor}. See @ref{Committing 16583@c <en>your changes}. 16584Edit messages with @var{editor}. See 16585@ref{Efetivando suas altera��es}. 16586 16587@c <en>@item -f 16588@item -f 16589@c <en>Do not read the @file{~/.cvsrc} file. See @ref{Global 16590@c <en>options}. 16591Do not read the @file{~/.cvsrc} file. See @ref{Op��es globais}. 16592 16593@c <en>@item -H 16594@item -H 16595@c <en>@itemx --help 16596@itemx --help 16597@c <en>Print a help message. See @ref{Global options}. 16598Print a help message. See @ref{Op��es globais}. 16599 16600@c <en>@item -l 16601@item -l 16602@c <en>Do not log in @file{$CVSROOT/CVSROOT/history} file. See @ref{Global 16603@c <en>options}. 16604Do not log in @file{$CVSROOT/CVSROOT/history} file. See 16605@ref{Op��es globais}. 16606 16607@c <en>@item -n 16608@item -n 16609@c <en>Do not change any files. See @ref{Global options}. 16610Do not change any files. See @ref{Op��es globais}. 16611 16612@c <en>@item -Q 16613@item -Q 16614@c <en>Be really quiet. See @ref{Global options}. 16615Be really quiet. See @ref{Op��es globais}. 16616 16617@c <en>@item -q 16618@item -q 16619@c <en>Be somewhat quiet. See @ref{Global options}. 16620Be somewhat quiet. See @ref{Op��es globais}. 16621 16622@c <en>@item -r 16623@item -r 16624@c <en>Make new working files read-only. See @ref{Global options}. 16625Make new working files read-only. See @ref{Op��es globais}. 16626 16627@c <en>@item -s @var{variable}=@var{value} 16628@item -s @var{variable}=@var{value} 16629@c <en>Set a user variable. See @ref{Variables}. 16630Set a user variable. See @ref{Variables}. 16631 16632@c <en>@item -T @var{tempdir} 16633@item -T @var{tempdir} 16634@c <en>Put temporary files in @var{tempdir}. See @ref{Global 16635@c <en>options}. 16636Put temporary files in @var{tempdir}. See 16637@ref{Op��es globais}. 16638 16639@c <en>@item -t 16640@item -t 16641@c <en>Trace @sc{cvs} execution. See @ref{Global options}. 16642Trace @sc{cvs} execution. See @ref{Op��es globais}. 16643 16644@c <en>@item -v 16645@item -v 16646@c <en>@item --version 16647@item --version 16648@c <en>Display version and copyright information for @sc{cvs}. 16649Display version and copyright information for @sc{cvs}. 16650 16651@c <en>@item -w 16652@item -w 16653@c <en>Make new working files read-write. See @ref{Global 16654@c <en>options}. 16655Make new working files read-write. See @ref{Op��es globais}. 16656 16657@c <en>@item -x 16658@item -x 16659@c <en>Encrypt all communication (client only). 16660@c <en>See @ref{Global options}. 16661Encrypt all communication (client only). 16662See @ref{Op��es globais}. 16663 16664@c <en>@item -z @var{gzip-level} 16665@item -z @var{gzip-level} 16666@c <en>@cindex Compression 16667@cindex Compression 16668@c <en>@cindex Gzip 16669@cindex Gzip 16670@c <en>Set the compression level (client only). 16671@c <en>See @ref{Global options}. 16672Set the compression level (client only). 16673See @ref{Op��es globais}. 16674@end table 16675 16676@c <en>Keyword expansion modes (@pxref{Substitution modes}): 16677Keyword expansion modes (@pxref{Modos de substitui��o}): 16678 16679@example 16680-kkv $@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp $ 16681-kkvl $@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ 16682-kk $@splitrcskeyword{}Id$ 16683-kv file1,v 1.1 1993/12/09 03:21:13 joe Exp 16684-ko @i{no expansion} 16685-kb @i{no expansion, file is binary} 16686@end example 16687 16688@c <en>Keywords (@pxref{Keyword list}): 16689Keywords (@pxref{Lista de palavras-chave}): 16690 16691@example 16692$@splitrcskeyword{}Author: joe $ 16693$@splitrcskeyword{}Date: 1993/12/09 03:21:13 $ 16694$@splitrcskeyword{}CVSHeader: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ 16695$@splitrcskeyword{}Header: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ 16696$@splitrcskeyword{}Id: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $ 16697$@splitrcskeyword{}Locker: harry $ 16698$@splitrcskeyword{}Name: snapshot_1_14 $ 16699$@splitrcskeyword{}RCSfile: file1,v $ 16700$@splitrcskeyword{}Revision: 1.1 $ 16701$@splitrcskeyword{}Source: /home/files/file1,v $ 16702$@splitrcskeyword{}State: Exp $ 16703$@splitrcskeyword{}Log: file1,v $ 16704Revision 1.1 1993/12/09 03:30:17 joe 16705Initial revision 16706 16707@end example 16708 16709@c The idea behind this table is that we want each item 16710@c to be a sentence or two at most. Preferably a 16711@c single line. 16712@c 16713@c In some cases refs to "foo options" are just to get 16714@c this thing written quickly, not because the "foo 16715@c options" node is really the best place to point. 16716Commands, command options, and command arguments: 16717 16718@table @code 16719@c ------------------------------------------------------------ 16720@c <en>@item add [@var{options}] [@var{files}@dots{}] 16721@item add [@var{options}] [@var{files}@dots{}] 16722@c <en>Add a new file/directory. See @ref{Adding files}. 16723Add a new file/directory. See @ref{Adicionando arquivos}. 16724 16725@table @code 16726@c <en>@item -k @var{kflag} 16727@item -k @var{kflag} 16728@c <en>Set keyword expansion. 16729Set keyword expansion. 16730 16731@c <en>@item -m @var{msg} 16732@item -m @var{msg} 16733@c <en>Set file description. 16734Set file description. 16735@end table 16736 16737@c ------------------------------------------------------------ 16738@c <en>@item admin [@var{options}] [@var{files}@dots{}] 16739@item admin [@var{options}] [@var{files}@dots{}] 16740@c <en>Administration of history files in the repository. See 16741@c <en>@ref{admin}. 16742Administration of history files in the repository. See 16743@ref{admin}. 16744@c This list omits those options which are not 16745@c documented as being useful with CVS. That might be 16746@c a mistake... 16747 16748@table @code 16749@c <en>@item -b[@var{rev}] 16750@item -b[@var{rev}] 16751@c <en>Set default branch. See @ref{Reverting local changes}. 16752Set default branch. See @ref{Reverting local changes}. 16753 16754@c <en>@item -c@var{string} 16755@item -c@var{string} 16756@c <en>Set comment leader. 16757Set comment leader. 16758 16759@c <en>@item -k@var{subst} 16760@item -k@var{subst} 16761@c <en>Set keyword substitution. See @ref{Keyword 16762@c <en>substitution}. 16763Set keyword substitution. See @ref{Substitui��o de palavra-chave}. 16764 16765@c <en>@item -l[@var{rev}] 16766@item -l[@var{rev}] 16767@c <en>Lock revision @var{rev}, or latest revision. 16768Lock revision @var{rev}, or latest revision. 16769 16770@c <en>@item -m@var{rev}:@var{msg} 16771@item -m@var{rev}:@var{msg} 16772@c <en>Replace the log message of revision @var{rev} with 16773@c <en>@var{msg}. 16774Replace the log message of revision @var{rev} with 16775@var{msg}. 16776 16777@c <en>@item -o@var{range} 16778@item -o@var{range} 16779@c <en>Delete revisions from the repository. See 16780@c <en>@ref{admin options}. 16781Delete revisions from the repository. See 16782@ref{admin options}. 16783 16784@c <en>@item -q 16785@item -q 16786@c <en>Run quietly; do not print diagnostics. 16787Run quietly; do not print diagnostics. 16788 16789@c <en>@item -s@var{state}[:@var{rev}] 16790@item -s@var{state}[:@var{rev}] 16791@c <en>Set the state. 16792Set the state. 16793 16794@c Does not work for client/server CVS 16795@c <en>@item -t 16796@item -t 16797@c <en>Set file description from standard input. 16798Set file description from standard input. 16799 16800@c <en>@item -t@var{file} 16801@item -t@var{file} 16802@c <en>Set file description from @var{file}. 16803Set file description from @var{file}. 16804 16805@c <en>@item -t-@var{string} 16806@item -t-@var{string} 16807@c <en>Set file description to @var{string}. 16808Set file description to @var{string}. 16809 16810@c <en>@item -u[@var{rev}] 16811@item -u[@var{rev}] 16812@c <en>Unlock revision @var{rev}, or latest revision. 16813Unlock revision @var{rev}, or latest revision. 16814@end table 16815 16816@c ------------------------------------------------------------ 16817@c <en>@item annotate [@var{options}] [@var{files}@dots{}] 16818@item annotate [@var{options}] [@var{files}@dots{}] 16819@c <en>Show last revision where each line was modified. See 16820@c <en>@ref{annotate}. 16821Show last revision where each line was modified. See 16822@ref{annotate}. 16823 16824@table @code 16825@c <en>@item -D @var{date} 16826@item -D @var{date} 16827@c <en>Annotate the most recent revision no later than 16828@c <en>@var{date}. See @ref{Common options}. 16829Annotate the most recent revision no later than 16830@var{date}. See @ref{Op��es comuns}. 16831 16832@c <en>@item -F 16833@item -F 16834@c <en>Force annotation of binary files. (Without this option, 16835@c <en>binary files are skipped with a message.) 16836Force annotation of binary files. (Without this option, 16837binary files are skipped with a message.) 16838 16839@c <en>@item -f 16840@item -f 16841@c <en>Use head revision if tag/date not found. See 16842@c <en>@ref{Common options}. 16843Use head revision if tag/date not found. See 16844@ref{Op��es comuns}. 16845 16846@c <en>@item -l 16847@item -l 16848@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 16849Local; run only in current working directory. @xref{Comportamento recursivo}. 16850 16851@c <en>@item -R 16852@item -R 16853@c <en>Operate recursively (default). @xref{Recursive 16854@c <en>behavior}. 16855Operate recursively (default). 16856@xref{Comportamento recursivo}. 16857 16858@c <en>@item -r @var{tag} 16859@item -r @var{tag} 16860@c <en>Annotate revision @var{tag}. See @ref{Common options}. 16861Annotate revision @var{tag}. See @ref{Op��es comuns}. 16862@end table 16863 16864@c ------------------------------------------------------------ 16865@c <en>@item checkout [@var{options}] @var{modules}@dots{} 16866@item checkout [@var{options}] @var{modules}@dots{} 16867@c <en>Get a copy of the sources. See @ref{checkout}. 16868Get a copy of the sources. See @ref{checkout}. 16869 16870@table @code 16871@c <en>@item -A 16872@item -A 16873@c <en>Reset any sticky tags/date/options. See @ref{Sticky 16874@c <en>tags} and @ref{Keyword substitution}. 16875Reset any sticky tags/date/options. See @ref{Etiquetas adesivas} 16876and @ref{Substitui��o de palavra-chave}. 16877 16878@c <en>@item -c 16879@item -c 16880@c <en>Output the module database. See @ref{checkout options}. 16881Output the module database. See @ref{checkout options}. 16882 16883@c <en>@item -D @var{date} 16884@item -D @var{date} 16885@c <en>Check out revisions as of @var{date} (is sticky). See 16886@c <en>@ref{Common options}. 16887Check out revisions as of @var{date} (is sticky). See 16888@ref{Op��es comuns}. 16889 16890@c <en>@item -d @var{dir} 16891@item -d @var{dir} 16892@c <en>Check out into @var{dir}. See @ref{checkout options}. 16893Check out into @var{dir}. See @ref{checkout options}. 16894 16895@c <en>@item -f 16896@item -f 16897@c <en>Use head revision if tag/date not found. See 16898@c <en>@ref{Common options}. 16899Use head revision if tag/date not found. See 16900@ref{Op��es comuns}. 16901 16902@c Probably want to use rev1/rev2 style like for diff 16903@c -r. Here and in on-line help. 16904@c <en>@item -j @var{rev} 16905@item -j @var{rev} 16906@c <en>Merge in changes. See @ref{checkout options}. 16907Merge in changes. See @ref{checkout options}. 16908 16909@c <en>@item -k @var{kflag} 16910@item -k @var{kflag} 16911@c <en>Use @var{kflag} keyword expansion. See 16912@c <en>@ref{Substitution modes}. 16913Use @var{kflag} keyword expansion. See 16914@ref{Modos de substitui��o}. 16915 16916@c <en>@item -l 16917@item -l 16918@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 16919Local; run only in current working directory. @xref{Comportamento recursivo}. 16920 16921@c <en>@item -N 16922@item -N 16923@c <en>Don't ``shorten'' module paths if -d specified. See 16924@c <en>@ref{checkout options}. 16925Don't ``shorten'' module paths if -d specified. See 16926@ref{checkout options}. 16927 16928@c <en>@item -n 16929@item -n 16930@c <en>Do not run module program (if any). See @ref{checkout options}. 16931Do not run module program (if any). See @ref{checkout options}. 16932 16933@c <en>@item -P 16934@item -P 16935@c <en>Prune empty directories. See @ref{Moving directories}. 16936Prune empty directories. See @ref{Movendo diret�rios}. 16937 16938@c <en>@item -p 16939@item -p 16940@c <en>Check out files to standard output (avoids 16941@c <en>stickiness). See @ref{checkout options}. 16942Check out files to standard output (avoids 16943stickiness). See @ref{checkout options}. 16944 16945@c <en>@item -R 16946@item -R 16947@c <en>Operate recursively (default). @xref{Recursive 16948@c <en>behavior}. 16949Operate recursively (default). @xref{Comportamento recursivo}. 16950 16951@c <en>@item -r @var{tag} 16952@item -r @var{tag} 16953@c <en>Checkout revision @var{tag} (is sticky). See @ref{Common options}. 16954Checkout revision @var{tag} (is sticky). See @ref{Op��es comuns}. 16955 16956@c <en>@item -s 16957@item -s 16958@c <en>Like -c, but include module status. See @ref{checkout options}. 16959Like -c, but include module status. See @ref{checkout options}. 16960@end table 16961 16962@c ------------------------------------------------------------ 16963@c <en>@item commit [@var{options}] [@var{files}@dots{}] 16964@item commit [@var{options}] [@var{files}@dots{}] 16965@c <en>Check changes into the repository. See @ref{commit}. 16966Check changes into the repository. See @ref{commit}. 16967 16968@table @code 16969@c <en>@item -F @var{file} 16970@item -F @var{file} 16971@c <en>Read log message from @var{file}. See @ref{commit options}. 16972Read log message from @var{file}. See @ref{commit options}. 16973 16974@c <en>@item -f 16975@item -f 16976@c What is this "disables recursion"? It is from the 16977@c on-line help; is it documented in this manual? 16978@c <en>Force the file to be committed; disables recursion. 16979@c <en>See @ref{commit options}. 16980Force the file to be committed; disables recursion. 16981See @ref{commit options}. 16982 16983@c <en>@item -l 16984@item -l 16985@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 16986Local; run only in current working directory. See @ref{Comportamento recursivo}. 16987 16988@c <en>@item -m @var{msg} 16989@item -m @var{msg} 16990@c <en>Use @var{msg} as log message. See @ref{commit options}. 16991Use @var{msg} as log message. See @ref{commit options}. 16992 16993@c <en>@item -n 16994@item -n 16995@c <en>Do not run module program (if any). See @ref{commit options}. 16996Do not run module program (if any). See @ref{commit options}. 16997 16998@c <en>@item -R 16999@item -R 17000@c <en>Operate recursively (default). @xref{Recursive 17001@c <en>behavior}. 17002Operate recursively (default). @xref{Comportamento recursivo}. 17003 17004@c <en>@item -r @var{rev} 17005@item -r @var{rev} 17006@c <en>Commit to @var{rev}. See @ref{commit options}. 17007Commit to @var{rev}. See @ref{commit options}. 17008@c FIXME: should be dragging over text from 17009@c commit options, especially if it can be cleaned up 17010@c and made concise enough. 17011@end table 17012 17013@c ------------------------------------------------------------ 17014@c <en>@item diff [@var{options}] [@var{files}@dots{}] 17015@item diff [@var{options}] [@var{files}@dots{}] 17016@c <en>Show differences between revisions. See @ref{diff}. 17017@c <en>In addition to the options shown below, accepts a wide 17018@c <en>variety of options to control output style, for example 17019@c <en>@samp{-c} for context diffs. 17020Show differences between revisions. See @ref{diff}. 17021In addition to the options shown below, accepts a wide 17022variety of options to control output style, for example 17023@samp{-c} for context diffs. 17024 17025@table @code 17026@c <en>@item -D @var{date1} 17027@item -D @var{date1} 17028@c <en>Diff revision for date against working file. See 17029@c <en>@ref{diff options}. 17030Diff revision for date against working file. See 17031@ref{diff options}. 17032 17033@c <en>@item -D @var{date2} 17034@item -D @var{date2} 17035@c <en>Diff @var{rev1}/@var{date1} against @var{date2}. See 17036@c <en>@ref{diff options}. 17037Diff @var{rev1}/@var{date1} against @var{date2}. See 17038@ref{diff options}. 17039 17040@c <en>@item -l 17041@item -l 17042@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17043Local; run only in current working directory. See @ref{Comportamento recursivo}. 17044 17045@c <en>@item -N 17046@item -N 17047@c <en>Include diffs for added and removed files. See 17048@c <en>@ref{diff options}. 17049Include diffs for added and removed files. See 17050@ref{diff options}. 17051 17052@c <en>@item -R 17053@item -R 17054@c <en>Operate recursively (default). @xref{Recursive 17055@c <en>behavior}. 17056Operate recursively (default). @xref{Comportamento recursivo}. 17057 17058@c <en>@item -r @var{rev1} 17059@item -r @var{rev1} 17060@c <en>Diff revision for @var{rev1} against working file. See 17061@c <en>@ref{diff options}. 17062Diff revision for @var{rev1} against working file. See 17063@ref{diff options}. 17064 17065@c <en>@item -r @var{rev2} 17066@item -r @var{rev2} 17067@c <en>Diff @var{rev1}/@var{date1} against @var{rev2}. See @ref{diff options}. 17068Diff @var{rev1}/@var{date1} against @var{rev2}. See @ref{diff options}. 17069@end table 17070 17071@c ------------------------------------------------------------ 17072@c <en>@item edit [@var{options}] [@var{files}@dots{}] 17073@item edit [@var{options}] [@var{files}@dots{}] 17074@c <en>Get ready to edit a watched file. See @ref{Editing files}. 17075Get ready to edit a watched file. See @ref{Editando arquivos}. 17076 17077@table @code 17078@c <en>@item -a @var{actions} 17079@item -a @var{actions} 17080@c <en>Specify actions for temporary watch, where 17081@c <en>@var{actions} is @code{edit}, @code{unedit}, 17082@c <en>@code{commit}, @code{all}, or @code{none}. See 17083@c <en>@ref{Editing files}. 17084Specify actions for temporary watch, where 17085@var{actions} is @code{edit}, @code{unedit}, 17086@code{commit}, @code{all}, or @code{none}. See 17087@ref{Editando arquivos}. 17088 17089@c <en>@item -l 17090@item -l 17091@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17092Local; run only in current working directory. See @ref{Comportamento recursivo}. 17093 17094@c <en>@item -R 17095@item -R 17096@c <en>Operate recursively (default). @xref{Recursive 17097@c <en>behavior}. 17098Operate recursively (default). @xref{Comportamento recursivo}. 17099@end table 17100 17101@c ------------------------------------------------------------ 17102@c <en>@item editors [@var{options}] [@var{files}@dots{}] 17103@item editors [@var{options}] [@var{files}@dots{}] 17104@c <en>See who is editing a watched file. See @ref{Watch information}. 17105See who is editing a watched file. See @ref{Informa��es de ???Watch???}. 17106 17107@table @code 17108@c <en>@item -l 17109@item -l 17110@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17111Local; run only in current working directory. See @ref{Comportamento recursivo}. 17112 17113@c <en>@item -R 17114@item -R 17115@c <en>Operate recursively (default). @xref{Recursive 17116@c <en>behavior}. 17117Operate recursively (default). @xref{Comportamento recursivo}. 17118@end table 17119 17120@c ------------------------------------------------------------ 17121@c <en>@item export [@var{options}] @var{modules}@dots{} 17122@item export [@var{options}] @var{modules}@dots{} 17123@c <en>Export files from @sc{cvs}. See @ref{export}. 17124Export files from @sc{cvs}. See @ref{export}. 17125 17126@table @code 17127@c <en>@item -D @var{date} 17128@item -D @var{date} 17129@c <en>Check out revisions as of @var{date}. See 17130@c <en>@ref{Common options}. 17131Check out revisions as of @var{date}. See 17132@ref{Op��es comuns}. 17133 17134@c <en>@item -d @var{dir} 17135@item -d @var{dir} 17136@c <en>Check out into @var{dir}. See @ref{export options}. 17137Check out into @var{dir}. See @ref{export options}. 17138 17139@c <en>@item -f 17140@item -f 17141@c <en>Use head revision if tag/date not found. See 17142@c <en>@ref{Common options}. 17143Use head revision if tag/date not found. See 17144@ref{Op��es comuns}. 17145 17146@c <en>@item -k @var{kflag} 17147@item -k @var{kflag} 17148@c <en>Use @var{kflag} keyword expansion. See 17149@c <en>@ref{Substitution modes}. 17150Use @var{kflag} keyword expansion. See 17151@ref{Modos de substitui��o}. 17152 17153@c <en>@item -l 17154@item -l 17155@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 17156Local; run only in current working directory. @xref{Comportamento recursivo}. 17157 17158@c <en>@item -N 17159@item -N 17160@c <en>Don't ``shorten'' module paths if -d specified. See 17161@c <en>@ref{export options}. 17162Don't ``shorten'' module paths if -d specified. See 17163@ref{export options}. 17164 17165@c <en>@item -n 17166@item -n 17167@c <en>Do not run module program (if any). See @ref{export options}. 17168Do not run module program (if any). See @ref{export options}. 17169 17170@c <en>@item -R 17171@item -R 17172@c <en>Operate recursively (default). @xref{Recursive 17173@c <en>behavior}. 17174Operate recursively (default). @xref{Comportamento recursivo}. 17175 17176@c <en>@item -r @var{tag} 17177@item -r @var{tag} 17178@c <en>Checkout revision @var{tag}. See @ref{Common options}. 17179Checkout revision @var{tag}. See @ref{Op��es comuns}. 17180@end table 17181 17182@c ------------------------------------------------------------ 17183@c <en>@item history [@var{options}] [@var{files}@dots{}] 17184@item history [@var{options}] [@var{files}@dots{}] 17185@c <en>Show repository access history. See @ref{history}. 17186Show repository access history. See @ref{history}. 17187 17188@table @code 17189@c <en>@item -a 17190@item -a 17191@c <en>All users (default is self). See @ref{history options}. 17192All users (default is self). See @ref{history options}. 17193 17194@c <en>@item -b @var{str} 17195@item -b @var{str} 17196@c <en>Back to record with @var{str} in module/file/repos 17197@c <en>field. See @ref{history options}. 17198Back to record with @var{str} in module/file/repos 17199field. See @ref{history options}. 17200 17201@c <en>@item -c 17202@item -c 17203@c <en>Report on committed (modified) files. See @ref{history options}. 17204Report on committed (modified) files. See @ref{history options}. 17205 17206@c <en>@item -D @var{date} 17207@item -D @var{date} 17208@c <en>Since @var{date}. See @ref{history options}. 17209Since @var{date}. See @ref{history options}. 17210 17211@c <en>@item -e 17212@item -e 17213@c <en>Report on all record types. See @ref{history options}. 17214Report on all record types. See @ref{history options}. 17215 17216@c <en>@item -l 17217@item -l 17218@c <en>Last modified (committed or modified report). See @ref{history options}. 17219Last modified (committed or modified report). See @ref{history options}. 17220 17221@c <en>@item -m @var{module} 17222@item -m @var{module} 17223@c <en>Report on @var{module} (repeatable). See @ref{history options}. 17224Report on @var{module} (repeatable). See @ref{history options}. 17225 17226@c <en>@item -n @var{module} 17227@item -n @var{module} 17228@c <en>In @var{module}. See @ref{history options}. 17229In @var{module}. See @ref{history options}. 17230 17231@c <en>@item -o 17232@item -o 17233@c <en>Report on checked out modules. See @ref{history options}. 17234Report on checked out modules. See @ref{history options}. 17235 17236@c <en>@item -p @var{repository} 17237@item -p @var{repository} 17238@c <en>In @var{repository}. See @ref{history options}. 17239In @var{repository}. See @ref{history options}. 17240 17241@c <en>@item -r @var{rev} 17242@item -r @var{rev} 17243@c <en>Since revision @var{rev}. See @ref{history options}. 17244Since revision @var{rev}. See @ref{history options}. 17245 17246@c <en>@item -T 17247@item -T 17248@c What the @#$@# is a TAG? Same as a tag? This 17249@c wording is also in the online-line help. 17250@c <en>Produce report on all TAGs. See @ref{history options}. 17251Produce report on all TAGs. See @ref{history options}. 17252 17253@c <en>@item -t @var{tag} 17254@item -t @var{tag} 17255@c <en>Since tag record placed in history file (by anyone). 17256@c <en>See @ref{history options}. 17257Since tag record placed in history file (by anyone). 17258See @ref{history options}. 17259 17260@c <en>@item -u @var{user} 17261@item -u @var{user} 17262@c <en>For user @var{user} (repeatable). See @ref{history options}. 17263For user @var{user} (repeatable). See @ref{history options}. 17264 17265@c <en>@item -w 17266@item -w 17267@c <en>Working directory must match. See @ref{history options}. 17268Working directory must match. See @ref{history options}. 17269 17270@c <en>@item -x @var{types} 17271@item -x @var{types} 17272@c <en>Report on @var{types}, one or more of 17273@c <en>@code{TOEFWUPCGMAR}. See @ref{history options}. 17274Report on @var{types}, one or more of 17275@code{TOEFWUPCGMAR}. See @ref{history options}. 17276 17277@c <en>@item -z @var{zone} 17278@item -z @var{zone} 17279@c <en>Output for time zone @var{zone}. See @ref{history options}. 17280Output for time zone @var{zone}. See @ref{history options}. 17281@end table 17282 17283@c ------------------------------------------------------------ 17284@c <en>@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{} 17285@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{} 17286@c <en>Import files into @sc{cvs}, using vendor branches. See 17287@c <en>@ref{import}. 17288Import files into @sc{cvs}, using vendor branches. See 17289@ref{import}. 17290 17291@table @code 17292@c <en>@item -b @var{bra} 17293@item -b @var{bra} 17294@c <en>Import to vendor branch @var{bra}. See 17295@c <en>@ref{Multiple vendor branches}. 17296Import to vendor branch @var{bra}. See 17297@ref{Ramos de fornecedor m�ltiplos}. 17298 17299@c <en>@item -d 17300@item -d 17301@c <en>Use the file's modification time as the time of 17302@c <en>import. See @ref{import options}. 17303Use the file's modification time as the time of 17304import. See @ref{import options}. 17305 17306@c <en>@item -k @var{kflag} 17307@item -k @var{kflag} 17308@c <en>Set default keyword substitution mode. See 17309@c <en>@ref{import options}. 17310Set default keyword substitution mode. See 17311@ref{import options}. 17312 17313@c <en>@item -m @var{msg} 17314@item -m @var{msg} 17315@c <en>Use @var{msg} for log message. See 17316@c <en>@ref{import options}. 17317Use @var{msg} for log message. See 17318@ref{import options}. 17319 17320@c <en>@item -I @var{ign} 17321@item -I @var{ign} 17322@c <en>More files to ignore (! to reset). See 17323@c <en>@ref{import options}. 17324More files to ignore (! to reset). See 17325@ref{import options}. 17326 17327@c <en>@item -W @var{spec} 17328@item -W @var{spec} 17329@c <en>More wrappers. See @ref{import options}. 17330More wrappers. See @ref{import options}. 17331@end table 17332 17333@c ------------------------------------------------------------ 17334@c <en>@item init 17335@item init 17336@c <en>Create a @sc{cvs} repository if it doesn't exist. See 17337@c <en>@ref{Creating a repository}. 17338Create a @sc{cvs} repository if it doesn't exist. See 17339@ref{Criando um reposit�rio}. 17340 17341@c ------------------------------------------------------------ 17342@c <en>@item kserver 17343@item kserver 17344@c <en>Kerberos authenticated server. 17345@c <en>See @ref{Kerberos authenticated}. 17346Kerberos authenticated server. 17347See @ref{Autentica��o kerberos}. 17348 17349@c ------------------------------------------------------------ 17350@c <en>@item log [@var{options}] [@var{files}@dots{}] 17351@item log [@var{options}] [@var{files}@dots{}] 17352@c <en>Print out history information for files. See @ref{log}. 17353Print out history information for files. See @ref{log}. 17354 17355@table @code 17356@c <en>@item -b 17357@item -b 17358@c <en>Only list revisions on the default branch. See @ref{log options}. 17359Only list revisions on the default branch. See @ref{log options}. 17360 17361@c <en>@item -d @var{dates} 17362@item -d @var{dates} 17363@c <en>Specify dates (@var{d1}<@var{d2} for range, @var{d} for 17364@c <en>latest before). See @ref{log options}. 17365Specify dates (@var{d1}<@var{d2} for range, @var{d} for 17366latest before). See @ref{log options}. 17367 17368@c <en>@item -h 17369@item -h 17370@c <en>Only print header. See @ref{log options}. 17371Only print header. See @ref{log options}. 17372 17373@c <en>@item -l 17374@item -l 17375@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17376Local; run only in current working directory. See @ref{Comportamento recursivo}. 17377 17378@c <en>@item -N 17379@item -N 17380@c <en>Do not list tags. See @ref{log options}. 17381Do not list tags. See @ref{log options}. 17382 17383@c <en>@item -R 17384@item -R 17385@c <en>Only print name of RCS file. See @ref{log options}. 17386Only print name of RCS file. See @ref{log options}. 17387 17388@c <en>@item -r@var{revs} 17389@item -r@var{revs} 17390@c <en>Only list revisions @var{revs}. See @ref{log options}. 17391Only list revisions @var{revs}. See @ref{log options}. 17392 17393@c <en>@item -s @var{states} 17394@item -s @var{states} 17395@c <en>Only list revisions with specified states. See @ref{log options}. 17396Only list revisions with specified states. See @ref{log options}. 17397 17398@c <en>@item -t 17399@item -t 17400@c <en>Only print header and descriptive text. See @ref{log 17401@c <en>options}. 17402Only print header and descriptive text. See @ref{log 17403options}. 17404 17405@c <en>@item -w@var{logins} 17406@item -w@var{logins} 17407@c <en>Only list revisions checked in by specified logins. See @ref{log options}. 17408Only list revisions checked in by specified logins. See @ref{log options}. 17409@end table 17410 17411@c ------------------------------------------------------------ 17412@c <en>@item login 17413@item login 17414@c <en>Prompt for password for authenticating server. See 17415@c <en>@ref{Password authentication client}. 17416Pede por uma senha para o servidor de autentica��o. Veja em 17417@ref{Cliente de autentica��o por senha}. 17418 17419@c ------------------------------------------------------------ 17420@c <en>@item logout 17421@item logout 17422@c <en>Remove stored password for authenticating server. See 17423@c <en>@ref{Password authentication client}. 17424Remove senhas armazenadas para a autentica��o no servidor. Veja em 17425@ref{Cliente de autentica��o por senha}. 17426 17427@c ------------------------------------------------------------ 17428@c <en>@item pserver 17429@item pserver 17430@c <en>Password authenticated server. 17431@c <en>See @ref{Password authentication server}. 17432Password authenticated server. 17433See @ref{Servidor de autentica��o por senha}. 17434 17435@c ------------------------------------------------------------ 17436@c <en>@item rannotate [@var{options}] [@var{modules}@dots{}] 17437@item rannotate [@var{options}] [@var{modules}@dots{}] 17438@c <en>Show last revision where each line was modified. See 17439@c <en>@ref{annotate}. 17440Show last revision where each line was modified. See 17441@ref{annotate}. 17442 17443@table @code 17444@c <en>@item -D @var{date} 17445@item -D @var{date} 17446@c <en>Annotate the most recent revision no later than 17447@c <en>@var{date}. See @ref{Common options}. 17448Annotate the most recent revision no later than 17449@var{date}. See @ref{Op��es comuns}. 17450 17451@c <en>@item -F 17452@item -F 17453@c <en>Force annotation of binary files. (Without this option, 17454@c <en>binary files are skipped with a message.) 17455Force annotation of binary files. (Without this option, 17456binary files are skipped with a message.) 17457 17458@c <en>@item -f 17459@item -f 17460@c <en>Use head revision if tag/date not found. See 17461@c <en>@ref{Common options}. 17462Use head revision if tag/date not found. See 17463@ref{Op��es comuns}. 17464 17465@c <en>@item -l 17466@item -l 17467@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 17468Local; run only in current working directory. @xref{Comportamento recursivo}. 17469 17470@c <en>@item -R 17471@item -R 17472@c <en>Operate recursively (default). @xref{Recursive behavior}. 17473Operate recursively (default). @xref{Comportamento recursivo}. 17474 17475@c <en>@item -r @var{tag} 17476@item -r @var{tag} 17477@c <en>Annotate revision @var{tag}. See @ref{Common options}. 17478Annotate revision @var{tag}. See @ref{Op��es comuns}. 17479@end table 17480 17481@c ------------------------------------------------------------ 17482@c <en>@item rdiff [@var{options}] @var{modules}@dots{} 17483@item rdiff [@var{options}] @var{modules}@dots{} 17484@c <en>Show differences between releases. See @ref{rdiff}. 17485Show differences between releases. See @ref{rdiff}. 17486 17487@table @code 17488@c <en>@item -c 17489@item -c 17490@c <en>Context diff output format (default). See @ref{rdiff options}. 17491Context diff output format (default). See @ref{rdiff options}. 17492 17493@c <en>@item -D @var{date} 17494@item -D @var{date} 17495@c <en>Select revisions based on @var{date}. See @ref{Common options}. 17496Select revisions based on @var{date}. See @ref{Op��es comuns}. 17497 17498@c <en>@item -f 17499@item -f 17500@c <en>Use head revision if tag/date not found. See 17501@c <en>@ref{Common options}. 17502Use head revision if tag/date not found. See 17503@ref{Op��es comuns}. 17504 17505@c <en>@item -l 17506@item -l 17507@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17508Local; run only in current working directory. See @ref{Comportamento recursivo}. 17509 17510@c <en>@item -R 17511@item -R 17512@c <en>Operate recursively (default). @xref{Recursive 17513@c <en>behavior}. 17514Operate recursively (default). @xref{Comportamento recursivo}. 17515 17516@c <en>@item -r @var{rev} 17517@item -r @var{rev} 17518@c <en>Select revisions based on @var{rev}. See @ref{Common options}. 17519Select revisions based on @var{rev}. See @ref{Op��es comuns}. 17520 17521@c <en>@item -s 17522@item -s 17523@c <en>Short patch - one liner per file. See @ref{rdiff options}. 17524Short patch - one liner per file. See @ref{rdiff options}. 17525 17526@c <en>@item -t 17527@item -t 17528@c <en>Top two diffs - last change made to the file. See 17529@c <en>@ref{diff options}. 17530Top two diffs - last change made to the file. See 17531@ref{diff options}. 17532 17533@c <en>@item -u 17534@item -u 17535@c <en>Unidiff output format. See @ref{rdiff options}. 17536Unidiff output format. See @ref{rdiff options}. 17537 17538@c <en>@item -V @var{vers} 17539@item -V @var{vers} 17540@c <en>Use RCS Version @var{vers} for keyword expansion (obsolete). See 17541@c <en>@ref{rdiff options}. 17542Use RCS Version @var{vers} for keyword expansion (obsolete). See 17543@ref{rdiff options}. 17544@end table 17545 17546@c ------------------------------------------------------------ 17547@c <en>@item release [@var{options}] @var{directory} 17548@item release [@var{options}] @var{directory} 17549@c <en>Indicate that a directory is no longer in use. See 17550@c <en>@ref{release}. 17551Indicate that a directory is no longer in use. See 17552@ref{release}. 17553 17554@table @code 17555@c <en>@item -d 17556@item -d 17557@c <en>Delete the given directory. See @ref{release options}. 17558Delete the given directory. See @ref{release options}. 17559@end table 17560 17561@c ------------------------------------------------------------ 17562@c <en>@item remove [@var{options}] [@var{files}@dots{}] 17563@item remove [@var{options}] [@var{files}@dots{}] 17564@c <en>Remove an entry from the repository. See @ref{Removing files}. 17565Remove an entry from the repository. See @ref{Removendo arquivos}. 17566 17567@table @code 17568@c <en>@item -f 17569@item -f 17570@c <en>Delete the file before removing it. See @ref{Removing files}. 17571Delete the file before removing it. See @ref{Removendo arquivos}. 17572 17573@c <en>@item -l 17574@item -l 17575@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17576Local; run only in current working directory. See @ref{Comportamento recursivo}. 17577 17578@c <en>@item -R 17579@item -R 17580@c <en>Operate recursively (default). @xref{Recursive 17581@c <en>behavior}. 17582Operate recursively (default). @xref{Comportamento recursivo}. 17583@end table 17584 17585@c ------------------------------------------------------------ 17586@c <en>@item rlog [@var{options}] [@var{files}@dots{}] 17587@item rlog [@var{options}] [@var{files}@dots{}] 17588@c <en>Print out history information for modules. See @ref{log}. 17589Print out history information for modules. See @ref{log}. 17590 17591@table @code 17592@c <en>@item -b 17593@item -b 17594@c <en>Only list revisions on the default branch. See @ref{log options}. 17595Only list revisions on the default branch. See @ref{log options}. 17596 17597@c <en>@item -d @var{dates} 17598@item -d @var{dates} 17599@c <en>Specify dates (@var{d1}<@var{d2} for range, @var{d} for 17600@c <en>latest before). See @ref{log options}. 17601Specify dates (@var{d1}<@var{d2} for range, @var{d} for 17602latest before). See @ref{log options}. 17603 17604@c <en>@item -h 17605@item -h 17606@c <en>Only print header. See @ref{log options}. 17607Only print header. See @ref{log options}. 17608 17609@c <en>@item -l 17610@item -l 17611@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17612Local; run only in current working directory. See @ref{Comportamento recursivo}. 17613 17614@c <en>@item -N 17615@item -N 17616@c <en>Do not list tags. See @ref{log options}. 17617Do not list tags. See @ref{log options}. 17618 17619@c <en>@item -R 17620@item -R 17621@c <en>Only print name of RCS file. See @ref{log options}. 17622Only print name of RCS file. See @ref{log options}. 17623 17624@c <en>@item -r@var{revs} 17625@item -r@var{revs} 17626@c <en>Only list revisions @var{revs}. See @ref{log options}. 17627Only list revisions @var{revs}. See @ref{log options}. 17628 17629@c <en>@item -s @var{states} 17630@item -s @var{states} 17631@c <en>Only list revisions with specified states. See @ref{log options}. 17632Only list revisions with specified states. See @ref{log options}. 17633 17634@c <en>@item -t 17635@item -t 17636@c <en>Only print header and descriptive text. See @ref{log options}. 17637Only print header and descriptive text. See @ref{log options}. 17638 17639@c <en>@item -w@var{logins} 17640@item -w@var{logins} 17641@c <en>Only list revisions checked in by specified logins. See @ref{log options}. 17642Only list revisions checked in by specified logins. See @ref{log options}. 17643@end table 17644 17645@c ------------------------------------------------------------ 17646@c <en>@item rtag [@var{options}] @var{tag} @var{modules}@dots{} 17647@item rtag [@var{options}] @var{tag} @var{modules}@dots{} 17648@c <en>Add a symbolic tag to a module. 17649@c <en>See @ref{Revisions} and @ref{Branching and merging}. 17650Add a symbolic tag to a module. 17651See @ref{Revis�es} and @ref{Ramificando e mesclando}. 17652 17653@table @code 17654@c <en>@item -a 17655@item -a 17656@c <en>Clear tag from removed files that would not otherwise 17657@c <en>be tagged. See @ref{Tagging add/remove}. 17658Clear tag from removed files that would not otherwise 17659be tagged. See @ref{Etiquetando adicionados/removidos}. 17660 17661@c <en>@item -b 17662@item -b 17663@c <en>Create a branch named @var{tag}. See @ref{Branching and merging}. 17664Create a branch named @var{tag}. See @ref{Ramificando e mesclando}. 17665 17666@c <en>@item -B 17667@item -B 17668@c <en>Used in conjunction with -F or -d, enables movement and deletion of 17669@c <en>branch tags. Use with extreme caution. 17670Used in conjunction with -F or -d, enables movement and deletion of 17671branch tags. Use with extreme caution. 17672 17673@c <en>@item -D @var{date} 17674@item -D @var{date} 17675@c <en>Tag revisions as of @var{date}. See @ref{Tagging by date/tag}. 17676Tag revisions as of @var{date}. See @ref{Etiquetando por data/etiqueta}. 17677 17678@c <en>@item -d 17679@item -d 17680@c <en>Delete @var{tag}. See @ref{Modifying tags}. 17681Delete @var{tag}. See @ref{Modificando etiquetas}. 17682 17683@c <en>@item -F 17684@item -F 17685@c <en>Move @var{tag} if it already exists. See @ref{Modifying tags}. 17686Move @var{tag} if it already exists. See @ref{Modificando etiquetas}. 17687 17688@c <en>@item -f 17689@item -f 17690@c <en>Force a head revision match if tag/date not found. 17691@c <en>See @ref{Tagging by date/tag}. 17692Force a head revision match if tag/date not found. 17693See @ref{Etiquetando por data/etiqueta}. 17694 17695@c <en>@item -l 17696@item -l 17697@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17698Local; run only in current working directory. See @ref{Comportamento recursivo}. 17699 17700@c <en>@item -n 17701@item -n 17702@c <en>No execution of tag program. See @ref{Common options}. 17703No execution of tag program. See @ref{Op��es comuns}. 17704 17705@c <en>@item -R 17706@item -R 17707@c <en>Operate recursively (default). @xref{Recursive 17708@c <en>behavior}. 17709Operate recursively (default). @xref{Comportamento recursivo}. 17710 17711@c <en>@item -r @var{rev} 17712@item -r @var{rev} 17713@c <en>Tag existing tag @var{rev}. See @ref{Tagging by date/tag}. 17714Tag existing tag @var{rev}. See @ref{Etiquetando por data/etiqueta}. 17715@end table 17716 17717@c ------------------------------------------------------------ 17718@c <en>@item server 17719@item server 17720@c <en>Rsh server. See @ref{Connecting via rsh}. 17721Rsh server. See @ref{Se conectando via rsh}. 17722 17723@c ------------------------------------------------------------ 17724@c <en>@item status [@var{options}] @var{files}@dots{} 17725@item status [@var{options}] @var{files}@dots{} 17726@c <en>Display status information in a working directory. See 17727@c <en>@ref{File status}. 17728Display status information in a working directory. See 17729@ref{Estado de arquivo}. 17730 17731@table @code 17732@c <en>@item -l 17733@item -l 17734@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17735Local; run only in current working directory. See @ref{Comportamento recursivo}. 17736 17737@c <en>@item -R 17738@item -R 17739@c <en>Operate recursively (default). @xref{Recursive 17740@c <en>behavior}. 17741Operate recursively (default). @xref{Comportamento recursivo}. 17742 17743@c <en>@item -v 17744@item -v 17745@c <en>Include tag information for file. See @ref{Tags}. 17746Include tag information for file. See @ref{Etiquetas}. 17747@end table 17748 17749@c ------------------------------------------------------------ 17750@c <en>@item tag [@var{options}] @var{tag} [@var{files}@dots{}] 17751@item tag [@var{options}] @var{tag} [@var{files}@dots{}] 17752@c <en>Add a symbolic tag to checked out version of files. 17753@c <en>See @ref{Revisions} and @ref{Branching and merging}. 17754Add a symbolic tag to checked out version of files. 17755See @ref{Revis�es} and @ref{Ramificando e mesclando}. 17756 17757@table @code 17758@c <en>@item -b 17759@item -b 17760@c <en>Create a branch named @var{tag}. See @ref{Branching and merging}. 17761Create a branch named @var{tag}. See @ref{Ramificando e mesclando}. 17762 17763@c <en>@item -c 17764@item -c 17765@c <en>Check that working files are unmodified. See 17766@c <en>@ref{Tagging the working directory}. 17767Check that working files are unmodified. See 17768@ref{Etiquetando o diret�rio de trabalho}. 17769 17770@c <en>@item -D @var{date} 17771@item -D @var{date} 17772@c <en>Tag revisions as of @var{date}. See @ref{Tagging by date/tag}. 17773Tag revisions as of @var{date}. See @ref{Etiquetando por data/etiqueta}. 17774 17775@c <en>@item -d 17776@item -d 17777@c <en>Delete @var{tag}. See @ref{Modifying tags}. 17778Delete @var{tag}. See @ref{Modificando etiquetas}. 17779 17780@c <en>@item -F 17781@item -F 17782@c <en>Move @var{tag} if it already exists. See @ref{Modifying tags}. 17783Move @var{tag} if it already exists. See @ref{Modificando etiquetas}. 17784 17785@c <en>@item -f 17786@item -f 17787@c <en>Force a head revision match if tag/date not found. 17788@c <en>See @ref{Tagging by date/tag}. 17789Force a head revision match if tag/date not found. 17790See @ref{Etiquetando por data/etiqueta}. 17791 17792@c <en>@item -l 17793@item -l 17794@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17795Local; run only in current working directory. See @ref{Comportamento recursivo}. 17796 17797@c <en>@item -R 17798@item -R 17799@c <en>Operate recursively (default). @xref{Recursive 17800@c <en>behavior}. 17801Operate recursively (default). @xref{Comportamento recursivo}. 17802 17803@c <en>@item -r @var{rev} 17804@item -r @var{rev} 17805@c <en>Tag existing tag @var{rev}. See @ref{Tagging by date/tag}. 17806Tag existing tag @var{rev}. See @ref{Etiquetando por data/etiqueta}. 17807@end table 17808 17809@c ------------------------------------------------------------ 17810@c <en>@item unedit [@var{options}] [@var{files}@dots{}] 17811@item unedit [@var{options}] [@var{files}@dots{}] 17812@c <en>Undo an edit command. See @ref{Editing files}. 17813Undo an edit command. See @ref{Editando arquivos}. 17814 17815@table @code 17816@c <en>@item -l 17817@item -l 17818@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17819Local; run only in current working directory. See @ref{Comportamento recursivo}. 17820 17821@c <en>@item -R 17822@item -R 17823@c <en>Operate recursively (default). @xref{Recursive behavior}. 17824Operate recursively (default). @xref{Comportamento recursivo}. 17825@end table 17826 17827@c ------------------------------------------------------------ 17828@c <en>@item update [@var{options}] [@var{files}@dots{}] 17829@item update [@var{options}] [@var{files}@dots{}] 17830@c <en>Bring work tree in sync with repository. See 17831@c <en>@ref{update}. 17832Bring work tree in sync with repository. See 17833@ref{update}. 17834 17835@table @code 17836@c <en>@item -A 17837@item -A 17838@c <en>Reset any sticky tags/date/options. See @ref{Sticky 17839@c <en>tags} and @ref{Keyword substitution}. 17840Reset any sticky tags/date/options. See 17841@ref{Etiquetas adesivas} and @ref{Substitui��o de palavra-chave}. 17842 17843@c <en>@item -C 17844@item -C 17845@c <en>Overwrite locally modified files with clean copies from 17846@c <en>the repository (the modified file is saved in 17847@c <en>@file{.#@var{file}.@var{revision}}, however). 17848Overwrite locally modified files with clean copies from 17849the repository (the modified file is saved in 17850@file{.#@var{file}.@var{revision}}, however). 17851 17852@c <en>@item -D @var{date} 17853@item -D @var{date} 17854@c <en>Check out revisions as of @var{date} (is sticky). See 17855@c <en>@ref{Common options}. 17856Check out revisions as of @var{date} (is sticky). See 17857@ref{Op��es comuns}. 17858 17859@c <en>@item -d 17860@item -d 17861@c <en>Create directories. See @ref{update options}. 17862Create directories. See @ref{update options}. 17863 17864@c <en>@item -f 17865@item -f 17866@c <en>Use head revision if tag/date not found. See 17867@c <en>@ref{Common options}. 17868Use head revision if tag/date not found. See 17869@ref{Op��es comuns}. 17870 17871@c <en>@item -I @var{ign} 17872@item -I @var{ign} 17873@c <en>More files to ignore (! to reset). See 17874@c <en>@ref{import options}. 17875More files to ignore (! to reset). See 17876@ref{import options}. 17877 17878@c Probably want to use rev1/rev2 style like for diff 17879@c -r. Here and in on-line help. 17880@c <en>@item -j @var{rev} 17881@item -j @var{rev} 17882@c <en>Merge in changes. See @ref{update options}. 17883Merge in changes. See @ref{update options}. 17884 17885@c <en>@item -k @var{kflag} 17886@item -k @var{kflag} 17887@c <en>Use @var{kflag} keyword expansion. See 17888@c <en>@ref{Substitution modes}. 17889Use @var{kflag} keyword expansion. See 17890@ref{Modos de substitui��o}. 17891 17892@c <en>@item -l 17893@item -l 17894@c <en>Local; run only in current working directory. @xref{Recursive behavior}. 17895Local; run only in current working directory. @xref{Comportamento recursivo}. 17896 17897@c <en>@item -P 17898@item -P 17899@c <en>Prune empty directories. See @ref{Moving directories}. 17900Prune empty directories. See @ref{Movendo diret�rios}. 17901 17902@c <en>@item -p 17903@item -p 17904@c <en>Check out files to standard output (avoids 17905@c <en>stickiness). See @ref{update options}. 17906Check out files to standard output (avoids 17907stickiness). See @ref{update options}. 17908 17909@c <en>@item -R 17910@item -R 17911@c <en>Operate recursively (default). @xref{Recursive 17912@c <en>behavior}. 17913Operate recursively (default). @xref{Comportamento recursivo}. 17914 17915@c <en>@item -r @var{tag} 17916@item -r @var{tag} 17917@c <en>Checkout revision @var{tag} (is sticky). See @ref{Common options}. 17918Checkout revision @var{tag} (is sticky). See @ref{Op��es comuns}. 17919 17920@c <en>@item -W @var{spec} 17921@item -W @var{spec} 17922@c <en>More wrappers. See @ref{import options}. 17923More wrappers. See @ref{import options}. 17924@end table 17925 17926@c ------------------------------------------------------------ 17927@c <en>@item version 17928@item version 17929@c <en>@cindex version (subcommand) 17930@cindex version (subcommand) 17931 17932@c <en>Display the version of @sc{cvs} being used. If the repository 17933@c <en>is remote, display both the client and server versions. 17934Display the version of @sc{cvs} being used. If the repository 17935is remote, display both the client and server versions. 17936 17937@c ------------------------------------------------------------ 17938@c <en>@item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}] 17939@item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}] 17940 17941@c <en>on/off: turn on/off read-only checkouts of files. See 17942@c <en>@ref{Setting a watch}. 17943on/off: turn on/off read-only checkouts of files. See 17944@ref{Ajustando um ???watch???}. 17945 17946@c <en>add/remove: add or remove notification on actions. See 17947@c <en>@ref{Getting Notified}. 17948add/remove: add or remove notification on actions. See 17949@ref{Recebendo Notifica��es}. 17950 17951@table @code 17952@c <en>@item -a @var{actions} 17953@item -a @var{actions} 17954@c <en>Specify actions for temporary watch, where 17955@c <en>@var{actions} is @code{edit}, @code{unedit}, 17956@c <en>@code{commit}, @code{all}, or @code{none}. See 17957@c <en>@ref{Editing files}. 17958Specify actions for temporary watch, where 17959@var{actions} is @code{edit}, @code{unedit}, 17960@code{commit}, @code{all}, or @code{none}. See 17961@ref{Editando arquivos}. 17962 17963@c <en>@item -l 17964@item -l 17965@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17966Local; run only in current working directory. See @ref{Comportamento recursivo}. 17967 17968@c <en>@item -R 17969@item -R 17970@c <en>Operate recursively (default). @xref{Recursive 17971@c <en>behavior}. 17972Operate recursively (default). @xref{Comportamento recursivo}. 17973@end table 17974 17975@c ------------------------------------------------------------ 17976@c <en>@item watchers [@var{options}] [@var{files}@dots{}] 17977@item watchers [@var{options}] [@var{files}@dots{}] 17978@c <en>See who is watching a file. See @ref{Watch information}. 17979See who is watching a file. See @ref{Informa��es de ???Watch???}. 17980 17981@table @code 17982@c <en>@item -l 17983@item -l 17984@c <en>Local; run only in current working directory. See @ref{Recursive behavior}. 17985Local; run only in current working directory. See @ref{Comportamento recursivo}. 17986 17987@c <en>@item -R 17988@item -R 17989@c <en>Operate recursively (default). @xref{Recursive 17990@c <en>behavior}. 17991Operate recursively (default). @xref{Comportamento recursivo}. 17992@end table 17993 17994@end table 17995 17996@c --------------------------------------------------------------------- 17997@c <en>@node Administrative files 17998@node Arquivos administrativos 17999@c <en>@appendix Reference manual for Administrative files 18000@appendix Manual de refer�ncia para Arquivos administrativos 18001@c <en>@cindex Administrative files (reference) 18002@cindex Arquivos administrativos (refer�ncia) 18003@c <en>@cindex Files, reference manual 18004@cindex Files, reference manual 18005@c <en>@cindex Reference manual (files) 18006@cindex Reference manual (files) 18007@c <en>@cindex CVSROOT (file) 18008@cindex CVSROOT (file) 18009 18010@c FIXME? Somewhere there needs to be a more "how-to" 18011@c guide to writing these. I think the triggers 18012@c (commitinfo, loginfo, taginfo, &c) are perhaps a 18013@c different case than files like modules. One 18014@c particular issue that people sometimes are 18015@c (unnecessarily?) worried about is performance, and 18016@c the impact of writing in perl or sh or ____. 18017@c <en>Inside the repository, in the directory 18018@c <en>@file{$CVSROOT/CVSROOT}, there are a number of 18019@c <en>supportive files for @sc{cvs}. You can use @sc{cvs} in a limited 18020@c <en>fashion without any of them, but if they are set up 18021@c <en>properly they can help make life easier. For a 18022@c <en>discussion of how to edit them, see @ref{Intro 18023@c <en>administrative files}. 18024Dentro do reposit�rio, no diret�rio 18025@file{$CVSROOT/CVSROOT}, existem v�rios arquivos de 18026suporte para o @sc{cvs}. Voc� pode usar o @sc{cvs} de 18027uma forma limitada sem se aproveitar deles, mas se eles 18028estiverem ajustados corretamente eles podem facilitar 18029muito seu trabalho. Para uma discuss�o sobre como 18030edit�-los, veja em @ref{Intro aos arquivos administrativos}. 18031 18032@c <en>The most important of these files is the @file{modules} 18033@c <en>file, which defines the modules inside the repository. 18034O mais importante destes arquivos � o arquivo 18035@file{modules}, que define os m�dulos dentro do reposit�rio. 18036 18037@menu 18038@c <en>* modules:: Defining modules 18039* modules:: Definindo m�dulos 18040@c <en>* Wrappers:: Specify binary-ness based on file name 18041* Wrappers:: Specify binary-ness based on file name 18042@c <en>* commit files:: The commit support files (commitinfo, 18043@c <en> verifymsg, loginfo) 18044* Arquivos de ???commit???:: Os arquivos de suporte a commit (commitinfo, 18045 verifymsg, loginfo) 18046@c <en>* taginfo:: Verifying/Logging tags 18047* taginfo:: Verifcando/Registrando etiquetas 18048@c <en>* rcsinfo:: Templates for the log messages 18049* rcsinfo:: Templates for the log messages 18050@c <en>* cvsignore:: Ignoring files via cvsignore 18051* cvsignore:: Ignoring files via cvsignore 18052@c <en>* checkoutlist:: Adding your own administrative files 18053* checkoutlist:: Adding your own administrative files 18054@c <en>* history file:: History information 18055* arquivo history (hist�rico):: History information 18056@c <en>* Variables:: Various variables are expanded 18057* Variables:: Various variables are expanded 18058@c <en>* config:: Miscellaneous CVS configuration 18059* config:: Miscellaneous CVS configuration 18060@end menu 18061 18062@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18063@c <en>@node modules 18064@node modules 18065@c <en>@appendixsec The modules file 18066@appendixsec O arquivo modules 18067@c <en>@cindex Modules (admin file) 18068@cindex Modules (arquivo administrativo) 18069@c <en>@cindex Defining modules (reference manual) 18070@cindex Definindo m�dulos (manual de refer�ncia) 18071 18072@c <en>The @file{modules} file records your definitions of 18073@c <en>names for collections of source code. @sc{cvs} will 18074@c <en>use these definitions if you use @sc{cvs} to update the 18075@c <en>modules file (use normal commands like @code{add}, 18076@c <en>@code{commit}, etc). 18077O arquivo @file{modules} registra suas defini��es de 18078nomes para cole��es de c�digo fonte. @sc{cvs} vai usar 18079estas defini��es se voc� usar o @sc{cvs} para atualizar 18080o arquivo modules (use comandos normais, como @code{add}, 18081@code{commit}, etc). 18082 18083@c <en>The @file{modules} file may contain blank lines and 18084@c <en>comments (lines beginning with @samp{#}) as well as 18085@c <en>module definitions. Long lines can be continued on the 18086@c <en>next line by specifying a backslash (@samp{\}) as the 18087@c <en>last character on the line. 18088The @file{modules} file may contain blank lines and 18089comments (lines beginning with @samp{#}) as well as 18090module definitions. Long lines can be continued on the 18091next line by specifying a backslash (@samp{\}) as the 18092last character on the line. 18093 18094@c <en>There are three basic types of modules: alias modules, 18095@c <en>regular modules, and ampersand modules. The difference 18096@c <en>between them is the way that they map files in the 18097@c <en>repository to files in the working directory. In all 18098@c <en>of the following examples, the top-level repository 18099@c <en>contains a directory called @file{first-dir}, which 18100@c <en>contains two files, @file{file1} and @file{file2}, and a 18101@c <en>directory @file{sdir}. @file{first-dir/sdir} contains 18102@c <en>a file @file{sfile}. 18103There are three basic types of modules: alias modules, 18104regular modules, and ampersand modules. The difference 18105between them is the way that they map files in the 18106repository to files in the working directory. In all 18107of the following examples, the top-level repository 18108contains a directory called @file{first-dir}, which 18109contains two files, @file{file1} and @file{file2}, and a 18110directory @file{sdir}. @file{first-dir/sdir} contains 18111a file @file{sfile}. 18112 18113@c FIXME: should test all the examples in this section. 18114 18115@menu 18116@c <en>* Alias modules:: The simplest kind of module 18117* Alias modules:: The simplest kind of module 18118@c <en>* Regular modules:: 18119* Regular modules:: 18120@c <en>* Ampersand modules:: 18121* Ampersand modules:: 18122@c <en>* Excluding directories:: Excluding directories from a module 18123* Excluding directories:: Excluding directories from a module 18124@c <en>* Module options:: Regular and ampersand modules can take options 18125* Module options:: Regular and ampersand modules can take options 18126@c <en>* Module program options:: How the modules ``program options'' programs 18127@c <en> are run. 18128* Module program options:: How the modules ``program options'' programs 18129 are run. 18130@end menu 18131 18132@c <en>@node Alias modules 18133@node Alias modules 18134@c <en>@appendixsubsec Alias modules 18135@appendixsubsec Alias modules 18136@c <en>@cindex Alias modules 18137@cindex Alias modules 18138@c <en>@cindex -a, in modules file 18139@cindex -a, in modules file 18140 18141@c <en>Alias modules are the simplest kind of module: 18142Alias modules are the simplest kind of module: 18143 18144@table @code 18145@c <en>@item @var{mname} -a @var{aliases}@dots{} 18146@c <en>This represents the simplest way of defining a module 18147@c <en>@var{mname}. The @samp{-a} flags the definition as a 18148@c <en>simple alias: @sc{cvs} will treat any use of @var{mname} (as 18149@c <en>a command argument) as if the list of names 18150@c <en>@var{aliases} had been specified instead. 18151@c <en>@var{aliases} may contain either other module names or 18152@c <en>paths. When you use paths in aliases, @code{checkout} 18153@c <en>creates all intermediate directories in the working 18154@c <en>directory, just as if the path had been specified 18155@c <en>explicitly in the @sc{cvs} arguments. 18156@item @var{mname} -a @var{aliases}@dots{} 18157This represents the simplest way of defining a module 18158@var{mname}. The @samp{-a} flags the definition as a 18159simple alias: @sc{cvs} will treat any use of @var{mname} (as 18160a command argument) as if the list of names 18161@var{aliases} had been specified instead. 18162@var{aliases} may contain either other module names or 18163paths. When you use paths in aliases, @code{checkout} 18164creates all intermediate directories in the working 18165directory, just as if the path had been specified 18166explicitly in the @sc{cvs} arguments. 18167@end table 18168 18169@c <en>For example, if the modules file contains: 18170For example, if the modules file contains: 18171 18172@example 18173amodule -a first-dir 18174@end example 18175 18176@noindent 18177@c <en>then the following two commands are equivalent: 18178then the following two commands are equivalent: 18179 18180@example 18181$ cvs co amodule 18182$ cvs co first-dir 18183@end example 18184 18185@noindent 18186@c <en>and they each would provide output such as: 18187and they each would provide output such as: 18188 18189@example 18190cvs checkout: Updating first-dir 18191U first-dir/file1 18192U first-dir/file2 18193cvs checkout: Updating first-dir/sdir 18194U first-dir/sdir/sfile 18195@end example 18196 18197@c <en>@node Regular modules 18198@node Regular modules 18199@c <en>@appendixsubsec Regular modules 18200@appendixsubsec Regular modules 18201@c <en>@cindex Regular modules 18202@cindex Regular modules 18203 18204@table @code 18205@c <en>@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] 18206@c <en>In the simplest case, this form of module definition 18207@c <en>reduces to @samp{@var{mname} @var{dir}}. This defines 18208@c <en>all the files in directory @var{dir} as module mname. 18209@c <en>@var{dir} is a relative path (from @code{$CVSROOT}) to a 18210@c <en>directory of source in the source repository. In this 18211@c <en>case, on checkout, a single directory called 18212@c <en>@var{mname} is created as a working directory; no 18213@c <en>intermediate directory levels are used by default, even 18214@c <en>if @var{dir} was a path involving several directory 18215@c <en>levels. 18216@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] 18217In the simplest case, this form of module definition 18218reduces to @samp{@var{mname} @var{dir}}. This defines 18219all the files in directory @var{dir} as module mname. 18220@var{dir} is a relative path (from @code{$CVSROOT}) to a 18221directory of source in the source repository. In this 18222case, on checkout, a single directory called 18223@var{mname} is created as a working directory; no 18224intermediate directory levels are used by default, even 18225if @var{dir} was a path involving several directory 18226levels. 18227@end table 18228 18229@c <en>For example, if a module is defined by: 18230For example, if a module is defined by: 18231 18232@example 18233regmodule first-dir 18234@end example 18235 18236@noindent 18237@c <en>then regmodule will contain the files from first-dir: 18238then regmodule will contain the files from first-dir: 18239 18240@example 18241$ cvs co regmodule 18242cvs checkout: Updating regmodule 18243U regmodule/file1 18244U regmodule/file2 18245cvs checkout: Updating regmodule/sdir 18246U regmodule/sdir/sfile 18247$ 18248@end example 18249 18250@c <en>By explicitly specifying files in the module definition 18251@c <en>after @var{dir}, you can select particular files from 18252@c <en>directory @var{dir}. Here is 18253@c <en>an example: 18254By explicitly specifying files in the module definition 18255after @var{dir}, you can select particular files from 18256directory @var{dir}. Here is 18257an example: 18258 18259@example 18260regfiles first-dir/sdir sfile 18261@end example 18262 18263@noindent 18264@c <en>With this definition, getting the regfiles module 18265@c <en>will create a single working directory 18266@c <en>@file{regfiles} containing the file listed, which 18267@c <en>comes from a directory deeper 18268@c <en>in the @sc{cvs} source repository: 18269With this definition, getting the regfiles module 18270will create a single working directory 18271@file{regfiles} containing the file listed, which 18272comes from a directory deeper 18273in the @sc{cvs} source repository: 18274 18275@example 18276$ cvs co regfiles 18277U regfiles/sfile 18278$ 18279@end example 18280 18281@c <en>@node Ampersand modules 18282@node Ampersand modules 18283@c <en>@appendixsubsec Ampersand modules 18284@appendixsubsec Ampersand modules 18285@c <en>@cindex Ampersand modules 18286@cindex Ampersand modules 18287@c <en>@cindex &, in modules file 18288@cindex &, in modules file 18289 18290@c <en>A module definition can refer to other modules by 18291@c <en>including @samp{&@var{module}} in its definition. 18292A module definition can refer to other modules by 18293including @samp{&@var{module}} in its definition. 18294@example 18295@var{mname} [ options ] @var{&module}@dots{} 18296@end example 18297 18298@c <en>Then getting the module creates a subdirectory for each such 18299@c <en>module, in the directory containing the module. For 18300@c <en>example, if modules contains 18301Then getting the module creates a subdirectory for each such 18302module, in the directory containing the module. For 18303example, if modules contains 18304 18305@example 18306ampermod &first-dir 18307@end example 18308 18309@noindent 18310@c <en>then a checkout will create an @code{ampermod} directory 18311@c <en>which contains a directory called @code{first-dir}, 18312@c <en>which in turns contains all the directories and files 18313@c <en>which live there. For example, the command 18314then a checkout will create an @code{ampermod} directory 18315which contains a directory called @code{first-dir}, 18316which in turns contains all the directories and files 18317which live there. For example, the command 18318 18319@example 18320$ cvs co ampermod 18321@end example 18322 18323@noindent 18324@c <en>will create the following files: 18325will create the following files: 18326 18327@example 18328ampermod/first-dir/file1 18329ampermod/first-dir/file2 18330ampermod/first-dir/sdir/sfile 18331@end example 18332 18333@c <en>There is one quirk/bug: the messages that @sc{cvs} 18334@c <en>prints omit the @file{ampermod}, and thus do not 18335@c <en>correctly display the location to which it is checking 18336@c <en>out the files: 18337There is one quirk/bug: the messages that @sc{cvs} 18338prints omit the @file{ampermod}, and thus do not 18339correctly display the location to which it is checking 18340out the files: 18341 18342@example 18343$ cvs co ampermod 18344cvs checkout: Updating first-dir 18345U first-dir/file1 18346U first-dir/file2 18347cvs checkout: Updating first-dir/sdir 18348U first-dir/sdir/sfile 18349$ 18350@end example 18351 18352@c <en>Do not rely on this buggy behavior; it may get fixed in 18353@c <en>a future release of @sc{cvs}. 18354Do not rely on this buggy behavior; it may get fixed in 18355a future release of @sc{cvs}. 18356 18357@c FIXCVS: What happens if regular and & modules are 18358@c combined, as in "ampermodule first-dir &second-dir"? 18359@c When I tried it, it seemed to just ignore the 18360@c "first-dir". I think perhaps it should be an error 18361@c (but this needs further investigation). 18362@c In addition to discussing what each one does, we 18363@c should put in a few words about why you would use one or 18364@c the other in various situations. 18365 18366@c <en>@node Excluding directories 18367@node Excluding directories 18368@c <en>@appendixsubsec Excluding directories 18369@appendixsubsec Excluding directories 18370@c <en>@cindex Excluding directories, in modules file 18371@cindex Excluding directories, in modules file 18372@c <en>@cindex !, in modules file 18373@cindex !, in modules file 18374 18375@c <en>An alias module may exclude particular directories from 18376@c <en>other modules by using an exclamation mark (@samp{!}) 18377@c <en>before the name of each directory to be excluded. 18378An alias module may exclude particular directories from 18379other modules by using an exclamation mark (@samp{!}) 18380before the name of each directory to be excluded. 18381 18382@c <en>For example, if the modules file contains: 18383For example, if the modules file contains: 18384 18385@example 18386exmodule -a !first-dir/sdir first-dir 18387@end example 18388 18389@noindent 18390@c <en>then checking out the module @samp{exmodule} will check 18391@c <en>out everything in @samp{first-dir} except any files in 18392@c <en>the subdirectory @samp{first-dir/sdir}. 18393then checking out the module @samp{exmodule} will check 18394out everything in @samp{first-dir} except any files in 18395the subdirectory @samp{first-dir/sdir}. 18396@c Note that the "!first-dir/sdir" sometimes must be listed 18397@c before "first-dir". That seems like a probable bug, in which 18398@c case perhaps it should be fixed (to allow either 18399@c order) rather than documented. See modules4 in testsuite. 18400 18401@c <en>@node Module options 18402@node Module options 18403@c <en>@appendixsubsec Module options 18404@appendixsubsec Module options 18405@c <en>@cindex Options, in modules file 18406@cindex Options, in modules file 18407 18408@c <en>Either regular modules or ampersand modules can contain 18409@c <en>options, which supply additional information concerning 18410@c <en>the module. 18411Either regular modules or ampersand modules can contain 18412options, which supply additional information concerning 18413the module. 18414 18415@table @code 18416@c <en>@cindex -d, in modules file 18417@cindex -d, in modules file 18418@c <en>@item -d @var{name} 18419@item -d @var{name} 18420@c <en>Name the working directory something other than the 18421@c <en>module name. 18422Name the working directory something other than the 18423module name. 18424@c FIXME: Needs a bunch of examples, analogous to the 18425@c examples for alias, regular, and ampersand modules 18426@c which show where the files go without -d. 18427 18428@c <en>@cindex Export program 18429@cindex Export program 18430@c <en>@cindex -e, in modules file 18431@cindex -e, in modules file 18432@c <en>@item -e @var{prog} 18433@item -e @var{prog} 18434@c <en>Specify a program @var{prog} to run whenever files in a 18435@c <en>module are exported. @var{prog} runs with a single 18436@c <en>argument, the module name. 18437Specify a program @var{prog} to run whenever files in a 18438module are exported. @var{prog} runs with a single 18439argument, the module name. 18440@c FIXME: Is it run on server? client? 18441 18442@c <en>@cindex Checkout program 18443@cindex Checkout program 18444@c <en>@cindex -o, in modules file 18445@cindex -o, in modules file 18446@c <en>@item -o @var{prog} 18447@item -o @var{prog} 18448@c <en>Specify a program @var{prog} to run whenever files in a 18449@c <en>module are checked out. @var{prog} runs with a single 18450@c <en>argument, the module name. See @ref{Module program options} for 18451@c <en>information on how @var{prog} is called. 18452Specify a program @var{prog} to run whenever files in a 18453module are checked out. @var{prog} runs with a single 18454argument, the module name. See @ref{Module program options} for 18455information on how @var{prog} is called. 18456@c FIXME: Is it run on server? client? 18457 18458@c <en>@cindex Status of a module 18459@cindex Status of a module 18460@c <en>@cindex Module status 18461@cindex Module status 18462@c <en>@cindex -s, in modules file 18463@cindex -s, in modules file 18464@c <en>@item -s @var{status} 18465@item -s @var{status} 18466@c <en>Assign a status to the module. When the module file is 18467@c <en>printed with @samp{cvs checkout -s} the modules are 18468@c <en>sorted according to primarily module status, and 18469@c <en>secondarily according to the module name. This option 18470@c <en>has no other meaning. You can use this option for 18471@c <en>several things besides status: for instance, list the 18472@c <en>person that is responsible for this module. 18473Assign a status to the module. When the module file is 18474printed with @samp{cvs checkout -s} the modules are 18475sorted according to primarily module status, and 18476secondarily according to the module name. This option 18477has no other meaning. You can use this option for 18478several things besides status: for instance, list the 18479person that is responsible for this module. 18480 18481@c <en>@cindex Tag program 18482@cindex Tag program 18483@c <en>@cindex -t, in modules file 18484@cindex -t, in modules file 18485@c <en>@item -t @var{prog} 18486@item -t @var{prog} 18487@c <en>Specify a program @var{prog} to run whenever files in a 18488@c <en>module are tagged with @code{rtag}. @var{prog} runs 18489@c <en>with two arguments: the module name and the symbolic 18490@c <en>tag specified to @code{rtag}. It is not run 18491@c <en>when @code{tag} is executed. Generally you will find 18492@c <en>that the @file{taginfo} file is a better solution(@pxref{taginfo}). 18493Specify a program @var{prog} to run whenever files in a 18494module are tagged with @code{rtag}. @var{prog} runs 18495with two arguments: the module name and the symbolic 18496tag specified to @code{rtag}. It is not run 18497when @code{tag} is executed. Generally you will find 18498that the @file{taginfo} file is a better solution(@pxref{taginfo}). 18499@c FIXME: Is it run on server? client? 18500@c Problems with -t include: 18501@c * It is run after the tag not before 18502@c * It doesn't get passed all the information that 18503@c taginfo does ("mov", &c). 18504@c * It only is run for rtag, not tag. 18505@end table 18506 18507@c <en>You should also see @pxref{Module program options} about how the 18508@c <en>``program options'' programs are run. 18509You should also see @pxref{Module program options} about how the 18510``program options'' programs are run. 18511 18512@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18513 18514@c <en>@node Module program options 18515@node Module program options 18516@c <en>@appendixsubsec How the modules file ``program options'' programs are run 18517@appendixsubsec How the modules file ``program options'' programs are run 18518@c <en>@cindex Modules file program options 18519@cindex Modules file program options 18520@c <en>@cindex -t, in modules file 18521@cindex -t, in modules file 18522@c <en>@cindex -o, in modules file 18523@cindex -o, in modules file 18524@c <en>@cindex -e, in modules file 18525@cindex -e, in modules file 18526 18527@noindent 18528@c <en>For checkout, rtag, and export, the program is server-based, and as such the 18529@c <en>following applies:- 18530For checkout, rtag, and export, the program is server-based, and as such the 18531following applies:- 18532 18533@c <en>If using remote access methods (pserver, ext, etc.), 18534@c <en>@sc{cvs} will execute this program on the server from a temporary 18535@c <en>directory. The path is searched for this program. 18536If using remote access methods (pserver, ext, etc.), 18537@sc{cvs} will execute this program on the server from a temporary 18538directory. The path is searched for this program. 18539 18540@c <en>If using ``local access'' (on a local or remote NFS file system, i.e. 18541@c <en>repository set just to a path), 18542@c <en>the program will be executed from the newly checked-out tree, if 18543@c <en>found there, or alternatively searched for in the path if not. 18544If using ``local access'' (on a local or remote NFS file system, i.e. 18545repository set just to a path), 18546the program will be executed from the newly checked-out tree, if 18547found there, or alternatively searched for in the path if not. 18548 18549@c <en>The programs are all run after the operation has effectively 18550@c <en>completed. 18551The programs are all run after the operation has effectively 18552completed. 18553 18554 18555@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18556@node Wrappers 18557@appendixsec The cvswrappers file 18558@cindex cvswrappers (admin file) 18559@cindex CVSWRAPPERS, environment variable 18560@cindex Wrappers 18561 18562@c FIXME: need some better way of separating this out 18563@c by functionality. -m is 18564@c one feature, and -k is a another. And this discussion 18565@c should be better motivated (e.g. start with the 18566@c problems, then explain how the feature solves it). 18567 18568Wrappers refers to a @sc{cvs} feature which lets you 18569control certain settings based on the name of the file 18570which is being operated on. The settings are @samp{-k} 18571for binary files, and @samp{-m} for nonmergeable text 18572files. 18573 18574The @samp{-m} option 18575specifies the merge methodology that should be used when 18576a non-binary file is updated. @code{MERGE} means the usual 18577@sc{cvs} behavior: try to merge the files. @code{COPY} 18578means that @code{cvs update} will refuse to merge 18579files, as it also does for files specified as binary 18580with @samp{-kb} (but if the file is specified as 18581binary, there is no need to specify @samp{-m 'COPY'}). 18582@sc{cvs} will provide the user with the 18583two versions of the files, and require the user using 18584mechanisms outside @sc{cvs}, to insert any necessary 18585changes. 18586 18587@c <en>@strong{WARNING: do not use @code{COPY} with 18588@c <en>@sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will 18589@c <en>copy one version of your file over the other, wiping 18590@c <en>out the previous contents.} 18591@strong{WARNING: do not use @code{COPY} with 18592@sc{cvs} 1.9 or earlier - such versions of @sc{cvs} will 18593copy one version of your file over the other, wiping 18594out the previous contents.} 18595@c Ordinarily we don't document the behavior of old 18596@c versions. But this one is so dangerous, I think we 18597@c must. I almost renamed it to -m 'NOMERGE' so we 18598@c could say "never use -m 'COPY'". 18599@c <en>The @samp{-m} wrapper option only affects behavior when 18600@c <en>merging is done on update; it does not affect how files 18601@c <en>are stored. See @ref{Binary files}, for more on 18602@c <en>binary files. 18603The @samp{-m} wrapper option only affects behavior when 18604merging is done on update; it does not affect how files 18605are stored. See @ref{Arquivos bin�rios}, for more on 18606binary files. 18607 18608The basic format of the file @file{cvswrappers} is: 18609 18610@c FIXME: @example is all wrong for this. Use @deffn or 18611@c something more sensible. 18612@example 18613wildcard [option value][option value]... 18614 18615where option is one of 18616-m update methodology value: MERGE or COPY 18617-k keyword expansion value: expansion mode 18618 18619and value is a single-quote delimited value. 18620@end example 18621 18622@ignore 18623@example 18624*.nib -f 'unwrap %s' -t 'wrap %s %s' -m 'COPY' 18625*.c -t 'indent %s %s' 18626@end example 18627@c When does the filter need to be an absolute pathname 18628@c and when will something like the above work? I 18629@c suspect it relates to the PATH of the server (which 18630@c in turn depends on all kinds of stuff, e.g. inetd 18631@c for pserver). I'm not sure whether/where to discuss 18632@c this. 18633@c FIXME: What do the %s's stand for? 18634 18635@noindent 18636The above example of a @file{cvswrappers} file 18637states that all files/directories that end with a @code{.nib} 18638should be filtered with the @file{wrap} program before 18639checking the file into the repository. The file should 18640be filtered though the @file{unwrap} program when the 18641file is checked out of the repository. The 18642@file{cvswrappers} file also states that a @code{COPY} 18643methodology should be used when updating the files in 18644the repository (that is, no merging should be performed). 18645 18646@c What pitfalls arise when using indent this way? Is 18647@c it a winning thing to do? Would be nice to at least 18648@c hint at those issues; we want our examples to tell 18649@c how to solve problems, not just to say that cvs can 18650@c do certain things. 18651The last example line says that all files that end with 18652@code{.c} should be filtered with @file{indent} 18653before being checked into the repository. Unlike the previous 18654example, no filtering of the @code{.c} file is done when 18655it is checked out of the repository. 18656@noindent 18657The @code{-t} filter is called with two arguments, 18658the first is the name of the file/directory to filter 18659and the second is the pathname to where the resulting 18660filtered file should be placed. 18661 18662@noindent 18663The @code{-f} filter is called with one argument, 18664which is the name of the file to filter from. The end 18665result of this filter will be a file in the users directory 18666that they can work on as they normally would. 18667 18668Note that the @samp{-t}/@samp{-f} features do not 18669conveniently handle one portion of @sc{cvs}'s operation: 18670determining when files are modified. @sc{cvs} will still 18671want a file (or directory) to exist, and it will use 18672its modification time to determine whether a file is 18673modified. If @sc{cvs} erroneously thinks a file is 18674unmodified (for example, a directory is unchanged but 18675one of the files within it is changed), you can force 18676it to check in the file anyway by specifying the 18677@samp{-f} option to @code{cvs commit} (@pxref{commit 18678options}). 18679@c This is, of course, a serious design flaw in -t/-f. 18680@c Probably the whole functionality needs to be 18681@c redesigned (starting from requirements) to fix this. 18682@end ignore 18683 18684@c FIXME: We don't document -W or point to where it is 18685@c documented. Or .cvswrappers. 18686For example, the following command imports a 18687directory, treating files whose name ends in 18688@samp{.exe} as binary: 18689 18690@example 18691cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag 18692@end example 18693 18694@c Another good example, would be storing files 18695@c (e.g. binary files) compressed in the repository. 18696@c :::::::::::::::::: 18697@c cvswrappers 18698@c :::::::::::::::::: 18699@c *.t12 -m 'COPY' 18700@c *.t[0-9][0-9] -f 'gunzipcp %s' -t 'gzipcp %s %s' -m 'COPY' 18701@c 18702@c :::::::::::::::::: 18703@c gunzipcp 18704@c :::::::::::::::::: 18705@c : 18706@c [ -f $1 ] || exit 1 18707@c zcat $1 > /tmp/.#$1.$$ 18708@c mv /tmp/.#$1.$$ $1 18709@c 18710@c :::::::::::::::::: 18711@c gzipcp 18712@c :::::::::::::::::: 18713@c : 18714@c DIRNAME=`echo $1 | sed -e "s|/.*/||g"` 18715@c if [ ! -d $DIRNAME ] ; then 18716@c DIRNAME=`echo $1 | sed -e "s|.*/||g"` 18717@c fi 18718@c gzip -c $DIRNAME > $2 18719@c One catch--"cvs diff" will not invoke the wrappers 18720@c (probably a CVS bug, although I haven't thought it out). 18721 18722@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18723@c <en>@node commit files 18724@node Arquivos de ???commit??? 18725@c <en>@appendixsec The commit support files 18726@appendixsec The commit support files 18727@c <en>@cindex Committing, administrative support files 18728@cindex Committing, administrative support files 18729 18730The @samp{-i} flag in the @file{modules} file can be 18731used to run a certain program whenever files are 18732committed (@pxref{modules}). The files described in 18733this section provide other, more flexible, ways to run 18734programs whenever something is committed. 18735 18736There are three kind of programs that can be run on 18737commit. They are specified in files in the repository, 18738as described below. The following table summarizes the 18739file names and the purpose of the corresponding 18740programs. 18741 18742@table @file 18743@item commitinfo 18744The program is responsible for checking that the commit 18745is allowed. If it exits with a non-zero exit status 18746the commit will be aborted. 18747 18748@item verifymsg 18749The specified program is used to evaluate the log message, 18750and possibly verify that it contains all required 18751fields. This is most useful in combination with the 18752@file{rcsinfo} file, which can hold a log message 18753template (@pxref{rcsinfo}). 18754 18755@item loginfo 18756The specified program is called when the commit is 18757complete. It receives the log message and some 18758additional information and can store the log message in 18759a file, or mail it to appropriate persons, or maybe 18760post it to a local newsgroup, or@dots{} Your 18761imagination is the limit! 18762@end table 18763 18764@menu 18765* syntax:: The common syntax 18766* commitinfo:: Pre-commit checking 18767* verifymsg:: How are log messages evaluated? 18768* loginfo:: Where should log messages be sent? 18769@end menu 18770 18771@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18772@node syntax 18773@appendixsubsec The common syntax 18774@cindex Info files (syntax) 18775@cindex Syntax of info files 18776@cindex Common syntax of info files 18777 18778@c FIXME: having this so totally separate from the 18779@c Variables node is rather bogus. 18780 18781The administrative files such as @file{commitinfo}, 18782@file{loginfo}, @file{rcsinfo}, @file{verifymsg}, etc., 18783all have a common format. The purpose of the files are 18784described later on. The common syntax is described 18785here. 18786 18787@cindex Regular expression syntax 18788Each line contains the following: 18789@itemize @bullet 18790@item 18791@c Say anything about DEFAULT and ALL? Right now we 18792@c leave that to the description of each file (and in fact 18793@c the practice is inconsistent which is really annoying). 18794A regular expression. This is a basic regular 18795expression in the syntax used by GNU emacs. 18796@c FIXME: What we probably should be saying is "POSIX Basic 18797@c Regular Expression with the following extensions (`\(' 18798@c `\|' '+' etc)" 18799@c rather than define it with reference to emacs. 18800@c The reference to emacs is not strictly speaking 18801@c true, as we don't support \=, \s, or \S. Also it isn't 18802@c clear we should document and/or promise to continue to 18803@c support all the obscure emacs extensions like \<. 18804@c Also need to better cite (or include) full 18805@c documentation for the syntax. 18806@c Also see comment in configure.in about what happens to the 18807@c syntax if we pick up a system-supplied regexp matcher. 18808 18809@item 18810A whitespace separator---one or more spaces and/or tabs. 18811 18812@item 18813A file name or command-line template. 18814@end itemize 18815 18816@noindent 18817Blank lines are ignored. Lines that start with the 18818character @samp{#} are treated as comments. Long lines 18819unfortunately can @emph{not} be broken in two parts in 18820any way. 18821 18822The first regular expression that matches the current 18823directory name in the repository is used. The rest of the line 18824is used as a file name or command-line as appropriate. 18825 18826@c FIXME: need an example. In particular, show what 18827@c the regular expression is matched against (one 18828@c ordinarily clueful person got confused about whether it 18829@c includes the filename--"directory name" above should be 18830@c unambiguous but there is nothing like an example to 18831@c confirm people's understanding of this sort of thing). 18832 18833@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18834@node commitinfo 18835@appendixsubsec Commitinfo 18836@cindex @file{commitinfo} 18837@cindex Commits, precommit verification of 18838@cindex Precommit checking 18839 18840The @file{commitinfo} file defines programs to execute 18841whenever @samp{cvs commit} is about to execute. These 18842programs are used for pre-commit checking to verify 18843that the modified, added and removed files are really 18844ready to be committed. This could be used, for 18845instance, to verify that the changed files conform to 18846to your site's standards for coding practice. 18847 18848As mentioned earlier, each line in the 18849@file{commitinfo} file consists of a regular expression 18850and a command-line template. The template can include 18851a program name and any number of arguments you wish to 18852supply to it. The full path to the current source 18853repository is appended to the template, followed by the 18854file names of any files involved in the commit (added, 18855removed, and modified files). 18856 18857@cindex Exit status, of commitinfo 18858The first line with a regular expression matching the 18859directory within the repository will be used. If the 18860command returns a non-zero exit status the commit will 18861be aborted. 18862@c FIXME: need example(s) of what "directory within the 18863@c repository" means. 18864 18865@cindex DEFAULT in commitinfo 18866If the repository name does not match any of the 18867regular expressions in this file, the @samp{DEFAULT} 18868line is used, if it is specified. 18869 18870@cindex ALL in commitinfo 18871All occurrences of the name @samp{ALL} appearing as a 18872regular expression are used in addition to the first 18873matching regular expression or the name @samp{DEFAULT}. 18874 18875@c <en>@cindex @file{commitinfo}, working directory 18876@cindex @file{commitinfo}, working directory 18877@c <en>@cindex @file{commitinfo}, command environment 18878@cindex @file{commitinfo}, command environment 18879@c <en>The command will be run in the root of the workspace 18880@c <en>containing the new versions of any files the user would like 18881@c <en>to modify (commit), @emph{or in a copy of the workspace on 18882@c <en>the server (@pxref{Remote repositories})}. If a file is 18883@c <en>being removed, there will be no copy of the file under the 18884@c <en>current directory. If a file is being added, there will be 18885@c <en>no corresponding archive file in the repository unless the 18886@c <en>file is being resurrected. 18887The command will be run in the root of the workspace 18888containing the new versions of any files the user would like 18889to modify (commit), @emph{or in a copy of the workspace on 18890the server (@pxref{Reposit�rios remotos})}. If a file is 18891being removed, there will be no copy of the file under the 18892current directory. If a file is being added, there will be 18893no corresponding archive file in the repository unless the 18894file is being resurrected. 18895 18896Note that both the repository directory and the corresponding 18897Attic (@pxref{Attic}) directory may need to be checked to 18898locate the archive file corresponding to any given file being 18899committed. Much of the information about the specific commit 18900request being made, including the destination branch, commit 18901message, and command line options specified, is not available 18902to the command. 18903 18904@c FIXME: should discuss using commitinfo to control 18905@c who has checkin access to what (e.g. Joe can check into 18906@c directories a, b, and c, and Mary can check into 18907@c directories b, c, and d--note this case cannot be 18908@c conveniently handled with unix groups). Of course, 18909@c adding a new set of features to CVS might be a more 18910@c natural way to fix this problem than telling people to 18911@c use commitinfo. 18912@c FIXME: Should make some reference, especially in 18913@c the context of controlling who has access, to the fact 18914@c that commitinfo can be circumvented. Perhaps 18915@c mention SETXID (but has it been carefully examined 18916@c for holes?). This fits in with the discussion of 18917@c general CVS security in "Password authentication 18918@c security" (the bit which is not pserver-specific). 18919 18920@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 18921@node verifymsg 18922@appendixsubsec Verifying log messages 18923@cindex @file{verifymsg} (admin file) 18924@cindex Log message, verifying 18925 18926Once you have entered a log message, you can evaluate 18927that message to check for specific content, such as 18928a bug ID. Use the @file{verifymsg} file to 18929specify a program that is used to verify the log message. 18930This program could be a simple script that checks 18931that the entered message contains the required fields. 18932 18933The @file{verifymsg} file is often most useful together 18934with the @file{rcsinfo} file, which can be used to 18935specify a log message template. 18936 18937Each line in the @file{verifymsg} file consists of a 18938regular expression and a command-line template. The 18939template must include a program name, and can include 18940any number of arguments. The full path to the current 18941log message template file is appended to the template. 18942 18943One thing that should be noted is that the @samp{ALL} 18944keyword is not supported. If more than one matching 18945line is found, the first one is used. This can be 18946useful for specifying a default verification script in a 18947directory, and then overriding it in a subdirectory. 18948 18949@cindex DEFAULT in @file{verifymsg} 18950If the repository name does not match any of the 18951regular expressions in this file, the @samp{DEFAULT} 18952line is used, if it is specified. 18953 18954@cindex Exit status, of @file{verifymsg} 18955If the verification script exits with a non-zero exit status, 18956the commit is aborted. 18957 18958@cindex @file{verifymsg}, changing the log message 18959In the default configuration, CVS allows the 18960verification script to change the log message. This is 18961controlled via the RereadLogAfterVerify CVSROOT/config 18962option. 18963 18964When @samp{RereadLogAfterVerify=always} or 18965@samp{RereadLogAfterVerify=stat}, the log message will 18966either always be reread after the verification script 18967is run or reread only if the log message file status 18968has changed. 18969 18970@xref{config}, for more on CVSROOT/config options. 18971 18972@c <en>It is NOT a good idea for a @file{verifymsg} script to 18973@c <en>interact directly with the user in the various 18974@c <en>client/server methods. For the @code{pserver} method, 18975@c <en>there is no protocol support for communicating between 18976@c <en>@file{verifymsg} and the client on the remote end. For the 18977@c <en>@code{ext} and @code{server} methods, it is possible 18978@c <en>for CVS to become confused by the characters going 18979@c <en>along the same channel as the CVS protocol 18980@c <en>messages. See @ref{Remote repositories}, for more 18981@c <en>information on client/server setups. In addition, at the time 18982@c <en>the @file{verifymsg} script runs, the CVS 18983@c <en>server has locks in place in the repository. If control is 18984@c <en>returned to the user here then other users may be stuck waiting 18985@c <en>for access to the repository. 18986It is NOT a good idea for a @file{verifymsg} script to 18987interact directly with the user in the various 18988client/server methods. For the @code{pserver} method, 18989there is no protocol support for communicating between 18990@file{verifymsg} and the client on the remote end. For the 18991@code{ext} and @code{server} methods, it is possible 18992for CVS to become confused by the characters going 18993along the same channel as the CVS protocol 18994messages. See @ref{Reposit�rios remotos}, for more 18995information on client/server setups. In addition, at the time 18996the @file{verifymsg} script runs, the CVS 18997server has locks in place in the repository. If control is 18998returned to the user here then other users may be stuck waiting 18999for access to the repository. 19000 19001This option can be useful if you find yourself using an 19002rcstemplate that needs to be modified to remove empty 19003elements or to fill in default values. It can also be 19004useful if the rcstemplate has changed in the repository 19005and the CVS/Template was not updated, but is able to be 19006adapted to the new format by the verification script 19007that is run by @file{verifymsg}. 19008 19009An example of an update might be to change all 19010occurrences of 'BugId:' to be 'DefectId:' (which can be 19011useful if the rcstemplate has recently been changed and 19012there are still checked-out user trees with cached 19013copies in the CVS/Template file of the older version). 19014 19015Another example of an update might be to delete a line 19016that contains 'BugID: none' from the log message after 19017validation of that value as being allowed is made. 19018 19019The following is a little silly example of a 19020@file{verifymsg} file, together with the corresponding 19021@file{rcsinfo} file, the log message template and an 19022verification script. We begin with the log message template. 19023We want to always record a bug-id number on the first 19024line of the log message. The rest of log message is 19025free text. The following template is found in the file 19026@file{/usr/cvssupport/tc.template}. 19027 19028@example 19029BugId: 19030@end example 19031 19032The script @file{/usr/cvssupport/bugid.verify} is used to 19033evaluate the log message. 19034 19035@example 19036#!/bin/sh 19037# 19038# bugid.verify filename 19039# 19040# Verify that the log message contains a valid bugid 19041# on the first line. 19042# 19043if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then 19044 exit 0 19045elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then 19046 # It is okay to allow commits with 'BugId: none', 19047 # but do not put that text into the real log message. 19048 grep -v '^BugId:[ ]*none$' > $1.rewrite 19049 mv $1.rewrite $1 19050 exit 0 19051else 19052 echo "No BugId found." 19053 exit 1 19054fi 19055@end example 19056 19057The @file{verifymsg} file contains this line: 19058 19059@example 19060^tc /usr/cvssupport/bugid.verify 19061@end example 19062 19063The @file{rcsinfo} file contains this line: 19064 19065@example 19066^tc /usr/cvssupport/tc.template 19067@end example 19068 19069The @file{config} file contains this line: 19070 19071@example 19072RereadLogAfterVerify=always 19073@end example 19074 19075 19076 19077@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19078@node loginfo 19079@appendixsubsec Loginfo 19080@cindex loginfo (admin file) 19081@cindex Storing log messages 19082@cindex Mailing log messages 19083@cindex Distributing log messages 19084@cindex Log messages 19085 19086@c "cvs commit" is not quite right. What we 19087@c mean is "when the repository gets changed" which 19088@c also includes "cvs import" and "cvs add" on a directory. 19089The @file{loginfo} file is used to control where 19090@samp{cvs commit} log information is sent. The first 19091entry on a line is a regular expression which is tested 19092against the directory that the change is being made to, 19093relative to the @code{$CVSROOT}. If a match is found, then 19094the remainder of the line is a filter program that 19095should expect log information on its standard input. 19096 19097If the repository name does not match any of the 19098regular expressions in this file, the @samp{DEFAULT} 19099line is used, if it is specified. 19100 19101All occurrences of the name @samp{ALL} appearing as a 19102regular expression are used in addition to the first 19103matching regular expression or @samp{DEFAULT}. 19104 19105The first matching regular expression is used. 19106 19107@xref{Arquivos de ???commit???}, for a description of the syntax of 19108the @file{loginfo} file. 19109 19110The user may specify a format string as 19111part of the filter. The string is composed of a 19112@samp{%} followed by a space, or followed by a single 19113format character, or followed by a set of format 19114characters surrounded by @samp{@{} and @samp{@}} as 19115separators. The format characters are: 19116 19117@table @t 19118@item s 19119file name 19120@item V 19121old version number (pre-checkin) 19122@item v 19123new version number (post-checkin) 19124@end table 19125 19126All other characters that appear in a format string 19127expand to an empty field (commas separating fields are 19128still provided). 19129 19130For example, some valid format strings are @samp{%}, 19131@samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}. 19132 19133The output will be a space separated string of tokens enclosed in 19134quotation marks (@t{"}). 19135Any embedded dollar signs (@t{$}), backticks (@t{`}), 19136backslashes (@t{\}), or quotation marks will be preceded 19137by a backslash (this allows the shell to correctly parse it 19138as a single string, regardless of the characters it contains). 19139For backwards compatibility, the first 19140token will be the repository subdirectory. The rest of the 19141tokens will be comma-delimited lists of the information 19142requested in the format string. For example, if 19143@samp{/u/src/master/yoyodyne/tc} is the repository, @samp{%@{sVv@}} 19144is the format string, and three files (@t{ChangeLog}, 19145@t{Makefile}, @t{foo.c}) were modified, the output 19146might be: 19147 19148@example 19149"yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13" 19150@end example 19151 19152As another example, @samp{%@{@}} means that only the 19153name of the repository will be generated. 19154 19155Note: when @sc{cvs} is accessing a remote repository, 19156@file{loginfo} will be run on the @emph{remote} 19157(i.e., server) side, not the client side (@pxref{Reposit�rios remotos}). 19158 19159@menu 19160* loginfo example:: Loginfo example 19161* Keeping a checked out copy:: Updating a tree on every checkin 19162@end menu 19163 19164@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19165@node loginfo example 19166@appendixsubsubsec Loginfo example 19167 19168The following @file{loginfo} file, together with the 19169tiny shell-script below, appends all log messages 19170to the file @file{$CVSROOT/CVSROOT/commitlog}, 19171and any commits to the administrative files (inside 19172the @file{CVSROOT} directory) are also logged in 19173@file{/usr/adm/cvsroot-log}. 19174Commits to the @file{prog1} directory are mailed to @t{ceder}. 19175 19176@c FIXME: is it a CVS feature or bug that only the 19177@c first matching line is used? It is documented 19178@c above, but is it useful? For example, if we wanted 19179@c to run both "cvs-log" and "Mail" for the CVSROOT 19180@c directory, it is kind of awkward if 19181@c only the first matching line is used. 19182@example 19183ALL /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER 19184^CVSROOT /usr/local/bin/cvs-log /usr/adm/cvsroot-log 19185^prog1 Mail -s %s ceder 19186@end example 19187 19188The shell-script @file{/usr/local/bin/cvs-log} looks 19189like this: 19190 19191@example 19192#!/bin/sh 19193(echo "------------------------------------------------------"; 19194 echo -n $2" "; 19195 date; 19196 echo; 19197 cat) >> $1 19198@end example 19199 19200@node Keeping a checked out copy 19201@appendixsubsubsec Keeping a checked out copy 19202 19203@c What other index entries? It seems like 19204@c people might want to use a lot of different 19205@c words for this functionality. 19206@cindex Keeping a checked out copy 19207@cindex Checked out copy, keeping 19208@cindex Web pages, maintaining with CVS 19209 19210It is often useful to maintain a directory tree which 19211contains files which correspond to the latest version 19212in the repository. For example, other developers might 19213want to refer to the latest sources without having to 19214check them out, or you might be maintaining a web site 19215with @sc{cvs} and want every checkin to cause the files 19216used by the web server to be updated. 19217@c Can we offer more details on the web example? Or 19218@c point the user at how to figure it out? This text 19219@c strikes me as sufficient for someone who already has 19220@c some idea of what we mean but not enough for the naive 19221@c user/sysadmin to understand it and set it up. 19222 19223The way to do this is by having loginfo invoke 19224@code{cvs update}. Doing so in the naive way will 19225cause a problem with locks, so the @code{cvs update} 19226must be run in the background. 19227@c Should we try to describe the problem with locks? 19228@c It seems like a digression for someone who just 19229@c wants to know how to make it work. 19230@c Another choice which might work for a single file 19231@c is to use "cvs -n update -p" which doesn't take 19232@c out locks (I think) but I don't see many advantages 19233@c of that and we might as well document something which 19234@c works for multiple files. 19235Here is an example for unix (this should all be on one line): 19236 19237@example 19238^cyclic-pages (date; cat; (sleep 2; cd /u/www/local-docs; 19239 cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1 19240@end example 19241 19242This will cause checkins to repository directories 19243starting with @code{cyclic-pages} to update the checked 19244out tree in @file{/u/www/local-docs}. 19245@c More info on some of the details? The "sleep 2" is 19246@c so if we are lucky the lock will be gone by the time 19247@c we start and we can wait 2 seconds instead of 30. 19248 19249@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19250@node rcsinfo 19251@appendixsec Rcsinfo 19252@cindex rcsinfo (admin file) 19253@cindex Form for log message 19254@cindex Log message template 19255@cindex Template for log message 19256 19257The @file{rcsinfo} file can be used to specify a form to 19258edit when filling out the commit log. The 19259@file{rcsinfo} file has a syntax similar to the 19260@file{verifymsg}, @file{commitinfo} and @file{loginfo} 19261files. @xref{syntax}. Unlike the other files the second 19262part is @emph{not} a command-line template. Instead, 19263the part after the regular expression should be a full pathname to 19264a file containing the log message template. 19265 19266If the repository name does not match any of the 19267regular expressions in this file, the @samp{DEFAULT} 19268line is used, if it is specified. 19269 19270All occurrences of the name @samp{ALL} appearing as a 19271regular expression are used in addition to the first 19272matching regular expression or @samp{DEFAULT}. 19273 19274@c FIXME: should be offering advice, somewhere around 19275@c here, about where to put the template file. The 19276@c verifymsg example uses /usr/cvssupport but doesn't 19277@c say anything about what that directory is for or 19278@c whether it is hardwired into CVS or who creates 19279@c it or anything. In particular we should say 19280@c how to version control the template file. A 19281@c probably better answer than the /usr/cvssupport 19282@c stuff is to use checkoutlist (with xref to the 19283@c checkoutlist doc). 19284@c Also I am starting to see a connection between 19285@c this and the Keeping a checked out copy node. 19286@c Probably want to say something about that. 19287The log message template will be used as a default log 19288message. If you specify a log message with @samp{cvs 19289commit -m @var{message}} or @samp{cvs commit -f 19290@var{file}} that log message will override the 19291template. 19292 19293@xref{verifymsg}, for an example @file{rcsinfo} 19294file. 19295 19296When @sc{cvs} is accessing a remote repository, 19297the contents of @file{rcsinfo} at the time a directory 19298is first checked out will specify a template. This 19299template will be updated on all @samp{cvs update} 19300commands. It will also be added to new directories 19301added with a @samp{cvs add new-directry} command. 19302In versions of @sc{cvs} prior to version 1.12, the 19303@file{CVS/Template} file was not updated. If the 19304@sc{cvs} server is at version 1.12 or higher an older 19305client may be used and the @file{CVS/Template} will 19306be updated from the server. 19307 19308@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19309@c <en>@node taginfo 19310@node taginfo 19311@c <en>@appendixsec Taginfo 19312@appendixsec Taginfo 19313@c <en>@cindex taginfo (admin file) 19314@cindex taginfo (admin file) 19315@c <en>@cindex Tags, logging 19316@cindex Tags, logging 19317@c <en>@cindex Tags, verifying 19318@cindex Tags, verifying 19319@c <en>The @file{taginfo} file defines programs to execute 19320@c <en>when someone executes a @code{tag} or @code{rtag} 19321@c <en>command. The @file{taginfo} file has the standard form 19322@c <en>for administrative files (@pxref{syntax}), 19323@c <en>where each line is a regular expression 19324@c <en>followed by a command to execute. The arguments passed 19325@c <en>to the command are, in order, the @var{tagname}, 19326@c <en>@var{operation} (@code{add} for @code{tag}, 19327@c <en>@code{mov} for @code{tag -F}, and @code{del} for 19328@c <en>@code{tag -d}), @var{repository}, and any remaining are 19329@c <en>pairs of @var{filename} @var{revision}. A non-zero 19330@c <en>exit of the filter program will cause the tag to be 19331@c <en>aborted. 19332The @file{taginfo} file defines programs to execute 19333when someone executes a @code{tag} or @code{rtag} 19334command. The @file{taginfo} file has the standard form 19335for administrative files (@pxref{syntax}), 19336where each line is a regular expression 19337followed by a command to execute. The arguments passed 19338to the command are, in order, the @var{tagname}, 19339@var{operation} (@code{add} for @code{tag}, 19340@code{mov} for @code{tag -F}, and @code{del} for 19341@code{tag -d}), @var{repository}, and any remaining are 19342pairs of @var{filename} @var{revision}. A non-zero 19343exit of the filter program will cause the tag to be 19344aborted. 19345 19346@c <en>Here is an example of using the @file{taginfo} file 19347@c <en>to log @code{tag} and @code{rtag} 19348@c <en>commands. In the @file{taginfo} file put: 19349Here is an example of using the @file{taginfo} file 19350to log @code{tag} and @code{rtag} 19351commands. In the @file{taginfo} file put: 19352 19353@example 19354ALL /usr/local/cvsroot/CVSROOT/loggit 19355@end example 19356 19357@noindent 19358@c <en>Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the 19359@c <en>following script: 19360Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the 19361following script: 19362 19363@example 19364#!/bin/sh 19365echo "$@@" >>/home/kingdon/cvsroot/CVSROOT/taglog 19366@end example 19367 19368@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19369@node cvsignore 19370@appendixsec Ignoring files via cvsignore 19371@cindex cvsignore (admin file), global 19372@cindex Global cvsignore 19373@cindex Ignoring files 19374@c -- This chapter should maybe be moved to the 19375@c tutorial part of the manual? 19376 19377There are certain file names that frequently occur 19378inside your working copy, but that you don't want to 19379put under @sc{cvs} control. Examples are all the object 19380files that you get while you compile your sources. 19381Normally, when you run @samp{cvs update}, it prints a 19382line for each file it encounters that it doesn't know 19383about (@pxref{update output}). 19384 19385@sc{cvs} has a list of files (or sh(1) file name patterns) 19386that it should ignore while running @code{update}, 19387@code{import} and @code{release}. 19388@c -- Are those the only three commands affected? 19389This list is constructed in the following way. 19390 19391@itemize @bullet 19392@item 19393The list is initialized to include certain file name 19394patterns: names associated with @sc{cvs} 19395administration, or with other common source control 19396systems; common names for patch files, object files, 19397archive files, and editor backup files; and other names 19398that are usually artifacts of assorted utilities. 19399Currently, the default list of ignored file name 19400patterns is: 19401 19402@cindex Ignored files 19403@cindex Automatically ignored files 19404@example 19405 RCS SCCS CVS CVS.adm 19406 RCSLOG cvslog.* 19407 tags TAGS 19408 .make.state .nse_depinfo 19409 *~ #* .#* ,* _$* *$ 19410 *.old *.bak *.BAK *.orig *.rej .del-* 19411 *.a *.olb *.o *.obj *.so *.exe 19412 *.Z *.elc *.ln 19413 core 19414@end example 19415 19416@item 19417The per-repository list in 19418@file{$CVSROOT/CVSROOT/cvsignore} is appended to 19419the list, if that file exists. 19420 19421@item 19422The per-user list in @file{.cvsignore} in your home 19423directory is appended to the list, if it exists. 19424 19425@item 19426Any entries in the environment variable 19427@code{$CVSIGNORE} is appended to the list. 19428 19429@item 19430Any @samp{-I} options given to @sc{cvs} is appended. 19431 19432@item 19433As @sc{cvs} traverses through your directories, the contents 19434of any @file{.cvsignore} will be appended to the list. 19435The patterns found in @file{.cvsignore} are only valid 19436for the directory that contains them, not for 19437any sub-directories. 19438@end itemize 19439 19440In any of the 5 places listed above, a single 19441exclamation mark (@samp{!}) clears the ignore list. 19442This can be used if you want to store any file which 19443normally is ignored by @sc{cvs}. 19444 19445Specifying @samp{-I !} to @code{cvs import} will import 19446everything, which is generally what you want to do if 19447you are importing files from a pristine distribution or 19448any other source which is known to not contain any 19449extraneous files. However, looking at the rules above 19450you will see there is a fly in the ointment; if the 19451distribution contains any @file{.cvsignore} files, then 19452the patterns from those files will be processed even if 19453@samp{-I !} is specified. The only workaround is to 19454remove the @file{.cvsignore} files in order to do the 19455import. Because this is awkward, in the future 19456@samp{-I !} might be modified to override 19457@file{.cvsignore} files in each directory. 19458 19459Note that the syntax of the ignore files consists of a 19460series of lines, each of which contains a space 19461separated list of filenames. This offers no clean way 19462to specify filenames which contain spaces, but you can 19463use a workaround like @file{foo?bar} to match a file 19464named @file{foo bar} (it also matches @file{fooxbar} 19465and the like). Also note that there is currently no 19466way to specify comments. 19467@c FIXCVS? I don't _like_ this syntax at all, but 19468@c changing it raises all the usual compatibility 19469@c issues and I'm also not sure what to change it to. 19470 19471@node checkoutlist 19472@appendixsec The checkoutlist file 19473@cindex checkoutlist 19474 19475It may be helpful to use @sc{cvs} to maintain your own 19476files in the @file{CVSROOT} directory. For example, 19477suppose that you have a script @file{logcommit.pl} 19478which you run by including the following line in the 19479@file{commitinfo} administrative file: 19480 19481@example 19482ALL $CVSROOT/CVSROOT/logcommit.pl 19483@end example 19484 19485To maintain @file{logcommit.pl} with @sc{cvs} you would 19486add the following line to the @file{checkoutlist} 19487administrative file: 19488 19489@example 19490logcommit.pl 19491@end example 19492 19493The format of @file{checkoutlist} is one line for each 19494file that you want to maintain using @sc{cvs}, giving 19495the name of the file, followed optionally by more whitespace 19496and any error message that should print if the file cannot be 19497checked out into CVSROOT after a commit: 19498 19499@example 19500logcommit.pl Could not update CVSROOT/logcommit.pl. 19501@end example 19502 19503After setting up @file{checkoutlist} in this fashion, 19504the files listed there will function just like 19505@sc{cvs}'s built-in administrative files. For example, 19506when checking in one of the files you should get a 19507message such as: 19508 19509@example 19510cvs commit: Rebuilding administrative file database 19511@end example 19512 19513@noindent 19514and the checked out copy in the @file{CVSROOT} 19515directory should be updated. 19516 19517@c <en>Note that listing @file{passwd} (@pxref{Password 19518@c <en>authentication server}) in @file{checkoutlist} is not 19519@c <en>recommended for security reasons. 19520Note that listing @file{passwd} 19521(@pxref{Servidor de autentica��o por senha}) in @file{checkoutlist} is not 19522recommended for security reasons. 19523 19524For information about keeping a checkout out copy in a 19525more general context than the one provided by 19526@file{checkoutlist}, see @ref{Keeping a checked out 19527copy}. 19528 19529@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 19530@c <en>@node history file 19531@node arquivo history (hist�rico) 19532@c <en>@appendixsec The history file 19533@appendixsec O arquivo history (hist�rico) 19534@c <en>@cindex History file 19535@cindex Arquivo history (hist�rico) 19536@c <en>@cindex Log information, saving 19537@cindex Log information, saving 19538 19539@c <en>The file @file{$CVSROOT/CVSROOT/history} is used 19540@c <en>to log information for the @code{history} command 19541@c <en>(@pxref{history}). This file must be created to turn 19542@c <en>on logging. This is done automatically if the 19543@c <en>@code{cvs init} command is used to set up the 19544@c <en>repository (@pxref{Creating a repository}). 19545The file @file{$CVSROOT/CVSROOT/history} is used 19546to log information for the @code{history} command 19547(@pxref{history}). This file must be created to turn 19548on logging. This is done automatically if the 19549@code{cvs init} command is used to set up the 19550repository (@pxref{Criando um reposit�rio}). 19551 19552The file format of the @file{history} file is 19553documented only in comments in the @sc{cvs} source 19554code, but generally programs should use the @code{cvs 19555history} command to access it anyway, in case the 19556format changes with future releases of @sc{cvs}. 19557 19558@node Variables 19559@appendixsec Expansions in administrative files 19560@cindex Internal variables 19561@cindex Variables 19562 19563Sometimes in writing an administrative file, you might 19564want the file to be able to know various things based 19565on environment @sc{cvs} is running in. There are 19566several mechanisms to do that. 19567 19568@c <en>To find the home directory of the user running @sc{cvs} 19569@c <en>(from the @code{HOME} environment variable), use 19570@c <en>@samp{~} followed by @samp{/} or the end of the line. 19571@c <en>Likewise for the home directory of @var{user}, use 19572@c <en>@samp{~@var{user}}. These variables are expanded on 19573@c <en>the server machine, and don't get any reasonable 19574@c <en>expansion if pserver (@pxref{Password authenticated}) 19575@c <en>is in use; therefore user variables (see below) may be 19576@c <en>a better choice to customize behavior based on the user 19577@c <en>running @sc{cvs}. 19578To find the home directory of the user running @sc{cvs} 19579(from the @code{HOME} environment variable), use 19580@samp{~} followed by @samp{/} or the end of the line. 19581Likewise for the home directory of @var{user}, use 19582@samp{~@var{user}}. These variables are expanded on 19583the server machine, and don't get any reasonable 19584expansion if pserver (@pxref{Autentica��o por senha}) 19585is in use; therefore user variables (see below) may be 19586a better choice to customize behavior based on the user 19587running @sc{cvs}. 19588@c Based on these limitations, should we deprecate ~? 19589@c What is it good for? Are people using it? 19590 19591One may want to know about various pieces of 19592information internal to @sc{cvs}. A @sc{cvs} internal 19593variable has the syntax @code{$@{@var{variable}@}}, 19594where @var{variable} starts with a letter and consists 19595of alphanumeric characters and @samp{_}. If the 19596character following @var{variable} is a 19597non-alphanumeric character other than @samp{_}, the 19598@samp{@{} and @samp{@}} can be omitted. The @sc{cvs} 19599internal variables are: 19600 19601@table @code 19602@c <en>@item CVSROOT 19603@item CVSROOT 19604@c <en>@cindex CVSROOT, internal variable 19605@cindex CVSROOT, internal variable 19606@c <en>This is the absolute path to the current @sc{cvs} root directory. 19607@c <en>@xref{Repository}, for a description of the various 19608@c <en>ways to specify this, but note that the internal 19609@c <en>variable contains just the directory and not any 19610@c <en>of the access method information. 19611This is the absolute path to the current @sc{cvs} root directory. 19612@xref{Reposit�rio}, for a description of the various 19613ways to specify this, but note that the internal 19614variable contains just the directory and not any 19615of the access method information. 19616 19617@item RCSBIN 19618@cindex RCSBIN, internal variable 19619In @sc{cvs} 1.9.18 and older, this specified the 19620directory where @sc{cvs} was looking for @sc{rcs} 19621programs. Because @sc{cvs} no longer runs @sc{rcs} 19622programs, specifying this internal variable is now an 19623error. 19624 19625@c <en>@item CVSEDITOR 19626@item CVSEDITOR 19627@c <en>@cindex CVSEDITOR, internal variable 19628@cindex CVSEDITOR, internal variable 19629@c <en>@itemx EDITOR 19630@itemx EDITOR 19631@c <en>@cindex EDITOR, internal variable 19632@cindex EDITOR, internal variable 19633@c <en>@itemx VISUAL 19634@itemx VISUAL 19635@c <en>@cindex VISUAL, internal variable 19636@cindex VISUAL, internal variable 19637@c <en>These all expand to the same value, which is the editor 19638@c <en>that @sc{cvs} is using. @xref{Global options}, for how 19639@c <en>to specify this. 19640These all expand to the same value, which is the editor 19641that @sc{cvs} is using. @xref{Op��es globais}, for how 19642to specify this. 19643 19644@c <en>@item USER 19645@item USER 19646@c <en>@cindex USER, internal variable 19647@cindex USER, internal variable 19648@c <en>Username of the user running @sc{cvs} (on the @sc{cvs} 19649@c <en>server machine). 19650@c <en>When using pserver, this is the user specified in the repository 19651@c <en>specification which need not be the same as the username the 19652@c <en>server is running as (@pxref{Password authentication server}). 19653@c <en>Do not confuse this with the environment variable of the same name. 19654Username of the user running @sc{cvs} (on the @sc{cvs} 19655server machine). 19656When using pserver, this is the user specified in the repository 19657specification which need not be the same as the username the 19658server is running as (@pxref{Servidor de autentica��o por senha}). 19659Do not confuse this with the environment variable of the same name. 19660@end table 19661 19662If you want to pass a value to the administrative files 19663which the user who is running @sc{cvs} can specify, 19664use a user variable. 19665@cindex User variables 19666To expand a user variable, the 19667administrative file contains 19668@code{$@{=@var{variable}@}}. To set a user variable, 19669specify the global option @samp{-s} to @sc{cvs}, with 19670argument @code{@var{variable}=@var{value}}. It may be 19671particularly useful to specify this option via 19672@file{.cvsrc} (@pxref{~/.cvsrc}). 19673 19674For example, if you want the administrative file to 19675refer to a test directory you might create a user 19676variable @code{TESTDIR}. Then if @sc{cvs} is invoked 19677as 19678 19679@example 19680cvs -s TESTDIR=/work/local/tests 19681@end example 19682 19683@noindent 19684and the 19685administrative file contains @code{sh 19686$@{=TESTDIR@}/runtests}, then that string is expanded 19687to @code{sh /work/local/tests/runtests}. 19688 19689All other strings containing @samp{$} are reserved; 19690there is no way to quote a @samp{$} character so that 19691@samp{$} represents itself. 19692 19693Environment variables passed to administrative files are: 19694 19695@table @code 19696@cindex environment variables, passed to administrative files 19697 19698@item CVS_USER 19699@cindex CVS_USER, environment variable 19700The @sc{cvs}-specific username provided by the user, if it 19701can be provided (currently just for the pserver access 19702method), and to the empty string otherwise. (@code{CVS_USER} 19703and @code{USER} may differ when @file{$CVSROOT/CVSROOT/passwd} 19704is used to map @sc{cvs} usernames to system usernames.) 19705 19706@item LOGNAME 19707@cindex LOGNAME, environment variable 19708The username of the system user. 19709 19710@item USER 19711@cindex USER, environment variable 19712Same as @code{LOGNAME}. 19713Do not confuse this with the internal variable of the same name. 19714@end table 19715 19716@node config 19717@appendixsec The CVSROOT/config configuration file 19718 19719@cindex config, in CVSROOT 19720@cindex CVSROOT/config 19721 19722The administrative file @file{config} contains various 19723miscellaneous settings which affect the behavior of 19724@sc{cvs}. The syntax is slightly different from the 19725other administrative files. Variables are not 19726expanded. Lines which start with @samp{#} are 19727considered comments. 19728@c FIXME: where do we define comments for the other 19729@c administrative files. 19730Other lines consist of a keyword, @samp{=}, and a 19731value. Note that this syntax is very strict. 19732Extraneous spaces or tabs are not permitted. 19733@c See comments in parseinfo.c:parse_config for more 19734@c discussion of this strictness. 19735 19736Currently defined keywords are: 19737 19738@table @code 19739@cindex RCSBIN, in CVSROOT/config 19740@item RCSBIN=@var{bindir} 19741For @sc{cvs} 1.9.12 through 1.9.18, this setting told 19742@sc{cvs} to look for @sc{rcs} programs in the 19743@var{bindir} directory. Current versions of @sc{cvs} 19744do not run @sc{rcs} programs; for compatibility this 19745setting is accepted, but it does nothing. 19746 19747@c <en>@cindex SystemAuth, in CVSROOT/config 19748@cindex SystemAuth, in CVSROOT/config 19749@c <en>@item SystemAuth=@var{value} 19750@item SystemAuth=@var{value} 19751@c <en>If @var{value} is @samp{yes}, then pserver should check 19752@c <en>for users in the system's user database if not found in 19753@c <en>@file{CVSROOT/passwd}. If it is @samp{no}, then all 19754@c <en>pserver users must exist in @file{CVSROOT/passwd}. 19755@c <en>The default is @samp{yes}. For more on pserver, see 19756@c <en>@ref{Password authenticated}. 19757If @var{value} is @samp{yes}, then pserver should check 19758for users in the system's user database if not found in 19759@file{CVSROOT/passwd}. If it is @samp{no}, then all 19760pserver users must exist in @file{CVSROOT/passwd}. 19761The default is @samp{yes}. For more on pserver, see 19762@ref{Autentica��o por senha}. 19763 19764@ignore 19765@cindex PreservePermissions, in CVSROOT/config 19766@item PreservePermissions=@var{value} 19767Enable support for saving special device files, 19768symbolic links, file permissions and ownerships in the 19769repository. The default value is @samp{no}. 19770@xref{Special Files}, for the full implications of using 19771this keyword. 19772@end ignore 19773 19774@cindex TopLevelAdmin, in CVSROOT/config 19775@item TopLevelAdmin=@var{value} 19776Modify the @samp{checkout} command to create a 19777@samp{CVS} directory at the top level of the new 19778working directory, in addition to @samp{CVS} 19779directories created within checked-out directories. 19780The default value is @samp{no}. 19781 19782@c <en>This option is useful if you find yourself performing 19783@c <en>many commands at the top level of your working 19784@c <en>directory, rather than in one of the checked out 19785@c <en>subdirectories. The @file{CVS} directory created there 19786@c <en>will mean you don't have to specify @code{CVSROOT} for 19787@c <en>each command. It also provides a place for the 19788@c <en>@file{CVS/Template} file (@pxref{Working directory 19789@c <en>storage}). 19790This option is useful if you find yourself performing 19791many commands at the top level of your working 19792directory, rather than in one of the checked out 19793subdirectories. The @file{CVS} directory created there 19794will mean you don't have to specify @code{CVSROOT} for 19795each command. It also provides a place for the 19796@file{CVS/Template} file 19797(@pxref{Armazenamento do Diret�rio de trabalho}). 19798 19799@c <en>@cindex LockDir, in CVSROOT/config 19800@cindex LockDir, in CVSROOT/config 19801@c <en>@item LockDir=@var{directory} 19802@item LockDir=@var{directory} 19803@c <en>Put @sc{cvs} lock files in @var{directory} rather than 19804@c <en>directly in the repository. This is useful if you want 19805@c <en>to let users read from the repository while giving them 19806@c <en>write access only to @var{directory}, not to the 19807@c <en>repository. 19808@c <en>It can also be used to put the locks on a very fast 19809@c <en>in-memory file system to speed up locking and unlocking 19810@c <en>the repository. 19811@c <en>You need to create @var{directory}, but 19812@c <en>@sc{cvs} will create subdirectories of @var{directory} as it 19813@c <en>needs them. For information on @sc{cvs} locks, see 19814@c <en>@ref{Concurrency}. 19815Put @sc{cvs} lock files in @var{directory} rather than 19816directly in the repository. This is useful if you want 19817to let users read from the repository while giving them 19818write access only to @var{directory}, not to the 19819repository. 19820It can also be used to put the locks on a very fast 19821in-memory file system to speed up locking and unlocking 19822the repository. 19823You need to create @var{directory}, but 19824@sc{cvs} will create subdirectories of @var{directory} as it 19825needs them. For information on @sc{cvs} locks, see 19826@ref{Concorr�ncia}. 19827 19828@c Mention this in Compatibility section? 19829Before enabling the LockDir option, make sure that you 19830have tracked down and removed any copies of @sc{cvs} 1.9 or 19831older. Such versions neither support LockDir, nor will 19832give an error indicating that they don't support it. 19833The result, if this is allowed to happen, is that some 19834@sc{cvs} users will put the locks one place, and others will 19835put them another place, and therefore the repository 19836could become corrupted. @sc{cvs} 1.10 does not support 19837LockDir but it will print a warning if run on a 19838repository with LockDir enabled. 19839 19840@cindex LogHistory, in CVSROOT/config 19841@item LogHistory=@var{value} 19842Control what is logged to the @file{CVSROOT/history} file (@pxref{history}). 19843Default of @samp{TOEFWUPCGMAR} (or simply @samp{all}) will log 19844all transactions. Any subset of the default is 19845legal. (For example, to only log transactions that modify the 19846@file{*,v} files, use @samp{LogHistory=TMAR}.) 19847 19848@cindex RereadLogAfterVerify, in CVSROOT/config 19849@cindex @file{verifymsg}, changing the log message 19850@item RereadLogAfterVerify=@var{value} 19851Modify the @samp{commit} command such that CVS will reread the 19852log message after running the program specified by @file{verifymsg}. 19853@var{value} may be one of @samp{yes} or @samp{always}, indicating that 19854the log message should always be reread; @samp{no} 19855or @samp{never}, indicating that it should never be 19856reread; or @var{value} may be @samp{stat}, indicating 19857that the file should be checked with the filesystem 19858@samp{stat()} function to see if it has changed (see warning below) 19859before rereading. The default value is @samp{always}. 19860 19861@strong{Note: the `stat' mode can cause CVS to pause for up to 19862one extra second per directory committed. This can be less IO and 19863CPU intensive but is not recommended for use with large repositories} 19864 19865@xref{verifymsg}, for more information on how verifymsg 19866may be used. 19867 19868@cindex UserAdminOptions, in CVSROOT/config 19869@item UserAdminOptions=@var{value} 19870Control what options will be allowed with the @code{cvs admin} 19871command (@pxref{admin}) for users not in the @code{cvsadmin} group. 19872The @var{value} string is a list of single character options 19873which should be allowed. If a user who is not a member of the 19874@code{cvsadmin} group tries to execute any @code{cvs admin} 19875option which is not listed they will will receive an error message 19876reporting that the option is restricted. 19877 19878If no @code{cvsadmin} group exists on the server, @sc{cvs} will 19879ignore the @code{UserAdminOptions} keyword (@pxref{admin}). 19880 19881When not specified, @code{UserAdminOptions} defaults to 19882@samp{k}. In other words, it defaults to allowing 19883users outside of the @code{cvsadmin} group to use the 19884@code{cvs admin} command only to change the default keyword 19885expansion mode for files. 19886 19887As an example, to restrict users not in the @code{cvsadmin} 19888group to using @code{cvs admin} to change the default keyword 19889substitution mode, lock revisions, unlock revisions, and 19890replace the log message, use @samp{UserAdminOptions=klum}. 19891@end table 19892 19893@c --------------------------------------------------------------------- 19894@c <en>@node Environment variables 19895@node Vari�veis de ambiente 19896@c <en>@appendix All environment variables which affect CVS 19897@appendix Todas as vari�veis de ambiente que afetam o CVS 19898@c <en>@cindex Environment variables 19899@cindex Environment variables 19900@c <en>@cindex Reference manual for variables 19901@cindex Reference manual for variables 19902 19903This is a complete list of all environment variables 19904that affect @sc{cvs}. 19905 19906@table @code 19907@cindex CVSIGNORE, environment variable 19908@item $CVSIGNORE 19909A whitespace-separated list of file name patterns that 19910@sc{cvs} should ignore. @xref{cvsignore}. 19911 19912@cindex CVSWRAPPERS, environment variable 19913@item $CVSWRAPPERS 19914A whitespace-separated list of file name patterns that 19915@sc{cvs} should treat as wrappers. @xref{Wrappers}. 19916 19917@cindex CVSREAD, environment variable 19918@cindex Read-only files, and CVSREAD 19919@item $CVSREAD 19920If this is set, @code{checkout} and @code{update} will 19921try hard to make the files in your working directory 19922read-only. When this is not set, the default behavior 19923is to permit modification of your working files. 19924 19925@cindex CVSREADONLYFS, environment variable 19926@item $CVSREADONLYFS 19927Turns on read-only repository mode. This allows one to 19928check out from a read-only repository, such as within 19929an anoncvs server, or from a CDROM repository. 19930 19931It has the same effect as if the @samp{-R} command-line 19932option is used. This can also allow the use of 19933read-only NFS repositories. 19934 19935@c <en>@item $CVSUMASK 19936@item $CVSUMASK 19937@c <en>Controls permissions of files in the repository. See 19938@c <en>@ref{File permissions}. 19939Controls permissions of files in the repository. See 19940@ref{Permiss�es de arquivos}. 19941 19942@item $CVSROOT 19943Should contain the full pathname to the root of the @sc{cvs} 19944source repository (where the @sc{rcs} files are 19945kept). This information must be available to @sc{cvs} for 19946most commands to execute; if @code{$CVSROOT} is not set, 19947or if you wish to override it for one invocation, you 19948can supply it on the command line: @samp{cvs -d cvsroot 19949cvs_command@dots{}} Once you have checked out a working 19950directory, @sc{cvs} stores the appropriate root (in 19951the file @file{CVS/Root}), so normally you only need to 19952worry about this when initially checking out a working 19953directory. 19954 19955@c <en>@item $CVSEDITOR 19956@item $CVSEDITOR 19957@c <en>@cindex CVSEDITOR, environment variable 19958@cindex CVSEDITOR, environment variable 19959@c <en>@itemx $EDITOR 19960@itemx $EDITOR 19961@c <en>@cindex EDITOR, environment variable 19962@cindex EDITOR, environment variable 19963@c <en>@itemx $VISUAL 19964@itemx $VISUAL 19965@c <en>@cindex VISUAL, environment variable 19966@cindex VISUAL, environment variable 19967@c <en>Specifies the program to use for recording log messages 19968@c <en>during commit. @code{$CVSEDITOR} overrides 19969@c <en>@code{$EDITOR}, which overrides @code{$VISUAL}. 19970@c <en>See @ref{Committing your changes} for more or 19971@c <en>@ref{Global options} for alternative ways of specifying a 19972@c <en>log editor. 19973Specifies the program to use for recording log messages 19974during commit. @code{$CVSEDITOR} overrides 19975@code{$EDITOR}, which overrides @code{$VISUAL}. 19976See @ref{Efetivando suas altera��es} for more or 19977@ref{Op��es globais} for alternative ways of specifying a 19978log editor. 19979 19980@cindex PATH, environment variable 19981@item $PATH 19982If @code{$RCSBIN} is not set, and no path is compiled 19983into @sc{cvs}, it will use @code{$PATH} to try to find all 19984programs it uses. 19985 19986@cindex HOME, environment variable 19987@item $HOME 19988@cindex HOMEPATH, environment variable 19989@item $HOMEPATH 19990@cindex HOMEDRIVE, environment variable 19991@item $HOMEDRIVE 19992Used to locate the directory where the @file{.cvsrc} 19993file, and other such files, are searched. On Unix, @sc{cvs} 19994just checks for @code{HOME}. On Windows NT, the system will 19995set @code{HOMEDRIVE}, for example to @samp{d:} and @code{HOMEPATH}, 19996for example to @file{\joe}. On Windows 95, you'll 19997probably need to set @code{HOMEDRIVE} and @code{HOMEPATH} yourself. 19998@c We are being vague about whether HOME works on 19999@c Windows; see long comment in windows-NT/filesubr.c. 20000 20001@c <en>@cindex CVS_RSH, environment variable 20002@cindex CVS_RSH, environment variable 20003@c <en>@item $CVS_RSH 20004@item $CVS_RSH 20005@c <en>Specifies the external program which @sc{cvs} connects with, 20006@c <en>when @code{:ext:} access method is specified. 20007@c <en>@pxref{Connecting via rsh}. 20008Specifies the external program which @sc{cvs} connects with, 20009when @code{:ext:} access method is specified. 20010@pxref{Se conectando via rsh}. 20011 20012@c <en>@item $CVS_SERVER 20013@item $CVS_SERVER 20014@c <en>Used in client-server mode when accessing a remote 20015@c <en>repository using @sc{rsh}. It specifies the name of 20016@c <en>the program to start on the server side (and any 20017@c <en>necessary arguments) when accessing a remote repository 20018@c <en>using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods. 20019@c <en>The default value for @code{:ext:} and @code{:server:} is @code{cvs}; 20020@c <en>the default value for @code{:fork:} is the name used to run the client. 20021@c <en>@pxref{Connecting via rsh} 20022Used in client-server mode when accessing a remote 20023repository using @sc{rsh}. It specifies the name of 20024the program to start on the server side (and any 20025necessary arguments) when accessing a remote repository 20026using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods. 20027The default value for @code{:ext:} and @code{:server:} is @code{cvs}; 20028the default value for @code{:fork:} is the name used to run the client. 20029@pxref{Se conectando via rsh} 20030 20031@c <en>@item $CVS_PASSFILE 20032@item $CVS_PASSFILE 20033@c <en>Used in client-server mode when accessing the @code{cvs 20034@c <en>login server}. Default value is @file{$HOME/.cvspass}. 20035@c <en>@pxref{Password authentication client} 20036Used in client-server mode when accessing the @code{cvs 20037login server}. Default value is @file{$HOME/.cvspass}. 20038@pxref{Cliente de autentica��o por senha} 20039 20040@c <en>@item $CVS_CLIENT_PORT 20041@item $CVS_CLIENT_PORT 20042@c <en>Used in client-server mode to set the port to use when accessing the server 20043@c <en>via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol 20044@c <en>if the port is not specified in the CVSROOT. 20045@c <en>@pxref{Remote repositories} 20046Used in client-server mode to set the port to use when accessing the server 20047via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol 20048if the port is not specified in the CVSROOT. 20049@pxref{Reposit�rios remotos} 20050 20051@cindex CVS_RCMD_PORT, environment variable 20052@item $CVS_RCMD_PORT 20053Used in client-server mode. If set, specifies the port 20054number to be used when accessing the @sc{rcmd} demon on 20055the server side. (Currently not used for Unix clients). 20056 20057@cindex CVS_CLIENT_LOG, environment variable 20058@item $CVS_CLIENT_LOG 20059Used for debugging only in client-server 20060mode. If set, everything sent to the server is logged 20061into @file{@code{$CVS_CLIENT_LOG}.in} and everything 20062sent from the server is logged into 20063@file{@code{$CVS_CLIENT_LOG}.out}. 20064 20065@cindex CVS_SERVER_SLEEP, environment variable 20066@item $CVS_SERVER_SLEEP 20067Used only for debugging the server side in 20068client-server mode. If set, delays the start of the 20069server child process the specified amount of 20070seconds so that you can attach to it with a debugger. 20071 20072@cindex CVS_IGNORE_REMOTE_ROOT, environment variable 20073@item $CVS_IGNORE_REMOTE_ROOT 20074For @sc{cvs} 1.10 and older, setting this variable 20075prevents @sc{cvs} from overwriting the @file{CVS/Root} 20076file when the @samp{-d} global option is specified. 20077Later versions of @sc{cvs} do not rewrite 20078@file{CVS/Root}, so @code{CVS_IGNORE_REMOTE_ROOT} has no 20079effect. 20080 20081@cindex CVS_LOCAL_BRANCH_NUM, environment variable 20082@item $CVS_LOCAL_BRANCH_NUM 20083Setting this variable allows some control over the 20084branch number that is assigned. This is specifically to 20085support the local commit feature of CVSup. If one sets 20086@code{CVS_LOCAL_BRANCH_NUM} to (say) 1000 then branches 20087the local repository, the revision numbers will look 20088like 1.66.1000.xx. There is almost a dead-set certainty 20089that there will be no conflicts with version numbers. 20090 20091@cindex COMSPEC, environment variable 20092@item $COMSPEC 20093Used under OS/2 only. It specifies the name of the 20094command interpreter and defaults to @sc{cmd.exe}. 20095 20096@c <en>@cindex TMPDIR, environment variable 20097@cindex TMPDIR, environment variable 20098@c <en>@item $TMPDIR 20099@item $TMPDIR 20100@c <en>@cindex TMP, environment variable 20101@cindex TMP, environment variable 20102@c <en>@itemx $TMP 20103@itemx $TMP 20104@c <en>@cindex TEMP, environment variable 20105@cindex TEMP, environment variable 20106@c <en>@itemx $TEMP 20107@itemx $TEMP 20108@c <en>@cindex Temporary files, location of 20109@cindex Temporary files, location of 20110@c This is quite nuts. We don't talk about tempnam 20111@c or mkstemp which we sometimes use. The discussion 20112@c of "Global options" is semi-incoherent. 20113@c I'm not even sure those are the only inaccuracies. 20114@c Furthermore, the conventions are 20115@c pretty crazy and they should be simplified. 20116@c <en>Directory in which temporary files are located. 20117@c <en>The @sc{cvs} server uses 20118@c <en>@code{TMPDIR}. @xref{Global options}, for a 20119@c <en>description of how to specify this. 20120@c <en>Some parts of @sc{cvs} will always use @file{/tmp} (via 20121@c <en>the @code{tmpnam} function provided by the system). 20122Directory in which temporary files are located. 20123The @sc{cvs} server uses 20124@code{TMPDIR}. @xref{Op��es globais}, for a 20125description of how to specify this. 20126Some parts of @sc{cvs} will always use @file{/tmp} (via 20127the @code{tmpnam} function provided by the system). 20128 20129On Windows NT, @code{TMP} is used (via the @code{_tempnam} 20130function provided by the system). 20131 20132The @code{patch} program which is used by the @sc{cvs} 20133client uses @code{TMPDIR}, and if it is not set, uses 20134@file{/tmp} (at least with GNU patch 2.1). Note that 20135if your server and client are both running @sc{cvs} 201361.9.10 or later, @sc{cvs} will not invoke an external 20137@code{patch} program. 20138 20139@cindex CVS_PID, environment variable 20140@item $CVS_PID 20141This is the process identification (aka pid) number of 20142the @sc{cvs} process. It is often useful in the 20143programs and/or scripts specified by the 20144@file{commitinfo}, @file{verifymsg}, @file{loginfo} 20145files. 20146@end table 20147 20148@c <en>@node Compatibility 20149@node Compatibilidade 20150@c <en>@appendix Compatibility between CVS Versions 20151@appendix Compatibility between CVS Versions 20152 20153@cindex CVS, versions of 20154@cindex Versions, of CVS 20155@cindex Compatibility, between CVS versions 20156@c We don't mention versions older than CVS 1.3 20157@c on the theory that it would clutter it up for the vast 20158@c majority of people, who don't have anything that old. 20159@c 20160@c <en>The repository format is compatible going back to 20161@c <en>@sc{cvs} 1.3. But see @ref{Watches Compatibility}, if 20162@c <en>you have copies of @sc{cvs} 1.6 or older and you want 20163@c <en>to use the optional developer communication features. 20164The repository format is compatible going back to 20165@sc{cvs} 1.3. But see @ref{Compatibilidade de ???Watches???}, if 20166you have copies of @sc{cvs} 1.6 or older and you want 20167to use the optional developer communication features. 20168@c If you "cvs rm" and commit using 1.3, then you'll 20169@c want to run "rcs -sdead <file,v>" on each of the 20170@c files in the Attic if you then want 1.5 and 20171@c later to recognize those files as dead (I think the 20172@c symptom if this is not done is that files reappear 20173@c in joins). (Wait: the above will work but really to 20174@c be strictly correct we should suggest checking 20175@c in a new revision rather than just changing the 20176@c state of the head revision, shouldn't we?). 20177@c The old convert.sh script was for this, but it never 20178@c did get updated to reflect use of the RCS "dead" 20179@c state. 20180@c Note: this is tricky to document without confusing 20181@c people--need to carefully say what CVS version we 20182@c are talking about and keep in mind the distinction 20183@c between a 20184@c repository created with 1.3 and on which one now 20185@c uses 1.5+, and a repository on which one wants to 20186@c use both versions side by side (e.g. during a 20187@c transition period). 20188@c Wait, can't CVS just detect the case in which a file 20189@c is in the Attic but the head revision is not dead? 20190@c Not sure whether this should produce a warning or 20191@c something, and probably needs further thought, but 20192@c it would appear that the situation can be detected. 20193@c 20194@c We might want to separate out the 1.3 compatibility 20195@c section (for repository & working directory) from the 20196@c rest--that might help avoid confusing people who 20197@c are upgrading (for example) from 1.6 to 1.8. 20198@c 20199@c A minor incompatibility is if a current version of CVS 20200@c puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will 20201@c see this as if there is no tag. Seems to me this is 20202@c too obscure to mention. 20203 20204The working directory format is compatible going back 20205to @sc{cvs} 1.5. It did change between @sc{cvs} 1.3 20206and @sc{cvs} 1.5. If you run @sc{cvs} 1.5 or newer on 20207a working directory checked out with @sc{cvs} 1.3, 20208@sc{cvs} will convert it, but to go back to @sc{cvs} 202091.3 you need to check out a new working directory with 20210@sc{cvs} 1.3. 20211 20212The remote protocol is interoperable going back to @sc{cvs} 1.5, but no 20213further (1.5 was the first official release with the remote protocol, 20214but some older versions might still be floating around). In many 20215cases you need to upgrade both the client and the server to take 20216advantage of new features and bugfixes, however. 20217 20218@c Perhaps should be saying something here about the 20219@c "D" lines in Entries (written by CVS 1.9; 1.8 and 20220@c older don't use them). These are supposed to be 20221@c compatible in both directions, but I'm not sure 20222@c they quite are 100%. One common gripe is if you 20223@c "rm -r" a directory and 1.9 gets confused, as it 20224@c still sees it in Entries. That one is fixed in 20225@c (say) 1.9.6. Someone else reported problems with 20226@c starting with a directory which was checked out with 20227@c an old version, and then using a new version, and 20228@c some "D" lines appeared, but not for every 20229@c directory, causing some directories to be skipped. 20230@c They weren't sure how to reproduce this, though. 20231 20232@c --------------------------------------------------------------------- 20233@c <en>@node Troubleshooting 20234@node Resolu��o de problemas 20235@c <en>@appendix Troubleshooting 20236@appendix Resolu��o de problemas 20237 20238If you are having trouble with @sc{cvs}, this appendix 20239may help. If there is a particular error message which 20240you are seeing, then you can look up the message 20241alphabetically. If not, you can look through the 20242section on other problems to see if your problem is 20243mentioned there. 20244 20245@menu 20246@c <en>* Error messages:: Partial list of CVS errors 20247* Mensagens de erro:: Partial list of CVS errors 20248@c <en>* Connection:: Trouble making a connection to a CVS server 20249* Conex�o:: Trouble making a connection to a CVS server 20250@c <en>* Other problems:: Problems not readily listed by error message 20251* Outros problemas:: Problems not readily listed by error message 20252@end menu 20253 20254@ignore 20255@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 20256@c @node Bad administrative files 20257@appendixsec Bad administrative files 20258 20259@c -- Give hints on how to fix them 20260@end ignore 20261 20262@c <en>@node Error messages 20263@node Mensagens de erro 20264@c <en>@appendixsec Partial list of error messages 20265@appendixsec Partial list of error messages 20266 20267Here is a partial list of error messages that you may 20268see from @sc{cvs}. It is not a complete list---@sc{cvs} 20269is capable of printing many, many error messages, often 20270with parts of them supplied by the operating system, 20271but the intention is to list the common and/or 20272potentially confusing error messages. 20273 20274The messages are alphabetical, but introductory text 20275such as @samp{cvs update: } is not considered in 20276ordering them. 20277 20278In some cases the list includes messages printed by old 20279versions of @sc{cvs} (partly because users may not be 20280sure which version of @sc{cvs} they are using at any 20281particular moment). 20282@c If we want to start retiring messages, perhaps we 20283@c should pick a cutoff version (for example, no more 20284@c messages which are specific to versions before 1.9) 20285@c and then move the old messages to an "old messages" 20286@c node rather than deleting them completely. 20287 20288@table @code 20289@c FIXME: What is the correct way to format a multiline 20290@c error message here? Maybe @table is the wrong 20291@c choice? Texinfo gurus? 20292@c <en>@item @var{file}:@var{line}: Assertion '@var{text}' failed 20293@item @var{file}:@var{line}: Assertion '@var{text}' failed 20294@c <en>The exact format of this message may vary depending on 20295@c <en>your system. It indicates a bug in @sc{cvs}, which can 20296@c <en>be handled as described in @ref{BUGS}. 20297The exact format of this message may vary depending on 20298your system. It indicates a bug in @sc{cvs}, which can 20299be handled as described in @ref{Paus}. 20300 20301@c <en>@item cvs @var{command}: authorization failed: server @var{host} rejected access 20302@item cvs @var{command}: authorization failed: server @var{host} rejected access 20303@c <en>This is a generic response when trying to connect to a 20304@c <en>pserver server which chooses not to provide a 20305@c <en>specific reason for denying authorization. Check that 20306@c <en>the username and password specified are correct and 20307@c <en>that the @code{CVSROOT} specified is allowed by @samp{--allow-root} 20308@c <en>in @file{inetd.conf}. See @ref{Password authenticated}. 20309This is a generic response when trying to connect to a 20310pserver server which chooses not to provide a 20311specific reason for denying authorization. Check that 20312the username and password specified are correct and 20313that the @code{CVSROOT} specified is allowed by @samp{--allow-root} 20314in @file{inetd.conf}. See @ref{Autentica��o por senha}. 20315 20316@item cvs @var{command}: conflict: removed @var{file} was modified by second party 20317This message indicates that you removed a file, and 20318someone else modified it. To resolve the conflict, 20319first run @samp{cvs add @var{file}}. If desired, look 20320at the other party's modification to decide whether you 20321still want to remove it. If you don't want to remove 20322it, stop here. If you do want to remove it, proceed 20323with @samp{cvs remove @var{file}} and commit your 20324removal. 20325@c Tests conflicts2-142b* in sanity.sh test for this. 20326 20327@item cannot change permissions on temporary directory 20328@example 20329Operation not permitted 20330@end example 20331This message has been happening in a non-reproducible, 20332occasional way when we run the client/server testsuite, 20333both on Red Hat Linux 3.0.3 and 4.1. We haven't been 20334able to figure out what causes it, nor is it known 20335whether it is specific to linux (or even to this 20336particular machine!). If the problem does occur on 20337other unices, @samp{Operation not permitted} would be 20338likely to read @samp{Not owner} or whatever the system 20339in question uses for the unix @code{EPERM} error. If 20340you have any information to add, please let us know as 20341described in @ref{Paus}. If you experience this error 20342while using @sc{cvs}, retrying the operation which 20343produced it should work fine. 20344@c This has been seen in a variety of tests, including 20345@c multibranch-2, multibranch-5, and basic1-24-rm-rm, 20346@c so it doesn't seem particularly specific to any one 20347@c test. 20348 20349@c <en>@item cvs [server aborted]: Cannot check out files into the repository itself 20350@item cvs [server aborted]: Cannot check out files into the repository itself 20351@c <en>The obvious cause for this message (especially for 20352@c <en>non-client/server @sc{cvs}) is that the @sc{cvs} root 20353@c <en>is, for example, @file{/usr/local/cvsroot} and you try 20354@c <en>to check out files when you are in a subdirectory, such 20355@c <en>as @file{/usr/local/cvsroot/test}. However, there is a 20356@c <en>more subtle cause, which is that the temporary 20357@c <en>directory on the server is set to a subdirectory of the 20358@c <en>root (which is also not allowed). If this is the 20359@c <en>problem, set the temporary directory to somewhere else, 20360@c <en>for example @file{/var/tmp}; see @code{TMPDIR} in 20361@c <en>@ref{Environment variables}, for how to set the 20362@c <en>temporary directory. 20363The obvious cause for this message (especially for 20364non-client/server @sc{cvs}) is that the @sc{cvs} root 20365is, for example, @file{/usr/local/cvsroot} and you try 20366to check out files when you are in a subdirectory, such 20367as @file{/usr/local/cvsroot/test}. However, there is a 20368more subtle cause, which is that the temporary 20369directory on the server is set to a subdirectory of the 20370root (which is also not allowed). If this is the 20371problem, set the temporary directory to somewhere else, 20372for example @file{/var/tmp}; see @code{TMPDIR} in 20373@ref{Vari�veis de ambiente}, for how to set the 20374temporary directory. 20375 20376@item cannot commit files as 'root' 20377See @samp{'root' is not allowed to commit files}. 20378 20379@c For one example see basica-1a10 in the testsuite 20380@c For another example, "cvs co ." on NT; see comment 20381@c at windows-NT/filesubr.c (expand_wild). 20382@c For another example, "cvs co foo/bar" where foo exists. 20383@c <en>@item cannot open CVS/Entries for reading: No such file or directory 20384@item cannot open CVS/Entries for reading: No such file or directory 20385@c <en>This generally indicates a @sc{cvs} internal error, and 20386@c <en>can be handled as with other @sc{cvs} bugs 20387@c <en>(@pxref{BUGS}). Usually there is a workaround---the 20388@c <en>exact nature of which would depend on the situation but 20389@c <en>which hopefully could be figured out. 20390This generally indicates a @sc{cvs} internal error, and 20391can be handled as with other @sc{cvs} bugs 20392(@pxref{Paus}). Usually there is a workaround---the 20393exact nature of which would depend on the situation but 20394which hopefully could be figured out. 20395 20396@c This is more obscure than it might sound; it only 20397@c happens if you run "cvs init" from a directory which 20398@c contains a CVS/Root file at the start. 20399@item cvs [init aborted]: cannot open CVS/Root: No such file or directory 20400This message is harmless. Provided it is not 20401accompanied by other errors, the operation has 20402completed successfully. This message should not occur 20403with current versions of @sc{cvs}, but it is documented 20404here for the benefit of @sc{cvs} 1.9 and older. 20405 20406@c <en>@item cvs server: cannot open /root/.cvsignore: Permission denied 20407@item cvs server: cannot open /root/.cvsignore: Permission denied 20408@c <en>@itemx cvs [server aborted]: can't chdir(/root): Permission denied 20409@itemx cvs [server aborted]: can't chdir(/root): Permission denied 20410@c <en>See @ref{Connection}. 20411See @ref{Conex�o}. 20412 20413@c <en>@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument 20414@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument 20415@c <en>This message has been reported as intermittently 20416@c <en>happening with @sc{cvs} 1.9 on Solaris 2.5. The cause is 20417@c <en>unknown; if you know more about what causes it, let us 20418@c <en>know as described in @ref{BUGS}. 20419This message has been reported as intermittently 20420happening with @sc{cvs} 1.9 on Solaris 2.5. The cause is 20421unknown; if you know more about what causes it, let us 20422know as described in @ref{Paus}. 20423 20424@c <en>@item cvs [@var{command} aborted]: cannot start server via rcmd 20425@item cvs [@var{command} aborted]: cannot start server via rcmd 20426@c <en>This, unfortunately, is a rather nonspecific error 20427@c <en>message which @sc{cvs} 1.9 will print if you are 20428@c <en>running the @sc{cvs} client and it is having trouble 20429@c <en>connecting to the server. Current versions of @sc{cvs} 20430@c <en>should print a much more specific error message. If 20431@c <en>you get this message when you didn't mean to run the 20432@c <en>client at all, you probably forgot to specify 20433@c <en>@code{:local:}, as described in @ref{Repository}. 20434This, unfortunately, is a rather nonspecific error 20435message which @sc{cvs} 1.9 will print if you are 20436running the @sc{cvs} client and it is having trouble 20437connecting to the server. Current versions of @sc{cvs} 20438should print a much more specific error message. If 20439you get this message when you didn't mean to run the 20440client at all, you probably forgot to specify 20441@code{:local:}, as described in @ref{Reposit�rio}. 20442 20443@item ci: @var{file},v: bad diff output line: Binary files - and /tmp/T2a22651 differ 20444@sc{cvs} 1.9 and older will print this message 20445when trying to check in a binary file if 20446@sc{rcs} is not correctly installed. Re-read the 20447instructions that came with your @sc{rcs} distribution 20448and the @sc{install} file in the @sc{cvs} 20449distribution. Alternately, upgrade to a current 20450version of @sc{cvs}, which checks in files itself 20451rather than via @sc{rcs}. 20452 20453@c <en>@item cvs checkout: could not check out @var{file} 20454@item cvs checkout: could not check out @var{file} 20455@c <en>With @sc{cvs} 1.9, this can mean that the @code{co} program 20456@c <en>(part of @sc{rcs}) returned a failure. It should be 20457@c <en>preceded by another error message, however it has been 20458@c <en>observed without another error message and the cause is 20459@c <en>not well-understood. With the current version of @sc{cvs}, 20460@c <en>which does not run @code{co}, if this message occurs 20461@c <en>without another error message, it is definitely a @sc{cvs} 20462@c <en>bug (@pxref{BUGS}). 20463With @sc{cvs} 1.9, this can mean that the @code{co} program 20464(part of @sc{rcs}) returned a failure. It should be 20465preceded by another error message, however it has been 20466observed without another error message and the cause is 20467not well-understood. With the current version of @sc{cvs}, 20468which does not run @code{co}, if this message occurs 20469without another error message, it is definitely a @sc{cvs} 20470bug (@pxref{Paus}). 20471@c My current suspicion is that the RCS in the rcs (not 20472@c cvs/winnt/rcs57nt.zip) directory on the _Practical_ 20473@c CD is bad (remains to be confirmed). 20474@c There is also a report of something which looks 20475@c very similar on SGI, Irix 5.2, so I dunno. 20476 20477@c <en>@item cvs [login aborted]: could not find out home directory 20478@item cvs [login aborted]: could not find out home directory 20479@c <en>This means that you need to set the environment 20480@c <en>variables that @sc{cvs} uses to locate your home directory. 20481@c <en>See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in 20482@c <en>@ref{Environment variables}. 20483This means that you need to set the environment 20484variables that @sc{cvs} uses to locate your home directory. 20485See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in 20486@ref{Vari�veis de ambiente}. 20487 20488@item cvs update: could not merge revision @var{rev} of @var{file}: No such file or directory 20489@sc{cvs} 1.9 and older will print this message if there was 20490a problem finding the @code{rcsmerge} program. Make 20491sure that it is in your @code{PATH}, or upgrade to a 20492current version of @sc{cvs}, which does not require 20493an external @code{rcsmerge} program. 20494 20495@item cvs [update aborted]: could not patch @var{file}: No such file or directory 20496This means that there was a problem finding the 20497@code{patch} program. Make sure that it is in your 20498@code{PATH}. Note that despite appearances the message 20499is @emph{not} referring to whether it can find @var{file}. 20500If both the client and the server are running a current 20501version of @sc{cvs}, then there is no need for an 20502external patch program and you should not see this 20503message. But if either client or server is running 20504@sc{cvs} 1.9, then you need @code{patch}. 20505 20506@item cvs update: could not patch @var{file}; will refetch 20507This means that for whatever reason the client was 20508unable to apply a patch that the server sent. The 20509message is nothing to be concerned about, because 20510inability to apply the patch only slows things down and 20511has no effect on what @sc{cvs} does. 20512@c xref to update output. Or File status? 20513@c Or some place else that 20514@c explains this whole "patch"/P/Needs Patch thing? 20515 20516@c <en>@item dying gasps from @var{server} unexpected 20517@item dying gasps from @var{server} unexpected 20518@c <en>There is a known bug in the server for @sc{cvs} 1.9.18 20519@c <en>and older which can cause this. For me, this was 20520@c <en>reproducible if I used the @samp{-t} global option. It 20521@c <en>was fixed by Andy Piper's 14 Nov 1997 change to 20522@c <en>src/filesubr.c, if anyone is curious. 20523@c <en>If you see the message, 20524@c <en>you probably can just retry the operation which failed, 20525@c <en>or if you have discovered information concerning its 20526@c <en>cause, please let us know as described in @ref{BUGS}. 20527There is a known bug in the server for @sc{cvs} 1.9.18 20528and older which can cause this. For me, this was 20529reproducible if I used the @samp{-t} global option. It 20530was fixed by Andy Piper's 14 Nov 1997 change to 20531src/filesubr.c, if anyone is curious. 20532If you see the message, 20533you probably can just retry the operation which failed, 20534or if you have discovered information concerning its 20535cause, please let us know as described in @ref{Paus}. 20536 20537@c <en>@item end of file from server (consult above messages if any) 20538@item end of file from server (consult above messages if any) 20539@c <en>The most common cause for this message is if you are 20540@c <en>using an external @code{rsh} program and it exited with 20541@c <en>an error. In this case the @code{rsh} program should 20542@c <en>have printed a message, which will appear before the 20543@c <en>above message. For more information on setting up a 20544@c <en>@sc{cvs} client and server, see @ref{Remote repositories}. 20545The most common cause for this message is if you are 20546using an external @code{rsh} program and it exited with 20547an error. In this case the @code{rsh} program should 20548have printed a message, which will appear before the 20549above message. For more information on setting up a 20550@sc{cvs} client and server, see @ref{Reposit�rios remotos}. 20551 20552@c <en>@item cvs [update aborted]: EOF in key in RCS file @var{file},v 20553@item cvs [update aborted]: EOF in key in RCS file @var{file},v 20554@c <en>@itemx cvs [checkout aborted]: EOF while looking for end of string in RCS file @var{file},v 20555@itemx cvs [checkout aborted]: EOF while looking for end of string in RCS file @var{file},v 20556@c <en>This means that there is a syntax error in the given 20557@c <en>@sc{rcs} file. Note that this might be true even if @sc{rcs} can 20558@c <en>read the file OK; @sc{cvs} does more error checking of 20559@c <en>errors in the RCS file. That is why you may see this 20560@c <en>message when upgrading from @sc{cvs} 1.9 to @sc{cvs} 20561@c <en>1.10. The likely cause for the original corruption is 20562@c <en>hardware, the operating system, or the like. Of 20563@c <en>course, if you find a case in which @sc{cvs} seems to 20564@c <en>corrupting the file, by all means report it, 20565@c <en>(@pxref{BUGS}). 20566@c <en>There are quite a few variations of this error message, 20567@c <en>depending on exactly where in the @sc{rcs} file @sc{cvs} 20568@c <en>finds the syntax error. 20569This means that there is a syntax error in the given 20570@sc{rcs} file. Note that this might be true even if @sc{rcs} can 20571read the file OK; @sc{cvs} does more error checking of 20572errors in the RCS file. That is why you may see this 20573message when upgrading from @sc{cvs} 1.9 to @sc{cvs} 205741.10. The likely cause for the original corruption is 20575hardware, the operating system, or the like. Of 20576course, if you find a case in which @sc{cvs} seems to 20577corrupting the file, by all means report it, 20578(@pxref{Paus}). 20579There are quite a few variations of this error message, 20580depending on exactly where in the @sc{rcs} file @sc{cvs} 20581finds the syntax error. 20582 20583@cindex mkmodules 20584@item cvs commit: Executing 'mkmodules' 20585This means that your repository is set up for a version 20586of @sc{cvs} prior to @sc{cvs} 1.8. When using @sc{cvs} 205871.8 or later, the above message will be preceded by 20588 20589@example 20590cvs commit: Rebuilding administrative file database 20591@end example 20592 20593If you see both messages, the database is being rebuilt 20594twice, which is unnecessary but harmless. If you wish 20595to avoid the duplication, and you have no versions of 20596@sc{cvs} 1.7 or earlier in use, remove @code{-i mkmodules} 20597every place it appears in your @code{modules} 20598file. For more information on the @code{modules} file, 20599see @ref{modules}. 20600 20601@c This message comes from "co", and I believe is 20602@c possible only with older versions of CVS which call 20603@c co. The problem with being able to create the bogus 20604@c RCS file still exists, though (and I think maybe 20605@c there is a different symptom(s) now). 20606@c FIXME: Would be nice to have a more exact wording 20607@c for this message. 20608@item missing author 20609Typically this can happen if you created an RCS file 20610with your username set to empty. @sc{cvs} will, bogusly, 20611create an illegal RCS file with no value for the author 20612field. The solution is to make sure your username is 20613set to a non-empty value and re-create the RCS file. 20614@c "make sure your username is set" is complicated in 20615@c and of itself, as there are the environment 20616@c variables the system login name, &c, and it depends 20617@c on the version of CVS. 20618 20619@c <en>@item cvs [checkout aborted]: no such tag @var{tag} 20620@item cvs [checkout aborted]: no such tag @var{tag} 20621@c <en>This message means that @sc{cvs} isn't familiar with 20622@c <en>the tag @var{tag}. Usually this means that you have 20623@c <en>mistyped a tag name; however there are (relatively 20624@c <en>obscure) cases in which @sc{cvs} will require you to 20625@c <en>@c Search sanity.sh for "no such tag" to see some of 20626@c <en>@c the relatively obscure cases. 20627@c <en>try a few other @sc{cvs} commands involving that tag, 20628@c <en>before you find one which will cause @sc{cvs} to update 20629This message means that @sc{cvs} isn't familiar with 20630the tag @var{tag}. Usually this means that you have 20631mistyped a tag name; however there are (relatively 20632obscure) cases in which @sc{cvs} will require you to 20633@c Search sanity.sh for "no such tag" to see some of 20634@c the relatively obscure cases. 20635try a few other @sc{cvs} commands involving that tag, 20636before you find one which will cause @sc{cvs} to update 20637@c <en>@cindex CVSROOT/val-tags file, forcing tags into 20638@cindex CVSROOT/val-tags file, forcing tags into 20639@c <en>@cindex val-tags file, forcing tags into 20640@cindex val-tags file, forcing tags into 20641@c <en>the @file{val-tags} file; see discussion of val-tags in 20642@c <en>@ref{File permissions}. You only need to worry about 20643@c <en>this once for a given tag; when a tag is listed in 20644@c <en>@file{val-tags}, it stays there. Note that using 20645@c <en>@samp{-f} to not require tag matches does not override 20646@c <en>this check; see @ref{Common options}. 20647the @file{val-tags} file; see discussion of val-tags in 20648@ref{Permiss�es de arquivos}. You only need to worry about 20649this once for a given tag; when a tag is listed in 20650@file{val-tags}, it stays there. Note that using 20651@samp{-f} to not require tag matches does not override 20652this check; see @ref{Op��es comuns}. 20653 20654@c <en>@item *PANIC* administration files missing 20655@item *PANIC* administration files missing 20656@c <en>This typically means that there is a directory named 20657@c <en>@sc{cvs} but it does not contain the administrative files 20658@c <en>which @sc{cvs} puts in a CVS directory. If the problem is 20659@c <en>that you created a CVS directory via some mechanism 20660@c <en>other than @sc{cvs}, then the answer is simple, use a name 20661@c <en>other than @sc{cvs}. If not, it indicates a @sc{cvs} bug 20662@c <en>(@pxref{BUGS}). 20663This typically means that there is a directory named 20664@sc{cvs} but it does not contain the administrative files 20665which @sc{cvs} puts in a CVS directory. If the problem is 20666that you created a CVS directory via some mechanism 20667other than @sc{cvs}, then the answer is simple, use a name 20668other than @sc{cvs}. If not, it indicates a @sc{cvs} bug 20669(@pxref{Paus}). 20670 20671@item rcs error: Unknown option: -x,v/ 20672This message will be followed by a usage message for 20673@sc{rcs}. It means that you have an old version of 20674@sc{rcs} (probably supplied with your operating 20675system), as well as an old version of @sc{cvs}. 20676@sc{cvs} 1.9.18 and earlier only work with @sc{rcs} version 5 and 20677later; current versions of @sc{cvs} do not run @sc{rcs} programs. 20678@c For more information on installing @sc{cvs}, see 20679@c (FIXME: where? it depends on whether you are 20680@c getting binaries or sources or what). 20681@c The message can also say "ci error" or something 20682@c instead of "rcs error", I suspect. 20683 20684@c <en>@item cvs [server aborted]: received broken pipe signal 20685@item cvs [server aborted]: received broken pipe signal 20686@c <en>This message seems to be caused by a hard-to-track-down 20687@c <en>bug in @sc{cvs} or the systems it runs on (we don't 20688@c <en>know---we haven't tracked it down yet!). It seems to 20689@c <en>happen only after a @sc{cvs} command has completed, and 20690@c <en>you should be able to just ignore the message. 20691@c <en>However, if you have discovered information concerning its 20692@c <en>cause, please let us know as described in @ref{BUGS}. 20693This message seems to be caused by a hard-to-track-down 20694bug in @sc{cvs} or the systems it runs on (we don't 20695know---we haven't tracked it down yet!). It seems to 20696happen only after a @sc{cvs} command has completed, and 20697you should be able to just ignore the message. 20698However, if you have discovered information concerning its 20699cause, please let us know as described in @ref{Paus}. 20700 20701@item 'root' is not allowed to commit files 20702When committing a permanent change, @sc{cvs} makes a log entry of 20703who committed the change. If you are committing the change logged 20704in as "root" (not under "su" or other root-priv giving program), 20705@sc{cvs} cannot determine who is actually making the change. 20706As such, by default, @sc{cvs} disallows changes to be committed by users 20707logged in as "root". (You can disable this option by passing the 20708@code{--enable-rootcommit} option to @file{configure} and recompiling @sc{cvs}. 20709On some systems this means editing the appropriate @file{config.h} file 20710before building @sc{cvs}.) 20711 20712@item Too many arguments! 20713This message is typically printed by the @file{log.pl} 20714script which is in the @file{contrib} directory in the 20715@sc{cvs} source distribution. In some versions of 20716@sc{cvs}, @file{log.pl} has been part of the default 20717@sc{cvs} installation. The @file{log.pl} script gets 20718called from the @file{loginfo} administrative file. 20719Check that the arguments passed in @file{loginfo} match 20720what your version of @file{log.pl} expects. In 20721particular, the @file{log.pl} from @sc{cvs} 1.3 and 20722older expects the logfile as an argument whereas the 20723@file{log.pl} from @sc{cvs} 1.5 and newer expects the 20724logfile to be specified with a @samp{-f} option. Of 20725course, if you don't need @file{log.pl} you can just 20726comment it out of @file{loginfo}. 20727 20728@item cvs [update aborted]: unexpected EOF reading @var{file},v 20729See @samp{EOF in key in RCS file}. 20730 20731@c <en>@item cvs [login aborted]: unrecognized auth response from @var{server} 20732@item cvs [login aborted]: unrecognized auth response from @var{server} 20733@c <en>This message typically means that the server is not set 20734@c <en>up properly. For example, if @file{inetd.conf} points 20735@c <en>to a nonexistent cvs executable. To debug it further, 20736@c <en>find the log file which inetd writes 20737@c <en>(@file{/var/log/messages} or whatever inetd uses on 20738@c <en>your system). For details, see @ref{Connection}, and 20739@c <en>@ref{Password authentication server}. 20740This message typically means that the server is not set 20741up properly. For example, if @file{inetd.conf} points 20742to a nonexistent cvs executable. To debug it further, 20743find the log file which inetd writes 20744(@file{/var/log/messages} or whatever inetd uses on 20745your system). For details, see @ref{Conex�o}, and 20746@ref{Servidor de autentica��o por senha}. 20747 20748@c <en>@item cvs commit: Up-to-date check failed for `@var{file}' 20749@item cvs commit: Up-to-date check failed for `@var{file}' 20750@c <en>This means that someone else has committed a change to 20751@c <en>that file since the last time that you did a @code{cvs 20752@c <en>update}. So before proceeding with your @code{cvs 20753@c <en>commit} you need to @code{cvs update}. @sc{cvs} will merge 20754@c <en>the changes that you made and the changes that the 20755@c <en>other person made. If it does not detect any conflicts 20756@c <en>it will report @samp{M @var{file}} and you are ready 20757@c <en>to @code{cvs commit}. If it detects conflicts it will 20758@c <en>print a message saying so, will report @samp{C @var{file}}, 20759@c <en>and you need to manually resolve the 20760@c <en>conflict. For more details on this process see 20761@c <en>@ref{Conflicts example}. 20762This means that someone else has committed a change to 20763that file since the last time that you did a @code{cvs 20764update}. So before proceeding with your @code{cvs 20765commit} you need to @code{cvs update}. @sc{cvs} will merge 20766the changes that you made and the changes that the 20767other person made. If it does not detect any conflicts 20768it will report @samp{M @var{file}} and you are ready 20769to @code{cvs commit}. If it detects conflicts it will 20770print a message saying so, will report @samp{C @var{file}}, 20771and you need to manually resolve the 20772conflict. For more details on this process see 20773@ref{Exemplo de conflitos}. 20774 20775@item Usage: diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 file2 file3 20776@example 20777Only one of [exEX3] allowed 20778@end example 20779This indicates a problem with the installation of 20780@code{diff3} and @code{rcsmerge}. Specifically 20781@code{rcsmerge} was compiled to look for GNU diff3, but 20782it is finding unix diff3 instead. The exact text of 20783the message will vary depending on the system. The 20784simplest solution is to upgrade to a current version of 20785@sc{cvs}, which does not rely on external 20786@code{rcsmerge} or @code{diff3} programs. 20787 20788@item warning: unrecognized response `@var{text}' from cvs server 20789If @var{text} contains a valid response (such as 20790@samp{ok}) followed by an extra carriage return 20791character (on many systems this will cause the second 20792part of the message to overwrite the first part), then 20793it probably means that you are using the @samp{:ext:} 20794access method with a version of rsh, such as most 20795non-unix rsh versions, which does not by default 20796provide a transparent data stream. In such cases you 20797probably want to try @samp{:server:} instead of 20798@samp{:ext:}. If @var{text} is something else, this 20799may signify a problem with your @sc{cvs} server. 20800Double-check your installation against the instructions 20801for setting up the @sc{cvs} server. 20802@c FIXCVS: should be printing CR as \r or \015 or some 20803@c such, probably. 20804 20805@c <en>@item cvs commit: [@var{time}] waiting for @var{user}'s lock in @var{directory} 20806@item cvs commit: [@var{time}] waiting for @var{user}'s lock in @var{directory} 20807@c <en>This is a normal message, not an error. See 20808@c <en>@ref{Concurrency}, for more details. 20809This is a normal message, not an error. See 20810@ref{Concorr�ncia}, for more details. 20811 20812@item cvs commit: warning: editor session failed 20813@cindex Exit status, of editor 20814This means that the editor which @sc{cvs} is using exits with a nonzero 20815exit status. Some versions of vi will do this even when there was not 20816a problem editing the file. If so, point the 20817@code{CVSEDITOR} environment variable to a small script 20818such as: 20819 20820@example 20821#!/bin/sh 20822vi $* 20823exit 0 20824@end example 20825 20826@c "warning: foo was lost" and "no longer pertinent" (both normal). 20827@c Would be nice to write these up--they are 20828@c potentially confusing for the new user. 20829@end table 20830 20831@c <en>@node Connection 20832@node Conex�o 20833@c <en>@appendixsec Trouble making a connection to a CVS server 20834@appendixsec Trouble making a connection to a CVS server 20835 20836This section concerns what to do if you are having 20837trouble making a connection to a @sc{cvs} server. If 20838you are running the @sc{cvs} command line client 20839running on Windows, first upgrade the client to 20840@sc{cvs} 1.9.12 or later. The error reporting in 20841earlier versions provided much less information about 20842what the problem was. If the client is non-Windows, 20843@sc{cvs} 1.9 should be fine. 20844 20845If the error messages are not sufficient to track down 20846the problem, the next steps depend largely on which 20847access method you are using. 20848 20849@table @code 20850@cindex :ext:, troubleshooting 20851@item :ext: 20852Try running the rsh program from the command line. For 20853example: "rsh servername cvs -v" should print @sc{cvs} 20854version information. If this doesn't work, you need to 20855fix it before you can worry about @sc{cvs} problems. 20856 20857@cindex :server:, troubleshooting 20858@item :server: 20859You don't need a command line rsh program to use this 20860access method, but if you have an rsh program around, 20861it may be useful as a debugging tool. Follow the 20862directions given for :ext:. 20863 20864@cindex :pserver:, troubleshooting 20865@item :pserver: 20866Errors along the lines of "connection refused" typically indicate 20867that inetd isn't even listening for connections on port 2401 20868whereas errors like "connection reset by peer", 20869"received broken pipe signal", "recv() from server: EOF", 20870or "end of file from server" 20871typically indicate that inetd is listening for 20872connections but is unable to start @sc{cvs} (this is frequently 20873caused by having an incorrect path in @file{inetd.conf} 20874or by firewall software rejecting the connection). 20875"unrecognized auth response" errors are caused by a bad command 20876line in @file{inetd.conf}, typically an invalid option or forgetting 20877to put the @samp{pserver} command at the end of the line. 20878Another less common problem is invisible control characters that 20879your editor "helpfully" added without you noticing. 20880 20881One good debugging tool is to "telnet servername 208822401". After connecting, send any text (for example 20883"foo" followed by return). If @sc{cvs} is working 20884correctly, it will respond with 20885 20886@example 20887cvs [pserver aborted]: bad auth protocol start: foo 20888@end example 20889 20890If instead you get: 20891 20892@example 20893Usage: cvs [cvs-options] command [command-options-and-arguments] 20894... 20895@end example 20896 20897@noindent 20898then you're missing the @samp{pserver} command at the end of the 20899line in @file{inetd.conf}; check to make sure that the entire command 20900is on one line and that it's complete. 20901 20902Likewise, if you get something like: 20903 20904@example 20905Unknown command: `pserved' 20906 20907CVS commands are: 20908 add Add a new file/directory to the repository 20909... 20910@end example 20911 20912@noindent 20913then you've misspelled @samp{pserver} in some way. If it isn't 20914obvious, check for invisible control characters (particularly 20915carriage returns) in @file{inetd.conf}. 20916 20917If it fails to work at all, then make sure inetd is working 20918right. Change the invocation in @file{inetd.conf} to run the 20919echo program instead of cvs. For example: 20920 20921@example 209222401 stream tcp nowait root /bin/echo echo hello 20923@end example 20924 20925After making that change and instructing inetd to 20926re-read its configuration file, "telnet servername 209272401" should show you the text hello and then the 20928server should close the connection. If this doesn't 20929work, you need to fix it before you can worry about 20930@sc{cvs} problems. 20931 20932On AIX systems, the system will often have its own 20933program trying to use port 2401. This is AIX's problem 20934in the sense that port 2401 is registered for use with 20935@sc{cvs}. I hear that there is an AIX patch available 20936to address this problem. 20937 20938Another good debugging tool is the @samp{-d} 20939(debugging) option to inetd. Consult your system 20940documentation for more information. 20941 20942If you seem to be connecting but get errors like: 20943 20944@example 20945cvs server: cannot open /root/.cvsignore: Permission denied 20946cvs [server aborted]: can't chdir(/root): Permission denied 20947@end example 20948 20949@noindent 20950then you probably haven't specified @samp{-f} in @file{inetd.conf}. 20951(In releases prior to @sc{cvs} 1.11.1, this problem can be caused by 20952your system setting the @code{$HOME} environment variable 20953for programs being run by inetd. In this case, you can either 20954have inetd run a shell script that unsets @code{$HOME} and then runs 20955@sc{cvs}, or you can use @code{env} to run @sc{cvs} with a pristine 20956environment.) 20957 20958If you can connect successfully for a while but then can't, 20959you've probably hit inetd's rate limit. 20960(If inetd receives too many requests for the same service 20961in a short period of time, it assumes that something is wrong 20962and temporarily disables the service.) 20963Check your inetd documentation to find out how to adjust the 20964rate limit (some versions of inetd have a single rate limit, 20965others allow you to set the limit for each service separately.) 20966@end table 20967 20968@c <en>@node Other problems 20969@node Outros problemas 20970@c <en>@appendixsec Other common problems 20971@appendixsec Other common problems 20972 20973Here is a list of problems which do not fit into the 20974above categories. They are in no particular order. 20975 20976@itemize @bullet 20977@item 20978@c <en>On Windows, if there is a 30 second or so delay when 20979@c <en>you run a @sc{cvs} command, it may mean that you have 20980@c <en>your home directory set to @file{C:/}, for example (see 20981@c <en>@code{HOMEDRIVE} and @code{HOMEPATH} in 20982@c <en>@ref{Environment variables}). @sc{cvs} expects the home 20983@c <en>directory to not end in a slash, for example @file{C:} 20984@c <en>or @file{C:\cvs}. 20985On Windows, if there is a 30 second or so delay when 20986you run a @sc{cvs} command, it may mean that you have 20987your home directory set to @file{C:/}, for example (see 20988@code{HOMEDRIVE} and @code{HOMEPATH} in 20989@ref{Vari�veis de ambiente}). @sc{cvs} expects the home 20990directory to not end in a slash, for example @file{C:} 20991or @file{C:\cvs}. 20992@c FIXCVS: CVS should at least detect this and print an 20993@c error, presumably. 20994 20995@item 20996@c <en>If you are running @sc{cvs} 1.9.18 or older, and 20997@c <en>@code{cvs update} finds a conflict and tries to 20998@c <en>merge, as described in @ref{Conflicts example}, but 20999@c <en>doesn't tell you there were conflicts, then you may 21000@c <en>have an old version of @sc{rcs}. The easiest solution 21001@c <en>probably is to upgrade to a current version of 21002@c <en>@sc{cvs}, which does not rely on external @sc{rcs} 21003@c <en>programs. 21004If you are running @sc{cvs} 1.9.18 or older, and 21005@code{cvs update} finds a conflict and tries to 21006merge, as described in @ref{Exemplo de conflitos}, but 21007doesn't tell you there were conflicts, then you may 21008have an old version of @sc{rcs}. The easiest solution 21009probably is to upgrade to a current version of 21010@sc{cvs}, which does not rely on external @sc{rcs} 21011programs. 21012@end itemize 21013 21014@c --------------------------------------------------------------------- 21015@c <en>@node Credits 21016@node Cr�ditos 21017@c <en>@appendix Credits 21018@appendix Cr�ditos 21019 21020@cindex Contributors (manual) 21021@cindex Credits (manual) 21022Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}> 21023wrote the manual pages which were distributed with 21024@sc{cvs} 1.3. Much of their text was copied into this 21025manual. He also read an early draft 21026of this manual and contributed many ideas and 21027corrections. 21028 21029The mailing-list @code{info-cvs} is sometimes 21030informative. I have included information from postings 21031made by the following persons: 21032David G. Grubbs <@t{dgg@@think.com}>. 21033 21034Some text has been extracted from the man pages for 21035@sc{rcs}. 21036 21037The @sc{cvs} @sc{faq} by David G. Grubbs has provided 21038useful material. The @sc{faq} is no longer maintained, 21039however, and this manual is about the closest thing there 21040is to a successor (with respect to documenting how to 21041use @sc{cvs}, at least). 21042 21043In addition, the following persons have helped by 21044telling me about mistakes I've made: 21045 21046@display 21047Roxanne Brunskill <@t{rbrunski@@datap.ca}>, 21048Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>, 21049Karl Pingle <@t{pingle@@acuson.com}>, 21050Thomas A Peterson <@t{tap@@src.honeywell.com}>, 21051Inge Wallin <@t{ingwa@@signum.se}>, 21052Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}> 21053and Michael Brown <@t{brown@@wi.extrel.com}>. 21054@end display 21055 21056The list of contributors here is not comprehensive; for a more 21057complete list of who has contributed to this manual see 21058the file @file{doc/ChangeLog} in the @sc{cvs} source 21059distribution. 21060 21061@c --------------------------------------------------------------------- 21062@c <en>@node BUGS 21063@node Paus 21064@c <en>@appendix Dealing with bugs in CVS or this manual 21065@appendix Dealing with bugs in CVS or this manual 21066 21067@cindex Bugs in this manual or CVS 21068Neither @sc{cvs} nor this manual is perfect, and they 21069probably never will be. If you are having trouble 21070using @sc{cvs}, or think you have found a bug, there 21071are a number of things you can do about it. Note that 21072if the manual is unclear, that can be considered a bug 21073in the manual, so these problems are often worth doing 21074something about as well as problems with @sc{cvs} itself. 21075 21076@cindex Reporting bugs 21077@cindex Bugs, reporting 21078@cindex Errors, reporting 21079@itemize @bullet 21080@item 21081If you want someone to help you and fix bugs that you 21082report, there are companies which will do that for a 21083fee. One such company is: 21084 21085@cindex Ximbiot 21086@cindex Support, getting CVS support 21087@example 21088Ximbiot 21089319 S. River St. 21090Harrisburg, PA 17104-1657 21091USA 21092Email: info@@ximbiot.com 21093Phone: (717) 579-6168 21094Fax: (717) 234-3125 21095@url{http://ximbiot.com/} 21096 21097@end example 21098 21099@item 21100If you got @sc{cvs} through a distributor, such as an 21101operating system vendor or a vendor of freeware 21102@sc{cd-rom}s, you may wish to see whether the 21103distributor provides support. Often, they will provide 21104no support or minimal support, but this may vary from 21105distributor to distributor. 21106 21107@item 21108If you have the skills and time to do so, you may wish 21109to fix the bug yourself. If you wish to submit your 21110fix for inclusion in future releases of @sc{cvs}, see 21111the file @sc{hacking} in the @sc{cvs} source 21112distribution. It contains much more information on the 21113process of submitting fixes. 21114 21115@item 21116There may be resources on the net which can help. Two 21117good places to start are: 21118 21119@example 21120@url{http://cvs.nongnu.org/} 21121@end example 21122 21123If you are so inspired, increasing the information 21124available on the net is likely to be appreciated. For 21125example, before the standard @sc{cvs} distribution 21126worked on Windows 95, there was a web page with some 21127explanation and patches for running @sc{cvs} on Windows 2112895, and various people helped out by mentioning this 21129page on mailing lists or newsgroups when the subject 21130came up. 21131 21132@item 21133It is also possible to report bugs to @email{bug-cvs@@nongnu.org}. 21134Note that someone may or may not want to do anything 21135with your bug report---if you need a solution consider 21136one of the options mentioned above. People probably do 21137want to hear about bugs which are particularly severe 21138in consequences and/or easy to fix, however. You can 21139also increase your odds by being as clear as possible 21140about the exact nature of the bug and any other 21141relevant information. The way to report bugs is to 21142send email to @email{bug-cvs@@nongnu.org}. Note 21143that submissions to @email{bug-cvs@@nongnu.org} may be distributed 21144under the terms of the @sc{gnu} Public License, so if 21145you don't like this, don't submit them. There is 21146usually no justification for sending mail directly to 21147one of the @sc{cvs} maintainers rather than to 21148@email{bug-cvs@@nongnu.org}; those maintainers who want to hear 21149about such bug reports read @email{bug-cvs@@nongnu.org}. Also note 21150that sending a bug report to other mailing lists or 21151newsgroups is @emph{not} a substitute for sending it to 21152@email{bug-cvs@@nongnu.org}. It is fine to discuss @sc{cvs} bugs on 21153whatever forum you prefer, but there are not 21154necessarily any maintainers reading bug reports sent 21155anywhere except @email{bug-cvs@@nongnu.org}. 21156@end itemize 21157 21158@cindex Known bugs in this manual or CVS 21159People often ask if there is a list of known bugs or 21160whether a particular bug is a known one. The file 21161@sc{bugs} in the @sc{cvs} source distribution is one 21162list of known bugs, but it doesn't necessarily try to 21163be comprehensive. Perhaps there will never be a 21164comprehensive, detailed list of known bugs. 21165 21166@c --------------------------------------------------------------------- 21167@c <en>@node Index 21168@node Indice 21169@c <en>@unnumbered Index 21170@unnumbered �ndice 21171@c <en>@cindex Index 21172@cindex �ndice 21173 21174@printindex cp 21175 21176@summarycontents 21177 21178@contents 21179 21180@bye 21181 21182Local Variables: 21183fill-column: 55 21184End: 21185