Mercurial > hgbook
comparison es/collab.tex @ 511:a9ea523446cc
Started translating collab chapter to spanish
author | Igor TAmara <igor@tamarapatino.org> |
---|---|
date | Mon, 10 Nov 2008 23:38:36 -0500 |
parents | b05e35d641e4 |
children | c7234c5d01b2 |
comparison
equal
deleted
inserted
replaced
508:04ba1c7785ae | 511:a9ea523446cc |
---|---|
1 \chapter{Collaborating with other people} | 1 \chapter{Colaborar con otros} |
2 \label{cha:collab} | 2 \label{cha:collab} |
3 | 3 |
4 As a completely decentralised tool, Mercurial doesn't impose any | 4 Debido a su naturaleza descentralizada, Mercurial no impone política |
5 policy on how people ought to work with each other. However, if | 5 alguna de cómo deben trabajar los grupos de personas. Sin embargo, si |
6 you're new to distributed revision control, it helps to have some | 6 usted es nuvo al control distribuido de versiones, es bueno tener |
7 tools and examples in mind when you're thinking about possible | 7 herramientas y ejemplos a la mano al pensar en posibles modelos de |
8 workflow models. | 8 flujo de trabajo. |
9 | 9 |
10 \section{Mercurial's web interface} | 10 \section{La interfaz web de Mercurial} |
11 | 11 |
12 Mercurial has a powerful web interface that provides several | 12 Mercurial tiene una poderosa interfaz web que provee bastantes |
13 useful capabilities. | 13 capacidades útiles. |
14 | 14 |
15 For interactive use, the web interface lets you browse a single | 15 Para uso interactivo, la interfaz le permite visualizar uno o varios |
16 repository or a collection of repositories. You can view the history | 16 repositorios. Puede ver la historia de un repositorio, examinar cada |
17 of a repository, examine each change (comments and diffs), and view | 17 cambio(comentarios y diferencias), y ver los contenidos de cada |
18 the contents of each directory and file. | 18 directorio y fichero. |
19 | 19 |
20 Also for human consumption, the web interface provides an RSS feed of | 20 Adicionalmente la interfaz provee feeds de RSS de los cambios de los |
21 the changes in a repository. This lets you ``subscribe'' to a | 21 repositorios. Que le permite ``subscribirse''a un repositorio usando |
22 repository using your favourite feed reader, and be automatically | 22 su herramienta de lectura de feeds favorita, y ser notificado |
23 notified of activity in that repository as soon as it happens. I find | 23 automáticamente de la actividad en el repositorio tan pronto como |
24 this capability much more convenient than the model of subscribing to | 24 sucede. Me gusta mucho más este modelo que el estar suscrito a una |
25 a mailing list to which notifications are sent, as it requires no | 25 lista de correo a la cual se envían las notificaciones, dado que no |
26 additional configuration on the part of whoever is serving the | 26 requiere configuración adicional de parte de quien sea que está |
27 repository. | 27 administrando el repositorio. |
28 | 28 |
29 The web interface also lets remote users clone a repository, pull | 29 La interfaz web también permite clonar repositorios a los usuarios |
30 changes from it, and (when the server is configured to permit it) push | 30 remotos, jalar cambios, y (cuando el servidor está configurado para |
31 changes back to it. Mercurial's HTTP tunneling protocol aggressively | 31 permitirlo) publicar cambios en el mismo. El protocolo de tunneling |
32 compresses data, so that it works efficiently even over low-bandwidth | 32 de Mercurial comprime datos agresivamente, de forma que trabaja |
33 network connections. | 33 eficientemente incluso con conexiones de red con poco ancho de banda. |
34 | 34 |
35 The easiest way to get started with the web interface is to use your | 35 La forma más sencilla de iniciarse con la interfaz web es usar su |
36 web browser to visit an existing repository, such as the master | 36 navegador para visitar un repositorio existente, como por ejemplo el |
37 Mercurial repository at | 37 repositorio principal de Mercurial \url{http://www.selenic.com/repo/hg?style=gitweb}. |
38 \url{http://www.selenic.com/repo/hg?style=gitweb}. | 38 |
39 | 39 Si está interesado en proveer una interfaz web a sus propios |
40 If you're interested in providing a web interface to your own | 40 repositorios, Mercurial provee dos formas de hacerlo. La primera es |
41 repositories, Mercurial provides two ways to do this. The first is | 41 usando la orden \hgcmd{serve}, que está enfocada a servir ``de forma |
42 using the \hgcmd{serve} command, which is best suited to short-term | 42 liviana'' y por intervalos cortos. Para más detalles de cómo usar |
43 ``lightweight'' serving. See section~\ref{sec:collab:serve} below for | 43 esta orden vea la sección~\ref{sec:collab:serve} más adelante. Si |
44 details of how to use this command. If you have a long-lived | 44 tiene un repositorio que desea hacer permanente, Mercurial tiene |
45 repository that you'd like to make permanently available, Mercurial | 45 soporte embebido del \command{ssh} para publicar cambios con seguridad |
46 has built-in support for the CGI (Common Gateway Interface) standard, | 46 al repositorio central, como se documenta en la |
47 which all common web servers support. See | 47 sección~\ref{sec:collab:ssh}. Es muy usual que se publique una copia |
48 section~\ref{sec:collab:cgi} for details of CGI configuration. | 48 de sólo lectura en el repositorio que está corriendo sobre HTTP usando |
49 | 49 CGI, como en la sección~\ref{sec:collab:cgi}. Publicar sobre HTTP |
50 \section{Collaboration models} | 50 satisface las necesidades de la gente que no tiene permisos de |
51 | 51 publicación y de aquellos que quieren usar navegadores web para |
52 With a suitably flexible tool, making decisions about workflow is much | 52 visualizar la historia del repositorio. |
53 more of a social engineering challenge than a technical one. | 53 |
54 Mercurial imposes few limitations on how you can structure the flow of | 54 \subsection{Trabajo con muchas ramas} |
55 work in a project, so it's up to you and your group to set up and live | 55 |
56 with a model that matches your own particular needs. | 56 Los proyectos de cierta talla tienden naturlamente a progresar de |
57 | 57 forma simultánea en varios frentes. En el caso del software, es común |
58 \subsection{Factors to keep in mind} | 58 que un proyecto tenga versiones periódicas oficiales. Una versión |
59 | 59 puede entrar a ``modo mantenimiento'' por un tiempo después de su |
60 The most important aspect of any model that you must keep in mind is | 60 primera publicación; las versiones de mantenimiento tienden a contener |
61 how well it matches the needs and capabilities of the people who will | 61 solamente arreglos de fallos, pero no nuevas características. En |
62 be using it. This might seem self-evident; even so, you still can't | 62 paralelo con las versiones de mantenimiento puede haber una o muchas |
63 afford to forget it for a moment. | 63 versiones futuras pueden estar en desarrollo. La gente usa normalmente |
64 | 64 la palabra ``rama'' para referirse a una de las direcciones |
65 I once put together a workflow model that seemed to make perfect sense | 65 ligeramente distintas en las cuales procede el desarrollo. |
66 to me, but that caused a considerable amount of consternation and | 66 |
67 strife within my development team. In spite of my attempts to explain | 67 Mercurial está especialmente preparado para administrar un buen número |
68 why we needed a complex set of branches, and how changes ought to flow | 68 de ramas simultáneas pero no idénticas. Cada ``dirección de |
69 between them, a few team members revolted. Even though they were | 69 desarrollo'' puede vivir en su propio repositorio central, y puede |
70 smart people, they didn't want to pay attention to the constraints we | 70 mezclar los cambios de una a otra de acuerdo con las necesidades. Dado |
71 were operating under, or face the consequences of those constraints in | 71 que los repositorios son independientes, uno del otro, los cambios |
72 the details of the model that I was advocating. | 72 inestables de una rama de desarrollo nunca afectarán una rama estable |
73 | 73 a menos que alguien explícitamente mezcle los cambios. |
74 Don't sweep foreseeable social or technical problems under the rug. | 74 |
75 Whatever scheme you put into effect, you should plan for mistakes and | 75 A continuación un ejemplo de cómo podría hacerse esto en la |
76 problem scenarios. Consider adding automated machinery to prevent, or | 76 práctica. Digamos que tiene una ``rama principal'' en un servidor |
77 quickly recover from, trouble that you can anticipate. As an example, | 77 central. |
78 if you intend to have a branch with not-for-release changes in it, | |
79 you'd do well to think early about the possibility that someone might | |
80 accidentally merge those changes into a release branch. You could | |
81 avoid this particular problem by writing a hook that prevents changes | |
82 from being merged from an inappropriate branch. | |
83 | |
84 \subsection{Informal anarchy} | |
85 | |
86 I wouldn't suggest an ``anything goes'' approach as something | |
87 sustainable, but it's a model that's easy to grasp, and it works | |
88 perfectly well in a few unusual situations. | |
89 | |
90 As one example, many projects have a loose-knit group of collaborators | |
91 who rarely physically meet each other. Some groups like to overcome | |
92 the isolation of working at a distance by organising occasional | |
93 ``sprints''. In a sprint, a number of people get together in a single | |
94 location (a company's conference room, a hotel meeting room, that kind | |
95 of place) and spend several days more or less locked in there, hacking | |
96 intensely on a handful of projects. | |
97 | |
98 A sprint is the perfect place to use the \hgcmd{serve} command, since | |
99 \hgcmd{serve} does not requires any fancy server infrastructure. You | |
100 can get started with \hgcmd{serve} in moments, by reading | |
101 section~\ref{sec:collab:serve} below. Then simply tell the person | |
102 next to you that you're running a server, send the URL to them in an | |
103 instant message, and you immediately have a quick-turnaround way to | |
104 work together. They can type your URL into their web browser and | |
105 quickly review your changes; or they can pull a bugfix from you and | |
106 verify it; or they can clone a branch containing a new feature and try | |
107 it out. | |
108 | |
109 The charm, and the problem, with doing things in an ad hoc fashion | |
110 like this is that only people who know about your changes, and where | |
111 they are, can see them. Such an informal approach simply doesn't | |
112 scale beyond a handful people, because each individual needs to know | |
113 about $n$ different repositories to pull from. | |
114 | |
115 \subsection{A single central repository} | |
116 | |
117 For smaller projects migrating from a centralised revision control | |
118 tool, perhaps the easiest way to get started is to have changes flow | |
119 through a single shared central repository. This is also the | |
120 most common ``building block'' for more ambitious workflow schemes. | |
121 | |
122 Contributors start by cloning a copy of this repository. They can | |
123 pull changes from it whenever they need to, and some (perhaps all) | |
124 developers have permission to push a change back when they're ready | |
125 for other people to see it. | |
126 | |
127 Under this model, it can still often make sense for people to pull | |
128 changes directly from each other, without going through the central | |
129 repository. Consider a case in which I have a tentative bug fix, but | |
130 I am worried that if I were to publish it to the central repository, | |
131 it might subsequently break everyone else's trees as they pull it. To | |
132 reduce the potential for damage, I can ask you to clone my repository | |
133 into a temporary repository of your own and test it. This lets us put | |
134 off publishing the potentially unsafe change until it has had a little | |
135 testing. | |
136 | |
137 In this kind of scenario, people usually use the \command{ssh} | |
138 protocol to securely push changes to the central repository, as | |
139 documented in section~\ref{sec:collab:ssh}. It's also usual to | |
140 publish a read-only copy of the repository over HTTP using CGI, as in | |
141 section~\ref{sec:collab:cgi}. Publishing over HTTP satisfies the | |
142 needs of people who don't have push access, and those who want to use | |
143 web browsers to browse the repository's history. | |
144 | |
145 \subsection{Working with multiple branches} | |
146 | |
147 Projects of any significant size naturally tend to make progress on | |
148 several fronts simultaneously. In the case of software, it's common | |
149 for a project to go through periodic official releases. A release | |
150 might then go into ``maintenance mode'' for a while after its first | |
151 publication; maintenance releases tend to contain only bug fixes, not | |
152 new features. In parallel with these maintenance releases, one or | |
153 more future releases may be under development. People normally use | |
154 the word ``branch'' to refer to one of these many slightly different | |
155 directions in which development is proceeding. | |
156 | |
157 Mercurial is particularly well suited to managing a number of | |
158 simultaneous, but not identical, branches. Each ``development | |
159 direction'' can live in its own central repository, and you can merge | |
160 changes from one to another as the need arises. Because repositories | |
161 are independent of each other, unstable changes in a development | |
162 branch will never affect a stable branch unless someone explicitly | |
163 merges those changes in. | |
164 | |
165 Here's an example of how this can work in practice. Let's say you | |
166 have one ``main branch'' on a central server. | |
167 \interaction{branching.init} | 78 \interaction{branching.init} |
168 People clone it, make changes locally, test them, and push them back. | 79 Alguien lo clona, hace cambios locales, los prueba, y los publica allí |
169 | 80 mismo. |
170 Once the main branch reaches a release milestone, you can use the | 81 |
171 \hgcmd{tag} command to give a permanent name to the milestone | 82 Una vez que la rama principal alcanza una estado de versión se puede |
172 revision. | 83 usar la orden \hgcmd{tag} para dar un nombre permanente a la revisión. |
173 \interaction{branching.tag} | 84 \interaction{branching.tag} |
174 Let's say some ongoing development occurs on the main branch. | 85 Digamos que en la rama principal ocurre más desarrollo. |
175 \interaction{branching.main} | 86 \interaction{branching.main} |
176 Using the tag that was recorded at the milestone, people who clone | 87 Cuando se usa la etiqueta con que se identificó la versión, la gente |
177 that repository at any time in the future can use \hgcmd{update} to | 88 puede clonar el repositorio en cualquier momento en el futuro |
178 get a copy of the working directory exactly as it was when that tagged | 89 empleando \hgcmd{update} para obtener una copia del directorio de |
179 revision was committed. | 90 trabajo exacta como cuando se creó la etiqueta de la revisión que se |
91 consignó. | |
180 \interaction{branching.update} | 92 \interaction{branching.update} |
181 | 93 |
182 In addition, immediately after the main branch is tagged, someone can | 94 Adicionalmente, justo después de que la rama principal se etiquete, |
183 then clone the main branch on the server to a new ``stable'' branch, | 95 alguien puede clonarla en el servidor a una nueva rama ``estable'', |
184 also on the server. | 96 también en el servidor. |
185 \interaction{branching.clone} | 97 \interaction{branching.clone} |
186 | 98 |
187 Someone who needs to make a change to the stable branch can then clone | 99 Alguien que requiera hacer un cambio en la rama estable puede clonar |
188 \emph{that} repository, make their changes, commit, and push their | 100 \emph{ese} repositorio, hacer sus cambios, consignar y publicarlos |
189 changes back there. | 101 posteriormente al inicial. |
190 \interaction{branching.stable} | 102 \interaction{branching.stable} |
191 Because Mercurial repositories are independent, and Mercurial doesn't | 103 Puesto que los repositorios de Mercurial son independientes, y que |
192 move changes around automatically, the stable and main branches are | 104 Mercurial no mueve los cambios de un lado a otro automáticamente, las |
193 \emph{isolated} from each other. The changes that you made on the | 105 ramas estable y principal están \emph{aisladas} la una de la otra. |
194 main branch don't ``leak'' to the stable branch, and vice versa. | 106 Los cambios que haga en la rama principal no ``se filtran'' a la rama |
195 | 107 estable o vice versa. |
196 You'll often want all of your bugfixes on the stable branch to show up | 108 |
197 on the main branch, too. Rather than rewrite a bugfix on the main | 109 Es usual que los arreglos de fallos de la rama estable deban hacerse |
198 branch, you can simply pull and merge changes from the stable to the | 110 aparecer en la rama principal también. En lugar de reescribir el |
199 main branch, and Mercurial will bring those bugfixes in for you. | 111 arreglo del fallo en la rama principal, puede jalar y mezclar los |
112 cambios de la rama estable a la principal, Mercurial traerá tales | |
113 arreglos por usted. | |
200 \interaction{branching.merge} | 114 \interaction{branching.merge} |
201 The main branch will still contain changes that are not on the stable | 115 La rama principal contendtrá aún los cambios que no están en la |
202 branch, but it will also contain all of the bugfixes from the stable | 116 estable y contendrá además todos los arreglos de fallos de la rama |
203 branch. The stable branch remains unaffected by these changes. | 117 estable. La rama estable permanece incólume a tales cambios. |
204 | 118 |
205 \subsection{Feature branches} | 119 \subsection{Feature branches} |
206 | 120 |
207 For larger projects, an effective way to manage change is to break up | 121 For larger projects, an effective way to manage change is to break up |
208 a team into smaller groups. Each group has a shared branch of its | 122 a team into smaller groups. Each group has a shared branch of its |