annotate es/filenames.tex @ 626:e33aab06b0d1

fix to get the table of contents right on the html version
author Javier Rojas <jerojasro@devnull.li>
date Mon, 19 Jan 2009 14:22:01 -0500
parents 9da096de3c52
children 93372b575c73
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
1 \chapter{File names and pattern matching}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
2 \label{chap:names}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
3
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
4 Mercurial provee mecanismos que le permiten trabajar con nombres de
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
5 ficheros en una manera consistente y expresiva.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
6
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
7 \section{Nombrado de ficheros simple}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
8
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
9 % TODO traducción literal de "under the hood". revisar
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
10 Mercurial usa un mecanismo unificado ``bajo el capó'' para manejar
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
11 nombres de ficheros. Cada comando se comporta de manera uniforme con
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
12 respecto a los nombres de fichero. La manera en que los comandos
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
13 operan con nombres de fichero es la siguiente.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
14
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
15 Si usted especifica explícitamente nombres reales de ficheros en la
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
16 línea de comandos, Mercurial opera únicamente sobre dichos ficheros,
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
17 como usted esperaría.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
18 \interaction{filenames.files}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
19
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
20 Cuando usted provee el nombre de un directorio, Mercurial interpreta
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
21 eso como ``opere en cada fichero en este directorio y sus
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
22 subdirectorios''. Mercurial va por todos los ficheros y subdirectorios
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
23 de un directorio en orden alfabético. Cuando encuentra un
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
24 subdirectorio, lo recorrerá antes de continuar con el directorio
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
25 actual.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
26 \interaction{filenames.dirs}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
27
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
28 \section{Ejecución de comandos sin ningún nombre de fichero}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
29
529
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
30 Los comandos de Mercurial que trabajan con nombres de fichero tienen
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
31 comportamientos por defecto adecuados cuando son utilizados sin pasar
3afc654d70e5 translated some paragraphs. yawn sleepy
jerojasro@localhost
parents: 501
diff changeset
32 ningún patrón o nombre de fichero. El tipo de comportamiento depende
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
33 de lo que haga el comando. Aquí presento unas cuantas reglas generales
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
34 que usted puede usar para que es lo que probablemente hará un comando
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
35 si usted no le pasa ningún nombre de fichero con el cual trabajar.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
36 \begin{itemize}
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
37 \item Muchos comandos operarán sobre el directorio de trabajo
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
38 completo. Por ejemplo, esto es lo que hace el comando
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
39 \hgcmd{add},
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
40 \item Si el comando tiene efectos difíciles o incluso imposibles de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
41 revertir, se le obligará a usted a proveer explícitamente al menos
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
42 % TODO revisar ese "lo proteje a usted"
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
43 un nombre o patrón (ver más abajo). Esto lo proteje a usted de,
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
44 por ejemplo, borrar ficheros accidentalmente al ejecutar
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
45 \hgcmd{remove} sin ningún argumento.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
46 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
47
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
48
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
49 Es fácil evitar este comportamiento por defecto, si no es el adecuado
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
50 para usted. Si un comando opera normalmente en todo el directorio de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
51 trabajo, usted puede llamarlo para que trabaje sólo en el directorio
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
52 actual y sus subdirectorio pasándole el nombre ``\dirname{.}''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
53 \interaction{filenames.wdir-subdir}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
54
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
55 Siguiendo la misma línea, algunos comandos normalmente imprimen las
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
56 rutas de ficheros con respecto a la raíz del repositorio, aún si usted
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
57 los llama dentro de un subdirectorio. Dichos comandos imprimirán las
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
58 rutas de los ficheros respecto al directorio en que usted se encuentra
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
59 si se les pasan nombres explícitos. Vamos a ejecutar el comando
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
60 \hgcmd{status} desde un subdirectorio, y a hacer que opere en el
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
61 directorio de trabajo completo, a la vez que todas las rutas de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
62 ficheros se imprimen respecto a nuestro subdirectorio, pasándole la
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
63 salida del comando \hgcmd{root}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
64 \interaction{filenames.wdir-relname}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
65
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
66 \section{Reportar que está pasando}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
67
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
68 El ejemplo con el comando \hgcmd{add} en la sección anterior ilustra
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
69 algo más que es útil acerca de los comandos de Mercurial. Si un
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
70 comando opera en un fichero que usted no pasó explícitamente en la
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
71 línea de comandos, usualmente se imprimirá el nombre del fichero, para
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
72 que usted no sea sorprendido por lo que sucede.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
73
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
74 Esto es el principio de \emph{mínima sorpresa}. Si usted se ha
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
75 referido explícitamente a un fichero en la línea de comandos, no tiene
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
76 mucho sentido repetir esto de vuelta a usted. Si Mercurial está
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
77 actuando en un fichero \emph{implícitamente}, porque usted no pasó
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
78 nombres, ni directorios, ni patrones (ver más abajo), lo más seguro es
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
79 decirle a usted qué se está haciendo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
80
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
81 Usted puede silenciar a los comandos que se comportan de esta manera
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
82 usando la opción \hggopt{-q}. También puede hacer que impriman el
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
83 nombre de cada fichero, aún aquellos que usted indicó explícitamente,
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
84 usando la opción \hggopt{-v}.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
85
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
86 \section{Uso de patrones para identificar ficheros}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
87
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
88 Además de trabajar con nombres de ficheros y directorios, Mercurial le
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
89 permite usar \emph{patrones} para identificar ficheros. El manejo de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
90 patrones de Mercurial es expresivo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
91
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
92 En sistemas tipo Unix (Linux, MacOS, etc.), el trabajo de asociar
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
93 patrones con nombres de ficheros recae sobre el intérprete de comandos.
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
94 En estos sistemas, usted debe indicarle explícitamente a Mercurial que
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
95 el nombre que se le pasa es un patrón. En Windows, el intérprete no
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
96 expande los patrones, así que Mercurial identificará automáticamente
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
97 los nombres que son patrones, y hará la expansión necesaria.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
98
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
99 Para pasar un patrón en vez de un nombre normal en la línea de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
100 comandos, el mecanismo es simple:
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
101 \begin{codesample2}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
102 syntax:patternbody
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
103 \end{codesample2}
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
104 Un patrón es identificado por una cadena de texto corta que indica qué
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
105 tipo de patrón es, seguido por un dos puntos, seguido por el patrón en
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
106 sí.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
107
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
108 Mercurial soporta dos tipos de sintaxis para patrones. La que se usa
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
109 con más frecuencia se denomina \texttt{glob}\ndt{Grupo, colección,
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
110 aglomeración.}; es el mismo tipo de asociación de patrones usado por
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
111 el intérprete de Unix, y también debería ser familiar para los
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
112 usuarios de la línea de comandos de Windows.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
113
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
114 Cuando Mercurial hace asociación automática de patrones en Windows,
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
115 usa la sintaxis \texttt{glob}. Por esto, usted puede omitir el
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
116 prefijo ``\texttt{glob:}'' en Windows, pero también es seguro usarlo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
117
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
118 La sintaxis \texttt{re}\ndt{Expresiones regulares.} es más poderosa;
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
119 le permite especificar patrones usando expresiones regulares, también
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
120 conocidas como regexps.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
121
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
122 A propósito, en los ejemplos siguientes, por favor note que yo tengo
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
123 el cuidado de rodear todos mis patrones con comillas sencillas, para
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
124 que no sean expandidos por el intérprete antes de que Mercurial pueda
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
125 verlos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
126
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
127 \subsection{Patrones \texttt{glob} estilo intérprete}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
128
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
129 Este es un vistazo general de los tipos de patrones que usted puede
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
130 usar cuando está usando asociación con patrone glob.
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
131
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
132 La secuencia ``\texttt{*}'' se asocia con cualquier cadena, dentro de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
133 un único directorio.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
134 \interaction{filenames.glob.star}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
135
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
136 La secuencia ``\texttt{**}'' se asocia con cualquier cadena, y cruza los
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
137 % TODO token
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
138 límites de los directorios. No es una elemento estándar de los tokens
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
139 de glob de Unix, pero es aceptado por varios intérpretes Unix
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
140 populares, y es muy útil.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
141 \interaction{filenames.glob.starstar}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
142
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
143 La secuencia ``\texttt{?}'' se asocia con cualquier caracter sencillo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
144 \interaction{filenames.glob.question}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
145
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
146 El caracter ``\texttt{[}'' marca el inicio de una \emph{clase de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
147 caracteres}. Ella se asocia con cualquier caracter sencillo dentro de
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
148 la clase. La clase se finaliza con un caracter ``\texttt{]}''. Una
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
149 clase puede contener múltiples \emph{rango}s de la forma
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
150 ``\texttt{a-f}'', que en este caso es una abreviación para
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
151 ``\texttt{abcdef}''.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
152 \interaction{filenames.glob.range}
530
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
153 Si el primer caracter en aparecer después de ``\texttt{[}'' en la
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
154 clase de caracteres es un ``\texttt{!}'', se \emph{niega} la clase,
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
155 haciendo que se asocie con cualquier caracter sencillo que no se
f809de31887a more translation :D
jerojasro@localhost
parents: 529
diff changeset
156 encuentre en la clase.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
157
531
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
158 Un ``\texttt{\{}'' marca el inicio de un grupo de subpatrones, en
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
159 donde todo el grupo es asociado si cualquier subpatrón en el grupo
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
160 puede ser asociado. El caracter ``\texttt{,}'' separa los subpatrones,
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
161 y el ``\texttt{\}}'' finaliza el grupo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
162 \interaction{filenames.glob.group}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
163
531
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
164 \subsubsection{Cuidado!}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
165
531
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
166 No olvide que si usted desea asocia un patrón con cualquier
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
167 directorio, no debería usar el elemento para asociar con cualquier
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
168 cadena ``\texttt{*}'', ya que éste sólo generará asociaciones dentro
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
169 de un solo directorio. En vez de eso, use el caracter para asociar con
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
170 cualquier cadena ``\texttt{**}''. Este pequeño ejemplo ilustra la
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
171 diferencia entre los dos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
172 \interaction{filenames.glob.star-starstar}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
173
531
5da084395a69 translated some other paragrpahs
jerojasro@localhost
parents: 530
diff changeset
174 \subsection{Asociación con patrones de expresiones regulares \texttt{re}}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
175
532
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
176 Mercurial acepta la misma sintaxis para expresiones regulares del
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
177 lenguaje de programación Python (internamente se usa el motor de
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
178 expresiones regulares de Python). Esta sintaxis está basada en la
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
179 misma del lenguaje Perl, que es el dialecto más popular en uso
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
180 (por ejemplo, también se usa en Java).
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
181
532
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
182 No discutiré el dialecto de expresiones regulares de Mercurial en
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
183 detalle aquí, ya que las mismas no son usadas frecuentemente. Las
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
184 expresiones regulares al estilo Perl se encuentran documentadas
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
185 exhaustivamente en una multitud de sitios web, y en muchos libros.
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
186 En vez de eso, me enfocaré en unas cuantas cosas que usted debería
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
187 conocer si tiene la necesidad de usar expresiones regulares en
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
188 Mercurial.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
189
532
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
190 Una expresión regular es comparada contra un nombre de fichero
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
191 completo, relativo a la raíz del repositorio. En otras palabras, aún
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
192 si usted se encuentra en un subdirectorio \dirname{foo}, si desea
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
193 asociar ficheros en este directorio, su patrón debe empezar con
7d3e036025fb moar paragraphas. lolz
jerojasro@localhost
parents: 531
diff changeset
194 ``\texttt{foo/}''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
195
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
196 Un detalle a tener en cuenta es que, si le son familiares las
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
197 expresiones regulares al estilo Perl, las de Mercurial están
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
198 \emph{enraízadas}. Esto es, que la asociación de una expresión se hace
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
199 desde el inicio de la cadena; no se buscan coincidencias dentro de la
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
200 cadena. Para buscar coincidencias en cualquier sitio dentro de una
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
201 cadena, empiece su patrón con un ``\texttt{.*}''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
202
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 603
diff changeset
203 \section{Filtrado de ficheros}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
204
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
205 Mercurial no sólo le provee una variedad de formas para especificar
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
206 ficheros; le permite limitar aún más dichos ficheros mediante el uso
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
207 de \emph{filtros}. Los comandos que operan con nombres de fichero
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
208 aceptan dos opciones de filtrado.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
209 \begin{itemize}
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
210 \item \hggopt{-I}, o \hggopt{--include}, le permite especificar un
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
211 patrón con el que deben coincidir los ficheros para ser
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
212 procesados.
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
213 \item \hggopt{-X}, o \hggopt{--exclude}, le brinda una manera de
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
214 \emph{evitar} procesar ficheros, si coinciden con este patrón.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
215 \end{itemize}
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
216 Usted puede pasar múltiples veces las opciones \hggopt{-I} y
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
217 \hggopt{-X} en la línea de comandos, e intercalarlos como desee.
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
218 Por defecto, Mercurial interpreta los patrones que usted pase usando
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
219 la sintaxis glob (pero usted puede usar expresiones regulares si lo
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
220 necesita).
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
221
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
222 El filtro \hggopt{-I} puede verse como un ``procese todos los ficheros
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
223 que coincidan con este filtro''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
224 \interaction{filenames.filter.include}
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
225 El filtro \hggopt{-X} puede verse como ``procese únicamente los
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
226 ficheros que no coincidan con este patrón''.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
227 \interaction{filenames.filter.exclude}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
228
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
229 \section{Ignorar ficheros y directorios no deseados}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
230
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
231 XXX.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
232
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
233 \section{Sensibilidad a mayúsculas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
234 \label{sec:names:case}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
235
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
236 Si usted está trabajando en un ambiente de desarrollo mixto que
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
237 contiene tanto sistemas Linux (u otro Unix) y sistemas Mac o Windows,
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
238 debería tener en mente el hecho de que ellos tratan
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
239 %TODO FIXME seguir desde aqui, no tengo idea de como traducir case
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
240 %sensitivity
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
241 case (``N'' versus ``n'') of file names in incompatible ways. This is
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
242 not very likely to affect you, and it's easy to deal with if it does,
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
243 but it could surprise you if you don't know about it.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
244
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
245 Operating systems and filesystems differ in the way they handle the
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
246 \emph{case} of characters in file and directory names. There are
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
247 three common ways to handle case in names.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
248 \begin{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
249 \item Completely case insensitive. Uppercase and lowercase versions
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
250 of a letter are treated as identical, both when creating a file and
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
251 during subsequent accesses. This is common on older DOS-based
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
252 systems.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
253 \item Case preserving, but insensitive. When a file or directory is
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
254 created, the case of its name is stored, and can be retrieved and
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
255 displayed by the operating system. When an existing file is being
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
256 looked up, its case is ignored. This is the standard arrangement on
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
257 Windows and MacOS. The names \filename{foo} and \filename{FoO}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
258 identify the same file. This treatment of uppercase and lowercase
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
259 letters as interchangeable is also referred to as \emph{case
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
260 folding}.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
261 \item Case sensitive. The case of a name is significant at all times.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
262 The names \filename{foo} and {FoO} identify different files. This
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
263 is the way Linux and Unix systems normally work.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
264 \end{itemize}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
265
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
266 On Unix-like systems, it is possible to have any or all of the above
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
267 ways of handling case in action at once. For example, if you use a
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
268 USB thumb drive formatted with a FAT32 filesystem on a Linux system,
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
269 Linux will handle names on that filesystem in a case preserving, but
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
270 insensitive, way.
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
271
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
272 \subsection{Almacenamiento portable y seguro de repositorios}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
273
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
274 El mecanismo de almacenamiento de los repositorios en Mercurial es
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
275 \emph{robusto frente a sensibilidad/insensibilidad a mayúsculas}. Los nombres de
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
276 fichero son traducidos para que puedan ser almacenados de manera
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
277 segura tanto en sistemas sensibles como insensibles a mayúsculas. Esto
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
278 significa que usted puede usar herramientas normales de copia de
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
279 ficheros para transferir un repositorio Mercurial a, por ejemplo, una
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
280 memoria USB, y trasladar de manera segura la memoria y el repositorio
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
281 de ida y vuelta entre un Mac, un PC ejecutando Windows, y un sistema
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
282 Linux
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
283
533
c847605eb2a9 translated a bit, will stop translating this file until I figure out how to translate the expression "case sensitivity"
jerojasro@localhost
parents: 532
diff changeset
284 \subsection{Detección de conflictos de mayúsculas/minúsculas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
285
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
286 Al operar en el directorio de trabajo, Mercurial respeta la política
615
9da096de3c52 changed "historia" to "historial".
Javier Rojas <jerojasro@devnull.li>
parents: 603
diff changeset
287 de nombrado del sistema de ficheros en que se encuentre el directorio
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
288 de trabajo. Si el sistema de ficheros conserva las diferencias entre
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
289 mayúsculas, pero no es sensible a ellas, Mercurial tratará los nombres
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
290 que sólo difieren en mayúsculas como uno solo y el mismo.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
291
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
292 Un aspecto importante de este enfoque es que es posible consignar un
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
293 conjunto de cambios en un sistema de ficheros sensible a mayúsculas
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
294 (típicamente Linux o Unix) que terminará causando problemas para
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
295 usuarios en sistemas insensibles a mayúsculas (usualmente en Windows o
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
296 MacOS). Si un usuario de Linux consigna cambios a dos ficheros, uno de
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
297 ellos llamado \filename{myfile.c} y el otro llamado \filename{MyFile.C},
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
298 ambos serán almacenados correctamente en el repositorio. Y serán
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
299 representados correctamente como ficheros separados, en los
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
300 directorios de trabajo de otros usuarios de Linux.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
301
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
302 Si un usuario de Windows o Mac jalan este cambio, no tendrán problemas
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
303 inicialmente, porque el mecanismo de almacenamiento de Mercurial es
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
304 seguro frente a sensibilidad/insensibilidad a mayúsculas. Sin embargo,
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
305 una vez que ellos traten de actualizar (\hgcmd{update}) el directorio
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
306 de trabajo con ese conjunto de cambios, o hagan fusión (\hgcmd{merge})
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
307 con ese conjunto de cambios, Mercurial verá el conflicto entre los dos
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
308 nombres de fichero que el sistema de ficheros trataría como el mismo,
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
309 e impedirá que ocurra la actualización o fusión.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
310
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
311 \subsection{Arreglar un conflicto de mayúsculas/minúsculas}
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
312
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
313 Si usted está usando Windows o Mac en un entorno mixto donde algunos
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
314 de sus colaboradores están usando Linux o Unix, y Mercurial reporta un
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
315 conflicto de mayúsculas/minúsculas cuando usted trata de actualizar
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
316 (\hgcmd{update}) o fusionar (\hgcmd{merge}), el procedimiento para
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
317 arreglar el problema es simple.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
318
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
319 Sólo busque un sistema Linux o Unix cercano, clone el repositorio
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
320 problema allí, y use el comando \hgcmd{rename} de Mercurial para
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
321 cambiar los nombres de cualquiera de los ficheros o directorios
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
322 problemáticos para que no causen más conflictos. Consigne este cambio,
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
323 y jálelo (\hgcmd{pull}) o empújelo (\hgcmd{push}) a su sistema Windows
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
324 o MacOS, y actualícelo (\hgcmd{update}) a la revisión con los nombres
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
325 que ya no generan conflictos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
326
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
327 El conjunto de cambios con los nombres con conflictos de
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
328 mayúsculas/minúsculas permanecerá en el historial de su proyecto, y
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
329 usted no podrá actualizar (\hgcmd{update}) su directorio de trabajo a
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
330 dicho conjunto de cambios en un sistema Windows o MacOS, pero puede
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
331 continuar el desarrollo sin impedimentos.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
332
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
333 \begin{note}
603
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
334 Antes de la versión~0.9.3, Mercurial no usaba un mecanismos seguro
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
335 frente a sensibilidad/insensibilidad a mayúsculas o minúsculas, y no
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
336 detectaba los conflictos con nombres de ficheros. Si usted está
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
337 usando una versión más antigua de Mercurial en Windows o MacOS, le
b8b121ed7551 finished filenames.tex
Javier Rojas <jerojasro@devnull.li>
parents: 533
diff changeset
338 recomiendo enérgicamente que se actualice.
501
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
339 \end{note}
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
340
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
341 %%% Local Variables:
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
342 %%% mode: latex
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
343 %%% TeX-master: "00book"
b05e35d641e4 Copying the files from en to es and taking intro chapter
Igor TAmara <igor@tamarapatino.org>
parents: 432
diff changeset
344 %%% End: