hgbook
changeset 431:f809de31887a
more translation :D
added a term to the glossary
added a term to the glossary
author | jerojasro@localhost |
---|---|
date | Sun Nov 30 18:41:51 2008 -0500 (2008-11-30) |
parents | 3afc654d70e5 |
children | 5da084395a69 |
files | es/Leame.1st es/filenames.tex |
line diff
1.1 --- a/es/Leame.1st Sat Nov 29 23:48:11 2008 -0500 1.2 +++ b/es/Leame.1st Sun Nov 30 18:41:51 2008 -0500 1.3 @@ -409,6 +409,8 @@ 1.4 principal del repositorio que no está asociada a ninguna rama 1.5 en particular. Traducción obtenida del manual de CVS en español. 1.6 1.7 +Unix-like systems -> sistemas tipo unix 1.8 + 1.9 URL -> No se traduce 1.10 1.11 working copy -> copia (de trabajo) local/activa
2.1 --- a/es/filenames.tex Sat Nov 29 23:48:11 2008 -0500 2.2 +++ b/es/filenames.tex Sun Nov 30 18:41:51 2008 -0500 2.3 @@ -30,118 +30,130 @@ 2.4 Los comandos de Mercurial que trabajan con nombres de fichero tienen 2.5 comportamientos por defecto adecuados cuando son utilizados sin pasar 2.6 ningún patrón o nombre de fichero. El tipo de comportamiento depende 2.7 -de lo que haga el comando. Aquí presento unas cuantas 2.8 -patterns. What kind of behaviour you should expect depends on what 2.9 -the command does. Here are a few rules of thumb you can use to 2.10 -predict what a command is likely to do if you don't give it any names 2.11 -to work with. 2.12 +de lo que haga el comando. Aquí presento unas cuantas reglas generales 2.13 +que usted puede usar para que es lo que probablemente hará un comando 2.14 +si usted no le pasa ningún nombre de fichero con el cual trabajar. 2.15 \begin{itemize} 2.16 -\item Most commands will operate on the entire working directory. 2.17 - This is what the \hgcmd{add} command does, for example. 2.18 -\item If the command has effects that are difficult or impossible to 2.19 - reverse, it will force you to explicitly provide at least one name 2.20 - or pattern (see below). This protects you from accidentally 2.21 - deleting files by running \hgcmd{remove} with no arguments, for 2.22 - example. 2.23 +\item Muchos comandos operarán sobre el directorio de trabajo 2.24 + completo. Por ejemplo, esto es lo que hace el comando 2.25 + \hgcmd{add}, 2.26 +\item Si el comando tiene efectos difíciles o incluso imposibles de 2.27 + revertir, se le obligará a usted a proveer explícitamente al menos 2.28 + % TODO revisar ese "lo proteje a usted" 2.29 + un nombre o patrón (ver más abajo). Esto lo proteje a usted de, 2.30 + por ejemplo, borrar ficheros accidentalmente al ejecutar 2.31 + \hgcmd{remove} sin ningún argumento. 2.32 \end{itemize} 2.33 2.34 -It's easy to work around these default behaviours if they don't suit 2.35 -you. If a command normally operates on the whole working directory, 2.36 -you can invoke it on just the current directory and its subdirectories 2.37 -by giving it the name ``\dirname{.}''. 2.38 + 2.39 +Es fácil evitar este comportamiento por defecto, si no es el adecuado 2.40 +para usted. Si un comando opera normalmente en todo el directorio de 2.41 +trabajo, usted puede llamarlo para que trabaje sólo en el directorio 2.42 +actual y sus subdirectorio pasándole el nombre ``\dirname{.}''. 2.43 \interaction{filenames.wdir-subdir} 2.44 2.45 -Along the same lines, some commands normally print file names relative 2.46 -to the root of the repository, even if you're invoking them from a 2.47 -subdirectory. Such a command will print file names relative to your 2.48 -subdirectory if you give it explicit names. Here, we're going to run 2.49 -\hgcmd{status} from a subdirectory, and get it to operate on the 2.50 -entire working directory while printing file names relative to our 2.51 -subdirectory, by passing it the output of the \hgcmd{root} command. 2.52 +Siguiendo la misma línea, algunos comandos normalmente imprimen las 2.53 +rutas de ficheros con respecto a la raíz del repositorio, aún si usted 2.54 +los llama dentro de un subdirectorio. Dichos comandos imprimirán las 2.55 +rutas de los ficheros respecto al directorio en que usted se encuentra 2.56 +si se les pasan nombres explícitos. Vamos a ejecutar el comando 2.57 +\hgcmd{status} desde un subdirectorio, y a hacer que opere en el 2.58 +directorio de trabajo completo, a la vez que todas las rutas de 2.59 +ficheros se imprimen respecto a nuestro subdirectorio, pasándole la 2.60 +salida del comando \hgcmd{root}. 2.61 \interaction{filenames.wdir-relname} 2.62 2.63 -\section{Telling you what's going on} 2.64 - 2.65 -The \hgcmd{add} example in the preceding section illustrates something 2.66 -else that's helpful about Mercurial commands. If a command operates 2.67 -on a file that you didn't name explicitly on the command line, it will 2.68 -usually print the name of the file, so that you will not be surprised 2.69 -what's going on. 2.70 - 2.71 -The principle here is of \emph{least surprise}. If you've exactly 2.72 -named a file on the command line, there's no point in repeating it 2.73 -back at you. If Mercurial is acting on a file \emph{implicitly}, 2.74 -because you provided no names, or a directory, or a pattern (see 2.75 -below), it's safest to tell you what it's doing. 2.76 - 2.77 -For commands that behave this way, you can silence them using the 2.78 -\hggopt{-q} option. You can also get them to print the name of every 2.79 -file, even those you've named explicitly, using the \hggopt{-v} 2.80 -option. 2.81 - 2.82 -\section{Using patterns to identify files} 2.83 - 2.84 -In addition to working with file and directory names, Mercurial lets 2.85 -you use \emph{patterns} to identify files. Mercurial's pattern 2.86 -handling is expressive. 2.87 - 2.88 -On Unix-like systems (Linux, MacOS, etc.), the job of matching file 2.89 -names to patterns normally falls to the shell. On these systems, you 2.90 -must explicitly tell Mercurial that a name is a pattern. On Windows, 2.91 -the shell does not expand patterns, so Mercurial will automatically 2.92 -identify names that are patterns, and expand them for you. 2.93 - 2.94 -To provide a pattern in place of a regular name on the command line, 2.95 -the mechanism is simple: 2.96 +\section{Reportar que está pasando} 2.97 + 2.98 +El ejemplo con el comando \hgcmd{add} en la sección anterior ilustra 2.99 +algo más que es útil acerca de los comandos de Mercurial. Si un 2.100 +comando opera en un fichero que usted no pasó explícitamente en la 2.101 +línea de comandos, usualmente se imprimirá el nombre del fichero, para 2.102 +que usted no sea sorprendido por lo que sucede. 2.103 + 2.104 +Esto es el principio de \emph{mínima sorpresa}. Si usted se ha 2.105 +referido explícitamente a un fichero en la línea de comandos, no tiene 2.106 +mucho sentido repetir esto de vuelta a usted. Si Mercurial está 2.107 +actuando en un fichero \emph{implícitamente}, porque usted no pasó 2.108 +nombres, ni directorios, ni patrones (ver más abajo), lo más seguro es 2.109 +decirle a usted qué se está haciendo. 2.110 + 2.111 +Usted puede silenciar a los comandos que se comportan de esta manera 2.112 +usando la opción \hggopt{-q}. También puede hacer que impriman el 2.113 +nombre de cada fichero, aún aquellos que usted indicó explícitamente, 2.114 +usando la opción \hggopt{-v}. 2.115 + 2.116 +\section{Uso de patrones para identificar ficheros} 2.117 + 2.118 +Además de trabajar con nombres de ficheros y directorios, Mercurial le 2.119 +permite usar \emph{patrones} para identificar ficheros. El manejo de 2.120 +patrones de Mercurial es expresivo. 2.121 + 2.122 +En sistemas tipo Unix (Linux, MacOS, etc.), el trabajo de asociar 2.123 +patrones con nombres de ficheros recae sobre el intérprete de comandos. 2.124 +En estos sistemas, usted debe indicarle explícitamente a Mercurial que 2.125 +el nombre que se le pasa es un patrón. En Windows, el intérprete no 2.126 +expande los patrones, así que Mercurial identificará automáticamente 2.127 +los nombres que son patrones, y hará la expansión necesaria. 2.128 + 2.129 +Para pasar un patrón en vez de un nombre normal en la línea de 2.130 +comandos, el mecanismo es simple: 2.131 \begin{codesample2} 2.132 syntax:patternbody 2.133 \end{codesample2} 2.134 -That is, a pattern is identified by a short text string that says what 2.135 -kind of pattern this is, followed by a colon, followed by the actual 2.136 -pattern. 2.137 - 2.138 -Mercurial supports two kinds of pattern syntax. The most frequently 2.139 -used is called \texttt{glob}; this is the same kind of pattern 2.140 -matching used by the Unix shell, and should be familiar to Windows 2.141 -command prompt users, too. 2.142 - 2.143 -When Mercurial does automatic pattern matching on Windows, it uses 2.144 -\texttt{glob} syntax. You can thus omit the ``\texttt{glob:}'' prefix 2.145 -on Windows, but it's safe to use it, too. 2.146 - 2.147 -The \texttt{re} syntax is more powerful; it lets you specify patterns 2.148 -using regular expressions, also known as regexps. 2.149 - 2.150 -By the way, in the examples that follow, notice that I'm careful to 2.151 -wrap all of my patterns in quote characters, so that they won't get 2.152 -expanded by the shell before Mercurial sees them. 2.153 - 2.154 -\subsection{Shell-style \texttt{glob} patterns} 2.155 - 2.156 -This is an overview of the kinds of patterns you can use when you're 2.157 -matching on glob patterns. 2.158 - 2.159 -The ``\texttt{*}'' character matches any string, within a single 2.160 -directory. 2.161 +Un patrón es identificado por una cadena de texto corta que indica qué 2.162 +tipo de patrón es, seguido por un dos puntos, seguido por el patrón en 2.163 +sí. 2.164 + 2.165 +Mercurial soporta dos tipos de sintaxis para patrones. La que se usa 2.166 +con más frecuencia se denomina \texttt{glob}\ndt{Grupo, colección, 2.167 +aglomeración.}; es el mismo tipo de asociación de patrones usado por 2.168 +el intérprete de Unix, y también debería ser familiar para los 2.169 +usuarios de la línea de comandos de Windows. 2.170 + 2.171 +Cuando Mercurial hace asociación automática de patrones en Windows, 2.172 +usa la sintaxis \texttt{glob}. Por esto, usted puede omitir el 2.173 +prefijo ``\texttt{glob:}'' en Windows, pero también es seguro usarlo. 2.174 + 2.175 +La sintaxis \texttt{re}\ndt{Expresiones regulares.} es más poderosa; 2.176 +le permite especificar patrones usando expresiones regulares, también 2.177 +conocidas como regexps. 2.178 + 2.179 +A propósito, en los ejemplos siguientes, por favor note que yo tengo 2.180 +el cuidado de rodear todos mis patrones con comillas sencillas, para 2.181 +que no sean expandidos por el intérprete antes de que Mercurial pueda 2.182 +verlos. 2.183 + 2.184 +\subsection{Patrones \texttt{glob} estilo intérprete} 2.185 + 2.186 +Este es un vistazo general de los tipos de patrones que usted puede 2.187 +usar cuando está usando asociación con patrone glob. 2.188 + 2.189 +La secuencia ``\texttt{*}'' se asocia con cualquier cadena, dentro de 2.190 +un único directorio. 2.191 \interaction{filenames.glob.star} 2.192 2.193 -The ``\texttt{**}'' pattern matches any string, and crosses directory 2.194 -boundaries. It's not a standard Unix glob token, but it's accepted by 2.195 -several popular Unix shells, and is very useful. 2.196 +La secuencia ``\texttt{**}'' se asocia con cualquier cadena, y cruza los 2.197 +% TODO token 2.198 +límites de los directorios. No es una elemento estándar de los tokens 2.199 +de glob de Unix, pero es aceptado por varios intérpretes Unix 2.200 +populares, y es muy útil. 2.201 \interaction{filenames.glob.starstar} 2.202 2.203 -The ``\texttt{?}'' pattern matches any single character. 2.204 +La secuencia ``\texttt{?}'' se asocia con cualquier caracter sencillo. 2.205 \interaction{filenames.glob.question} 2.206 2.207 -The ``\texttt{[}'' character begins a \emph{character class}. This 2.208 -matches any single character within the class. The class ends with a 2.209 -``\texttt{]}'' character. A class may contain multiple \emph{range}s 2.210 -of the form ``\texttt{a-f}'', which is shorthand for 2.211 +El caracter ``\texttt{[}'' marca el inicio de una \emph{clase de 2.212 +caracteres}. Ella se asocia con cualquier caracter sencillo dentro de 2.213 +la clase. La clase se finaliza con un caracter ``\texttt{]}''. Una 2.214 +clase puede contener múltiples \emph{rango}s de la forma 2.215 +``\texttt{a-f}'', que en este caso es una abreviación para 2.216 ``\texttt{abcdef}''. 2.217 \interaction{filenames.glob.range} 2.218 -If the first character after the ``\texttt{[}'' in a character class 2.219 -is a ``\texttt{!}'', it \emph{negates} the class, making it match any 2.220 -single character not in the class. 2.221 +Si el primer caracter en aparecer después de ``\texttt{[}'' en la 2.222 +clase de caracteres es un ``\texttt{!}'', se \emph{niega} la clase, 2.223 +haciendo que se asocie con cualquier caracter sencillo que no se 2.224 +encuentre en la clase. 2.225 2.226 A ``\texttt{\{}'' begins a group of subpatterns, where the whole group 2.227 matches if any subpattern in the group matches. The ``\texttt{,}''