comparison es/daily.tex @ 472:48584345e451

Finishing daily.tex translation to spanish
author Igor TAmara <igor@tamarapatino.org>
date Sun, 26 Oct 2008 07:47:01 -0500
parents 854a70fc05c6
children 84944c0ecde6
comparison
equal deleted inserted replaced
459:d4a0d7488a08 472:48584345e451
282 manualmente y desea que Mercurial sepa que ha copiado un fichero, 282 manualmente y desea que Mercurial sepa que ha copiado un fichero,
283 basta con aplicar la opción \hgopt{copy}{--after} a la orden 283 basta con aplicar la opción \hgopt{copy}{--after} a la orden
284 \hgcmd{copy}. 284 \hgcmd{copy}.
285 \interaction{daily.copy.after} 285 \interaction{daily.copy.after}
286 286
287 \section{Renaming files} 287 \section{Renombrar ficheros}
288 288
289 It's rather more common to need to rename a file than to make a copy 289 La necesidad de renombrar un fichero es más común que hacer una copia
290 of it. The reason I discussed the \hgcmd{copy} command before talking 290 del fichero. La razón por la cual discutí la orden \hgcmd{copy} antes
291 about renaming files is that Mercurial treats a rename in essentially 291 de hablar acerca de cambiar el nombre de los ficheros, es que
292 the same way as a copy. Therefore, knowing what Mercurial does when 292 Mercurial trata el renombrar un archivo de la misma forma que una
293 you copy a file tells you what to expect when you rename a file. 293 copia. Por lo tanto, saber lo que hace Mercurial cuando usted copia
294 294 un archivo, le indica qué esperar cuando renombra un archivo.
295 When you use the \hgcmd{rename} command, Mercurial makes a copy of 295
296 each source file, then deletes it and marks the file as removed. 296 Cuando usa la orden \hgcmd{rename}, Mercurial hace una copia de cada
297 archivo fuente, lo borra y lo marca como fichero eliminado.
297 \interaction{daily.rename.rename} 298 \interaction{daily.rename.rename}
298 The \hgcmd{status} command shows the newly copied file as added, and 299 La orden \hgcmd{status} muestra la nueva copia del fichero como
299 the copied-from file as removed. 300 añadido y el fichero inicial de la copia, como eliminado.
300 \interaction{daily.rename.status} 301 \interaction{daily.rename.status}
301 As with the results of a \hgcmd{copy}, we must use the 302 De la misma forma como se usa la orden \hgcmd{copy}, debemos usar la
302 \hgopt{status}{-C} option to \hgcmd{status} to see that the added file 303 opción \hgopt{status}{-C} de la orden \hgcmd{status} para verificar
303 is really being tracked by Mercurial as a copy of the original, now 304 que el archivo añadido realmente comienza a ser seguido por Mercurial
304 removed, file. 305 como una copia del fichero original, ahora eliminado.
305 \interaction{daily.rename.status-copy} 306 \interaction{daily.rename.status-copy}
306 307
307 As with \hgcmd{remove} and \hgcmd{copy}, you can tell Mercurial about 308 Igual que con \hgcmd{remove} y \hgcmd{copy}, puede indicársele a
308 a rename after the fact using the \hgopt{rename}{--after} option. In 309 Mercurial acerca de un renombramiento inmediato con la opción
309 most other respects, the behaviour of the \hgcmd{rename} command, and 310 \hgopt{rename}{--after}. El comportamiento de la orden
310 the options it accepts, are similar to the \hgcmd{copy} command. 311 \hgcmd{rename} y las opciones que acepta, son similares a la orden
311 312 \hgcmd{copy} en casi todo.
312 \subsection{Renaming files and merging changes} 313
313 314 \subsection{Renombrar ficheros y fusionar cambios}
314 Since Mercurial's rename is implemented as copy-and-remove, the same 315
315 propagation of changes happens when you merge after a rename as after 316 Dado que el renombrar de Mercurial se implementa como un
316 a copy. 317 copiar-y-eliminar, la misma propagación de cambios ocurre cuando usted
317 318 fusiona después de renombrar como después de hacer una copia.
318 If I modify a file, and you rename it to a new name, and then we merge 319
319 our respective changes, my modifications to the file under its 320 Si Yo modifico un fichero y usted lo renombra a un nuevo archivo, y
320 original name will be propagated into the file under its new name. 321 posteriormente fusionamos nuestros cambios respectivos, mi
321 (This is something you might expect to ``simply work,'' but not all 322 modificación al fichero bajo su nombre original se propagará en el
322 revision control systems actually do this.) 323 fichero con el nuevo nombre. (Es lo que se esperaría como ``lo hace,''
323 324 pero, no todos los sistemas de control de revisiones lo logran.)
324 Whereas having changes follow a copy is a feature where you can 325
325 perhaps nod and say ``yes, that might be useful,'' it should be clear 326 El hecho de que los cambios sigan la copia es una característica que
326 that having them follow a rename is definitely important. Without 327 puede subestimar diciendo ``si, puede ser útil,'' debería ser claro
327 this facility, it would simply be too easy for changes to become 328 que el seguimiento de cambios de un renombramiento es importante
328 orphaned when files are renamed. 329 definitivamente. Sin esto, sería muy sencillo que los cambios se
329 330 volvieran huérfanos cuando los archivos se renombran.
330 \subsection{Divergent renames and merging} 331
331 332 \subsection{Cambios de nombre divergentes y fusión}
332 The case of diverging names occurs when two developers start with a 333
333 file---let's call it \filename{foo}---in their respective 334 El caso de renombramiento con nombres divergentes ocurre cuando dos
334 repositories. 335 desarrolladores comienzan con un fichero---llamémoslo
336 \filename{foo}---en sus repositorios respectivos.
335 337
336 \interaction{rename.divergent.clone} 338 \interaction{rename.divergent.clone}
337 Anne renames the file to \filename{bar}. 339 Ana renombra el fichero a \filename{bar}.
338 \interaction{rename.divergent.rename.anne} 340 \interaction{rename.divergent.rename.anne}
339 Meanwhile, Bob renames it to \filename{quux}. 341 Mientras que Roberto lo renombra como \filename{quux}.
340 \interaction{rename.divergent.rename.bob} 342 \interaction{rename.divergent.rename.bob}
341 343
342 I like to think of this as a conflict because each developer has 344 Veo esto como un conflicto porque cada desarrollador ha expresado
343 expressed different intentions about what the file ought to be named. 345 intenciones diferentes acerca de cómo considera debería haberse
344 346 renombrado el fichero.
345 What do you think should happen when they merge their work? 347
346 Mercurial's actual behaviour is that it always preserves \emph{both} 348 ¿ué cree que debería pasar cuando fusionen su trabajo?
347 names when it merges changesets that contain divergent renames. 349 El comportamiento de Mercurial es que siempre preserva \emph{ambos}
350 nombres cuando fusiona los conjuntos de cambios que contienen nombres
351 divergentes.
348 \interaction{rename.divergent.merge} 352 \interaction{rename.divergent.merge}
349 353
350 Notice that Mercurial does warn about the divergent renames, but it 354 Tenga en cuenta que Mercurial le advierte acerca de nombres
351 leaves it up to you to do something about the divergence after the merge. 355 divergentes, pero deja que usted decida qué hacer con la divergencia
352 356 después de la fusión.
353 \subsection{Convergent renames and merging} 357
354 358 \subsection{Cambios de nombre convergentes y fusión}
355 Another kind of rename conflict occurs when two people choose to 359
356 rename different \emph{source} files to the same \emph{destination}. 360 Otra clase de conflicto al cambiar el nombre ocurre cuando dos
357 In this case, Mercurial runs its normal merge machinery, and lets you 361 personas eligen renombrar diferentes ficheros \emph{fuente} al mismo
358 guide it to a suitable resolution. 362 \emph{destino}. En este caso Mercurial aplica su maquinaria de fusión
359 363 usual, y le permite a usted guiarlo a una solución adecuada.
360 \subsection{Other name-related corner cases} 364
361 365 \subsection{Otros casos límites relacionados con renombramientos}
362 Mercurial has a longstanding bug in which it fails to handle a merge 366
363 where one side has a file with a given name, while another has a 367 Mercurial tiene un fallo de mucho tiempo en el cual no es capaz de
364 directory with the same name. This is documented as~\bug{29}. 368 fusionar cuando por un lado hay un archivo con un nombre dado,
369 mientras que en otro hay un directorio con el mismo nombre. Esto está
370 documentado como~\bug{29}.
365 \interaction{issue29.go} 371 \interaction{issue29.go}
366 372
367 \section{Recovering from mistakes} 373 \section{Recuperarse de equivocaciones}
368 374
369 Mercurial has some useful commands that will help you to recover from 375 Mercurial tiene unas órdenes poderosas que le ayudarán a recuperarse
370 some common mistakes. 376 de equivocaciones comunes.
371 377
372 The \hgcmd{revert} command lets you undo changes that you have made to 378 La orden \hgcmd{revert} le permite deshacer cambios que haya hecho a
373 your working directory. For example, if you \hgcmd{add} a file by 379 su directorio de trabajo. Por ejemplo, Si aplicó \hgcmd{add} a un
374 accident, just run \hgcmd{revert} with the name of the file you added, 380 fichero por accidente, ejecute \hgcmd{revert} con el nombre del
375 and while the file won't be touched in any way, it won't be tracked 381 fichero que añadió, y en tando que el archivo no haya sido tocado de
376 for adding by Mercurial any longer, either. You can also use 382 forma alguna, no será adicionado, ni seguido por Mercurial. También
377 \hgcmd{revert} to get rid of erroneous changes to a file. 383 puede usar \hgcmd{revert} para deshacerse de cambios erróneos a un
378 384 fichero.
379 It's useful to remember that the \hgcmd{revert} command is useful for 385
380 changes that you have not yet committed. Once you've committed a 386 Tenga en cuenta que la orden \hgcmd{revert} se usa para cambios que no
381 change, if you decide it was a mistake, you can still do something 387 han sido consignados. Cuando haya consignado un cambio, si decide que
382 about it, though your options may be more limited. 388 era un error, puede hacer algo todavía, pero sus opciones pueden ser
383 389 más limitadas.
384 For more information about the \hgcmd{revert} command, and details 390
385 about how to deal with changes you have already committed, see 391 Para obtener información acerca de la orden \hgcmd{revert} y detalles
386 chapter~\ref{chap:undo}. 392 de cómo tratar con cambios consignados, vea el capítulo~\ref{chap:undo}.
387 393
388 %%% Local Variables: 394 %%% Local Variables:
389 %%% mode: latex 395 %%% mode: latex
390 %%% TeX-master: "00book" 396 %%% TeX-master: "00book"
391 %%% End: 397 %%% End: